Clean up imports and long lines.

parent 728d3308
......@@ -20,22 +20,18 @@ module Graphics.UI.Qtah.Generator.Interface.Core.QDate (
c_QDate,
) where
import Data.Bits ((.|.))
import Foreign.Hoppy.Generator.Spec (
Export (ExportBitspace, ExportEnum, ExportClass),
Operator (OpArray, OpNe),
Export (ExportClass),
addReqIncludes,
classSetConversionToGc,
classSetEntityPrefix,
ident,
ident1,
includeStd,
makeClass,
mkConstMethod,
mkConstMethod',
mkCtor,
mkMethod,
mkProp,
mkStaticMethod,
mkStaticMethod',
)
......@@ -44,11 +40,10 @@ import Foreign.Hoppy.Generator.Spec.ClassFeature (
classAddFeatures,
)
import Foreign.Hoppy.Generator.Types (
bitspaceT, boolT, intT, int64T, objT, refT, voidT,
boolT, intT, int64T, objT,
)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)
import Graphics.UI.Qtah.Generator.Types
......@@ -81,7 +76,8 @@ c_QDate =
, just $ mkConstMethod "daysInMonth" [] intT
, just $ mkConstMethod "daysInYear" [] intT
, just $ mkConstMethod "daysTo" [objT c_QDate] int64T
-- TODO test (qtVersion >= [4, 5]) $ mkConstMethod "getDate" (intT *year, intT *month, intT *day) voidT
-- TODO test (qtVersion >= [4, 5]) $ mkConstMethod "getDate"
-- (intT *year, intT *month, intT *day) voidT
, just $ mkConstMethod "isNull" [] boolT
, just $ mkConstMethod "isValid" [] boolT
, just $ mkConstMethod "month" [] intT
......@@ -90,18 +86,23 @@ c_QDate =
, just $ mkConstMethod'
"toString" "toStringWithStringFormat" [objT c_QString] (objT c_QString)
, just $ mkConstMethod "toString" [] (objT c_QString)
-- TODO just $ mkConstMethod' "toString" "toStringWithDateFormat" [DateFormat] (objT c_QString)
-- TODO just $ mkConstMethod' "toString" "toStringWithStringViewFormat" [objT c_QStringView] (objT c_QString)
-- TODO just $ mkConstMethod' "toString" "toStringWithDateFormat"
-- [DateFormat] (objT c_QString)
-- TODO just $ mkConstMethod' "toString" "toStringWithStringViewFormat"
-- [objT c_QStringView] (objT c_QString)
, just $ mkConstMethod "weekNumber" [] intT
-- TODO just $ mkConstMethod' "weekNumber" "weekNumberWithYearNumber" (intT *yearNumber = Q_NULLPTR) intT
-- TODO just $ mkConstMethod' "weekNumber" "weekNumberWithYearNumber"
-- (intT *yearNumber = Q_NULLPTR) intT
, just $ mkConstMethod "year" [] intT
-- Static Public Members
, just $ mkStaticMethod "currentDate" [] (objT c_QDate)
, just $ mkStaticMethod "fromJulianDay" [int64T] (objT c_QDate)
, just $ mkStaticMethod "fromString" [objT c_QString] (objT c_QDate)
-- TODO just $ mkStaticMethod' "fromString" "fromStringWithDateFormat" [objT c_QString, Qt::DateFormat] (objT c_QDate)
, just $ mkStaticMethod' "fromString" "fromStringWithStringFormat" [objT c_QString, objT c_QString] (objT c_QDate)
-- TODO just $ mkStaticMethod' "fromString" "fromStringWithDateFormat"
-- [objT c_QString, Qt::DateFormat] (objT c_QDate)
, just $ mkStaticMethod' "fromString" "fromStringWithStringFormat"
[objT c_QString, objT c_QString] (objT c_QDate)
, just $ mkStaticMethod "isLeapYear" [intT] boolT
, just $ mkStaticMethod' "isValid" "isValidYMD" [intT, intT, intT] boolT
]
......@@ -19,55 +19,51 @@ module Graphics.UI.Qtah.Generator.Interface.Core.QSettings (
aModule,
) where
import Foreign.Hoppy.Generator.Spec (Class, Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
mkConstMethod,
mkConstMethod',
mkCtor,
mkMethod)
import Foreign.Hoppy.Generator.Types (intT, objT,
ptrT,
voidT)
import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent)
import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)
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.Module (AModule (AQtModule),
makeQtModule)
import Graphics.UI.Qtah.Generator.Types
import Foreign.Hoppy.Generator.Spec (
Class,
Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
mkConstMethod,
mkConstMethod',
mkCtor,
mkMethod,
)
import Foreign.Hoppy.Generator.Types (objT, ptrT, voidT)
import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)
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.Module (AModule (AQtModule), makeQtModule)
import Graphics.UI.Qtah.Generator.Types
{-# ANN module "HLint: ignore Use camelCase" #-}
aModule :: AModule
aModule = AQtModule
$ makeQtModule ["Core", "QSettings"] [QtExport $ ExportClass c_QSettings]
aModule =
AQtModule $
makeQtModule ["Core", "QSettings"]
[QtExport $ ExportClass c_QSettings]
c_QSettings :: Class
c_QSettings =
addReqIncludes [includeStd "QSettings"] $ classSetEntityPrefix "" $ makeClass
(ident "QSettings")
Nothing
[c_QObject]
[ mkCtor "new" []
, mkCtor "newWithOrganization" [objT c_QString]
, mkCtor "newWithOrganizationAndApplication"
[objT c_QString, objT c_QString]
, mkCtor "newWithOrganizationAndApplicationAndParent"
[objT c_QString, objT c_QString, ptrT $ objT c_QObject]
, mkCtor "newWithParent" [ptrT $ objT c_QObject]
-- TODO QSettings(Scope scope, const QString &organization,
-- const QString &application = QString(), QObject *parent = Q_NULLPTR)
-- TODO QSettings(Format format, Scope scope, const QString &organization,
-- const QString &application = QString(), QObject *parent = Q_NULLPTR)
-- TODO QSettings(const QString &fileName, Format format, QObject *parent = Q_NULLPTR)
, mkMethod "setValue" [objT c_QString, objT c_QVariant] voidT
, mkConstMethod "value" [objT c_QString] (objT c_QVariant)
, mkConstMethod' "value"
"valueWithDefault"
[objT c_QString, objT c_QVariant]
(objT c_QVariant)
]
addReqIncludes [includeStd "QSettings"] $
classSetEntityPrefix "" $
makeClass (ident "QSettings") Nothing [c_QObject]
[ mkCtor "new" []
, mkCtor "newWithOrganization" [objT c_QString]
, mkCtor "newWithOrganizationAndApplication" [objT c_QString, objT c_QString]
, mkCtor "newWithOrganizationAndApplicationAndParent"
[objT c_QString, objT c_QString, ptrT $ objT c_QObject]
, mkCtor "newWithParent" [ptrT $ objT c_QObject]
-- TODO QSettings(Scope scope, const QString &organization,
-- const QString &application = QString(), QObject *parent = Q_NULLPTR)
-- TODO QSettings(Format format, Scope scope, const QString &organization,
-- const QString &application = QString(), QObject *parent = Q_NULLPTR)
-- TODO QSettings(const QString &fileName, Format format, QObject *parent = Q_NULLPTR)
, mkMethod "setValue" [objT c_QString, objT c_QVariant] voidT
, mkConstMethod "value" [objT c_QString] (objT c_QVariant)
, mkConstMethod' "value" "valueWithDefault" [objT c_QString, objT c_QVariant] (objT c_QVariant)
]
......@@ -21,47 +21,14 @@ module Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractItemDelegate (
) where
import Foreign.Hoppy.Generator.Spec (
Export (ExportBitspace, ExportEnum, ExportClass),
Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident,
ident1,
includeStd,
makeClass,
mkBoolHasProp,
mkConstMethod,
mkMethod,
mkMethod',
mkProp,
)
import Foreign.Hoppy.Generator.Types (
bitspaceT,
boolT,
enumT,
intT,
objT,
ptrT,
voidT,
)
import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (c_QAbstractItemModel)
import Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionModel (c_QItemSelectionModel)
import Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex (c_QModelIndex)
import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)
import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint)
import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)
import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
import Graphics.UI.Qtah.Generator.Interface.Core.Types (
e_DropAction,
e_TextElideMode,
)
import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (
c_Listener,
c_ListenerQModelIndex,
c_ListenerQSize,
)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractScrollArea (c_QAbstractScrollArea)
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
......
......@@ -21,29 +21,17 @@ module Graphics.UI.Qtah.Generator.Interface.Widgets.QDateEdit (
) where
import Foreign.Hoppy.Generator.Spec (
Export (ExportBitspace, ExportClass, ExportEnum),
Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident,
ident1,
includeStd,
makeClass,
mkBoolIsProp,
mkBoolHasProp,
mkConstMethod,
mkCtor,
mkMethod,
mkProp,
)
import Foreign.Hoppy.Generator.Types (
bitspaceT, boolT, enumT, intT, objT, ptrT, refT, voidT,
)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Foreign.Hoppy.Generator.Types (objT, ptrT)
import Foreign.Hoppy.Generator.Version (collect, just)
import Graphics.UI.Qtah.Generator.Interface.Core.QDate (c_QDate)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment)
import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QDateTimeEdit (
c_QDateTimeEdit,
)
......
......@@ -28,26 +28,19 @@ import Foreign.Hoppy.Generator.Spec (
ident1,
includeStd,
makeClass,
mkBoolIsProp,
mkBoolHasProp,
mkConstMethod,
mkCtor,
mkMethod,
mkProp,
)
import Foreign.Hoppy.Generator.Types (
bitspaceT, boolT, enumT, intT, objT, ptrT, refT, voidT,
)
import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Graphics.UI.Qtah.Generator.Flags (qtVersion)
import Graphics.UI.Qtah.Generator.Interface.Core.QDate (c_QDate)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment)
import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerQDate)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractSpinBox (
c_QAbstractSpinBox,
)
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
......
......@@ -21,56 +21,19 @@ module Graphics.UI.Qtah.Generator.Interface.Widgets.QStyledItemDelegate (
) where
import Foreign.Hoppy.Generator.Spec (
Export (ExportBitspace, ExportEnum, ExportClass),
Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident,
ident1,
includeStd,
makeClass,
mkBoolHasProp,
mkConstMethod,
mkCtor,
mkMethod,
mkMethod',
mkProp,
)
import Foreign.Hoppy.Generator.Types (
bitspaceT,
boolT,
enumT,
intT,
objT,
ptrT,
voidT,
)
import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (c_QAbstractItemModel)
import Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionModel (c_QItemSelectionModel)
import Foreign.Hoppy.Generator.Types (objT, ptrT)
-- import Graphics.UI.Qtah.Generator.Interface.Core.QLocale (c_QLocale)
import Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex (c_QModelIndex)
import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)
import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint)
import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)
import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize)
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.Core.Types (
e_DropAction,
e_TextElideMode,
)
import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (
c_Listener,
c_ListenerQModelIndex,
c_ListenerQSize,
)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractItemDelegate (
c_QAbstractItemDelegate,
)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractScrollArea (c_QAbstractScrollArea)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)
import Graphics.UI.Qtah.Generator.Module (
AModule (AQtModule), makeQtModule, makeQtModuleWithMinVersion,
)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractItemDelegate (c_QAbstractItemDelegate)
import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)
import Graphics.UI.Qtah.Generator.Types
{-# ANN module "HLint: ignore Use camelCase" #-}
......
......@@ -28,26 +28,18 @@ import Foreign.Hoppy.Generator.Spec (
ident,
includeStd,
makeClass,
mkBoolIsProp,
mkConstMethod,
mkCtor,
mkMethod,
mkMethod',
mkProp,
)
import Foreign.Hoppy.Generator.Types (
bitspaceT, boolT, constT, enumT, intT, objT, ptrT, voidT,
bitspaceT, boolT, intT, objT, ptrT, voidT,
)
import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
import Graphics.UI.Qtah.Generator.Interface.Core.Types (
e_Orientation,
e_ToolButtonStyle,
bs_WindowFlags,
)
import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_WindowFlags)
import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)
import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerInt)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QFrame (c_QFrame)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)
import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)
......
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