Small style edits: unused imports, long lines, etc.

parent b52e5e3c
......@@ -77,9 +77,9 @@ forEachListener() {
# Keep the includes in the C++ section up-to-date with the types used here.
$fn Bool "bool"
$fn Double "double"
$fn DockWidgetArea "Qt::DockWidgetArea"
$fn DockWidgetAreas "Qt::DockWidgetAreas"
$fn Double "double"
$fn Int "int"
$fn IntBool "int|bool"
$fn IntInt "int|int"
......@@ -95,8 +95,8 @@ forEachListener() {
$fn PtrQWidgetPtrQWidget "QWidget*|QWidget*"
$fn QAbstractSliderAction "QAbstractSlider::SliderAction"
$fn QClipboardMode "QClipboard::Mode"
$fn QDockWidgetFeatures "QDockWidget::DockWidgetFeatures"
$fn QDate "QDate"
$fn QDockWidgetFeatures "QDockWidget::DockWidgetFeatures"
$fn QModelIndex "QModelIndex"
$fn QModelIndexIntInt "QModelIndex|int|int"
$fn QModelIndexIntIntQModelIndexInt "QModelIndex|int|int|QModelIndex|int"
......
......@@ -21,9 +21,8 @@ module Graphics.UI.Qtah.Generator.Interface.Core.QPalette (
e_ColorRole
) where
import Foreign.Hoppy.Generator.Spec
(Export(ExportBitspace, ExportEnum, ExportFn), Include, ident1, includeStd)
import Foreign.Hoppy.Generator.Version (collect, just, test)
import Foreign.Hoppy.Generator.Spec (Export (ExportEnum), Include, ident1, includeStd)
import Foreign.Hoppy.Generator.Version (collect, just)
import Graphics.UI.Qtah.Generator.Module (AModule(AQtModule), makeQtModule)
import Graphics.UI.Qtah.Generator.Types
......@@ -42,6 +41,8 @@ exports =
[ just $ ExportEnum e_ColorRole
]
-- TODO QPalette
e_ColorRole =
makeQtEnum (ident1 "QPalette" "ColorRole") qPaletteInclude
[ (10, ["window"])
......@@ -56,6 +57,5 @@ e_ColorRole =
, (1, ["button"])
, (8, ["button", "text"])
, (7, ["bright", "text"])
]
......@@ -74,7 +74,9 @@ import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButt
(c_QAbstractButton)
import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractSlider (e_SliderAction)
import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction)
import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QDockWidget (bs_DockWidgetFeatures)
import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QDockWidget (
bs_DockWidgetFeatures,
)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsItem (c_QGraphicsItem)
import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QSystemTrayIcon (
e_ActivationReason,
......@@ -91,9 +93,9 @@ aModule =
moduleAddHaskellName ["Internal", "Callback"]
moduleAddExports $ collect
[ just $ ExportCallback cb_BoolVoid
, just $ ExportCallback cb_DoubleVoid
, just $ ExportCallback cb_DockWidgetAreaVoid
, just $ ExportCallback cb_DockWidgetAreasVoid
, just $ ExportCallback cb_DoubleVoid
, just $ ExportCallback cb_IntVoid
, just $ ExportCallback cb_IntBoolVoid
, just $ ExportCallback cb_IntIntVoid
......@@ -139,10 +141,6 @@ cb_BoolVoid =
makeCallback (toExtName "CallbackBoolVoid")
[boolT] voidT
cb_DoubleVoid =
makeCallback (toExtName "CallbackDoubleVoid")
[doubleT] voidT
cb_DockWidgetAreaVoid =
makeCallback (toExtName "CallbackDockWidgetAreaVoid")
[enumT e_DockWidgetArea] voidT
......@@ -151,6 +149,10 @@ cb_DockWidgetAreasVoid =
makeCallback (toExtName "CallbackDockWidgetAreasVoid")
[bitspaceT bs_DockWidgetAreas] voidT
cb_DoubleVoid =
makeCallback (toExtName "CallbackDoubleVoid")
[doubleT] voidT
cb_IntVoid =
makeCallback (toExtName "CallbackIntVoid")
[intT] voidT
......
......@@ -88,14 +88,16 @@ c_QDockWidget =
signals =
collect
[ just $ makeSignal c_QDockWidget "allowedAreasChanged" c_ListenerDockWidgetAreas
, test (qtVersion >= [4, 3]) $ makeSignal c_QDockWidget "dockLocationChanged" c_ListenerDockWidgetArea
, test (qtVersion >= [4, 3]) $
makeSignal c_QDockWidget "dockLocationChanged" c_ListenerDockWidgetArea
, just $ makeSignal c_QDockWidget "featuresChanged" c_ListenerQDockWidgetFeatures
, just $ makeSignal c_QDockWidget "topLevelChanged" c_ListenerBool
, just $ makeSignal c_QDockWidget "visibilityChanged" c_ListenerBool
]
(e_DockWidgetFeature, bs_DockWidgetFeatures) =
makeQtEnumBitspace (ident1 "QDockWidget" "DockWidgetFeature") "DockWidgetFeatures" [includeStd "QDockWidget"] $
makeQtEnumBitspace (ident1 "QDockWidget" "DockWidgetFeature") "DockWidgetFeatures"
[includeStd "QDockWidget"] $
[ (0x0, ["no", "dock", "widget", "features"])
, (0x1, ["dock", "widget", "closable"])
, (0x2, ["dock", "widget", "movable"])
......
......@@ -45,7 +45,11 @@ import Foreign.Hoppy.Generator.Types (
voidT,
)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment, bs_TextInteractionFlags, e_TextFormat)
import Graphics.UI.Qtah.Generator.Interface.Core.Types (
bs_Alignment,
bs_TextInteractionFlags,
e_TextFormat,
)
import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap)
import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerQString)
import Graphics.UI.Qtah.Generator.Interface.Widgets.QFrame (c_QFrame)
......
......@@ -72,7 +72,8 @@ c_QMainWindow =
, mkCtor "newWithParent" [ptrT $ objT c_QWidget]
-- TODO Ctor with Qt::WindowFlags.
, mkMethod "addDockWidget" [enumT e_DockWidgetArea, ptrT $ objT c_QDockWidget] voidT
, mkMethod' "addDockWidget" "addDockWidgetWithOrientation" [enumT e_DockWidgetArea, ptrT $ objT c_QDockWidget, enumT e_Orientation] voidT
, mkMethod' "addDockWidget" "addDockWidgetWithOrientation"
[enumT e_DockWidgetArea, ptrT $ objT c_QDockWidget, enumT e_Orientation] voidT
-- TODO mkMethod' "addToolBar" "addToolBarWithArea" [e_ToolBarArea, ptrT $ objT c_QToolBar]
-- voidT
, mkMethod "addToolBar" [ptrT $ objT c_QToolBar] voidT
......@@ -100,7 +101,8 @@ c_QMainWindow =
, mkMethod "setCorner" [enumT e_Corner, enumT e_DockWidgetArea] voidT
-- TODO setTabPosition
-- TODO setTabShape
, mkMethod "splitDockWidget" [ptrT $ objT c_QDockWidget, ptrT $ objT c_QDockWidget, enumT e_Orientation] voidT
, mkMethod "splitDockWidget"
[ptrT $ objT c_QDockWidget, ptrT $ objT c_QDockWidget, enumT e_Orientation] voidT
, mkProp "statusBar" $ ptrT $ objT c_QStatusBar
-- TODO tabifiedDockWidgets
-- TODO tabifyDockWidget
......
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