Add QComboBox module

parent 0468db5a
......@@ -157,6 +157,7 @@ executable qtah-generator
, Graphics.UI.Qtah.Generator.Interface.Widgets.QBoxLayout
, Graphics.UI.Qtah.Generator.Interface.Widgets.QButtonGroup
, Graphics.UI.Qtah.Generator.Interface.Widgets.QCheckBox
, Graphics.UI.Qtah.Generator.Interface.Widgets.QComboBox
, Graphics.UI.Qtah.Generator.Interface.Widgets.QDateEdit
, Graphics.UI.Qtah.Generator.Interface.Widgets.QDateTimeEdit
, Graphics.UI.Qtah.Generator.Interface.Widgets.QDial
......
......@@ -30,6 +30,7 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QApplication as QA
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QBoxLayout as QBoxLayout
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QButtonGroup as QButtonGroup
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QCheckBox as QCheckBox
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QComboBox as QComboBox
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QDateEdit as QDateEdit
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QDateTimeEdit as QDateTimeEdit
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QDial as QDial
......@@ -107,6 +108,7 @@ modules =
, QBoxLayout.aModule
, QButtonGroup.aModule
, QCheckBox.aModule
, QComboBox.aModule
, QDateEdit.aModule
, QDateTimeEdit.aModule
, QDial.aModule
......
-- This file is part of Qtah.
--
-- Copyright 2015-2018 The Qtah Authors.
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
module Graphics.UI.Qtah.Generator.Interface.Widgets.QComboBox (
aModule,
) where
import Foreign.Hoppy.Generator.Spec (
Export (ExportEnum, ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
mkCtor,
mkMethod,
mkMethod',
mkProp
)
import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, voidT)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
import Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant)
import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)
import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (
c_ListenerInt,
c_ListenerQString,
)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)
import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)
import Graphics.UI.Qtah.Generator.Types
{-# ANN module "HLint: ignore Use camelCase" #-}
aModule =
AQtModule $
makeQtModule ["Widgets", "QComboBox"] $
QtExport (ExportClass c_QComboBox) :
map QtExportSignal signals
c_QComboBox =
addReqIncludes [includeStd "QComboBox"] $
classSetEntityPrefix "" $
makeClass (ident "QComboBox") Nothing [c_QWidget] $
collect
[ just $ mkCtor "new" []
, just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]
, just $ mkMethod "addItem" [objT c_QString] voidT
, just $ mkMethod' "addItem" "addItemWithData" [objT c_QString, objT c_QVariant] voidT
, just $ mkMethod' "addItem" "addItemWithIcon" [objT c_QIcon, objT c_QString] voidT
, just $ mkMethod' "addItem" "addItemWithIconAndData" [objT c_QIcon, objT c_QString, objT c_QVariant] voidT
, just $ mkProp "currentIndex" intT
, just $ mkProp "currentText" $ objT c_QString
]
signals =
[ makeSignal c_QComboBox "activated" c_ListenerInt
, makeSignal' c_QComboBox "activated" "activatedString" c_ListenerQString
, makeSignal c_QComboBox "currentIndexChanged" c_ListenerInt
, makeSignal' c_QComboBox "currentIndexChanged" "currentIndexChangedString" c_ListenerQString
]
......@@ -146,6 +146,7 @@ library
, Graphics.UI.Qtah.Widgets.QBoxLayout
, Graphics.UI.Qtah.Widgets.QButtonGroup
, Graphics.UI.Qtah.Widgets.QCheckBox
, Graphics.UI.Qtah.Widgets.QComboBox
, Graphics.UI.Qtah.Widgets.QDateEdit
, Graphics.UI.Qtah.Widgets.QDateTimeEdit
, Graphics.UI.Qtah.Widgets.QDial
......@@ -318,6 +319,7 @@ library
, Graphics.UI.Qtah.Generated.Widgets.QBoxLayout
, Graphics.UI.Qtah.Generated.Widgets.QButtonGroup
, Graphics.UI.Qtah.Generated.Widgets.QCheckBox
, Graphics.UI.Qtah.Generated.Widgets.QComboBox
, Graphics.UI.Qtah.Generated.Widgets.QDateEdit
, Graphics.UI.Qtah.Generated.Widgets.QDateTimeEdit
, Graphics.UI.Qtah.Generated.Widgets.QDial
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment