qtah-generator 0.3.0 → 0.4.0
raw patch · 173 files changed
+1898/−328 lines, 173 filesdep ~hoppy-generatordep ~hoppy-stddep ~processsetup-changedPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hoppy-generator, hoppy-std, process
API changes (from Hackage documentation)
Files
- Setup.hs +1/−1
- qtah-generator.cabal +21/−5
- qtah-listener-gen +22/−3
- src/Graphics/UI/Qtah/Generator/Common.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Empty.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Flags.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core.hs +5/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractItemModel.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractItemModel.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractListModel.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractTableModel.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QByteArray.hs +131/−0
- src/Graphics/UI/Qtah/Generator/Interface/Core/QChar.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QChildEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QCoreApplication.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QDir.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelection.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelectionModel.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelectionModel.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelectionRange.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QList.hs +32/−5
- src/Graphics/UI/Qtah/Generator/Interface/Core/QList.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QMargins.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QMarginsF.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QModelIndex.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QObject.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QPersistentModelIndex.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QPoint.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QPointF.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QRect.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QRectF.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QSize.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QSizeF.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QString.hs +9/−2
- src/Graphics/UI/Qtah/Generator/Interface/Core/QString.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QStringList.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QStringListModel.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QTextCodec.hs +91/−0
- src/Graphics/UI/Qtah/Generator/Interface/Core/QTimer.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QTimerEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QVariant.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QVariant.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/QVector.hs +4/−4
- src/Graphics/UI/Qtah/Generator/Interface/Core/QVector.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Core/Types.hs +39/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui.hs +9/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QActionEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QBrush.hs +5/−3
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QClipboard.hs +11/−5
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QClipboard.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QCloseEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QColor.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QDoubleValidator.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QEnterEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QExposeEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QFocusEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QFont.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QHideEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QHoverEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QIcon.hs +155/−0
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QIcon.hs-boot +22/−0
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QImage.hs +13/−6
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QInputEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QIntValidator.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QKeyEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QMouseEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QOpenGLWindow.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QPaintDevice.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QPaintDeviceWindow.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QPaintEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QPainter.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QPainterPath.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QPen.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QPixmap.hs +156/−0
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QPolygon.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QPolygonF.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QRasterWindow.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QRegion.hs +5/−2
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QShowEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QStandardItemModel.hs +115/−0
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QSurface.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QTransform.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QValidator.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QWheelEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QWindow.hs +3/−2
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QWindow.hs-boot +5/−2
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QtahOpenGLWindow.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Gui/QtahRasterWindow.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Imports.hs +9/−1
- src/Graphics/UI/Qtah/Generator/Interface/Internal.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Internal/Callback.hs +55/−2
- src/Graphics/UI/Qtah/Generator/Interface/Internal/EventListener.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Internal/Listener.hs +94/−14
- src/Graphics/UI/Qtah/Generator/Interface/Internal/Listener.hs-boot +10/−2
- src/Graphics/UI/Qtah/Generator/Interface/Internal/SceneEventListener.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets.hs +10/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractButton.hs +7/−4
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractButton.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractGraphicsShapeItem.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractItemView.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractScrollArea.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractSlider.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractSlider.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractSpinBox.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAction.hs +12/−6
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAction.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QActionGroup.hs +4/−2
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QApplication.hs +11/−3
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QBoxLayout.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QButtonGroup.hs +5/−2
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QCheckBox.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDial.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDialog.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDialogButtonBox.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDoubleSpinBox.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QFileDialog.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QFormLayout.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QFrame.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsEllipseItem.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsItem.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsItem.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsPolygonItem.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsRectItem.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsScene.hs +4/−3
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsScene.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsSceneEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsSceneMouseEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsSceneWheelEvent.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsView.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGridLayout.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGroupBox.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QHBoxLayout.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QInputDialog.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLabel.hs +16/−3
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLayout.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLayout.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLayoutItem.hs +2/−2
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLineEdit.hs +53/−49
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QListView.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMainWindow.hs +13/−3
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMenu.hs +51/−34
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMenuBar.hs +4/−3
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMessageBox.hs +3/−2
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QOpenGLWidget.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QProgressBar.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QPushButton.hs +4/−2
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QRadioButton.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QRubberBand.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QScrollArea.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QScrollBar.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSizePolicy.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSlider.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSpacerItem.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSpinBox.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSplitter.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QStackedLayout.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QStackedWidget.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QStatusBar.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSystemTrayIcon.hs +106/−0
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSystemTrayIcon.hs-boot +24/−0
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTabWidget.hs +11/−7
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTextEdit.hs +3/−2
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QToolBar.hs +108/−0
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTreeView.hs +67/−0
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTreeWidget.hs +164/−0
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTreeWidget.hs-boot +26/−0
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QVBoxLayout.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QWidget.hs +43/−13
- src/Graphics/UI/Qtah/Generator/Interface/Widgets/QWidget.hs-boot +1/−1
- src/Graphics/UI/Qtah/Generator/Module.hs +1/−1
- src/Graphics/UI/Qtah/Generator/Types.hs +1/−1
- src/Main.hs +2/−2
Setup.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
qtah-generator.cabal view
@@ -1,12 +1,12 @@ name: qtah-generator-version: 0.3.0+version: 0.4.0 synopsis: Generator for Qtah Qt bindings homepage: http://khumba.net/projects/qtah license: LGPL-3 license-files: LICENSE.GPL, LICENSE.LGPL author: Bryan Gardiner <bog@khumba.net> maintainer: Bryan Gardiner <bog@khumba.net>-copyright: Copyright 2015-2017 The Qtah Authors.+copyright: Copyright 2015-2018 The Qtah Authors. category: Graphics build-type: Custom cabal-version: >=1.10@@ -41,11 +41,11 @@ , containers >=0.5 && <0.6 , directory >=1.2 && <1.4 , filepath >=1.3 && <1.5- , hoppy-generator >=0.3.3 && <0.4- , hoppy-std >=0.3 && <0.4+ , hoppy-generator >=0.4 && <0.5+ , hoppy-std >=0.4 && <0.5 , haskell-src >=1.0 && <1.1 , mtl >=2.1 && <2.3- , process >=1.2 && <1.5+ , process >=1.2 && <1.7 , transformers >=0.3 && <0.6 hs-source-dirs: src main-is: Main.hs@@ -56,6 +56,7 @@ , Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel , Graphics.UI.Qtah.Generator.Interface.Core.QAbstractListModel , Graphics.UI.Qtah.Generator.Interface.Core.QAbstractTableModel+ , Graphics.UI.Qtah.Generator.Interface.Core.QByteArray , Graphics.UI.Qtah.Generator.Interface.Core.QChar , Graphics.UI.Qtah.Generator.Interface.Core.QChildEvent , Graphics.UI.Qtah.Generator.Interface.Core.QCoreApplication@@ -79,6 +80,7 @@ , Graphics.UI.Qtah.Generator.Interface.Core.QString , Graphics.UI.Qtah.Generator.Interface.Core.QStringList , Graphics.UI.Qtah.Generator.Interface.Core.QStringListModel+ , Graphics.UI.Qtah.Generator.Interface.Core.QTextCodec , Graphics.UI.Qtah.Generator.Interface.Core.QTimer , Graphics.UI.Qtah.Generator.Interface.Core.QTimerEvent , Graphics.UI.Qtah.Generator.Interface.Core.QVariant@@ -97,6 +99,7 @@ , Graphics.UI.Qtah.Generator.Interface.Gui.QFont , Graphics.UI.Qtah.Generator.Interface.Gui.QHideEvent , Graphics.UI.Qtah.Generator.Interface.Gui.QHoverEvent+ , Graphics.UI.Qtah.Generator.Interface.Gui.QIcon , Graphics.UI.Qtah.Generator.Interface.Gui.QImage , Graphics.UI.Qtah.Generator.Interface.Gui.QInputEvent , Graphics.UI.Qtah.Generator.Interface.Gui.QIntValidator@@ -109,11 +112,13 @@ , Graphics.UI.Qtah.Generator.Interface.Gui.QPainter , Graphics.UI.Qtah.Generator.Interface.Gui.QPainterPath , Graphics.UI.Qtah.Generator.Interface.Gui.QPen+ , Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap , Graphics.UI.Qtah.Generator.Interface.Gui.QPolygon , Graphics.UI.Qtah.Generator.Interface.Gui.QPolygonF , Graphics.UI.Qtah.Generator.Interface.Gui.QRasterWindow , Graphics.UI.Qtah.Generator.Interface.Gui.QRegion , Graphics.UI.Qtah.Generator.Interface.Gui.QShowEvent+ , Graphics.UI.Qtah.Generator.Interface.Gui.QStandardItemModel , Graphics.UI.Qtah.Generator.Interface.Gui.QSurface , Graphics.UI.Qtah.Generator.Interface.Gui.QTransform , Graphics.UI.Qtah.Generator.Interface.Gui.QValidator@@ -184,11 +189,22 @@ , Graphics.UI.Qtah.Generator.Interface.Widgets.QStackedLayout , Graphics.UI.Qtah.Generator.Interface.Widgets.QStackedWidget , Graphics.UI.Qtah.Generator.Interface.Widgets.QStatusBar+ , Graphics.UI.Qtah.Generator.Interface.Widgets.QSystemTrayIcon , 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.QTreeView+ , Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidget , Graphics.UI.Qtah.Generator.Interface.Widgets.QVBoxLayout , Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget , Graphics.UI.Qtah.Generator.Module , Graphics.UI.Qtah.Generator.Types ghc-options: -W -fwarn-incomplete-patterns -fwarn-unused-do-bind default-language: Haskell2010++custom-setup+ setup-depends:+ base+ , Cabal+ , directory+ , filepath
qtah-listener-gen view
@@ -2,7 +2,7 @@ # This file is part of Qtah. #-# Copyright 2015-2017 The Qtah Authors.+# Copyright 2015-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@@ -17,6 +17,13 @@ # 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/>. +if (( BASH_VERSINFO[0] < 4 || ( BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] < 1 ) )); then+ echo "qtah-listener-gen: Error, this script depends on features in bash 4.1 and newer." >&2+ echo "qtah-listener-gen: You are currently running version $BASH_VERSION, please upgrade." >&2+ echo "qtah-listener-gen: Aborting." >&2+ exit 1+fi+ set -euo pipefail msg() {@@ -74,14 +81,16 @@ $fn Int "int" $fn IntBool "int|bool" $fn IntInt "int|int"+ $fn Orientation "Qt::Orientation" $fn PtrQAbstractButton "QAbstractButton*" $fn PtrQAbstractButtonBool "QAbstractButton*|bool" $fn PtrQAbstractItemModel "QAbstractItemModel*" $fn PtrQAction "QAction*" $fn PtrQObject "QObject*"+ $fn PtrQTreeWidgetItem "QTreeWidgetItem*"+ $fn PtrQTreeWidgetItemInt "QTreeWidgetItem*|int"+ $fn PtrQTreeWidgetItemPtrQTreeWidgetItem "QTreeWidgetItem*|QTreeWidgetItem*" $fn PtrQWidgetPtrQWidget "QWidget*|QWidget*"- $fn RefConstQItemSelectionRefConstQItemSelection "const QItemSelection&|const QItemSelection&"- $fn ScreenOrientation "Qt::ScreenOrientation" 0x050000 '[5, 0]' $fn QAbstractSliderAction "QAbstractSlider::SliderAction" $fn QClipboardMode "QClipboard::Mode" $fn QModelIndex "QModelIndex"@@ -93,7 +102,13 @@ $fn Qreal "qreal" $fn QSize "QSize" $fn QString "QString"+ $fn QSystemTrayIconActivationReason "QSystemTrayIcon::ActivationReason" $fn QWindowVisibility "QWindow::Visibility" 0x050000 '[5, 0]'+ $fn RefConstQIcon "const QIcon&"+ $fn RefConstQItemSelectionRefConstQItemSelection "const QItemSelection&|const QItemSelection&"+ $fn ScreenOrientation "Qt::ScreenOrientation" 0x050000 '[5, 0]'+ $fn ToolBarAreas "Qt::ToolBarAreas"+ $fn ToolButtonStyle "Qt::ToolButtonStyle" $fn WindowModality "Qt::WindowModality" $fn WindowState "Qt::WindowState" $fn "" ""@@ -121,10 +136,14 @@ sayHpp '#include <QAbstractSlider>' sayHpp '#include <QAction>' sayHpp '#include <QClipboard>'+ sayHpp '#include <QIcon>'+ sayHpp '#include <QItemSelection>' sayHpp '#include <QModelIndex>' sayHpp '#include <QObject>' sayHpp '#include <QPoint>' sayHpp '#include <QSize>'+ sayHpp '#include <QSystemTrayIcon>'+ sayHpp '#include <QTreeWidgetItem>' sayHpp '#include <QVector>' sayHpp '#include <QWidget>' sayHpp '#if QT_VERSION >= 0x050000'
src/Graphics/UI/Qtah/Generator/Common.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Empty.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Flags.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -20,6 +20,7 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel as QAbstractItemModel import qualified Graphics.UI.Qtah.Generator.Interface.Core.QAbstractListModel as QAbstractListModel import qualified Graphics.UI.Qtah.Generator.Interface.Core.QAbstractTableModel as QAbstractTableModel+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QByteArray as QByteArray import qualified Graphics.UI.Qtah.Generator.Interface.Core.QChar as QChar import qualified Graphics.UI.Qtah.Generator.Interface.Core.QChildEvent as QChildEvent import qualified Graphics.UI.Qtah.Generator.Interface.Core.QCoreApplication as QCoreApplication@@ -43,6 +44,7 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Core.QString as QString import qualified Graphics.UI.Qtah.Generator.Interface.Core.QStringList as QStringList import qualified Graphics.UI.Qtah.Generator.Interface.Core.QStringListModel as QStringListModel+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QTextCodec as QTextCodec import qualified Graphics.UI.Qtah.Generator.Interface.Core.QTimer as QTimer import qualified Graphics.UI.Qtah.Generator.Interface.Core.QTimerEvent as QTimerEvent import qualified Graphics.UI.Qtah.Generator.Interface.Core.QVariant as QVariant@@ -58,6 +60,7 @@ [ [ QAbstractItemModel.aModule , QAbstractListModel.aModule , QAbstractTableModel.aModule+ , QByteArray.aModule , QChar.aModule , QChildEvent.aModule , QCoreApplication.aModule@@ -80,6 +83,7 @@ , QString.aModule , QStringList.aModule , QStringListModel.aModule+ , QTextCodec.aModule , QTimer.aModule , QTimerEvent.aModule , QVariant.aModule
src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractItemModel.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractItemModel.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractListModel.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractTableModel.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QByteArray.hs view
@@ -0,0 +1,131 @@+-- This file is part of Qtah.+--+-- Copyright 2015-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/>.++{-# LANGUAGE CPP #-}++module Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (+ aModule,+ c_QByteArray,+ ) where++#if !MIN_VERSION_base(4,8,0)+import Data.Monoid (mconcat)+#endif+import Foreign.Hoppy.Generator.Language.Haskell (+ addImports,+ indent,+ ln,+ sayLn,+ )+import Foreign.Hoppy.Generator.Spec (+ Class,+ ClassHaskellConversion (+ ClassHaskellConversion,+ classHaskellConversionFromCppFn,+ classHaskellConversionToCppFn,+ classHaskellConversionType+ ),+ Export (ExportClass),+ addAddendumHaskell,+ addReqIncludes,+ classSetEntityPrefix,+ classSetHaskellConversion,+ hsImport1,+ ident,+ includeStd,+ makeClass,+ mkConstMethod,+ mkConstMethod',+ mkCtor,+ mkMethod,+ mkMethod',+ )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+ ClassFeature (Assignable, Copyable, Comparable, Equatable),+ classAddFeatures,+ )+import Foreign.Hoppy.Generator.Types (boolT, charT, constT, intT, ptrT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Imports+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types+import Language.Haskell.Syntax (+ HsName (HsIdent),+ HsQName (UnQual),+ HsType (HsTyCon),+ )++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule :: AModule+aModule =+ AQtModule $+ makeQtModule ["Core", "QByteArray"]+ [ QtExport $ ExportClass c_QByteArray+ ]++c_QByteArray :: Class+c_QByteArray =+ addReqIncludes [includeStd "QByteArray"] $+ addAddendum $+ classAddFeatures [Assignable, Copyable, Comparable, Equatable] $+ classSetHaskellConversion conversion $+ classSetEntityPrefix "" $+ makeClass (ident "QByteArray") Nothing [] $+ collect+ [ just $ mkCtor "new" []+ , just $ mkCtor "newFromData" [ptrT $ constT charT]+ , just $ mkCtor "newFromDataAndSize" [ptrT $ constT charT, intT]+ , just $ mkCtor "newFromRepeatedChar" [intT, charT]+ , just $ mkConstMethod "at" [intT] charT+ , just $ mkMethod "clear" [] voidT+ , just $ mkMethod' "data" "getData" [] $ ptrT charT+ , just $ mkConstMethod' "data" "getDataConst" [] $ ptrT $ constT charT+ , just $ mkConstMethod "isEmpty" [] boolT+ , just $ mkConstMethod "isNull" [] boolT+ , just $ mkConstMethod "size" [] intT+ -- TODO Lots more methods.+ ]++conversion :: ClassHaskellConversion+conversion =+ ClassHaskellConversion+ { classHaskellConversionType = Just $ do+ addImports importForByteString+ return $ HsTyCon $ UnQual $ HsIdent "QtahDBS.ByteString"+ , classHaskellConversionToCppFn = Just $ sayLn "convertToCpp"+ , classHaskellConversionFromCppFn = Just $ sayLn "convertFromCpp"+ }++addAddendum :: Class -> Class+addAddendum = addAddendumHaskell $ do+ addImports $ mconcat [hsImport1 "Prelude" "($)",+ importForByteString,+ importForByteStringUnsafe,+ importForPrelude]+ ln+ sayLn "convertToCpp :: QtahDBS.ByteString -> QtahP.IO QByteArray"+ sayLn "convertToCpp ="+ indent $+ sayLn "QtahP.flip QtahDBSU.unsafeUseAsCStringLen $ QtahP.uncurry newFromDataAndSize"+ ln+ sayLn "convertFromCpp :: QByteArrayValue ba => ba -> QtahP.IO QtahDBS.ByteString"+ sayLn "convertFromCpp ba = do"+ indent $ do+ sayLn "d <- getDataConst ba"+ sayLn "len <- size ba"+ sayLn "QtahDBS.packCStringLen (d, len)"
src/Graphics/UI/Qtah/Generator/Interface/Core/QChar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QChildEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QCoreApplication.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QDir.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelection.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelectionModel.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelectionModel.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelectionRange.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QList.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -24,13 +24,16 @@ defaultOptions, Contents (..), inheritHasContents,+ instantiate, -- * Instantiations allModules, c_QListInt, c_QListQAbstractButton,+ c_QListQByteArray, c_QListQItemSelectionRange, c_QListQModelIndex, c_QListQObject,+ c_QListQSize, c_QListQString, c_QListQVariant, c_QListQWidget,@@ -91,9 +94,11 @@ import Foreign.Hoppy.Generator.Types (boolT, constT, intT, objT, ptrT, refT, toGcT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray) import Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionRange (c_QItemSelectionRange) 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.QSize (c_QSize) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant) import Graphics.UI.Qtah.Generator.Interface.Imports@@ -109,8 +114,10 @@ HsType (HsTyApp, HsTyCon), ) +{-# ANN module "HLint: ignore Use camelCase" #-}+ -- | Options for instantiating the list classes.-data Options = Options+newtype Options = Options { optListClassFeatures :: [ClassFeature] -- ^ Additional features to add to the @QList@ class. Lists are always -- 'Assignable' and 'Copyable', but you may want to add 'Equatable' if your@@ -122,7 +129,7 @@ defaultOptions = Options [] -- | A set of instantiated classes.-data Contents = Contents+newtype Contents = Contents { c_QList :: Class -- ^ @QList\<T>@ } @@ -251,7 +258,7 @@ ClassHaskellConversion { classHaskellConversionType = Just $ do hsType <- cppTypeToHsTypeAndUse HsHsSide t- return $ HsTyApp (HsTyCon $ Special $ HsListCon) hsType+ return $ HsTyApp (HsTyCon $ Special HsListCon) hsType , classHaskellConversionToCppFn = Just $ do addImports importForRuntime sayLn "QtahFHR.fromContents"@@ -283,7 +290,7 @@ -- | Converts an instantiation into a list of exports to be included in a -- module. toExports :: Contents -> [QtExport]-toExports m = map (QtExport . ExportClass . ($ m)) [c_QList]+toExports m = [QtExport $ ExportClass $ c_QList m] createModule :: String -> Contents -> QtModule createModule name contents = makeQtModule ["Core", "QList", name] $ toExports contents@@ -293,9 +300,11 @@ map AQtModule [ qmod_Int , qmod_QAbstractButton+ , qmod_QByteArray , qmod_QItemSelectionRange , qmod_QModelIndex , qmod_QObject+ , qmod_QSize , qmod_QString , qmod_QVariant , qmod_QWidget@@ -320,6 +329,15 @@ c_QListQAbstractButton :: Class c_QListQAbstractButton = c_QList contents_QAbstractButton +qmod_QByteArray :: QtModule+qmod_QByteArray = createModule "QByteArray" contents_QByteArray++contents_QByteArray :: Contents+contents_QByteArray = instantiate "QListQByteArray" (objT c_QByteArray) mempty++c_QListQByteArray :: Class+c_QListQByteArray = c_QList contents_QByteArray+ qmod_QItemSelectionRange :: QtModule qmod_QItemSelectionRange = createModule "QItemSelectionRange" contents_QItemSelectionRange @@ -347,6 +365,15 @@ c_QListQObject :: Class c_QListQObject = c_QList contents_QObject++qmod_QSize :: QtModule+qmod_QSize = createModule "QSize" contents_QSize++contents_QSize :: Contents+contents_QSize = instantiate "QListQSize" (objT c_QSize) mempty++c_QListQSize :: Class+c_QListQSize = c_QList contents_QSize qmod_QString :: QtModule qmod_QString = createModule "QString" contents_QString
src/Graphics/UI/Qtah/Generator/Interface/Core/QList.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QMargins.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QMarginsF.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QModelIndex.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QObject.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QPersistentModelIndex.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QPoint.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QPointF.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QRect.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QRectF.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QSize.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QSizeF.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QString.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -61,6 +61,7 @@ import Foreign.Hoppy.Generator.Types (charT, constT, intT, objT, ptrT, refT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray) import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar) import Graphics.UI.Qtah.Generator.Interface.Imports import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -96,10 +97,16 @@ classSetEntityPrefix "" $ makeClass (ident "QString") Nothing [] $ collect- [ just $ mkCtor "newFromCString" [ptrT $ constT charT]+ [ just $ mkCtor "new" []+ , just $ mkCtor "newFromByteArray" [objT c_QByteArray]+ , just $ mkCtor "newFromCString" [ptrT $ constT charT] , just $ mkConstMethod' OpArray "at" [intT] $ objT c_QChar , just $ makeFnMethod (ident2 "qtah" "qstring" "set") "set" MNormal Nonpure [refT $ objT c_QString, intT, objT c_QChar] voidT , test (qtVersion >= [5, 0]) $ mkConstMethod "toHtmlEscaped" [] $ objT c_QString+ , just $ mkConstMethod "toLatin1" [] $ objT c_QByteArray+ , just $ mkConstMethod "toLocal8Bit" [] $ objT c_QByteArray , just $ mkConstMethod "toStdString" [] $ objT c_string+ , just $ mkConstMethod "toUtf8" [] $ objT c_QByteArray+ -- TODO Lots more method here. ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QString.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QStringList.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QStringListModel.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QTextCodec.hs view
@@ -0,0 +1,91 @@+-- This file is part of Qtah.+--+-- Copyright 2015-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/>.++{-# LANGUAGE CPP #-}++module Graphics.UI.Qtah.Generator.Interface.Core.QTextCodec (+ aModule,+ c_QTextCodec,+ ) where++import Foreign.Hoppy.Generator.Spec (+ Export (ExportClass),+ addReqIncludes,+ classSetEntityPrefix,+ classSetDtorPrivate,+ ident,+ includeStd,+ makeClass,+ mkConstMethod,+ mkConstMethod',+ mkStaticMethod,+ mkStaticMethod',+ )+import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar)+import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListInt, c_QListQByteArray)+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++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+ AQtModule $+ makeQtModule ["Core", "QTextCodec"]+ [ QtExport $ ExportClass c_QTextCodec+ ]++c_QTextCodec =+ addReqIncludes [includeStd "QTextCodec"] $+ classSetDtorPrivate $+ classSetEntityPrefix "" $+ makeClass (ident "QTextCodec") Nothing [] $+ collect+ [ just $ mkConstMethod "aliases" [] $ objT c_QListQByteArray+ , just $ mkConstMethod' "canEncode" "canEncodeChar" [objT c_QChar] boolT+ , just $ mkConstMethod' "canEncode" "canEncodeString" [objT c_QString] boolT+ , just $ mkConstMethod "fromUnicode" [objT c_QString] $ objT c_QByteArray+ -- TODO QByteArray fromUnicode(const QChar*, int, ConverterState* =) const+ -- TODO QTextDecoder* makeDecoder(ConversionFlags =) const+ -- TODO QTextEncoder* makeEncoder(ConversionFlags =) const+ , just $ mkConstMethod "mibEnum" [] intT+ , just $ mkConstMethod "name" [] $ objT c_QByteArray+ , just $ mkConstMethod "toUnicode" [objT c_QByteArray] $ objT c_QString+ -- TODO QString toUnicode(const char*) const+ -- TODO QString toUnicode(const char*, int, ConverterState* =) const++ , just $ mkStaticMethod "availableCodecs" [] $ objT c_QListQByteArray+ , just $ mkStaticMethod "availableMibs" [] $ objT c_QListInt+ , just $ mkStaticMethod' "codecForHtml" "codecForHtml"+ [objT c_QByteArray] $ ptrT $ objT c_QTextCodec+ , just $ mkStaticMethod' "codecForHtml" "codecForHtmlWithDefault"+ [objT c_QByteArray, ptrT $ objT c_QTextCodec] $ ptrT $ objT c_QTextCodec+ , just $ mkStaticMethod "codecForLocale" [] $ ptrT $ objT c_QTextCodec+ , just $ mkStaticMethod "codecForMib" [intT] $ ptrT $ objT c_QTextCodec+ , just $ mkStaticMethod "codecForName" [objT c_QByteArray] $ ptrT $ objT c_QTextCodec+ -- TODO QTextCodec* codecForName(const char*) (Omit this?)+ , just $ mkStaticMethod' "codecForUtfText" "codecForUtfText"+ [objT c_QByteArray] $ ptrT $ objT c_QTextCodec+ , just $ mkStaticMethod' "codecForUtfText" "codecForUtfTextWithDefault"+ [objT c_QByteArray, ptrT $ objT c_QTextCodec] $ ptrT $ objT c_QTextCodec+ , just $ mkStaticMethod "setCodecForLocale" [ptrT $ objT c_QTextCodec] voidT+ ]++-- TODO ConverterState, ConversionFlag, ConversionFlags
src/Graphics/UI/Qtah/Generator/Interface/Core/QTimer.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QTimerEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QVariant.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QVariant.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/QVector.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -86,7 +86,7 @@ import Graphics.UI.Qtah.Generator.Types -- | Options for instantiating the vector classes.-data Options = Options+newtype Options = Options { optVectorClassFeatures :: [ClassFeature] -- ^ Additional features to add to the @QVector@ class. Vectors are always -- 'Assignable' and 'Copyable', but you may want to add 'Equatable' if your@@ -98,7 +98,7 @@ defaultOptions = Options [] -- | A set of instantiated classes.-data Contents = Contents+newtype Contents = Contents { c_QVector :: Class -- ^ @QVector\<T>@ } @@ -246,7 +246,7 @@ -- | Converts an instantiation into a list of exports to be included in a -- module. toExports :: Contents -> [QtExport]-toExports m = map (QtExport . ExportClass . ($ m)) [c_QVector]+toExports m = [QtExport $ ExportClass $ c_QVector m] createModule :: String -> Contents -> QtModule createModule name contents = makeQtModule ["Core", "QVector", name] $ toExports contents
src/Graphics/UI/Qtah/Generator/Interface/Core/QVector.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Core/Types.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -26,6 +26,7 @@ e_BrushStyle, e_CaseSensitivity, e_CheckState,+ e_ContextMenuPolicy, e_Corner, e_CursorMoveStyle, e_DropAction,@@ -67,6 +68,9 @@ e_TextFormat, e_TextInteractionFlag, bs_TextInteractionFlags,+ e_ToolBarArea,+ bs_ToolBarAreas,+ e_ToolButtonStyle, e_TransformationMode, e_WindowModality, e_WindowState,@@ -77,6 +81,7 @@ import Data.Bits ((.|.)) import Foreign.Hoppy.Generator.Spec (+ CppEnum, Export (ExportBitspace, ExportEnum, ExportFn), Include, Purity (Nonpure),@@ -108,6 +113,7 @@ , just $ ExportEnum e_BrushStyle , just $ ExportEnum e_CaseSensitivity , just $ ExportEnum e_CheckState+ , just $ ExportEnum e_ContextMenuPolicy , just $ ExportEnum e_Corner , just $ ExportEnum e_CursorMoveStyle , just $ ExportEnum e_DropAction@@ -145,6 +151,9 @@ , just $ ExportEnum e_TextFormat , just $ ExportEnum e_TextInteractionFlag , just $ ExportBitspace bs_TextInteractionFlags+ , just $ ExportEnum e_ToolBarArea+ , just $ ExportBitspace bs_ToolBarAreas+ , just $ ExportEnum e_ToolButtonStyle , just $ ExportEnum e_TransformationMode , just $ ExportEnum e_WindowModality , just $ ExportEnum e_WindowState@@ -221,6 +230,16 @@ , (2, ["checked"]) ] +e_ContextMenuPolicy :: CppEnum+e_ContextMenuPolicy =+ makeQtEnum (ident1 "Qt" "ContextMenuPolicy") qtInclude+ [ (0, ["no", "context", "menu"])+ , (4, ["prevent", "context", "menu"])+ , (1, ["default", "context", "menu"])+ , (2, ["actions", "context", "menu"])+ , (3, ["custom", "context", "menu"])+ ]+ e_Corner = makeQtEnum (ident1 "Qt" "Corner") qtInclude [ (0x00000, ["top", "left", "corner"])@@ -662,6 +681,25 @@ , (textEditorInteraction, ["text", "editor", "interaction"]) , (textBrowserInteraction, ["text", "browser", "interaction"]) ]++(e_ToolBarArea, bs_ToolBarAreas) =+ makeQtEnumBitspace (ident1 "Qt" "ToolBarArea") "ToolBarAreas" qtInclude+ [ (0x0, ["no", "tool", "bar", "area"])+ , (0x1, ["left", "tool", "bar", "area"])+ , (0x2, ["right", "tool", "bar", "area"])+ , (0x4, ["top", "tool", "bar", "area"])+ , (0x8, ["bottom", "tool", "bar", "area"])+ , (0xf, ["all", "tool", "bar", "areas"])+ ]++e_ToolButtonStyle =+ makeQtEnum (ident1 "Qt" "ToolButtonStyle") qtInclude+ [ (0, ["tool", "button", "icon", "only"])+ , (1, ["tool", "button", "text", "only"])+ , (2, ["tool", "button", "text", "beside", "icon"])+ , (3, ["tool", "button", "text", "under", "icon"])+ , (4, ["tool", "button", "follow", "style"])+ ] e_TransformationMode = makeQtEnum (ident1 "Qt" "TransformationMode") qtInclude
src/Graphics/UI/Qtah/Generator/Interface/Gui.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -29,6 +29,7 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QFont as QFont import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QHideEvent as QHideEvent import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QHoverEvent as QHoverEvent+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QIcon as QIcon import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QImage as QImage import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QInputEvent as QInputEvent import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QIntValidator as QIntValidator@@ -41,11 +42,13 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QPainter as QPainter import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QPainterPath as QPainterPath import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QPen as QPen+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap as QPixmap import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QPolygon as QPolygon import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QPolygonF as QPolygonF import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QRasterWindow as QRasterWindow import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QRegion as QRegion import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QShowEvent as QShowEvent+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QStandardItemModel as QStandardItemModel import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QSurface as QSurface import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QTransform as QTransform import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QValidator as QValidator@@ -71,6 +74,7 @@ , QFont.aModule , QHideEvent.aModule , QHoverEvent.aModule+ , QIcon.aModule , QImage.aModule , QInputEvent.aModule , QIntValidator.aModule@@ -83,11 +87,15 @@ , QPainter.aModule , QPainterPath.aModule , QPen.aModule+ , QPixmap.aModule , QPolygon.aModule , QPolygonF.aModule , QRasterWindow.aModule , QRegion.aModule , QShowEvent.aModule+ , QStandardItemModel.aModule+ , QStandardItemModel.itemModule+ , QStandardItemModel.itemListModule , QSurface.aModule , QTransform.aModule , QValidator.aModule
src/Graphics/UI/Qtah/Generator/Interface/Gui/QActionEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QBrush.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -41,6 +41,8 @@ import Foreign.Hoppy.Generator.Types (boolT, 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.QImage (c_QImage)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap) 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@@ -67,7 +69,7 @@ , 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 "texture" $ objT c_QPixmap+ , mkProp "textureImage" $ objT c_QImage , mkProp "transform" $ objT c_QTransform ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QClipboard.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -39,6 +39,8 @@ import Graphics.UI.Qtah.Generator.Flags (qtVersion) 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.Gui.QImage (c_QImage)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener ( c_Listener, c_ListenerQClipboardMode,@@ -63,15 +65,19 @@ collect [ just $ mkMethod' "clear" "clear" [] voidT , just $ mkMethod' "clear" "clearWithMode" [enumT e_Mode] voidT- -- TODO image+ , just $ mkConstMethod' "image" "image" [] $ objT c_QImage+ , just $ mkConstMethod' "image" "imageAll" [enumT e_Mode] $ objT c_QImage -- TODO mimeData , just $ mkConstMethod "ownsClipboard" [] boolT , test (qtVersion >= [4, 2]) $ mkConstMethod "ownsFindBuffer" [] boolT , just $ mkConstMethod "ownsSelection" [] boolT- -- TODO pixmap- -- TODO setImage+ , just $ mkConstMethod' "pixmap" "pixmap" [] $ objT c_QPixmap+ , just $ mkConstMethod' "pixmap" "pixmapAll" [enumT e_Mode] $ objT c_QPixmap+ , just $ mkMethod' "setImage" "setImage" [objT c_QImage] voidT+ , just $ mkMethod' "setImage" "setImageAll" [objT c_QImage, enumT e_Mode] voidT -- TODO setMimeData- -- TODO setPixmap+ , just $ mkMethod' "setPixmap" "setPixmap" [objT c_QPixmap] voidT+ , just $ mkMethod' "setPixmap" "setPixmapAll" [objT c_QPixmap, enumT e_Mode] voidT , just $ mkMethod' "setText" "setText" [objT c_QString] voidT , just $ mkMethod' "setText" "setTextWithMode" [objT c_QString, enumT e_Mode] voidT , just $ mkConstMethod "supportsFindBuffer" [] boolT
src/Graphics/UI/Qtah/Generator/Interface/Gui/QClipboard.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QCloseEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QColor.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QDoubleValidator.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QEnterEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QExposeEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QFocusEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QFont.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QHideEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QHoverEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QIcon.hs view
@@ -0,0 +1,155 @@+-- This file is part of Qtah.+--+-- Copyright 2015-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.Gui.QIcon (+ aModule,+ c_QIcon,+ ) where++import Foreign.Hoppy.Generator.Spec (+ Export (ExportClass, ExportEnum),+ addReqIncludes,+ classSetConversionToGc,+ classSetEntityPrefix,+ ident,+ ident1,+ includeStd,+ makeClass,+ mkConstMethod,+ mkConstMethod',+ mkCtor,+ mkMethod,+ mkMethod',+ mkStaticMethod,+ mkStaticMethod',+ )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+ ClassFeature (Assignable, Copyable),+ classAddFeatures,+ )+import Foreign.Hoppy.Generator.Types (+ bitspaceT,+ boolT,+ enumT,+ intT,+ int64T,+ objT,+ ptrT,+ refT,+ voidT,+ )+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQSize)+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.QStringList (c_QStringList)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPainter (c_QPainter)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Gui.QWindow (c_QWindow)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+ AQtModule $+ makeQtModule ["Gui", "QIcon"]+ [ QtExport $ ExportClass c_QIcon+ , QtExport $ ExportEnum e_Mode+ , QtExport $ ExportEnum e_State+ ]++c_QIcon =+ addReqIncludes [includeStd "QIcon"] $+ classSetConversionToGc $+ classAddFeatures [Assignable, Copyable] $+ classSetEntityPrefix "" $+ makeClass (ident "QIcon") Nothing [] $+ collect+ [ just $ mkCtor "new" []+ -- TODO QIcon(QIconEngine*)+ , just $ mkCtor "newWithFile" [objT c_QString]+ , just $ mkCtor "newWithPixmap" [objT c_QPixmap]+ , just $ mkConstMethod' "actualSize" "actualSize" [objT c_QSize] $ objT c_QSize+ , just $ mkConstMethod' "actualSize" "actualSizeAll"+ [objT c_QSize, enumT e_Mode, enumT e_State] $ objT c_QSize+ , test (qtVersion >= [5, 1]) $ mkConstMethod' "actualSize" "actualSizeWithWindow"+ [ptrT $ objT c_QWindow, objT c_QSize] $ objT c_QSize+ , test (qtVersion >= [5, 1]) $ mkConstMethod' "actualSize" "actualSizeWithWindowAll"+ [ptrT $ objT c_QWindow, objT c_QSize, enumT e_Mode, enumT e_State] $ objT c_QSize+ , just $ mkMethod' "addFile" "addFile" [objT c_QString] voidT+ , just $ mkMethod' "addFile" "addFileAll"+ [objT c_QString, objT c_QSize, enumT e_Mode, enumT e_State]+ voidT+ , just $ mkMethod' "addPixmap" "addPixmap" [objT c_QPixmap] voidT+ , just $ mkMethod' "addPixmap" "addPixmapAll" [objT c_QPixmap, enumT e_Mode, enumT e_State] voidT+ , just $ mkConstMethod' "availableSizes" "availableSizes" [] $ objT c_QListQSize+ , just $ mkConstMethod' "availableSizes" "availableSizesAll" [enumT e_Mode, enumT e_State] $+ objT c_QListQSize+ , just $ mkConstMethod "cacheKey" [] int64T+ , just $ mkStaticMethod' "fromTheme" "fromTheme" [objT c_QString] $ objT c_QIcon+ , just $ mkStaticMethod' "fromTheme" "fromThemeWithFallback" [objT c_QString, objT c_QIcon] $+ objT c_QIcon+ , just $ mkStaticMethod "hasThemeIcon" [objT c_QString] boolT+ , test (qtVersion >= [5, 6]) $ mkConstMethod "isMask" [] boolT+ , just $ mkConstMethod "isNull" [] boolT+ , just $ mkConstMethod "name" [] $ objT c_QString+ , just $ mkConstMethod' "paint" "paintWithRect"+ [ptrT $ objT c_QPainter, objT c_QRect] $ voidT+ , just $ mkConstMethod' "paint" "paintWithRectAll"+ [ptrT $ objT c_QPainter, objT c_QRect, bitspaceT bs_Alignment, enumT e_Mode, enumT e_State]+ voidT+ , just $ mkConstMethod' "paint" "paintWithRaw"+ [ptrT $ objT c_QPainter, intT, intT, intT, intT] $ voidT+ , just $ mkConstMethod' "paint" "paintWithRawAll"+ [ptrT $ objT c_QPainter, intT, intT, intT, intT, bitspaceT bs_Alignment, enumT e_Mode,+ enumT e_State]+ voidT+ , test (qtVersion >= [5, 1]) $ mkConstMethod' "pixmap" "pixmapExtent" [intT] $ objT c_QPixmap+ , test (qtVersion >= [5, 1]) $ mkConstMethod' "pixmap" "pixmapExtentAll"+ [intT, enumT e_Mode, enumT e_State] $ objT c_QPixmap+ , just $ mkConstMethod' "pixmap" "pixmapRaw" [intT, intT] $ objT c_QPixmap+ , just $ mkConstMethod' "pixmap" "pixmapRawAll" [intT, intT, enumT e_Mode, enumT e_State] $+ objT c_QPixmap+ , just $ mkConstMethod' "pixmap" "pixmapSize" [objT c_QSize] $ objT c_QPixmap+ , just $ mkConstMethod' "pixmap" "pixmapSizeAll" [objT c_QSize, enumT e_Mode, enumT e_State] $+ objT c_QPixmap+ , test (qtVersion >= [5, 6]) $ mkMethod "setIsMask" [boolT] voidT+ , just $ mkStaticMethod "setThemeName" [objT c_QString] voidT+ , just $ mkStaticMethod "setThemeSearchPaths" [objT c_QStringList] voidT+ , just $ mkMethod "swap" [refT $ objT c_QIcon] voidT+ , just $ mkStaticMethod "themeName" [] $ objT c_QString+ , just $ mkStaticMethod "themeSearchPaths" [] $ objT c_QStringList+ -- TODO operator QVariant() const+ ]++e_Mode =+ makeQtEnum (ident1 "QIcon" "Mode") [includeStd "QIcon"]+ [ (0, ["normal"])+ , (1, ["disabled"])+ , (2, ["active"])+ , (3, ["selected"])+ ]++e_State =+ makeQtEnum (ident1 "QIcon" "State") [includeStd "QIcon"]+ [ (0, ["on"])+ , (1, ["off"])+ ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QIcon.hs-boot view
@@ -0,0 +1,22 @@+-- This file is part of Qtah.+--+-- Copyright 2015-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.Gui.QIcon (c_QIcon) where++import Foreign.Hoppy.Generator.Spec (Class)++c_QIcon :: Class
src/Graphics/UI/Qtah/Generator/Interface/Gui/QImage.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -63,6 +63,7 @@ ) import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray) 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)@@ -165,8 +166,12 @@ , just $ mkMethod' "fill" "fillWithColor" [objT c_QColor] voidT , just $ mkMethod' "fill" "fillWithGlobalColor" [enumT e_GlobalColor] voidT , just $ mkConstMethod "format" [] $ enumT e_Format- , just $ mkStaticMethod' "fromData" "fromData" [ptrT $ constT ucharT, intT] $ objToHeapT c_QImage- , just $ makeFnMethod (ident2 "qtah" "qimage" "fromData") "fromDataWithFormat" MStatic Nonpure+ , just $ mkStaticMethod' "fromData" "fromDataByteArray" [objT c_QByteArray] $ objToHeapT c_QImage+ , just $ makeFnMethod (ident2 "qtah" "qimage" "fromData") "fromDataByteArrayWithFormat"+ MStatic Nonpure [objT c_QByteArray, objT c_QString] $ ptrT $ objT c_QImage+ , just $ mkStaticMethod' "fromData" "fromDataRaw" [ptrT $ constT ucharT, intT] $+ objToHeapT c_QImage+ , just $ makeFnMethod (ident2 "qtah" "qimage" "fromData") "fromDataRawWithFormat" MStatic Nonpure [ptrT $ constT ucharT, intT, objT c_QString] $ ptrT $ objT c_QImage , just $ mkConstMethod "hasAlphaChannel" [] boolT , just $ mkConstMethod "height" [] intT@@ -178,10 +183,12 @@ , just $ makeFnMethod (ident2 "qtah" "qimage" "load") "loadWithFormat" MStatic Nonpure [refT $ objT c_QImage, objT c_QString, objT c_QString] boolT -- TODO load(QIODevice*, ...)- , just $ mkMethod' "loadFromData" "loadFromData" [ptrT $ constT ucharT, intT] boolT- , just $ makeFnMethod (ident2 "qtah" "qimage" "loadFromData") "loadFromDataWithFormat"+ , just $ mkMethod' "loadFromData" "loadFromDataByteArray" [objT c_QByteArray] boolT+ , just $ makeFnMethod (ident2 "qtah" "qimage" "loadFromData") "loadFromDataByteArrayWithFormat"+ MStatic Nonpure [refT $ objT c_QImage, objT c_QByteArray, objT c_QString] boolT+ , just $ mkMethod' "loadFromData" "loadFromDataRaw" [ptrT $ constT ucharT, intT] boolT+ , just $ makeFnMethod (ident2 "qtah" "qimage" "loadFromData") "loadFromDataRawWithFormat" MStatic Nonpure [refT $ objT c_QImage, ptrT $ constT ucharT, intT, objT c_QString] boolT- -- TODO loadFromData(const QByteArray&, ...) , just $ mkConstMethod "mirrored" [boolT, boolT] $ objT c_QImage -- TODO Args optional? , just $ mkProp "offset" $ objT c_QPoint , just $ mkConstMethod' "pixel" "pixelAtPoint" [objT c_QPoint] qrgb
src/Graphics/UI/Qtah/Generator/Interface/Gui/QInputEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QIntValidator.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QKeyEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QMouseEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QOpenGLWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPaintDevice.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPaintDeviceWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPaintEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPainter.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPainterPath.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPen.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QPixmap.hs view
@@ -0,0 +1,156 @@+-- This file is part of Qtah.+--+-- Copyright 2015-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.Gui.QPixmap (+ aModule,+ c_QPixmap,+ ) where++import Foreign.Hoppy.Generator.Spec (+ Export (ExportClass),+ addReqIncludes,+ classSetConversionToGc,+ classSetEntityPrefix,+ ident,+ includeStd,+ makeClass,+ mkConstMethod,+ mkConstMethod',+ mkCtor,+ mkMethod,+ mkMethod',+ mkProp,+ mkStaticMethod,+ mkStaticMethod',+ )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+ ClassFeature (Assignable, Copyable),+ classAddFeatures,+ )+import Foreign.Hoppy.Generator.Types (+ bitspaceT,+ boolT,+ enumT,+ intT,+ int64T,+ objT,+ ptrT,+ refT,+ voidT,+ )+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+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 (+ bs_ImageConversionFlags,+ e_AspectRatioMode,+ e_TransformationMode,+ qreal,+ )+import Graphics.UI.Qtah.Generator.Interface.Gui.QColor (c_QColor)+import Graphics.UI.Qtah.Generator.Interface.Gui.QImage (c_QImage)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPaintDevice (c_QPaintDevice)+import Graphics.UI.Qtah.Generator.Interface.Gui.QRegion (c_QRegion)+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++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+ AQtModule $+ makeQtModule ["Gui", "QPixmap"]+ [ QtExport $ ExportClass c_QPixmap+ ]++c_QPixmap =+ addReqIncludes [includeStd "QPixmap"] $+ classSetConversionToGc $+ classAddFeatures [Assignable, Copyable] $+ classSetEntityPrefix "" $+ makeClass (ident "QPixmap") Nothing [c_QPaintDevice] $+ collect+ [ just $ mkCtor "new" []+ , just $ mkCtor "newWithSize" [objT c_QSize]+ , just $ mkCtor "newWithSizeRaw" [intT, intT]+ , just $ mkCtor "newWithFile" [objT c_QString]+ -- TODO QPixmap(const QString&, const char*, Qt::ImageConversionFlags)+ -- TODO QPixmap(const char* const[] xpm) (Does this copy the data?)+ , just $ mkConstMethod "cacheKey" [] int64T+ , just $ mkMethod' "convertFromImage" "convertFromImage" [objT c_QImage] boolT+ , just $ mkMethod' "convertFromImage" "convertFromImageAll"+ [objT c_QImage, bitspaceT bs_ImageConversionFlags] boolT+ , just $ mkConstMethod' "copy" "copyRect" [objT c_QRect] $ objT c_QPixmap+ , just $ mkConstMethod' "copy" "copyRaw" [intT, intT, intT, intT] $ objT c_QPixmap+ -- TODO QBitmap createHeuristicMask(bool =) const+ -- TODO QBitmap createMaskFromColor(const QColor&, Qt::MaskMode =) const+ , just $ mkStaticMethod "defaultDepth" [] intT+ , just $ mkConstMethod "depth" [] intT+ , just $ mkMethod "detach" [] voidT+ , test (qtVersion >= [5, 0]) $ mkProp "devicePixelRatio" qreal+ , just $ mkMethod' "fill" "fill" [] voidT+ , just $ mkMethod' "fill" "fillWithColor" [objT c_QColor] voidT+ , just $ mkStaticMethod' "fromImage" "fromImage" [objT c_QImage] $ objT c_QPixmap+ , just $ mkStaticMethod' "fromImage" "fromImageAll"+ [objT c_QImage, bitspaceT bs_ImageConversionFlags] $ objT c_QPixmap+ -- TODO QPixmap fromImageReader(QImageReader*, ...)+ , just $ mkConstMethod "hasAlpha" [] boolT+ , just $ mkConstMethod "hasAlphaChannel" [] boolT+ , just $ mkConstMethod "height" [] intT+ , just $ mkConstMethod "isNull" [] boolT+ , just $ mkConstMethod "isQBitmap" [] boolT+ , just $ mkMethod' "load" "load" [objT c_QString] boolT+ -- TODO load(const QString&, const char*, Qt::ImageConversionFlags)+ -- TODO loadFromData+ -- TODO mask+ , just $ mkConstMethod "rect" [] $ objT c_QRect+ , just $ mkConstMethod "save" [objT c_QString] boolT+ -- TODO bool save(const QString&, const char*, int)+ -- TODO save(QIODevice*, ...)+ , just $ mkConstMethod' "scaled" "scaledRaw" [intT, intT] $ objT c_QPixmap+ , just $ mkConstMethod' "scaled" "scaledRawAll"+ [intT, intT, enumT e_AspectRatioMode, enumT e_TransformationMode] $ objT c_QPixmap+ , just $ mkConstMethod' "scaled" "scaledSize" [objT c_QSize] $ objT c_QPixmap+ , just $ mkConstMethod' "scaled" "scaledSizeAll"+ [objT c_QSize, enumT e_AspectRatioMode, enumT e_TransformationMode] $ objT c_QPixmap+ , just $ mkConstMethod' "scaledToHeight" "scaledToHeight" [intT] $ objT c_QPixmap+ , just $ mkConstMethod' "scaledToHeight" "scaledToHeightAll" [intT, enumT e_TransformationMode] $+ objT c_QPixmap+ , just $ mkConstMethod' "scaledToWidth" "scaledToWidth" [intT] $ objT c_QPixmap+ , just $ mkConstMethod' "scaledToWidth" "scaledToWidthAll" [intT, enumT e_TransformationMode] $+ objT c_QPixmap+ , just $ mkMethod' "scroll" "scrollRaw" [intT, intT, intT, intT, intT, intT] voidT+ , just $ mkMethod' "scroll" "scrollRawAll"+ [intT, intT, intT, intT, intT, intT, ptrT $ objT c_QRegion] voidT+ , just $ mkMethod' "scroll" "scrollRect" [intT, intT, objT c_QRect] voidT+ , just $ mkMethod' "scroll" "scrollRectAll" [intT, intT, objT c_QRect, ptrT $ objT c_QRegion]+ voidT+ , just $ mkConstMethod "size" [] $ objT c_QSize+ , just $ mkMethod "swap" [refT $ objT c_QPixmap] voidT+ , just $ mkConstMethod "toImage" [] $ objT c_QImage+ , just $ mkConstMethod' "transformed" "transformed" [objT c_QTransform] $ objT c_QPixmap+ , just $ mkConstMethod' "transformed" "transformedAll"+ [objT c_QTransform, enumT e_TransformationMode] $ objT c_QPixmap+ -- TODO QPixmap transformed(const QMatrix&, ...)+ , just $ mkStaticMethod' "trueMatrix" "trueMatrixTransform" [objT c_QTransform, intT, intT] $+ objT c_QTransform+ -- TODO QPixmap trueMatrix(const QMatrix&, ...)+ , just $ mkConstMethod "width" [] intT+ -- OMIT bool operator!() (It's just isNull).+ ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPolygon.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPolygonF.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QRasterWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QRegion.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -44,6 +44,8 @@ import Graphics.UI.Qtah.Generator.Flags (qtVersion) 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.Types (e_FillRule)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPolygon (c_QPolygon) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -65,7 +67,8 @@ collect [ just $ mkCtor "new" [] , just $ mkCtor "newFromPoints" [intT, intT, intT, intT, enumT e_RegionType]- -- TODO newFromPolygon (needs QPolygon)+ , just $ mkCtor "newFromPolygon" [objT c_QPolygon]+ , just $ mkCtor "newFromPolygonAll" [objT c_QPolygon, enumT e_FillRule] -- TODO newFromBitmap (needs QBitmap) , just $ mkCtor "newFromRect" [objT c_QRect, enumT e_RegionType] , just $ mkConstMethod "boundingRect" [] $ objT c_QRect
src/Graphics/UI/Qtah/Generator/Interface/Gui/QShowEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QStandardItemModel.hs view
@@ -0,0 +1,115 @@+-- This file is part of Qtah.+--+-- Copyright 2015-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.Gui.QStandardItemModel (+ aModule,+ itemModule,+ itemListModule,+ c_QStandardItemModel,+ ) where++import Foreign.Hoppy.Generator.Spec (+ Class,+ Export (ExportClass),+ addReqIncludes,+ classSetEntityPrefix,+ ident,+ includeStd,+ makeClass,+ mkConstMethod,+ mkCtor,+ mkMethod',+ mkProp,+ )+import Foreign.Hoppy.Generator.Types (+ bitspaceT, intT, objT, ptrT, voidT,+ )+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (+ c_QAbstractItemModel,+ )+import Graphics.UI.Qtah.Generator.Interface.Core.QList (+ Contents, c_QList, instantiate,+ )+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.Gui.QIcon (c_QIcon)+import Graphics.UI.Qtah.Generator.Module (+ AModule (AQtModule), makeQtModule, makeQtModuleWithMinVersion,+ )+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule :: AModule+aModule =+ AQtModule $+ makeQtModule ["Gui", "QStandardItemModel"]+ [QtExport $ ExportClass c_QStandardItemModel]++itemModule :: AModule+itemModule =+ AQtModule $+ makeQtModuleWithMinVersion+ ["Gui", "QStandardItem"]+ [4, 2]+ [QtExport $ ExportClass c_QStandardItem]++itemListModule :: AModule+itemListModule =+ AQtModule $+ makeQtModuleWithMinVersion+ ["Core", "QList", "QStandardItem"]+ [4, 2]+ [QtExport $ ExportClass c_QListQStandardItem]++c_QStandardItemModel :: Class+c_QStandardItemModel =+ addReqIncludes [includeStd "QStandardItemModel"] $+ classSetEntityPrefix "" $+ makeClass (ident "QStandardItemModel") Nothing [c_QAbstractItemModel] $+ collect+ [ test (qtVersion >= [4, 2]) $+ mkMethod' "appendRow" "appendRowItems" [objT c_QListQStandardItem] voidT+ , test (qtVersion >= [4, 2]) $+ mkMethod' "appendRow" "appendRowItem" [ptrT $ objT c_QStandardItem] voidT+ ]++c_QStandardItem :: Class+c_QStandardItem =+ addReqIncludes [includeStd "QStandardItem"] $+ classSetEntityPrefix "" $+ makeClass (ident "QStandardItem") Nothing [] $+ collect+ [ just $ mkCtor "new" []+ , just $ mkCtor "newWithText" [objT c_QString]+ , just $ mkCtor "newWithIconAndText" [objT c_QIcon, objT c_QString]+ , just $ mkCtor "newWithRows" [intT]+ , just $ mkCtor "newWithRowsAndColumns" [intT, intT]+ , just $ mkConstMethod "model" [] (ptrT $ objT c_QAbstractItemModel)+ , just $ mkProp "text" $ objT c_QString+ , just $ mkProp "textAlignment" $ bitspaceT bs_Alignment+ -- TODO other methods+ ]++c_QListQStandardItem :: Class+c_QListQStandardItem = c_QList contents_QStandardItem++contents_QStandardItem :: Contents+contents_QStandardItem =+ instantiate "QListQStandardItem" (ptrT $ objT c_QStandardItem) mempty
src/Graphics/UI/Qtah/Generator/Interface/Gui/QSurface.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QTransform.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QValidator.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QWheelEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -55,6 +55,7 @@ e_WindowType, qreal, )+import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon) import Graphics.UI.Qtah.Generator.Interface.Gui.QRegion (c_QRegion) import Graphics.UI.Qtah.Generator.Interface.Gui.QSurface (c_QSurface, e_SurfaceType) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (@@ -110,7 +111,7 @@ , just $ mkProp "geometry" $ objT c_QRect , just $ mkProp "height" intT , just $ mkMethod "hide" [] voidT- -- TODO mkProp "icon" $ objT c_QIcon+ , just $ mkProp "icon" $ objT c_QIcon , test (qtVersion >= [5, 1]) $ mkConstMethod "isActive" [] boolT , just $ mkConstMethod "isAncestorOf" [ptrT $ objT c_QWindow, enumT e_AncestorMode] boolT , just $ mkConstMethod "isExposed" [] boolT
src/Graphics/UI/Qtah/Generator/Interface/Gui/QWindow.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -17,12 +17,15 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QWindow ( minVersion,+ c_QWindow, e_Visibility, ) where -import Foreign.Hoppy.Generator.Spec (CppEnum)+import Foreign.Hoppy.Generator.Spec (Class, CppEnum) import Graphics.UI.Qtah.Generator.Flags (Version) minVersion :: Version++c_QWindow :: Class e_Visibility :: CppEnum
src/Graphics/UI/Qtah/Generator/Interface/Gui/QtahOpenGLWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Gui/QtahRasterWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Imports.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -19,6 +19,8 @@ -- Some classes use qualified imports that don't start with @\"Qtah\"@; such -- imports are one-off and are not listed here. module Graphics.UI.Qtah.Generator.Interface.Imports (+ importForByteString,+ importForByteStringUnsafe, importForChar, importForEvent, importForForeign,@@ -30,6 +32,12 @@ ) where import Foreign.Hoppy.Generator.Spec (HsImportSet, hsQualifiedImport)++importForByteString :: HsImportSet+importForByteString = hsQualifiedImport "Data.ByteString" "QtahDBS"++importForByteStringUnsafe :: HsImportSet+importForByteStringUnsafe = hsQualifiedImport "Data.ByteString.Unsafe" "QtahDBSU" importForChar :: HsImportSet importForChar = hsQualifiedImport "Data.Char" "QtahDC"
src/Graphics/UI/Qtah/Generator/Interface/Internal.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Internal/Callback.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -18,6 +18,7 @@ module Graphics.UI.Qtah.Generator.Interface.Internal.Callback where import Foreign.Hoppy.Generator.Spec (+ Callback, Export (ExportCallback), makeCallback, makeModule,@@ -27,6 +28,7 @@ toExtName, ) import Foreign.Hoppy.Generator.Types (+ bitspaceT, boolT, constT, doubleT,@@ -50,20 +52,28 @@ import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVector (c_QVectorInt) import Graphics.UI.Qtah.Generator.Interface.Core.Types (+ bs_ToolBarAreas,+ e_Orientation, e_ScreenOrientation, e_ScreenOrientation_minVersion,+ e_ToolButtonStyle, e_WindowModality, e_WindowState, qreal, ) import {-# SOURCE #-} qualified Graphics.UI.Qtah.Generator.Interface.Gui.QClipboard as QClipboard+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon) import Graphics.UI.Qtah.Generator.Interface.Gui.QPaintEvent (c_QPaintEvent) import {-# SOURCE #-} qualified Graphics.UI.Qtah.Generator.Interface.Gui.QWindow as QWindow import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton (c_QAbstractButton) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractSlider (e_SliderAction)-import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsItem (c_QGraphicsItem) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsItem (c_QGraphicsItem)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QSystemTrayIcon (+ e_ActivationReason,+ )+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidget (c_QTreeWidgetItem) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AHoppyModule)) @@ -79,6 +89,7 @@ , just $ ExportCallback cb_IntVoid , just $ ExportCallback cb_IntBoolVoid , just $ ExportCallback cb_IntIntVoid+ , just $ ExportCallback cb_OrientationVoid , just $ ExportCallback cb_PtrQAbstractButtonVoid , just $ ExportCallback cb_PtrQAbstractButtonBoolVoid , just $ ExportCallback cb_PtrQAbstractItemModelVoid@@ -87,6 +98,9 @@ , just $ ExportCallback cb_PtrQObjectPtrQEventBool , just $ ExportCallback cb_PtrQObjectVoid , just $ ExportCallback cb_PtrQPaintEventVoid+ , just $ ExportCallback cb_PtrQTreeWidgetItemVoid+ , just $ ExportCallback cb_PtrQTreeWidgetItemIntVoid+ , just $ ExportCallback cb_PtrQTreeWidgetItemPtrQTreeWidgetItemVoid , just $ ExportCallback cb_PtrQWidgetPtrQWidgetVoid , just $ ExportCallback cb_QAbstractSliderActionVoid , just $ ExportCallback cb_QClipboardModeVoid@@ -100,8 +114,12 @@ , just $ ExportCallback cb_QrealVoid , just $ ExportCallback cb_QSizeVoid , just $ ExportCallback cb_QStringVoid+ , just $ ExportCallback cb_QSystemTrayIconActivationReasonVoid+ , just $ ExportCallback cb_RefConstQIconVoid , just $ ExportCallback cb_RefConstQItemSelectionRefConstQItemSelectionVoid , test (qtVersion >= e_ScreenOrientation_minVersion) $ ExportCallback cb_ScreenOrientationVoid+ , just $ ExportCallback cb_ToolBarAreasVoid+ , just $ ExportCallback cb_ToolButtonStyleVoid , just $ ExportCallback cb_WindowModalityVoid , just $ ExportCallback cb_WindowStateVoid , just $ ExportCallback cb_Void@@ -127,6 +145,10 @@ makeCallback (toExtName "CallbackIntIntVoid") [intT, intT] voidT +cb_OrientationVoid =+ makeCallback (toExtName "CallbackOrientationVoid")+ [enumT e_Orientation] voidT+ cb_PtrQAbstractButtonVoid = makeCallback (toExtName "CallbackPtrQAbstractButtonVoid") [ptrT $ objT c_QAbstractButton] voidT@@ -159,6 +181,21 @@ makeCallback (toExtName "CallbackPtrQPaintEventVoid") [ptrT $ objT c_QPaintEvent] voidT +cb_PtrQTreeWidgetItemVoid :: Callback+cb_PtrQTreeWidgetItemVoid =+ makeCallback (toExtName "CallbackPtrQTreeWidgetItemVoid")+ [ptrT $ objT c_QTreeWidgetItem] voidT++cb_PtrQTreeWidgetItemIntVoid :: Callback+cb_PtrQTreeWidgetItemIntVoid =+ makeCallback (toExtName "CallbackPtrQTreeWidgetItemIntVoid")+ [ptrT $ objT c_QTreeWidgetItem, intT] voidT++cb_PtrQTreeWidgetItemPtrQTreeWidgetItemVoid :: Callback+cb_PtrQTreeWidgetItemPtrQTreeWidgetItemVoid =+ makeCallback (toExtName "CallbackPtrQTreeWidgetItemPtrQTreeWidgetItemVoid")+ [ptrT $ objT c_QTreeWidgetItem, ptrT $ objT c_QTreeWidgetItem] voidT+ cb_PtrQWidgetPtrQWidgetVoid = makeCallback (toExtName "CallbackPtrQWidgetPtrQWidgetVoid") [ptrT $ objT c_QWidget, ptrT $ objT c_QWidget] voidT@@ -211,6 +248,14 @@ makeCallback (toExtName "CallbackQStringVoid") [objT c_QString] voidT +cb_QSystemTrayIconActivationReasonVoid =+ makeCallback (toExtName "CallbackQSystemTrayIconActivationReasonVoid")+ [enumT e_ActivationReason] voidT++cb_RefConstQIconVoid =+ makeCallback (toExtName "CallbackRefConstQIconVoid")+ [refT $ constT $ objT c_QIcon] voidT+ cb_RefConstQItemSelectionRefConstQItemSelectionVoid = makeCallback (toExtName "CallbackRefConstQItemSelectionRefConstQItemSelectionVoid") [refT $ constT $ objT c_QItemSelection, refT $ constT $ objT c_QItemSelection] voidT@@ -218,6 +263,14 @@ cb_ScreenOrientationVoid = makeCallback (toExtName "CallbackScreenOrientationVoid") [enumT e_ScreenOrientation] voidT++cb_ToolBarAreasVoid =+ makeCallback (toExtName "CallbackToolBarAreasVoid")+ [bitspaceT bs_ToolBarAreas] voidT++cb_ToolButtonStyleVoid =+ makeCallback (toExtName "CallbackToolButtonStyleVoid")+ [enumT e_ToolButtonStyle] voidT cb_WindowModalityVoid = makeCallback (toExtName "CallbackWindowModalityVoid")
src/Graphics/UI/Qtah/Generator/Interface/Internal/EventListener.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Internal/Listener.hs view
@@ -58,6 +58,15 @@ [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT ] +c_ListenerOrientation =+ S.makeClass (S.ident "ListenerOrientation") Nothing [QObject.c_QObject]+ [ S.mkCtor "new" [S.callbackT C.cb_OrientationVoid]+ , S.mkCtor "newWithParent"+ [S.callbackT C.cb_OrientationVoid, S.ptrT $ S.objT QObject.c_QObject]+ , S.mkMethod "connectListener"+ [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT+ ]+ c_ListenerPtrQAbstractButton = S.makeClass (S.ident "ListenerPtrQAbstractButton") Nothing [QObject.c_QObject] [ S.mkCtor "new" [S.callbackT C.cb_PtrQAbstractButtonVoid]@@ -103,33 +112,42 @@ [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT ] -c_ListenerPtrQWidgetPtrQWidget =- S.makeClass (S.ident "ListenerPtrQWidgetPtrQWidget") Nothing [QObject.c_QObject]- [ S.mkCtor "new" [S.callbackT C.cb_PtrQWidgetPtrQWidgetVoid]+c_ListenerPtrQTreeWidgetItem =+ S.makeClass (S.ident "ListenerPtrQTreeWidgetItem") Nothing [QObject.c_QObject]+ [ S.mkCtor "new" [S.callbackT C.cb_PtrQTreeWidgetItemVoid] , S.mkCtor "newWithParent"- [S.callbackT C.cb_PtrQWidgetPtrQWidgetVoid, S.ptrT $ S.objT QObject.c_QObject]+ [S.callbackT C.cb_PtrQTreeWidgetItemVoid, S.ptrT $ S.objT QObject.c_QObject] , S.mkMethod "connectListener" [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT ] -c_ListenerRefConstQItemSelectionRefConstQItemSelection =- S.makeClass (S.ident "ListenerRefConstQItemSelectionRefConstQItemSelection") Nothing [QObject.c_QObject]- [ S.mkCtor "new" [S.callbackT C.cb_RefConstQItemSelectionRefConstQItemSelectionVoid]+c_ListenerPtrQTreeWidgetItemInt =+ S.makeClass (S.ident "ListenerPtrQTreeWidgetItemInt") Nothing [QObject.c_QObject]+ [ S.mkCtor "new" [S.callbackT C.cb_PtrQTreeWidgetItemIntVoid] , S.mkCtor "newWithParent"- [S.callbackT C.cb_RefConstQItemSelectionRefConstQItemSelectionVoid, S.ptrT $ S.objT QObject.c_QObject]+ [S.callbackT C.cb_PtrQTreeWidgetItemIntVoid, S.ptrT $ S.objT QObject.c_QObject] , S.mkMethod "connectListener" [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT ] -c_ListenerScreenOrientation =- S.makeClass (S.ident "ListenerScreenOrientation") Nothing [QObject.c_QObject]- [ S.mkCtor "new" [S.callbackT C.cb_ScreenOrientationVoid]+c_ListenerPtrQTreeWidgetItemPtrQTreeWidgetItem =+ S.makeClass (S.ident "ListenerPtrQTreeWidgetItemPtrQTreeWidgetItem") Nothing [QObject.c_QObject]+ [ S.mkCtor "new" [S.callbackT C.cb_PtrQTreeWidgetItemPtrQTreeWidgetItemVoid] , S.mkCtor "newWithParent"- [S.callbackT C.cb_ScreenOrientationVoid, S.ptrT $ S.objT QObject.c_QObject]+ [S.callbackT C.cb_PtrQTreeWidgetItemPtrQTreeWidgetItemVoid, S.ptrT $ S.objT QObject.c_QObject] , S.mkMethod "connectListener" [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT ] +c_ListenerPtrQWidgetPtrQWidget =+ S.makeClass (S.ident "ListenerPtrQWidgetPtrQWidget") Nothing [QObject.c_QObject]+ [ S.mkCtor "new" [S.callbackT C.cb_PtrQWidgetPtrQWidgetVoid]+ , S.mkCtor "newWithParent"+ [S.callbackT C.cb_PtrQWidgetPtrQWidgetVoid, S.ptrT $ S.objT QObject.c_QObject]+ , S.mkMethod "connectListener"+ [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT+ ]+ c_ListenerQAbstractSliderAction = S.makeClass (S.ident "ListenerQAbstractSliderAction") Nothing [QObject.c_QObject] [ S.mkCtor "new" [S.callbackT C.cb_QAbstractSliderActionVoid]@@ -229,6 +247,15 @@ [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT ] +c_ListenerQSystemTrayIconActivationReason =+ S.makeClass (S.ident "ListenerQSystemTrayIconActivationReason") Nothing [QObject.c_QObject]+ [ S.mkCtor "new" [S.callbackT C.cb_QSystemTrayIconActivationReasonVoid]+ , S.mkCtor "newWithParent"+ [S.callbackT C.cb_QSystemTrayIconActivationReasonVoid, S.ptrT $ S.objT QObject.c_QObject]+ , S.mkMethod "connectListener"+ [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT+ ]+ c_ListenerQWindowVisibility = S.makeClass (S.ident "ListenerQWindowVisibility") Nothing [QObject.c_QObject] [ S.mkCtor "new" [S.callbackT C.cb_QWindowVisibilityVoid]@@ -238,6 +265,51 @@ [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT ] +c_ListenerRefConstQIcon =+ S.makeClass (S.ident "ListenerRefConstQIcon") Nothing [QObject.c_QObject]+ [ S.mkCtor "new" [S.callbackT C.cb_RefConstQIconVoid]+ , S.mkCtor "newWithParent"+ [S.callbackT C.cb_RefConstQIconVoid, S.ptrT $ S.objT QObject.c_QObject]+ , S.mkMethod "connectListener"+ [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT+ ]++c_ListenerRefConstQItemSelectionRefConstQItemSelection =+ S.makeClass (S.ident "ListenerRefConstQItemSelectionRefConstQItemSelection") Nothing [QObject.c_QObject]+ [ S.mkCtor "new" [S.callbackT C.cb_RefConstQItemSelectionRefConstQItemSelectionVoid]+ , S.mkCtor "newWithParent"+ [S.callbackT C.cb_RefConstQItemSelectionRefConstQItemSelectionVoid, S.ptrT $ S.objT QObject.c_QObject]+ , S.mkMethod "connectListener"+ [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT+ ]++c_ListenerScreenOrientation =+ S.makeClass (S.ident "ListenerScreenOrientation") Nothing [QObject.c_QObject]+ [ S.mkCtor "new" [S.callbackT C.cb_ScreenOrientationVoid]+ , S.mkCtor "newWithParent"+ [S.callbackT C.cb_ScreenOrientationVoid, S.ptrT $ S.objT QObject.c_QObject]+ , S.mkMethod "connectListener"+ [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT+ ]++c_ListenerToolBarAreas =+ S.makeClass (S.ident "ListenerToolBarAreas") Nothing [QObject.c_QObject]+ [ S.mkCtor "new" [S.callbackT C.cb_ToolBarAreasVoid]+ , S.mkCtor "newWithParent"+ [S.callbackT C.cb_ToolBarAreasVoid, S.ptrT $ S.objT QObject.c_QObject]+ , S.mkMethod "connectListener"+ [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT+ ]++c_ListenerToolButtonStyle =+ S.makeClass (S.ident "ListenerToolButtonStyle") Nothing [QObject.c_QObject]+ [ S.mkCtor "new" [S.callbackT C.cb_ToolButtonStyleVoid]+ , S.mkCtor "newWithParent"+ [S.callbackT C.cb_ToolButtonStyleVoid, S.ptrT $ S.objT QObject.c_QObject]+ , S.mkMethod "connectListener"+ [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT+ ]+ c_ListenerWindowModality = S.makeClass (S.ident "ListenerWindowModality") Nothing [QObject.c_QObject] [ S.mkCtor "new" [S.callbackT C.cb_WindowModalityVoid]@@ -277,14 +349,16 @@ , V.just $ S.ExportClass c_ListenerInt , V.just $ S.ExportClass c_ListenerIntBool , V.just $ S.ExportClass c_ListenerIntInt+ , V.just $ S.ExportClass c_ListenerOrientation , V.just $ S.ExportClass c_ListenerPtrQAbstractButton , V.just $ S.ExportClass c_ListenerPtrQAbstractButtonBool , V.just $ S.ExportClass c_ListenerPtrQAbstractItemModel , V.just $ S.ExportClass c_ListenerPtrQAction , V.just $ S.ExportClass c_ListenerPtrQObject+ , V.just $ S.ExportClass c_ListenerPtrQTreeWidgetItem+ , V.just $ S.ExportClass c_ListenerPtrQTreeWidgetItemInt+ , V.just $ S.ExportClass c_ListenerPtrQTreeWidgetItemPtrQTreeWidgetItem , V.just $ S.ExportClass c_ListenerPtrQWidgetPtrQWidget- , V.just $ S.ExportClass c_ListenerRefConstQItemSelectionRefConstQItemSelection- , V.test (F.qtVersion >= [5, 0]) $ S.ExportClass c_ListenerScreenOrientation , V.just $ S.ExportClass c_ListenerQAbstractSliderAction , V.just $ S.ExportClass c_ListenerQClipboardMode , V.just $ S.ExportClass c_ListenerQModelIndex@@ -296,7 +370,13 @@ , V.just $ S.ExportClass c_ListenerQreal , V.just $ S.ExportClass c_ListenerQSize , V.just $ S.ExportClass c_ListenerQString+ , V.just $ S.ExportClass c_ListenerQSystemTrayIconActivationReason , V.test (F.qtVersion >= [5, 0]) $ S.ExportClass c_ListenerQWindowVisibility+ , V.just $ S.ExportClass c_ListenerRefConstQIcon+ , V.just $ S.ExportClass c_ListenerRefConstQItemSelectionRefConstQItemSelection+ , V.test (F.qtVersion >= [5, 0]) $ S.ExportClass c_ListenerScreenOrientation+ , V.just $ S.ExportClass c_ListenerToolBarAreas+ , V.just $ S.ExportClass c_ListenerToolButtonStyle , V.just $ S.ExportClass c_ListenerWindowModality , V.just $ S.ExportClass c_ListenerWindowState , V.just $ S.ExportClass c_Listener
src/Graphics/UI/Qtah/Generator/Interface/Internal/Listener.hs-boot view
@@ -9,14 +9,16 @@ c_ListenerInt :: Class c_ListenerIntBool :: Class c_ListenerIntInt :: Class+c_ListenerOrientation :: Class c_ListenerPtrQAbstractButton :: Class c_ListenerPtrQAbstractButtonBool :: Class c_ListenerPtrQAbstractItemModel :: Class c_ListenerPtrQAction :: Class c_ListenerPtrQObject :: Class+c_ListenerPtrQTreeWidgetItem :: Class+c_ListenerPtrQTreeWidgetItemInt :: Class+c_ListenerPtrQTreeWidgetItemPtrQTreeWidgetItem :: Class c_ListenerPtrQWidgetPtrQWidget :: Class-c_ListenerRefConstQItemSelectionRefConstQItemSelection :: Class-c_ListenerScreenOrientation :: Class c_ListenerQAbstractSliderAction :: Class c_ListenerQClipboardMode :: Class c_ListenerQModelIndex :: Class@@ -28,7 +30,13 @@ c_ListenerQreal :: Class c_ListenerQSize :: Class c_ListenerQString :: Class+c_ListenerQSystemTrayIconActivationReason :: Class c_ListenerQWindowVisibility :: Class+c_ListenerRefConstQIcon :: Class+c_ListenerRefConstQItemSelectionRefConstQItemSelection :: Class+c_ListenerScreenOrientation :: Class+c_ListenerToolBarAreas :: Class+c_ListenerToolButtonStyle :: Class c_ListenerWindowModality :: Class c_ListenerWindowState :: Class c_Listener :: Class
src/Graphics/UI/Qtah/Generator/Interface/Internal/SceneEventListener.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -73,8 +73,12 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QStackedLayout as QStackedLayout import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QStackedWidget as QStackedWidget import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QStatusBar as QStatusBar+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QSystemTrayIcon as QSystemTrayIcon 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.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 import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget as QWidget import Graphics.UI.Qtah.Generator.Module (AModule)@@ -139,8 +143,13 @@ , QStackedLayout.aModule , QStackedWidget.aModule , QStatusBar.aModule+ , QSystemTrayIcon.aModule , QTabWidget.aModule , QTextEdit.aModule+ , QToolBar.aModule+ , QTreeView.aModule+ , QTreeWidget.aModule+ , QTreeWidget.itemModule , QVBoxLayout.aModule , QWidget.aModule ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractButton.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -28,13 +28,16 @@ includeStd, makeClass, mkBoolIsProp,+ mkConstMethod, mkMethod, mkProp, )-import Foreign.Hoppy.Generator.Types (boolT, intT, objT, voidT)+import Foreign.Hoppy.Generator.Types (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.Gui.QIcon (c_QIcon) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener, c_ListenerBool)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QButtonGroup (c_QButtonGroup) 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@@ -62,8 +65,8 @@ , mkBoolIsProp "checked" , mkMethod "click" [] voidT , mkBoolIsProp "down"- -- TODO group- -- TODO icon+ , mkConstMethod "group" [] $ ptrT $ objT c_QButtonGroup+ , mkProp "icon" $ objT c_QIcon , mkProp "iconSize" $ objT c_QSize -- TODO shortcut , mkProp "text" $ objT c_QString
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractButton.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractGraphicsShapeItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractItemView.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractScrollArea.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractSlider.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractSlider.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractSpinBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAction.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -39,6 +39,8 @@ import Graphics.UI.Qtah.Generator.Flags (qtVersion) 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.Gui.QFont (c_QFont)+import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener, c_ListenerBool) import Graphics.UI.Qtah.Generator.Interface.Widgets.QActionGroup (c_QActionGroup) import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu (c_QMenu)@@ -65,9 +67,13 @@ classSetEntityPrefix "" $ makeClass (ident "QAction") Nothing [c_QObject] $ collect- [ just $ mkCtor "new" [ptrT $ objT c_QObject]- , just $ mkCtor "newWithText" [objT c_QString, ptrT $ objT c_QObject]- -- TODO newWithIconAndText+ [ test (qtVersion >= [5, 0]) $ mkCtor "new" []+ , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]+ , test (qtVersion >= [5, 0]) $ mkCtor "newWithText" [objT c_QString]+ , just $ mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QObject]+ , test (qtVersion >= [5, 0]) $ mkCtor "newWithIconAndText" [objT c_QIcon, objT c_QString]+ , just $ mkCtor "newWithIconAndTextAndParent"+ [objT c_QIcon, objT c_QString, ptrT $ objT c_QObject] , just $ mkProp "actionGroup" $ ptrT $ objT c_QActionGroup , just $ mkMethod "activate" [enumT e_ActionEvent] voidT -- TODO associatedGraphicsWidgets@@ -77,9 +83,9 @@ , just $ mkBoolIsProp "checked" -- TODO data , just $ mkBoolIsProp "enabled"- -- TODO font+ , just $ mkProp "font" $ objT c_QFont , just $ mkMethod "hover" [] voidT- -- TODO icon+ , just $ mkProp "icon" $ objT c_QIcon , just $ mkProp "iconText" $ objT c_QString , just $ mkBoolIsProp "iconVisibleInMenu" , just $ mkProp "menu" $ ptrT $ objT c_QMenu
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAction.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QActionGroup.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -36,6 +36,7 @@ import Foreign.Hoppy.Generator.Types (boolT, 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.Gui.QIcon (c_QIcon) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerPtrQAction) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -58,7 +59,8 @@ , -- TODO actions mkMethod' "addAction" "addAction" [ptrT $ objT c_QAction] $ ptrT $ objT c_QAction , mkMethod' "addAction" "addNewAction" [objT c_QString] $ ptrT $ objT c_QAction- -- TODO addNewActionWithIcon+ , mkMethod' "addAction" "addNewActionWithIcon" [objT c_QIcon, objT c_QString] $+ ptrT $ objT c_QAction , mkConstMethod "checkedAction" [] $ ptrT $ objT c_QAction , mkBoolIsProp "enabled" , mkBoolIsProp "exclusive"
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QApplication.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -49,6 +49,8 @@ import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_LayoutDirection, e_NavigationMode) import Graphics.UI.Qtah.Generator.Interface.Gui.QClipboard (c_QClipboard)+import Graphics.UI.Qtah.Generator.Interface.Gui.QFont (c_QFont)+import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener ( c_Listener, c_ListenerPtrQWidgetPtrQWidget,@@ -95,7 +97,10 @@ , just $ mkStaticProp "desktopSettingsAware" boolT , just $ mkStaticProp "doubleClickInterval" intT , just $ mkStaticMethod "focusWidget" [] $ ptrT $ objT c_QWidget- -- TODO font+ , just $ mkStaticMethod' "font" "font" [] $ objT c_QFont+ , just $ mkStaticMethod' "font" "fontWithWidget" [ptrT $ objT c_QWidget] $ objT c_QFont+ , just $ makeFnMethod (ident2 "qtah" "qapplication" "fontWithClass") "fontWithClass"+ MStatic Nonpure [objT c_QString] $ objT c_QFont -- TODO fontMetrics , just $ mkStaticProp "globalStrut" $ objT c_QSize -- TODO inputContext@@ -124,6 +129,9 @@ , just $ mkConstMethod "sessionId" [] $ objT c_QString , just $ mkConstMethod "sessionKey" [] $ objT c_QString -- TODO setEffectEnabled+ , just $ mkStaticMethod' "setFont" "setFont" [objT c_QFont] voidT+ , just $ makeFnMethod (ident2 "qtah" "qapplication" "setFontWithClass") "setFontWithClass"+ MStatic Nonpure [objT c_QFont, objT c_QString] voidT -- TODO setFont -- TODO setGraphicsSystem (<5) -- TODO setInputContext@@ -149,7 +157,7 @@ , just $ mkStaticProp "wheelScrollLines" intT , just $ mkStaticMethod' "widgetAt" "widgetAtPoint" [objT c_QPoint] $ ptrT $ objT c_QWidget , just $ mkStaticMethod' "widgetAt" "widgetAtRaw" [intT, intT] $ ptrT $ objT c_QWidget- -- TODO windowIcon+ , just $ mkProp "windowIcon" $ objT c_QIcon -- TODO x11EventFilter -- TODO x11ProcessEvent ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QBoxLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QButtonGroup.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -17,6 +17,7 @@ module Graphics.UI.Qtah.Generator.Interface.Widgets.QButtonGroup ( aModule,+ c_QButtonGroup, ) where import Foreign.Hoppy.Generator.Spec (@@ -43,7 +44,9 @@ c_ListenerPtrQAbstractButton, c_ListenerPtrQAbstractButtonBool, )-import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton (c_QAbstractButton)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton (+ c_QAbstractButton,+ ) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QCheckBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDial.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDialog.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDialogButtonBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDoubleSpinBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QFileDialog.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QFormLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QFrame.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsEllipseItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsItem.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsPolygonItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsRectItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsScene.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -36,6 +36,7 @@ mkCtor, mkConstMethod, mkConstMethod',+ mkProp, ) import Foreign.Hoppy.Generator.Types (voidT, objT, ptrT, intT, boolT, enumT) import Foreign.Hoppy.Generator.Version (collect, just, test)@@ -49,6 +50,7 @@ -- import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.Types hiding (aModule) import Graphics.UI.Qtah.Generator.Interface.Gui.QBrush (c_QBrush)+import Graphics.UI.Qtah.Generator.Interface.Gui.QFont (c_QFont) import Graphics.UI.Qtah.Generator.Interface.Gui.QPainterPath (c_QPainterPath) import Graphics.UI.Qtah.Generator.Interface.Gui.QPen (c_QPen) import Graphics.UI.Qtah.Generator.Interface.Gui.QPolygonF (c_QPolygonF)@@ -140,7 +142,7 @@ -- TODO mkMethod "createItemGroup" [objT c_QList<QGraphicsItem] $ ptrT $ objT c_QGraphicsItemGroup -- TODO mkMethod "destroyItemGroup" [ptrT $ objT c_QGraphicsItemGroup] voidT , just $ mkConstMethod "focusItem" [] $ ptrT $ objT c_QGraphicsItem- -- TODO mkConstMethod "font" [] $ objT c_QFont+ , just $ mkProp "font" $ objT c_QFont , just $ mkConstMethod "foregroundBrush" [] $ objT c_QBrush , just $ mkConstMethod "hasFocus" [] boolT , just $ mkConstMethod "height" [] qreal@@ -206,7 +208,6 @@ , just $ mkMethod "setFocusItem" [ptrT $ objT c_QGraphicsItem] voidT , just $ mkMethod' "setFocusItem" "setFocusItemAll" [ptrT $ objT c_QGraphicsItem, enumT e_FocusReason] voidT- -- TODO mkMethod "setFont" [objT c_QFont] voidT , just $ mkMethod "setForegroundBrush" [objT c_QBrush] voidT -- TODO mkMethod "setItemIndexMethod" [objT c_ItemIndexMethod] voidT , test (qtVersion >= [5, 4]) $ mkMethod "setMinimumRenderSize" [qreal] voidT
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsScene.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsSceneEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsSceneMouseEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsSceneWheelEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsView.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGridLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGroupBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QHBoxLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QInputDialog.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLabel.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -33,9 +33,20 @@ mkMethod, mkProp, )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, doubleT, enumT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (+ bitspaceT,+ boolT,+ constT,+ doubleT,+ enumT,+ intT,+ objT,+ ptrT,+ voidT,+ ) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment, 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) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)@@ -68,12 +79,14 @@ -- TODO movie , mkProp "openExternalLinks" boolT -- TODO picture- -- TODO pixmap+ , mkConstMethod "pixmap" [] $ ptrT $ constT $ objT c_QPixmap , mkBoolHasProp "scaledContents" , mkConstMethod "selectedText" [] $ objT c_QString , mkConstMethod "selectionStart" [] intT+ -- TODO mkProp "movie" $ ptrT $ objT c_QMovie , mkMethod' "setNum" "setInt" [intT] voidT , mkMethod' "setNum" "setDouble" [doubleT] voidT+ , mkMethod "setPixmap" [objT c_QPixmap] voidT , mkMethod "setSelection" [intT, intT] voidT , mkProp "text" $ objT c_QString , mkProp "textFormat" $ enumT e_TextFormat
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLayout.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLayoutItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -66,5 +66,5 @@ , mkConstMethod "minimumSize" [] $ objT c_QSize , mkConstMethod "sizeHint" [] $ objT c_QSize -- TODO spacerItem- , mkConstMethod "widget" [] $ ptrT $ objT c_QWidget+ , mkMethod "widget" [] $ ptrT $ objT c_QWidget ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLineEdit.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -37,6 +37,8 @@ mkProp, ) import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, constT, enumT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QMargins (c_QMargins) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)@@ -64,55 +66,57 @@ c_QLineEdit = addReqIncludes [includeStd "QLineEdit"] $ classSetEntityPrefix "" $- makeClass (ident "QLineEdit") Nothing [c_QWidget]- [ mkCtor "new" []- , mkCtor "newWithParent" [ptrT $ objT c_QWidget]- , mkCtor "newWithText" [objT c_QString]- , mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QWidget]- , mkProp "alignment" $ bitspaceT bs_Alignment- , mkMethod "backspace" [] voidT- , mkMethod "clear" [] voidT+ makeClass (ident "QLineEdit") Nothing [c_QWidget] $+ collect+ [ just $ mkCtor "new" []+ , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]+ , just $ mkCtor "newWithText" [objT c_QString]+ , just $ mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QWidget]+ , just $ mkProp "alignment" $ bitspaceT bs_Alignment+ , just $ mkMethod "backspace" [] voidT+ , just $ mkMethod "clear" [] voidT+ , test (qtVersion >= [5, 2]) $ mkBoolIsProp "clearButtonEnabled" -- TODO completer- , mkConstMethod "copy" [] voidT- , mkMethod "createStandardContextMenu" [] $ ptrT $ objT c_QMenu- , mkMethod "cursorBackward" [boolT, intT] voidT- , mkMethod "cursorForward" [boolT, intT] voidT- , mkProp "cursorMoveStyle" $ enumT e_CursorMoveStyle- , mkProp "cursorPosition" intT- , mkMethod "cursorPositionAt" [objT c_QPoint] intT- , mkMethod "cursorWordBackward" [boolT] voidT- , mkMethod "cursorWordForward" [boolT] voidT- , mkMethod "cut" [] voidT- , mkMethod "del" [] voidT- , mkMethod "deselect" [] voidT- , mkConstMethod "displayText" [] $ objT c_QString- , mkProp "dragEnabled" boolT- , mkProp "echoMode" $ enumT e_EchoMode- , mkMethod "end" [boolT] voidT- , mkBoolHasProp "frame"- , mkConstMethod "hasAcceptableInput" [] boolT- , mkConstMethod "hasSelectedText" [] boolT- , mkMethod "home" [boolT] voidT- , mkProp "inputMask" $ objT c_QString- , mkMethod "insert" [objT c_QString] voidT- , mkConstMethod "isRedoAvailable" [] boolT- , mkConstMethod "isUndoAvailable" [] boolT- , mkProp "maxLength" intT- , mkBoolIsProp "modified"- , mkMethod "paste" [] voidT- , mkProp "placeholderText" $ objT c_QString- , mkBoolIsProp "readOnly"- , mkMethod "redo" [] voidT- , mkMethod "selectAll" [] voidT- , mkConstMethod "selectedText" [] $ objT c_QString- , mkConstMethod "selectionStart" [] intT- , mkMethod "setSelection" [intT, intT] voidT- , mkMethod' "setTextMargins" "setTextMargins" [objT c_QMargins] voidT- , mkMethod' "setTextMargins" "setTextMarginsRaw" [intT, intT, intT, intT] voidT- , mkProp "text" $ objT c_QString- , mkConstMethod "textMargins" [] $ objT c_QMargins- , mkMethod "undo" [] voidT- , mkProp "validator" $ ptrT $ constT $ objT c_QValidator+ , just $ mkConstMethod "copy" [] voidT+ , just $ mkMethod "createStandardContextMenu" [] $ ptrT $ objT c_QMenu+ , just $ mkMethod "cursorBackward" [boolT, intT] voidT+ , just $ mkMethod "cursorForward" [boolT, intT] voidT+ , just $ mkProp "cursorMoveStyle" $ enumT e_CursorMoveStyle+ , just $ mkProp "cursorPosition" intT+ , just $ mkMethod "cursorPositionAt" [objT c_QPoint] intT+ , just $ mkMethod "cursorWordBackward" [boolT] voidT+ , just $ mkMethod "cursorWordForward" [boolT] voidT+ , just $ mkMethod "cut" [] voidT+ , just $ mkMethod "del" [] voidT+ , just $ mkMethod "deselect" [] voidT+ , just $ mkConstMethod "displayText" [] $ objT c_QString+ , just $ mkProp "dragEnabled" boolT+ , just $ mkProp "echoMode" $ enumT e_EchoMode+ , just $ mkMethod "end" [boolT] voidT+ , just $ mkBoolHasProp "frame"+ , just $ mkConstMethod "hasAcceptableInput" [] boolT+ , just $ mkConstMethod "hasSelectedText" [] boolT+ , just $ mkMethod "home" [boolT] voidT+ , just $ mkProp "inputMask" $ objT c_QString+ , just $ mkMethod "insert" [objT c_QString] voidT+ , just $ mkConstMethod "isRedoAvailable" [] boolT+ , just $ mkConstMethod "isUndoAvailable" [] boolT+ , just $ mkProp "maxLength" intT+ , just $ mkBoolIsProp "modified"+ , just $ mkMethod "paste" [] voidT+ , just $ mkProp "placeholderText" $ objT c_QString+ , just $ mkBoolIsProp "readOnly"+ , just $ mkMethod "redo" [] voidT+ , just $ mkMethod "selectAll" [] voidT+ , just $ mkConstMethod "selectedText" [] $ objT c_QString+ , just $ mkConstMethod "selectionStart" [] intT+ , just $ mkMethod "setSelection" [intT, intT] voidT+ , just $ mkMethod' "setTextMargins" "setTextMargins" [objT c_QMargins] voidT+ , just $ mkMethod' "setTextMargins" "setTextMarginsRaw" [intT, intT, intT, intT] voidT+ , just $ mkProp "text" $ objT c_QString+ , just $ mkConstMethod "textMargins" [] $ objT c_QMargins+ , just $ mkMethod "undo" [] voidT+ , just $ mkProp "validator" $ ptrT $ constT $ objT c_QValidator ] signals =
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QListView.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMainWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -20,6 +20,7 @@ ) where import Foreign.Hoppy.Generator.Spec (+ Class, Export (ExportClass), addReqIncludes, classSetEntityPrefix,@@ -29,26 +30,31 @@ mkBoolIsProp, mkCtor, mkMethod,+ mkMethod', mkProp, )-import Foreign.Hoppy.Generator.Types (boolT, objT, ptrT)+import Foreign.Hoppy.Generator.Types (boolT, 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.Internal.Listener (c_ListenerQSize) import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu (c_QMenu) import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenuBar (c_QMenuBar) import Graphics.UI.Qtah.Generator.Interface.Widgets.QStatusBar (c_QStatusBar)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QToolBar (c_QToolBar) 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", "QMainWindow"] $ QtExport (ExportClass c_QMainWindow) : map QtExportSignal signals +c_QMainWindow :: Class c_QMainWindow = addReqIncludes [includeStd "QMainWindow"] $ classSetEntityPrefix "" $@@ -57,7 +63,10 @@ , mkCtor "newWithParent" [ptrT $ objT c_QWidget] -- TODO Ctor with Qt::WindowFlags. -- TODO addDockWidget- -- TODO addToolBar+ -- TODO mkMethod' "addToolBar" "addToolBarWithArea" [e_ToolBarArea, ptrT $ objT c_QToolBar]+ -- voidT+ , mkMethod "addToolBar" [ptrT $ objT c_QToolBar] voidT+ , mkMethod' "addToolBar" "addToolBarWithTitle" [objT c_QString] (ptrT $ objT c_QToolBar) -- TODO addToolBarBreak , mkBoolIsProp "animated" , mkProp "centralWidget" $ ptrT $ objT c_QWidget@@ -90,6 +99,7 @@ , mkProp "unifiedTitleAndToolBarOnMac" boolT ] +signals :: [Signal] signals = [ makeSignal c_QMainWindow "iconSizeChanged" c_ListenerQSize -- TODO toolButtonStyleChanged
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMenu.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -35,9 +35,12 @@ mkProp, ) import Foreign.Hoppy.Generator.Types (boolT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion) 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.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener, c_ListenerPtrQAction) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)@@ -55,40 +58,54 @@ c_QMenu = addReqIncludes [includeStd "QMenu"] $ classSetEntityPrefix "" $- makeClass (ident "QMenu") Nothing- [ c_QWidget ]- [ mkCtor "new" []- , mkCtor "newWithParent" [ptrT $ objT c_QWidget]- , mkCtor "newWithTitle" [objT c_QString]- , mkCtor "newWithTitleAndParent" [objT c_QString, ptrT $ objT c_QWidget]- , mkConstMethod "actionAt" [objT c_QPoint] $ ptrT $ objT c_QAction- , mkConstMethod "actionGeometry" [ptrT $ objT c_QAction] $ objT c_QRect- , mkProp "activeAction" $ ptrT $ objT c_QAction- , mkMethod' "addAction" "addAction" [ptrT $ objT c_QAction] voidT- , mkMethod' "addAction" "addNewAction" [objT c_QString] $ ptrT $ objT c_QAction- -- TODO addNewActionWithIcon and connecting forms- , mkMethod' "addMenu" "addMenu" [ptrT $ objT c_QMenu] $ ptrT $ objT c_QAction- , mkMethod' "addMenu" "addNewMenu" [objT c_QString] $ ptrT $ objT c_QMenu- -- TODO addNewMenuWithIcon- , mkMethod "addSeparator" [] $ ptrT $ objT c_QAction- , mkMethod "clear" [] voidT- , mkProp "defaultAction" $ ptrT $ objT c_QAction- , mkMethod' "exec" "exec" [] $ ptrT $ objT c_QAction- , mkMethod' "exec" "execAt" [objT c_QPoint, ptrT $ objT c_QAction] $ ptrT $ objT c_QAction+ makeClass (ident "QMenu") Nothing [c_QWidget] $+ collect+ [ just $ mkCtor "new" []+ , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]+ , just $ mkCtor "newWithTitle" [objT c_QString]+ , just $ mkCtor "newWithTitleAndParent" [objT c_QString, ptrT $ objT c_QWidget]+ , just $ mkConstMethod "actionAt" [objT c_QPoint] $ ptrT $ objT c_QAction+ , just $ mkConstMethod "actionGeometry" [ptrT $ objT c_QAction] $ objT c_QRect+ , just $ mkProp "activeAction" $ ptrT $ objT c_QAction+ , just $ mkMethod' "addAction" "addAction" [ptrT $ objT c_QAction] voidT+ , just $ mkMethod' "addAction" "addNewAction" [objT c_QString] $ ptrT $ objT c_QAction+ , just $ mkMethod' "addAction" "addNewActionWithIcon" [objT c_QIcon, objT c_QString] $+ ptrT $ objT c_QAction+ -- TODO There are a bunch of addAction overloads that take functors (>=5.6); add them?+ , just $ mkMethod' "addMenu" "addMenu" [ptrT $ objT c_QMenu] $ ptrT $ objT c_QAction+ , just $ mkMethod' "addMenu" "addNewMenu" [objT c_QString] $ ptrT $ objT c_QMenu+ , just $ mkMethod' "addMenu" "addNewMenuWithIcon" [objT c_QIcon, objT c_QString] $+ ptrT $ objT c_QMenu+ , test (qtVersion >= [5, 1]) $+ mkMethod' "addSection" "addSection" [objT c_QString] $ ptrT $ objT c_QAction+ , test (qtVersion >= [5, 1]) $+ mkMethod' "addSection" "addSectionWithIcon" [objT c_QIcon, objT c_QString] $+ ptrT $ objT c_QAction+ , just $ mkMethod "addSeparator" [] $ ptrT $ objT c_QAction+ , just $ mkMethod "clear" [] voidT+ , just $ mkProp "defaultAction" $ ptrT $ objT c_QAction+ , just $ mkMethod' "exec" "exec" [] $ ptrT $ objT c_QAction+ , just $ mkMethod' "exec" "execAt" [objT c_QPoint, ptrT $ objT c_QAction] $ ptrT $ objT c_QAction -- TODO Static exec- , mkMethod "hideTearOffMenu" [] voidT- -- TODO icon- , mkMethod "insertMenu" [ptrT $ objT c_QAction, ptrT $ objT c_QMenu] $ ptrT $ objT c_QAction- , mkMethod "insertSeparator" [ptrT $ objT c_QAction] $ ptrT $ objT c_QAction- , mkConstMethod "isEmpty" [] boolT- , mkConstMethod "isTearOffMenuVisible" [] boolT- , mkConstMethod "menuAction" [] $ ptrT $ objT c_QAction- , mkMethod' "popup" "popup" [objT c_QPoint] voidT- , mkMethod' "popup" "popupAction" [objT c_QPoint, ptrT $ objT c_QAction] voidT- , mkProp "separatorsCollapsible" boolT- -- TODO setIcon- , mkBoolIsProp "tearOffEnabled"- , mkProp "title" $ objT c_QString+ , just $ mkMethod "hideTearOffMenu" [] voidT+ , just $ mkProp "icon" $ objT c_QIcon+ , just $ mkMethod "insertMenu" [ptrT $ objT c_QAction, ptrT $ objT c_QMenu] $+ ptrT $ objT c_QAction+ , test (qtVersion >= [5, 1]) $+ mkMethod' "insertSection" "insertSection"+ [ptrT $ objT c_QAction, objT c_QString] $ ptrT $ objT c_QAction+ , test (qtVersion >= [5, 1]) $+ mkMethod' "insertSection" "insertSectionWithIcon"+ [ptrT $ objT c_QAction, objT c_QIcon, objT c_QString] $ ptrT $ objT c_QAction+ , just $ mkMethod "insertSeparator" [ptrT $ objT c_QAction] $ ptrT $ objT c_QAction+ , just $ mkConstMethod "isEmpty" [] boolT+ , just $ mkConstMethod "isTearOffMenuVisible" [] boolT+ , just $ mkConstMethod "menuAction" [] $ ptrT $ objT c_QAction+ , just $ mkMethod' "popup" "popup" [objT c_QPoint] voidT+ , just $ mkMethod' "popup" "popupAction" [objT c_QPoint, ptrT $ objT c_QAction] voidT+ , just $ mkProp "separatorsCollapsible" boolT+ , just $ mkBoolIsProp "tearOffEnabled"+ , just $ mkProp "title" $ objT c_QString ] signals =
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMenuBar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -41,6 +41,7 @@ import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_Corner)+import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerPtrQAction) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction) import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu (c_QMenu)@@ -66,10 +67,10 @@ , just $ mkProp "activeAction" $ ptrT $ objT c_QAction , just $ mkMethod' "addAction" "addAction" [ptrT $ objT c_QAction] voidT , just $ mkMethod' "addAction" "addNewAction" [objT c_QString] $ ptrT $ objT c_QAction- -- TODO addNewActionWithIcon and connecting forms , just $ mkMethod' "addMenu" "addMenu" [ptrT $ objT c_QMenu] $ ptrT $ objT c_QAction , just $ mkMethod' "addMenu" "addNewMenu" [objT c_QString] $ ptrT $ objT c_QMenu- -- TODO addNewMenuWithIcon+ , just $ mkMethod' "addMenu" "addNewMenuWithIcon" [objT c_QIcon, objT c_QString] $+ ptrT $ objT c_QMenu , just $ mkMethod "addSeparator" [] $ ptrT $ objT c_QAction , just $ mkMethod "clear" [] voidT , just $ mkConstMethod "cornerWidget" [enumT e_Corner] $ ptrT $ objT c_QWidget
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMessageBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -46,6 +46,7 @@ e_WindowModality, ) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerPtrQAbstractButton)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton (c_QAbstractButton) import Graphics.UI.Qtah.Generator.Interface.Widgets.QCheckBox (c_QCheckBox) import Graphics.UI.Qtah.Generator.Interface.Widgets.QDialog (c_QDialog)@@ -99,7 +100,7 @@ , test (qtVersion >= [4, 2]) $ mkProp "detailedText" $ objT c_QString , test (qtVersion >= [4, 2]) $ mkConstMethod "escapeButton" [] $ ptrT $ objT c_QAbstractButton , just $ mkProp "icon" $ enumT e_Icon- -- TODO iconPixmap+ , just $ mkProp "iconPixmap" $ objT c_QPixmap , test (qtVersion >= [4, 2]) $ mkStaticMethod' "information" "information" [ptrT $ objT c_QWidget, objT c_QString, objT c_QString] $ enumT e_StandardButton , test (qtVersion >= [4, 2]) $ mkStaticMethod' "information" "informationWithButtons"
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QOpenGLWidget.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QProgressBar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QPushButton.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -34,6 +34,7 @@ ) import Foreign.Hoppy.Generator.Types (boolT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton (c_QAbstractButton) import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu (c_QMenu) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)@@ -56,7 +57,8 @@ , mkCtor "newWithParent" [ptrT $ objT c_QWidget] , mkCtor "newWithText" [objT c_QString] , mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QWidget]- -- TODO Ctors with QIcon.+ , mkCtor "newWithIconAndText" [objT c_QIcon, objT c_QString]+ , mkCtor "newWithIconAndTextAndParent" [objT c_QIcon, objT c_QString, ptrT $ objT c_QWidget] , mkProp "autoDefault" boolT , mkBoolIsProp "default" , mkBoolIsProp "flat"
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QRadioButton.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QRubberBand.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QScrollArea.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QScrollBar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSizePolicy.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSlider.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSpacerItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSpinBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSplitter.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QStackedLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QStackedWidget.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QStatusBar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSystemTrayIcon.hs view
@@ -0,0 +1,106 @@+-- This file is part of Qtah.+--+-- Copyright 2015-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.QSystemTrayIcon (+ aModule,+ c_QSystemTrayIcon,+ e_ActivationReason,+ ) where++import Foreign.Hoppy.Generator.Spec (+ Export (ExportClass, ExportEnum),+ addReqIncludes,+ classSetEntityPrefix,+ ident,+ ident1,+ includeStd,+ makeClass,+ mkBoolIsProp,+ mkConstMethod,+ mkCtor,+ mkMethod,+ mkMethod',+ mkProp,+ mkStaticMethod,+ )+import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+ c_Listener,+ c_ListenerQSystemTrayIconActivationReason,+ )+import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu (c_QMenu)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+ AQtModule $+ makeQtModule ["Widgets", "QSystemTrayIcon"] $+ QtExport (ExportClass c_QSystemTrayIcon) :+ map QtExportSignal signals +++ [ QtExport $ ExportEnum e_ActivationReason+ , QtExport $ ExportEnum e_MessageIcon+ ]++c_QSystemTrayIcon =+ addReqIncludes [includeStd "QSystemTrayIcon"] $+ classSetEntityPrefix "" $+ makeClass (ident "QSystemTrayIcon") Nothing [c_QObject]+ [ mkCtor "new" []+ , mkCtor "newWithParent" [ptrT $ objT c_QObject]+ , mkCtor "newWithIcon" [objT c_QIcon]+ , mkCtor "newWithIconAndParent" [objT c_QIcon, ptrT $ objT c_QObject]+ , mkProp "contextMenu" $ ptrT $ objT c_QMenu+ , mkConstMethod "geometry" [] $ objT c_QRect+ , mkMethod "hide" [] voidT+ , mkProp "icon" $ objT c_QIcon+ , mkStaticMethod "isSystemTrayAvailable" [] boolT+ , mkMethod "show" [] voidT+ , mkMethod' "showMessage" "showMessage" [objT c_QString, objT c_QString] voidT+ , mkMethod' "showMessage" "showMessageAll"+ [objT c_QString, objT c_QString, enumT e_MessageIcon, intT] voidT+ , mkStaticMethod "supportsMessages" [] boolT+ , mkProp "toolTip" $ objT c_QString+ , mkBoolIsProp "visible"+ ]++signals =+ [ makeSignal c_QSystemTrayIcon "activated" c_ListenerQSystemTrayIconActivationReason+ , makeSignal c_QSystemTrayIcon "messageClicked" c_Listener+ ]++e_ActivationReason =+ makeQtEnum (ident1 "QSystemTrayIcon" "ActivationReason") [includeStd "QSystemTrayIcon"]+ [ (0, ["unknown"])+ , (1, ["context"])+ , (2, ["double", "click"])+ , (3, ["trigger"])+ , (4, ["middle", "click"])+ ]++e_MessageIcon =+ makeQtEnum (ident1 "QSystemTrayIcon" "MessageIcon") [includeStd "QSystemTrayIcon"]+ [ (0, ["no", "icon"])+ , (1, ["information"])+ , (2, ["warning"])+ , (3, ["critical"])+ ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSystemTrayIcon.hs-boot view
@@ -0,0 +1,24 @@+-- This file is part of Qtah.+--+-- Copyright 2015-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.QSystemTrayIcon (+ e_ActivationReason,+ ) where++import Foreign.Hoppy.Generator.Spec (CppEnum)++e_ActivationReason :: CppEnum
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTabWidget.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -31,6 +31,7 @@ mkConstMethod, mkCtor, mkMethod,+ mkMethod', mkProp, ) import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, voidT)@@ -39,6 +40,7 @@ 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_Corner, e_TextElideMode)+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.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -62,8 +64,9 @@ collect [ just $ mkCtor "new" [] , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]- , just $ mkMethod "addTab" [ptrT $ objT c_QWidget, objT c_QString] intT- -- TODO addTabWithIcon+ , just $ mkMethod' "addTab" "addTab" [ptrT $ objT c_QWidget, objT c_QString] intT+ , just $ mkMethod' "addTab" "addTabWithIcon" [ptrT $ objT c_QWidget, objT c_QIcon, objT c_QString]+ intT , just $ mkMethod "clear" [] voidT , just $ mkConstMethod "cornerWidget" [enumT e_Corner] $ ptrT $ objT c_QWidget , just $ mkConstMethod "count" [] intT@@ -73,20 +76,21 @@ , test (qtVersion >= [4, 2]) $ mkProp "elideMode" $ enumT e_TextElideMode , test (qtVersion >= [4, 2]) $ mkProp "iconSize" $ objT c_QSize , just $ mkConstMethod "indexOf" [ptrT $ objT c_QWidget] intT- , just $ mkMethod "insertTab" [intT, ptrT $ objT c_QWidget, objT c_QString] intT- -- TODO insertTabWithIcon+ , just $ mkMethod' "insertTab" "insertTab" [intT, ptrT $ objT c_QWidget, objT c_QString] intT+ , just $ mkMethod' "insertTab" "insertTabWithIcon"+ [intT, ptrT $ objT c_QWidget, objT c_QIcon, objT c_QString] intT , just $ mkConstMethod "isTabEnabled" [intT] boolT , test (qtVersion >= [4, 5]) $ mkBoolIsProp "movable" , just $ mkMethod "removeTab" [intT] voidT , just $ mkMethod "setCornerWidget" [ptrT $ objT c_QWidget, enumT e_Corner] voidT , just $ mkMethod "setTabEnabled" [intT, boolT] voidT- -- TODO setTabIcon+ , just $ mkMethod "setTabIcon" [intT, objT c_QIcon] voidT , just $ mkMethod "setTabText" [intT, objT c_QString] voidT , just $ mkMethod "setTabToolTip" [intT, objT c_QString] voidT , test (qtVersion >= [4, 1]) $ mkMethod "setTabWhatsThis" [intT, objT c_QString] voidT -- TODO tabBar , test (qtVersion >= [5, 4]) $ mkProp "tabBarAutoHide" boolT- -- TODO tabIcon+ , just $ mkConstMethod "tabIcon" [intT] $ objT c_QIcon , just $ mkProp "tabPosition" $ enumT e_TabPosition , just $ mkProp "tabShape" $ enumT e_TabShape , just $ mkConstMethod "tabText" [intT] $ objT c_QString
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTextEdit.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -41,6 +41,7 @@ import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment, qreal) import Graphics.UI.Qtah.Generator.Interface.Gui.QColor (c_QColor)+import Graphics.UI.Qtah.Generator.Interface.Gui.QFont (c_QFont) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener ( c_Listener, c_ListenerBool,@@ -80,7 +81,7 @@ , mkMethod' "createStandardContextMenu" "createStandardContextMenuAt" [objT c_QPoint] $ ptrT $ objT c_QMenu -- TODO currentCharFormat- -- TODO currentFont+ , mkProp "currentFont" $ objT c_QFont -- TODO cursorForPosition , mkConstMethod' "cursorRect" "cursorRect" [] $ objT c_QRect -- TODO cursorRect(const QTextCursor&)
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QToolBar.hs view
@@ -0,0 +1,108 @@+-- This file is part of Qtah.+--+-- Copyright 2015-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.QToolBar (+ aModule,+ c_QToolBar,+ ) 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, enumT, 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 (+ bs_ToolBarAreas,+ e_Orientation,+ e_ToolBarArea,+ e_ToolButtonStyle,+ )+import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+ c_ListenerBool,+ c_ListenerOrientation,+ c_ListenerPtrQAction,+ c_ListenerQSize,+ c_ListenerToolBarAreas,+ c_ListenerToolButtonStyle,+ )+import Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction)+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", "QToolBar"] $+ QtExport (ExportClass c_QToolBar) :+ map QtExportSignal signals++c_QToolBar :: Class+c_QToolBar =+ addReqIncludes [includeStd "QToolBar"] $+ classSetEntityPrefix "" $+ makeClass (ident "QToolBar") Nothing [c_QWidget]+ [ mkCtor "new" []+ , mkCtor "newWithParent" [ptrT $ objT c_QWidget]+ , mkCtor "newWithTitle" [objT c_QString]+ , mkCtor "newWithTitleAndParent" [objT c_QString, ptrT $ objT c_QWidget]+ , mkMethod' "addAction" "addAction" [objT c_QString] $ ptrT $ objT c_QAction+ , mkMethod' "addAction" "addActionWithIcon" [objT c_QIcon, objT c_QString] $ ptrT $ objT c_QAction+ , mkMethod "addSeparator" [] $ ptrT $ objT c_QAction+ , mkMethod "addWidget" [ptrT $ objT c_QWidget] $ ptrT $ objT c_QAction+ , mkProp "allowedAreas" $ bitspaceT bs_ToolBarAreas+ , mkMethod "clear" [] voidT+ , mkBoolIsProp "floatable"+ , mkProp "iconSize" $ objT c_QSize+ , mkMethod "insertSeparator" [ptrT $ objT c_QAction] $ ptrT $ objT c_QAction+ , mkMethod "insertWidget" [ptrT $ objT c_QAction, ptrT $ objT c_QWidget] $ ptrT $ objT c_QAction+ , mkConstMethod "isAreaAllowed" [enumT e_ToolBarArea] boolT+ , mkConstMethod "isFloating" [] boolT+ , mkBoolIsProp "movable"+ , mkProp "orientation" $ enumT e_Orientation+ , mkMethod "toggleViewAction" [] $ ptrT $ objT c_QAction+ , mkProp "toolButtonStyle" $ enumT e_ToolButtonStyle+ , mkConstMethod "widgetForAction" [ptrT $ objT c_QAction] $ ptrT $ objT c_QWidget+ ]++signals :: [Signal]+signals =+ [ makeSignal c_QToolBar "actionTriggered" c_ListenerPtrQAction+ , makeSignal c_QToolBar "allowedAreasChanged" c_ListenerToolBarAreas+ , makeSignal c_QToolBar "iconSizeChanged" c_ListenerQSize+ , makeSignal c_QToolBar "movableChanged" c_ListenerBool+ , makeSignal c_QToolBar "orientationChanged" c_ListenerOrientation+ , makeSignal c_QToolBar "toolButtonStyleChanged" c_ListenerToolButtonStyle+ , makeSignal c_QToolBar "topLevelChanged" c_ListenerBool+ , makeSignal c_QToolBar "visibilityChanged" c_ListenerBool+ ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTreeView.hs view
@@ -0,0 +1,67 @@+-- This file is part of Qtah.+--+-- Copyright 2015-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.QTreeView (+ aModule,+ c_QTreeView,+ ) where++import Foreign.Hoppy.Generator.Spec (+ Class,+ Export (ExportClass),+ addReqIncludes,+ classSetEntityPrefix,+ ident,+ includeStd,+ makeClass,+ mkCtor,+ mkBoolIsProp,+ mkMethod,+ )+import Foreign.Hoppy.Generator.Types (intT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractItemView (c_QAbstractItemView)+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", "QTreeView"] $+ QtExport (ExportClass c_QTreeView) :+ map QtExportSignal signals++c_QTreeView :: Class+c_QTreeView =+ addReqIncludes [includeStd "QTreeView"] $+ classSetEntityPrefix "" $+ makeClass (ident "QTreeView") Nothing [c_QAbstractItemView] $+ collect+ [ just $ mkCtor "new" []+ , just $ mkBoolIsProp "headerHidden"+ , just $ mkMethod "resizeColumnToContents" [intT] voidT+ , test (qtVersion >= [4, 2]) $ mkBoolIsProp "sortingEnabled"+ -- TODO add more methods+ ]++signals :: [Signal]+signals =+ [ -- TODO add signals+ ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTreeWidget.hs view
@@ -0,0 +1,164 @@+-- This file is part of Qtah.+--+-- Copyright 2015-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.QTreeWidget (+ -- modules+ aModule,+ itemModule,+ -- classes+ c_QTreeWidget,+ c_QTreeWidgetItem,+ ) where++import Foreign.Hoppy.Generator.Spec (+ Class,+ CppEnum,+ Export (ExportClass, ExportEnum),+ addReqIncludes,+ classSetEntityPrefix,+ ident,+ ident1,+ includeStd,+ makeClass,+ mkConstMethod,+ mkConstMethod',+ mkCtor,+ mkMethod,+ )+import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, voidT, boolT, enumT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)+import Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_SortOrder)+import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+ c_Listener,+ c_ListenerPtrQTreeWidgetItem,+ c_ListenerPtrQTreeWidgetItemInt,+ c_ListenerPtrQTreeWidgetItemPtrQTreeWidgetItem,+ )+import Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeView (c_QTreeView)+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", "QTreeWidget"] $+ QtExport (ExportClass c_QTreeWidget) :+ map QtExportSignal signals++itemModule :: AModule+itemModule =+ AQtModule $+ makeQtModule ["Widgets", "QTreeWidgetItem"] $+ map+ QtExport+ [ ExportClass c_QTreeWidgetItem+ , ExportEnum e_ChildIndicatorPolicy+ ]++c_QTreeWidget :: Class+c_QTreeWidget =+ addReqIncludes [includeStd "QTreeWidget"] $+ classSetEntityPrefix "" $+ makeClass (ident "QTreeWidget") Nothing [c_QTreeView] $+ collect+ [ just $ mkCtor "new" []+ , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]+ , test (qtVersion >= [4, 1]) $+ mkMethod "addTopLevelItem" [ptrT $ objT c_QTreeWidgetItem] voidT+ , just $ mkConstMethod "currentItem" [] (ptrT $ objT c_QTreeWidgetItem)+ , just $ mkConstMethod "headerItem" [] (ptrT $ objT c_QTreeWidgetItem)+ , test (qtVersion >= [4, 2]) $+ mkConstMethod "invisibleRootItem" [] (ptrT $ objT c_QTreeWidgetItem)+ , just $ mkMethod "setCurrentItem" [ptrT $ objT c_QTreeWidgetItem] voidT+ , just $ mkMethod "setHeaderItem" [ptrT $ objT c_QTreeWidgetItem] voidT+ , test (qtVersion >= [4, 2]) $+ mkMethod "setHeaderLabel" [objT c_QString] voidT+ , just $ mkMethod "setHeaderLabels" [objT c_QStringList] voidT+ , just $ mkMethod "sortItems" [intT, enumT e_SortOrder] voidT+ , just $ mkConstMethod "topLevelItem" [intT] (ptrT $ objT c_QTreeWidgetItem)+ , just $ mkConstMethod "topLevelItemCount" [] intT+ -- TODO add more methods+ ]++c_QTreeWidgetItem :: Class+c_QTreeWidgetItem =+ addReqIncludes [includeStd "QTreeWidgetItem"] $+ classSetEntityPrefix "" $+ makeClass (ident "QTreeWidgetItem") Nothing [] $+ collect+ [ just $ mkCtor "new" []+ , just $ mkCtor "newWithType" [intT]+ , just $ mkCtor "newWithStrings" [objT c_QStringList]+ , just $ mkCtor "newWithStringsAndType" [objT c_QStringList, intT]+ , just $ mkCtor "newWithParentTree" [ptrT $ objT c_QTreeWidget]+ , just $ mkCtor "newWithParentTreeAndType" [ptrT $ objT c_QTreeWidget, intT]+ , just $ mkCtor "newWithParentTreeAndStrings" [ptrT $ objT c_QTreeWidget, objT c_QStringList]+ , just $ mkCtor "newWithParentTreeAndStringsAndType"+ [ptrT $ objT c_QTreeWidget, objT c_QStringList, intT]+ , just $ mkCtor "newWithParentItem" [ptrT $ objT c_QTreeWidgetItem]+ , just $ mkCtor "newWithParentItemAndType" [ptrT $ objT c_QTreeWidgetItem, intT]+ , just $ mkCtor "newWithParentItemAndStrings" [ptrT $ objT c_QTreeWidgetItem, objT c_QStringList]+ , just $ mkCtor "newWithParentItemAndStringsAndType"+ [ptrT $ objT c_QTreeWidgetItem, objT c_QStringList, intT]+ , just $ mkConstMethod "child" [intT] (ptrT $ objT c_QTreeWidgetItem)+ , just $ mkConstMethod "childCount" [] intT+ , just $ mkConstMethod "childIndicatorPolicy" [] (enumT e_ChildIndicatorPolicy)+ , just $ mkConstMethod "columnCount" [] intT+ , just $ mkConstMethod' "data" "getData" [intT, intT] (objT c_QVariant)+ , test (qtVersion >= [4, 2]) $ mkConstMethod "isHidden" [] boolT+ , just $ mkConstMethod "parent" [] (ptrT $ objT c_QTreeWidgetItem)+ , just $ mkMethod "setChildIndicatorPolicy" [enumT e_ChildIndicatorPolicy] voidT+ , just $ mkMethod "setData" [intT, intT, objT c_QVariant] voidT+ , test (qtVersion >= [4, 2]) $ mkMethod "setHidden" [boolT] voidT+ , just $ mkMethod "setIcon" [intT, objT c_QIcon] voidT+ , just $ mkMethod "setText" [intT, objT c_QString] voidT+ , just $ mkConstMethod "text" [intT] (objT c_QString)+ , just $ mkConstMethod' "type" "getType" [] intT+ -- TODO add more methods+ ]++signals :: [Signal]+signals =+ [ makeSignal c_QTreeWidget "currentItemChanged" c_ListenerPtrQTreeWidgetItemPtrQTreeWidgetItem+ , makeSignal c_QTreeWidget "itemActivated" c_ListenerPtrQTreeWidgetItemInt+ , makeSignal c_QTreeWidget "itemChanged" c_ListenerPtrQTreeWidgetItemInt+ , makeSignal c_QTreeWidget "itemClicked" c_ListenerPtrQTreeWidgetItemInt+ , makeSignal c_QTreeWidget "itemCollapsed" c_ListenerPtrQTreeWidgetItem+ , makeSignal c_QTreeWidget "itemDoubleClicked" c_ListenerPtrQTreeWidgetItemInt+ , makeSignal c_QTreeWidget "itemEntered" c_ListenerPtrQTreeWidgetItemInt+ , makeSignal c_QTreeWidget "itemExpanded" c_ListenerPtrQTreeWidgetItem+ , makeSignal c_QTreeWidget "itemPressed" c_ListenerPtrQTreeWidgetItemInt+ , makeSignal c_QTreeWidget "itemSelectionChanged" c_Listener+ ]++e_ChildIndicatorPolicy :: CppEnum+e_ChildIndicatorPolicy =+ makeQtEnum+ (ident1 "QTreeWidgetItem" "ChildIndicatorPolicy")+ [includeStd "QTreeWidgetItem"]+ [ (0, ["show", "indicator"])+ , (1, ["dont", "show", "indicator"])+ , (2, ["dont", "show", "indicator", "when", "childless"])+ ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTreeWidget.hs-boot view
@@ -0,0 +1,26 @@+-- This file is part of Qtah.+--+-- Copyright 2015-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.QTreeWidget (+ c_QTreeWidget,+ c_QTreeWidgetItem,+ ) where++import Foreign.Hoppy.Generator.Spec (Class)++c_QTreeWidget :: Class+c_QTreeWidgetItem :: Class
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QVBoxLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QWidget.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -47,13 +47,23 @@ import Graphics.UI.Qtah.Generator.Interface.Core.Types ( bs_WindowFlags, bs_WindowStates,+ e_ContextMenuPolicy, e_LayoutDirection, e_WindowModality, e_WindowType, qreal, ) import Graphics.UI.Qtah.Generator.Interface.Gui.QFont (c_QFont)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerQPoint)+import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPaintDevice (c_QPaintDevice)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPainter (c_QPainter)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap)+import Graphics.UI.Qtah.Generator.Interface.Gui.QRegion (c_QRegion)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+ c_ListenerQPoint,+ c_ListenerQString,+ c_ListenerRefConstQIcon,+ ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayout (c_QLayout) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -94,7 +104,7 @@ , just $ mkMethod "close" [] boolT , just $ mkConstMethod "contentsMargins" [] $ objT c_QMargins , just $ mkConstMethod "contentsRect" [] $ objT c_QRect- -- TODO contextMenuPolicy+ , just $ mkProp "contextMenuPolicy" $ enumT e_ContextMenuPolicy -- TODO cursor -- TODO effectiveWinId , just $ mkConstMethod "ensurePolished" [] voidT@@ -103,13 +113,15 @@ , just $ mkConstMethod "focusProxy" [] $ ptrT $ objT c_QWidget , just $ mkConstMethod "focusWidget" [] $ ptrT $ objT c_QWidget , just $ mkProp "font" $ objT c_QFont- -- TODO font -- TODO fontInfo -- TODO fontMetrics -- TODO foregroundRole , just $ mkConstMethod "frameGeometry" [] $ objT c_QRect , just $ mkConstMethod "frameSize" [] $ objT c_QSize , just $ mkConstMethod "geometry" [] $ objT c_QRect+ , test (qtVersion >= [5, 0]) $ mkMethod "grab" [] $ objT c_QPixmap+ , test (qtVersion >= [5, 0]) $+ mkMethod' "grab" "grabWithRect" [objT c_QRect] $ objT c_QPixmap -- TODO grabGesture , just $ mkMethod "grabKeyboard" [] voidT , just $ mkMethod "grabMouse" [] voidT@@ -178,7 +190,25 @@ , just $ mkMethod "releaseMouse" [] voidT -- TODO releaseShortcut , just $ mkMethod "removeAction" [ptrT $ objT c_QAction] voidT- -- TODO render+ , test (qtVersion >= [4, 3]) $+ mkMethod' "render" "renderWithTarget" [ptrT $ objT c_QPaintDevice] voidT+ , test (qtVersion >= [4, 3]) $+ mkMethod' "render" "renderWithTargetAndOffset"+ [ptrT $ objT c_QPaintDevice, objT c_QPoint] voidT+ , test (qtVersion >= [4, 3]) $+ mkMethod' "render" "renderWithTargetAndOffsetAndRegion"+ [ptrT $ objT c_QPaintDevice, objT c_QPoint, objT c_QRegion] voidT+ -- TODO [4.3] void render(QPaintDevice *target, const QPoint &targetOffset,+ -- const QRegion &sourceRegion, RenderFlags renderFlags)+ , just $ mkMethod' "render" "renderWithPainter" [ptrT $ objT c_QPainter] voidT+ , just $+ mkMethod' "render" "renderWithPainterAndOffset"+ [ptrT $ objT c_QPainter, objT c_QPoint] voidT+ , just $+ mkMethod' "render" "renderWithPainterAndOffsetAndRegion"+ [ptrT $ objT c_QPainter, objT c_QPoint, objT c_QRegion] voidT+ -- TODO void render(QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion,+ -- RenderFlags renderFlags) , just $ mkMethod' "repaint" "repaint" [] voidT , just $ mkMethod' "repaint" "repaintRaw" [intT, intT, intT, intT] voidT , just $ mkMethod' "repaint" "repaintRect" [objT c_QRect] voidT@@ -211,7 +241,6 @@ -- TODO setFocus(Qt::FocusReason) -- TODO setFocusPolicy , just $ mkMethod "setFocusProxy" [ptrT $ objT c_QWidget] voidT- -- TODO setFont -- TODO setForegroundRole , just $ mkMethod' "setGeometry" "setGeometryRaw" [intT, intT, intT, intT] voidT , just $ mkMethod' "setGeometry" "setGeometryRect" [objT c_QRect] voidT@@ -252,7 +281,6 @@ , just $ mkMethod "setVisible" [boolT] voidT , just $ mkMethod "setWhatsThis" [objT c_QString] voidT , just $ mkMethod "setWindowFilePath" [objT c_QString] voidT- -- TODO setWindowIcon , just $ mkMethod "setWindowIconText" [objT c_QString] voidT , just $ mkMethod "setWindowModified" [boolT] voidT , just $ mkMethod "setWindowRole" [objT c_QString] voidT@@ -289,8 +317,9 @@ , just $ mkConstMethod "window" [] $ ptrT $ objT c_QWidget , just $ mkConstMethod "windowFilePath" [] $ objT c_QString , just $ mkProp "windowFlags" $ bitspaceT bs_WindowFlags- -- TODO windowIcon- , just $ mkConstMethod "windowIconText" [] $ objT c_QString+ , just $ mkProp "windowIcon" $ objT c_QIcon+ , -- DEPRECATED by 5.7.+ just $ mkConstMethod "windowIconText" [] $ objT c_QString , just $ mkProp "windowModality" $ enumT e_WindowModality , just $ mkProp "windowOpacity" qreal , just $ mkConstMethod "windowRole" [] $ objT c_QString@@ -306,8 +335,9 @@ ] signals =- [ makeSignal c_QWidget "customContextMenuRequested" c_ListenerQPoint- -- TODO windowIconChanged (>=5.0?)- -- TODO windowIconTextChanged (>=5.0?)- -- TODO windowTitleChanged (>=5.0?)+ collect+ [ just $ makeSignal c_QWidget "customContextMenuRequested" c_ListenerQPoint+ , test (qtVersion >= [5, 0]) $ makeSignal c_QWidget "windowIconChanged" c_ListenerRefConstQIcon+ -- TODO windowIconTextChanged (>=5.0? Deprecated by 5.7.)+ , test (qtVersion >= [5, 0]) $ makeSignal c_QWidget "windowTitleChangd" c_ListenerQString ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QWidget.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Module.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Graphics/UI/Qtah/Generator/Types.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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
src/Main.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2017 The Qtah Authors.+-- Copyright 2015-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@@ -74,7 +74,7 @@ args <- getArgs case args of ["--qt-version"] -> putStrLn $ intercalate "." $ map show qtVersion- ["--qmake-executable"] -> putStrLn $ unlines $ qmakeExecutable : qmakeArguments+ ["--qmake-executable"] -> putStr $ unlines $ qmakeExecutable : qmakeArguments _ -> do _ <- run [iface] args return ()