Fill out QBrush.

parent 9458720e
......@@ -22,6 +22,7 @@ module Graphics.UI.Qtah.Generator.Interface.Core.Types (
e_AlignmentFlag,
bs_Alignment,
e_AspectRatioMode,
e_BrushStyle,
e_CaseSensitivity,
e_CheckState,
e_Corner,
......@@ -93,6 +94,7 @@ exports =
[ just $ ExportEnum e_AlignmentFlag
, just $ ExportBitspace bs_Alignment
, just $ ExportEnum e_AspectRatioMode
, just $ ExportEnum e_BrushStyle
, just $ ExportEnum e_CaseSensitivity
, just $ ExportEnum e_CheckState
, just $ ExportEnum e_Corner
......@@ -160,6 +162,29 @@ e_AspectRatioMode =
, (2, ["keep", "aspect", "ratio", "by", "expanding"])
]
e_BrushStyle =
makeQtEnum (ident1 "Qt" "BrushStyle") qtInclude
[ (0, ["no", "brush"])
, (1, ["solid", "pattern"])
, (2, ["dense", "1", "pattern"])
, (3, ["dense", "2", "pattern"])
, (4, ["dense", "3", "pattern"])
, (5, ["dense", "4", "pattern"])
, (6, ["dense", "5", "pattern"])
, (7, ["dense", "6", "pattern"])
, (8, ["dense", "7", "pattern"])
, (9, ["hor", "pattern"])
, (10, ["ver", "pattern"])
, (11, ["cross", "pattern"])
, (12, ["b", "diag", "pattern"])
, (13, ["f", "diag", "pattern"])
, (14, ["diag", "cross", "pattern"])
, (15, ["linear", "gradient", "pattern"])
, (16, ["radial", "gradient", "pattern"])
, (17, ["conical", "gradient", "pattern"])
, (24, ["texture", "pattern"])
]
e_CaseSensitivity =
makeQtEnum (ident1 "Qt" "CaseSensitivity") qtInclude
[ (0, ["case", "insensitive"])
......
......@@ -28,14 +28,20 @@ import Foreign.Hoppy.Generator.Spec (
ident,
includeStd,
makeClass,
mkConstMethod,
mkCtor,
mkMethod,
mkMethod',
mkProp,
)
import Foreign.Hoppy.Generator.Spec.ClassFeature (
ClassFeature (Assignable, Copyable, Equatable),
classAddFeatures,
)
import Foreign.Hoppy.Generator.Types (objT)
import Foreign.Hoppy.Generator.Types (boolT, constT, enumT, objT, refT, voidT)
import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_BrushStyle, e_GlobalColor)
import Graphics.UI.Qtah.Generator.Interface.Gui.QColor (c_QColor)
import Graphics.UI.Qtah.Generator.Interface.Gui.QTransform (c_QTransform)
import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)
import Graphics.UI.Qtah.Generator.Types
......@@ -54,5 +60,14 @@ c_QBrush =
makeClass (ident "QBrush") Nothing [] $
[ mkCtor "new" []
, mkCtor "newWithColor" [objT c_QColor]
, mkProp "color" $ objT c_QColor
-- TODO mkConstMethod "gradient" [] $ ptrT $ constT $ objT c_QGradient
, mkConstMethod "isOpaque" [] boolT
-- TODO mkProp "matrix" $ objT c_QMatrix
, mkMethod' "setColor" "setGlobalColor" [enumT e_GlobalColor] voidT
, mkProp "style" $ enumT e_BrushStyle
, mkMethod "swap" [refT $ objT c_QBrush] voidT
-- TODO mkProp "texture" $ objT c_QPixmap
-- TODO mkProp "textureImage" $ objT c_QImage
, mkProp "transform" $ objT c_QTransform
]
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