Add QPalete and QWidget.backgroundRole

parent 62f30ffa
......@@ -87,6 +87,7 @@ executable qtah-generator
, Graphics.UI.Qtah.Generator.Interface.Core.QTimerEvent
, Graphics.UI.Qtah.Generator.Interface.Core.QVariant
, Graphics.UI.Qtah.Generator.Interface.Core.QVector
, Graphics.UI.Qtah.Generator.Interface.Core.QPalette
, Graphics.UI.Qtah.Generator.Interface.Core.Types
, Graphics.UI.Qtah.Generator.Interface.Gui
, Graphics.UI.Qtah.Generator.Interface.Gui.QActionEvent
......
......@@ -35,6 +35,7 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Core.QMargins as QMargins
import qualified Graphics.UI.Qtah.Generator.Interface.Core.QMarginsF as QMarginsF
import qualified Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex as QModelIndex
import qualified Graphics.UI.Qtah.Generator.Interface.Core.QObject as QObject
import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPalette as QPalette
import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPersistentModelIndex as QPersistentModelIndex
import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPoint as QPoint
import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPointF as QPointF
......@@ -76,6 +77,7 @@ modules =
, QMarginsF.aModule
, QModelIndex.aModule
, QObject.aModule
, QPalette.aModule
, QPersistentModelIndex.aModule
, QPoint.aModule
, QPointF.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/>.
-- | Top-level bindings and bindings in the @Qt::@ namespace.
module Graphics.UI.Qtah.Generator.Interface.Core.QPalette (
aModule,
e_ColorRole
) where
import Foreign.Hoppy.Generator.Spec
(Export(ExportBitspace, ExportEnum, ExportFn), Include, ident1, includeStd)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Module (AModule(AQtModule), makeQtModule)
import Graphics.UI.Qtah.Generator.Types
{-# ANN module "HLint: ignore Use camelCase" #-}
qPaletteInclude :: [Include]
qPaletteInclude = [includeStd "Qt", includeStd "QPalette"]
aModule :: AModule
aModule = AQtModule $ makeQtModule ["Core", "QPalette"] exports
exports :: [QtExport]
exports =
QtExportSpecials :
(map QtExport . collect)
[ just $ ExportEnum e_ColorRole
]
e_ColorRole =
makeQtEnum (ident1 "QPalette" "ColorRole") qPaletteInclude
[ (10, ["window"])
, (10, ["background"])
, (0, ["window", "text"])
, (0, ["foreground"])
, (9, ["base"])
, (16, ["alternate", "base"])
, (18, ["tool", "tip", "base"])
, (19, ["tool", "tip", "text"])
, (6, ["text"])
, (1, ["button"])
, (8, ["button", "text"])
, (7, ["bright", "text"])
]
......@@ -54,6 +54,9 @@ import Graphics.UI.Qtah.Generator.Interface.Core.Types (
e_WindowType,
qreal,
)
import Graphics.UI.Qtah.Generator.Interface.Core.QPalette (
e_ColorRole
)
import Graphics.UI.Qtah.Generator.Interface.Gui.QFont (c_QFont)
import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)
import Graphics.UI.Qtah.Generator.Interface.Gui.QPaintDevice (c_QPaintDevice)
......@@ -94,7 +97,7 @@ c_QWidget =
-- TODO addActions
, just $ mkMethod "adjustSize" [] voidT
, just $ mkConstMethod "autoFillBackground" [] boolT
-- TODO backgroundRole
, just $ mkProp "backgroundRole" $ enumT e_ColorRole
, just $ mkConstMethod "baseSize" [] $ objT c_QSize
, just $ mkConstMethod' "childAt" "childAtRaw" [intT, intT] $ ptrT $ objT c_QWidget
, just $ mkConstMethod' "childAt" "childAtPoint" [objT c_QPoint] $ ptrT $ objT c_QWidget
......
......@@ -57,6 +57,7 @@ library
, Graphics.UI.Qtah.Core.QMarginsF
, Graphics.UI.Qtah.Core.QModelIndex
, Graphics.UI.Qtah.Core.QObject
, Graphics.UI.Qtah.Core.QPalette
, Graphics.UI.Qtah.Core.QPersistentModelIndex
, Graphics.UI.Qtah.Core.QPoint
, Graphics.UI.Qtah.Core.QPointF
......@@ -224,6 +225,7 @@ library
, Graphics.UI.Qtah.Generated.Core.QMarginsF
, Graphics.UI.Qtah.Generated.Core.QModelIndex
, Graphics.UI.Qtah.Generated.Core.QObject
, Graphics.UI.Qtah.Generated.Core.QPalette
, Graphics.UI.Qtah.Generated.Core.QPersistentModelIndex
, Graphics.UI.Qtah.Generated.Core.QPoint
, Graphics.UI.Qtah.Generated.Core.QPointF
......
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