module Graphics.UI.Qtah.Generator.Interface.Gui.QPen (
aModule,
c_QPen,
) where
import Foreign.Hoppy.Generator.Spec (
addReqIncludes,
classSetConversionToGc,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
mkBoolIsProp,
mkCtor,
mkMethod,
mkProp,
np,
)
import Foreign.Hoppy.Generator.Spec.ClassFeature (
ClassFeature (Assignable, Copyable, Equatable),
classAddFeatures,
)
import Foreign.Hoppy.Generator.Types (enumT, intT, objT, refT, voidT)
import Graphics.UI.Qtah.Generator.Interface.Core.Types (
e_PenCapStyle,
e_PenJoinStyle,
e_PenStyle,
qreal,
)
import Graphics.UI.Qtah.Generator.Interface.Gui.QBrush (c_QBrush)
import Graphics.UI.Qtah.Generator.Interface.Gui.QColor (c_QColor)
import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)
import Graphics.UI.Qtah.Generator.Types
{-# ANN module "HLint: ignore Use camelCase" #-}
aModule :: AModule
aModule =
QtModule -> AModule
AQtModule (QtModule -> AModule) -> QtModule -> AModule
forall a b. (a -> b) -> a -> b
$
[String] -> [QtExport] -> QtModule
makeQtModule [String
"Gui", String
"QPen"]
[ Class -> QtExport
forall a. Exportable a => a -> QtExport
qtExport Class
c_QPen ]
c_QPen :: Class
c_QPen =
[Include] -> Class -> Class
forall a. HasReqs a => [Include] -> a -> a
addReqIncludes [String -> Include
includeStd String
"QPen"] (Class -> Class) -> Class -> Class
forall a b. (a -> b) -> a -> b
$
Class -> Class
classSetConversionToGc (Class -> Class) -> Class -> Class
forall a b. (a -> b) -> a -> b
$
[ClassFeature] -> Class -> Class
classAddFeatures [ClassFeature
Assignable, ClassFeature
Copyable, ClassFeature
Equatable] (Class -> Class) -> Class -> Class
forall a b. (a -> b) -> a -> b
$
String -> Class -> Class
classSetEntityPrefix String
"" (Class -> Class) -> Class -> Class
forall a b. (a -> b) -> a -> b
$
Identifier -> Maybe ExtName -> [Class] -> [ClassEntity] -> Class
makeClass (String -> Identifier
ident String
"QPen") Maybe ExtName
forall a. Maybe a
Nothing []
[ String -> [Parameter] -> ClassEntity
forall p. IsParameter p => String -> [p] -> ClassEntity
mkCtor String
"new" [Parameter]
np
, String -> [Type] -> ClassEntity
forall p. IsParameter p => String -> [p] -> ClassEntity
mkCtor String
"newWithColor" [Class -> Type
objT Class
c_QColor]
, String -> Type -> ClassEntity
mkProp String
"brush" (Type -> ClassEntity) -> Type -> ClassEntity
forall a b. (a -> b) -> a -> b
$ Class -> Type
objT Class
c_QBrush
, String -> Type -> ClassEntity
mkProp String
"capStyle" (Type -> ClassEntity) -> Type -> ClassEntity
forall a b. (a -> b) -> a -> b
$ CppEnum -> Type
enumT CppEnum
e_PenCapStyle
, String -> Type -> ClassEntity
mkProp String
"color" (Type -> ClassEntity) -> Type -> ClassEntity
forall a b. (a -> b) -> a -> b
$ Class -> Type
objT Class
c_QColor
, String -> ClassEntity
mkBoolIsProp String
"cosmetic"
, String -> Type -> ClassEntity
mkProp String
"dashOffset" Type
qreal
, String -> Type -> ClassEntity
mkProp String
"joinStyle" (Type -> ClassEntity) -> Type -> ClassEntity
forall a b. (a -> b) -> a -> b
$ CppEnum -> Type
enumT CppEnum
e_PenJoinStyle
, String -> Type -> ClassEntity
mkProp String
"miterLimit" Type
qreal
, String -> Type -> ClassEntity
mkProp String
"style" (Type -> ClassEntity) -> Type -> ClassEntity
forall a b. (a -> b) -> a -> b
$ CppEnum -> Type
enumT CppEnum
e_PenStyle
, String -> [Type] -> Type -> ClassEntity
forall name p.
(IsFnName String name, IsParameter p) =>
name -> [p] -> Type -> ClassEntity
mkMethod String
"swap" [Type -> Type
refT (Type -> Type) -> Type -> Type
forall a b. (a -> b) -> a -> b
$ Class -> Type
objT Class
c_QPen] Type
voidT
, String -> Type -> ClassEntity
mkProp String
"width" Type
intT
, String -> Type -> ClassEntity
mkProp String
"widthF" Type
qreal
]