Verified Commit 13c49236 authored by Bryan Gardiner's avatar Bryan Gardiner

Merge branch 'maksbotan-sep-19-pr' (MR !15)

!15
parents 8819c32d 0d1ba7b3
......@@ -107,6 +107,7 @@ executable qtah-generator
, Graphics.UI.Qtah.Generator.Interface.Gui.QExposeEvent
, Graphics.UI.Qtah.Generator.Interface.Gui.QFocusEvent
, Graphics.UI.Qtah.Generator.Interface.Gui.QFont
, Graphics.UI.Qtah.Generator.Interface.Gui.QFontDatabase
, Graphics.UI.Qtah.Generator.Interface.Gui.QHideEvent
, Graphics.UI.Qtah.Generator.Interface.Gui.QHoverEvent
, Graphics.UI.Qtah.Generator.Interface.Gui.QIcon
......@@ -156,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
......
......@@ -168,6 +168,7 @@ e_Type =
, (131, ["parent", "about", "to", "change"])
, (21, ["parent", "change"])
, (212, ["platform", "panel"])
, (217, ["platform", "surface"])
, (75, ["polish"])
, (74, ["polish", "request"])
, (123, ["query", "whats", "this"])
......
......@@ -28,6 +28,7 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QEnterEvent as QEnterE
import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QExposeEvent as QExposeEvent
import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QFocusEvent as QFocusEvent
import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QFont as QFont
import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QFontDatabase as QFontDatabase
import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QHideEvent as QHideEvent
import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QHoverEvent as QHoverEvent
import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QIcon as QIcon
......@@ -74,6 +75,7 @@ modules =
, QExposeEvent.aModule
, QFocusEvent.aModule
, QFont.aModule
, QFontDatabase.aModule
, QHideEvent.aModule
, QHoverEvent.aModule
, QIcon.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.Gui.QFontDatabase (
aModule,
c_QFontDatabase,
) where
import Foreign.Hoppy.Generator.Spec (
Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
mkStaticMethod
)
import Foreign.Hoppy.Generator.Types (intT, objT)
import Foreign.Hoppy.Generator.Version (collect, just)
import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)
import Graphics.UI.Qtah.Generator.Types
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
{-# ANN module "HLint: ignore Use camelCase" #-}
aModule =
AQtModule $
makeQtModule ["Gui", "QFontDatabase"]
[ QtExport $ ExportClass c_QFontDatabase
]
c_QFontDatabase =
addReqIncludes [includeStd "QFontDatabase"] $
classSetEntityPrefix "" $
makeClass (ident "QFontDatabase") Nothing [] $
collect
[ just $ mkStaticMethod "addApplicationFont" [objT c_QString] intT
]
-- TODO The rest of QFontDatabase.
......@@ -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 (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)
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
]
......@@ -71,6 +71,7 @@ import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (
)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayout (c_QLayout)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QSizePolicy (c_QSizePolicy, e_Policy)
import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)
import Graphics.UI.Qtah.Generator.Types
......@@ -276,7 +277,7 @@ c_QWidget =
-- TODO setShortcutEnabled
, just $ mkMethod' "setSizeIncrement" "setSizeIncrement" [objT c_QSize] voidT
, just $ mkMethod' "setSizeIncrement" "setSizeIncrementRaw" [intT, intT] voidT
-- TODO setSizePolicy
, just $ mkMethod' "setSizePolicy" "setSizePolicyRaw" [enumT e_Policy, enumT e_Policy] voidT
, just $ mkMethod "setStatusTip" [objT c_QString] voidT
-- TODO setStyle
, just $ mkMethod "setStyleSheet" [objT c_QString] voidT
......@@ -299,7 +300,7 @@ c_QWidget =
, just $ mkConstMethod "size" [] $ objT c_QSize
, just $ mkConstMethod "sizeHint" [] $ objT c_QSize
, just $ mkConstMethod "sizeIncrement" [] $ objT c_QSize
-- TODO sizePolicy
, just $ mkProp "sizePolicy" $ objT c_QSizePolicy
, just $ mkMethod "stackUnder" [ptrT $ objT c_QWidget] voidT
, just $ mkConstMethod "statusTip" [] $ objT c_QString
, just $ mkConstMethod "styleSheet" [] $ objT c_QString
......
......@@ -97,6 +97,7 @@ library
, Graphics.UI.Qtah.Gui.QExposeEvent
, Graphics.UI.Qtah.Gui.QFocusEvent
, Graphics.UI.Qtah.Gui.QFont
, Graphics.UI.Qtah.Gui.QFontDatabase
, Graphics.UI.Qtah.Gui.QHideEvent
, Graphics.UI.Qtah.Gui.QHoverEvent
, Graphics.UI.Qtah.Gui.QIcon
......@@ -145,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
......@@ -271,6 +273,7 @@ library
, Graphics.UI.Qtah.Generated.Gui.QExposeEvent
, Graphics.UI.Qtah.Generated.Gui.QFocusEvent
, Graphics.UI.Qtah.Generated.Gui.QFont
, Graphics.UI.Qtah.Generated.Gui.QFontDatabase
, Graphics.UI.Qtah.Generated.Gui.QHideEvent
, Graphics.UI.Qtah.Generated.Gui.QHoverEvent
, Graphics.UI.Qtah.Generated.Gui.QIcon
......@@ -316,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