Commit 56e262c1 authored by Yuriy Syrovetskiy's avatar Yuriy Syrovetskiy

Add QToolBox

parent 1200319d
......@@ -196,6 +196,7 @@ executable qtah-generator
, Graphics.UI.Qtah.Generator.Interface.Widgets.QTabWidget
, Graphics.UI.Qtah.Generator.Interface.Widgets.QTextEdit
, Graphics.UI.Qtah.Generator.Interface.Widgets.QToolBar
, Graphics.UI.Qtah.Generator.Interface.Widgets.QToolBox
, Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeView
, Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidget
, Graphics.UI.Qtah.Generator.Interface.Widgets.QVBoxLayout
......
......@@ -79,6 +79,7 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QSystemTrayIcon as
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QTabWidget as QTabWidget
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QTextEdit as QTextEdit
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QToolBar as QToolBar
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QToolBox as QToolBox
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeView as QTreeView
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidget as QTreeWidget
import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QVBoxLayout as QVBoxLayout
......@@ -151,6 +152,7 @@ modules =
, QTabWidget.aModule
, QTextEdit.aModule
, QToolBar.aModule
, QToolBox.aModule
, QTreeView.aModule
, QTreeWidget.aModule
, QTreeWidget.itemModule
......
-- This file is part of Qtah.
--
-- Copyright 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/>.
module Graphics.UI.Qtah.Generator.Interface.Widgets.QToolBox (
aModule,
c_QToolBox,
) where
import Foreign.Hoppy.Generator.Spec (
Class,
Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
mkBoolIsProp,
mkConstMethod,
mkCtor,
mkMethod,
mkMethod',
mkProp,
)
import Foreign.Hoppy.Generator.Types (
bitspaceT, boolT, constT, enumT, 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.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)
import Graphics.UI.Qtah.Generator.Types
{-# ANN module "HLint: ignore Use camelCase" #-}
aModule :: AModule
aModule =
AQtModule $
makeQtModule ["Widgets", "QToolBox"] $
QtExport (ExportClass c_QToolBox) :
map QtExportSignal signals
c_QToolBox :: Class
c_QToolBox =
addReqIncludes [includeStd "QToolBox"] $
classSetEntityPrefix "" $
makeClass (ident "QToolBox") Nothing [c_QFrame]
[
-- Properties
mkConstMethod "count" [] intT
, mkConstMethod "currentIndex" [] intT
-- Public Functions
, mkCtor "new" []
, mkCtor "newWithParent" [ptrT $ objT c_QWidget]
, mkCtor
"newWithParentAndFlags" [ptrT $ objT c_QWidget, bitspaceT bs_WindowFlags]
, mkMethod'
"addItem"
"addItemWithIcon"
[ptrT $ objT c_QWidget, objT c_QIcon, objT c_QString]
intT
, mkMethod "addItem" [ptrT $ objT c_QWidget, objT c_QString] intT
, mkConstMethod "currentWidget" [] (ptrT $ objT c_QWidget)
, mkConstMethod "indexOf" [ptrT $ objT c_QWidget] intT
, mkMethod'
"insertItem"
"insertItemWithIcon"
[intT, ptrT $ objT c_QWidget, objT c_QIcon, objT c_QString]
intT
, mkMethod "insertItem" [intT, ptrT $ objT c_QWidget, objT c_QString] intT
, mkConstMethod "isItemEnabled" [intT] boolT
, mkConstMethod "itemIcon" [intT] (objT c_QIcon)
, mkConstMethod "itemText" [intT] (objT c_QString)
, mkConstMethod "itemToolTip" [intT] (objT c_QString)
, mkMethod "removeItem" [intT] voidT
, mkMethod "setItemEnabled" [intT, boolT] voidT
, mkMethod "setItemIcon" [intT, objT c_QIcon] voidT
, mkMethod "setItemText" [intT, objT c_QString] voidT
, mkMethod "setItemToolTip" [intT, objT c_QString] voidT
, mkConstMethod "widget" [intT] (ptrT $ objT c_QWidget)
-- Public Slots
, mkMethod "setCurrentIndex" [intT] voidT
, mkMethod "setCurrentWidget" [ptrT $ objT c_QWidget] voidT
]
signals :: [Signal]
signals =
[ makeSignal c_QToolBox "currentChanged" c_ListenerInt
]
......@@ -185,6 +185,7 @@ library
, Graphics.UI.Qtah.Widgets.QTabWidget
, Graphics.UI.Qtah.Widgets.QTextEdit
, Graphics.UI.Qtah.Widgets.QToolBar
, Graphics.UI.Qtah.Widgets.QToolBox
, Graphics.UI.Qtah.Widgets.QTreeView
, Graphics.UI.Qtah.Widgets.QTreeWidget
, Graphics.UI.Qtah.Widgets.QTreeWidgetItem
......@@ -342,6 +343,7 @@ library
, Graphics.UI.Qtah.Generated.Widgets.QTabWidget
, Graphics.UI.Qtah.Generated.Widgets.QTextEdit
, Graphics.UI.Qtah.Generated.Widgets.QToolBar
, Graphics.UI.Qtah.Generated.Widgets.QToolBox
, Graphics.UI.Qtah.Generated.Widgets.QTreeView
, Graphics.UI.Qtah.Generated.Widgets.QTreeWidget
, Graphics.UI.Qtah.Generated.Widgets.QTreeWidgetItem
......
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