packages feed

qtah-generator 0.2.1 → 0.3.0

raw patch · 162 files changed

+5234/−262 lines, 162 filesdep ~directorydep ~hoppy-generatorsetup-changedPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: directory, hoppy-generator

API changes (from Hackage documentation)

Files

Setup.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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.2.1+version: 0.3.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-2016 Bryan Gardiner+copyright: Copyright 2015-2017 The Qtah Authors. category: Graphics build-type: Custom cabal-version: >=1.10@@ -39,9 +39,9 @@   build-depends:       base >=4 && <5     , containers >=0.5 && <0.6-    , directory >=1.2 && <1.3+    , directory >=1.2 && <1.4     , filepath >=1.3 && <1.5-    , hoppy-generator >=0.3 && <0.4+    , hoppy-generator >=0.3.3 && <0.4     , hoppy-std >=0.3 && <0.4     , haskell-src >=1.0 && <1.1     , mtl >=2.1 && <2.3@@ -51,18 +51,25 @@   main-is: Main.hs   other-modules:       Graphics.UI.Qtah.Generator.Common-    , Graphics.UI.Qtah.Generator.Flag     , Graphics.UI.Qtah.Generator.Flags     , Graphics.UI.Qtah.Generator.Interface.Core+    , 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.QChar     , Graphics.UI.Qtah.Generator.Interface.Core.QChildEvent     , Graphics.UI.Qtah.Generator.Interface.Core.QCoreApplication     , Graphics.UI.Qtah.Generator.Interface.Core.QDir     , Graphics.UI.Qtah.Generator.Interface.Core.QEvent+    , Graphics.UI.Qtah.Generator.Interface.Core.QItemSelection+    , Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionModel+    , Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionRange     , Graphics.UI.Qtah.Generator.Interface.Core.QList     , Graphics.UI.Qtah.Generator.Interface.Core.QMargins     , Graphics.UI.Qtah.Generator.Interface.Core.QMarginsF+    , Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex     , Graphics.UI.Qtah.Generator.Interface.Core.QObject+    , Graphics.UI.Qtah.Generator.Interface.Core.QPersistentModelIndex     , Graphics.UI.Qtah.Generator.Interface.Core.QPoint     , Graphics.UI.Qtah.Generator.Interface.Core.QPointF     , Graphics.UI.Qtah.Generator.Interface.Core.QRect@@ -71,12 +78,15 @@     , Graphics.UI.Qtah.Generator.Interface.Core.QSizeF     , 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.QTimer     , Graphics.UI.Qtah.Generator.Interface.Core.QTimerEvent     , Graphics.UI.Qtah.Generator.Interface.Core.QVariant     , Graphics.UI.Qtah.Generator.Interface.Core.QVector     , Graphics.UI.Qtah.Generator.Interface.Core.Types     , Graphics.UI.Qtah.Generator.Interface.Gui     , Graphics.UI.Qtah.Generator.Interface.Gui.QActionEvent+    , Graphics.UI.Qtah.Generator.Interface.Gui.QBrush     , Graphics.UI.Qtah.Generator.Interface.Gui.QClipboard     , Graphics.UI.Qtah.Generator.Interface.Gui.QCloseEvent     , Graphics.UI.Qtah.Generator.Interface.Gui.QColor@@ -84,25 +94,43 @@     , Graphics.UI.Qtah.Generator.Interface.Gui.QEnterEvent     , Graphics.UI.Qtah.Generator.Interface.Gui.QExposeEvent     , Graphics.UI.Qtah.Generator.Interface.Gui.QFocusEvent+    , 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.QImage     , Graphics.UI.Qtah.Generator.Interface.Gui.QInputEvent     , Graphics.UI.Qtah.Generator.Interface.Gui.QIntValidator     , Graphics.UI.Qtah.Generator.Interface.Gui.QKeyEvent     , Graphics.UI.Qtah.Generator.Interface.Gui.QMouseEvent+    , Graphics.UI.Qtah.Generator.Interface.Gui.QOpenGLWindow+    , Graphics.UI.Qtah.Generator.Interface.Gui.QPaintDevice+    , Graphics.UI.Qtah.Generator.Interface.Gui.QPaintDeviceWindow+    , Graphics.UI.Qtah.Generator.Interface.Gui.QPaintEvent+    , 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.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.QSurface+    , Graphics.UI.Qtah.Generator.Interface.Gui.QTransform     , Graphics.UI.Qtah.Generator.Interface.Gui.QValidator     , Graphics.UI.Qtah.Generator.Interface.Gui.QWheelEvent+    , Graphics.UI.Qtah.Generator.Interface.Gui.QWindow+    , Graphics.UI.Qtah.Generator.Interface.Gui.QtahOpenGLWindow+    , Graphics.UI.Qtah.Generator.Interface.Gui.QtahRasterWindow     , Graphics.UI.Qtah.Generator.Interface.Imports     , Graphics.UI.Qtah.Generator.Interface.Internal     , Graphics.UI.Qtah.Generator.Interface.Internal.Callback     , Graphics.UI.Qtah.Generator.Interface.Internal.EventListener     , Graphics.UI.Qtah.Generator.Interface.Internal.Listener+    , Graphics.UI.Qtah.Generator.Interface.Internal.SceneEventListener     , Graphics.UI.Qtah.Generator.Interface.Widgets     , Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractGraphicsShapeItem+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractItemView     , Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractScrollArea     , Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractSlider     , Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractSpinBox@@ -119,6 +147,15 @@     , Graphics.UI.Qtah.Generator.Interface.Widgets.QFileDialog     , Graphics.UI.Qtah.Generator.Interface.Widgets.QFormLayout     , Graphics.UI.Qtah.Generator.Interface.Widgets.QFrame+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsEllipseItem+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsItem+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsPolygonItem+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsRectItem+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsScene+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsSceneEvent+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsSceneMouseEvent+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsSceneWheelEvent+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsView     , Graphics.UI.Qtah.Generator.Interface.Widgets.QGridLayout     , Graphics.UI.Qtah.Generator.Interface.Widgets.QGroupBox     , Graphics.UI.Qtah.Generator.Interface.Widgets.QHBoxLayout@@ -127,10 +164,12 @@     , Graphics.UI.Qtah.Generator.Interface.Widgets.QLayout     , Graphics.UI.Qtah.Generator.Interface.Widgets.QLayoutItem     , Graphics.UI.Qtah.Generator.Interface.Widgets.QLineEdit+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QListView     , Graphics.UI.Qtah.Generator.Interface.Widgets.QMainWindow     , Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu     , Graphics.UI.Qtah.Generator.Interface.Widgets.QMenuBar     , Graphics.UI.Qtah.Generator.Interface.Widgets.QMessageBox+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QOpenGLWidget     , Graphics.UI.Qtah.Generator.Interface.Widgets.QProgressBar     , Graphics.UI.Qtah.Generator.Interface.Widgets.QPushButton     , Graphics.UI.Qtah.Generator.Interface.Widgets.QRadioButton
qtah-listener-gen view
@@ -2,7 +2,7 @@  # This file is part of Qtah. #-# Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+# Copyright 2015-2017 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@@ -76,14 +76,26 @@     $fn IntInt "int|int"     $fn PtrQAbstractButton "QAbstractButton*"     $fn PtrQAbstractButtonBool "QAbstractButton*|bool"+    $fn PtrQAbstractItemModel "QAbstractItemModel*"     $fn PtrQAction "QAction*"     $fn PtrQObject "QObject*"     $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"+    $fn QModelIndexIntInt "QModelIndex|int|int"+    $fn QModelIndexIntIntQModelIndexInt "QModelIndex|int|int|QModelIndex|int"+    $fn QModelIndexQModelIndex "QModelIndex|QModelIndex"+    $fn QModelIndexQModelIndexQVectorInt "QModelIndex|QModelIndex|QVector<int>"     $fn QPoint "QPoint"+    $fn Qreal "qreal"     $fn QSize "QSize"     $fn QString "QString"+    $fn QWindowVisibility "QWindow::Visibility" 0x050000 '[5, 0]'+    $fn WindowModality "Qt::WindowModality"+    $fn WindowState "Qt::WindowState"     $fn "" "" } @@ -103,14 +115,21 @@     sayHpp '#define QTAH_LISTENERS_HPP'     sayHpp     sayHpp '#include <string>'+    sayHpp '#include <Qt>'+    sayHpp '#include <QtGlobal>'     sayHpp '#include <QAbstractButton>'     sayHpp '#include <QAbstractSlider>'     sayHpp '#include <QAction>'     sayHpp '#include <QClipboard>'+    sayHpp '#include <QModelIndex>'     sayHpp '#include <QObject>'     sayHpp '#include <QPoint>'     sayHpp '#include <QSize>'+    sayHpp '#include <QVector>'     sayHpp '#include <QWidget>'+    sayHpp '#if QT_VERSION >= 0x050000'+    sayHpp '#include <QWindow>'+    sayHpp '#endif'     sayHpp '#include "b_callback.hpp"'      sayCpp '////////// GENERATED FILE, EDITS WILL BE LOST //////////'@@ -120,7 +139,7 @@     sayCpp '#include <iostream>'      writeCpp() {-        local -r name="${1?}" params="${2?}"+        local -r name="${1?}" params="${2?}" minVersion="${3-}"         local -r className="Listener${name}"         local -r callbackClassName="Callback${name}Void"         local paramList=""@@ -139,6 +158,10 @@             done < <(tr '|' '\n' <<<"$params")         fi +        if [[ -n $minVersion ]]; then+            sayHpp+            sayHpp "#if QT_VERSION >= ${minVersion}"+        fi         sayHpp         sayHpp "class ${className} : public QObject {"         sayHpp "    Q_OBJECT"@@ -155,7 +178,15 @@         sayHpp "    callback f_;"         sayHpp "    bool connected_;"         sayHpp "};"+        if [[ -n $minVersion ]]; then+            sayHpp+            sayHpp "#endif"+        fi +        if [[ -n $minVersion ]]; then+            sayCpp+            sayCpp "#if QT_VERSION >= ${minVersion}"+        fi         sayCpp         sayCpp "${className}::${className}(${className}::callback f, QObject* parent) :"         sayCpp "    QObject(parent), f_(f), connected_(false) {}"@@ -175,6 +206,10 @@         sayCpp "void ${className}::invoke(${paramList}) {"         sayCpp "    f_(${paramNameList});"         sayCpp "}"+        if [[ -n $minVersion ]]; then+            sayCpp+            sayCpp "#endif"+        fi     }      forEachListener writeCpp@@ -197,6 +232,8 @@     say     say 'module Graphics.UI.Qtah.Generator.Interface.Internal.Listener where'     say+    say 'import qualified Foreign.Hoppy.Generator.Version as V'+    say 'import qualified Graphics.UI.Qtah.Generator.Flags as F'     say 'import qualified Foreign.Hoppy.Generator.Spec as S'     say 'import qualified Foreign.Hoppy.Generator.Types as S'     say 'import qualified Foreign.Hoppy.Generator.Std.String as String'@@ -231,14 +268,19 @@     say "  S.addReqIncludes [S.includeLocal \"listener.hpp\"] \$"     say "  S.moduleModify' (S.makeModule \"listener\" \"b_listener.hpp\" \"b_listener.cpp\") \$ do"     say "    S.moduleAddHaskellName [\"Internal\", \"Listener\"]"-    say "    S.moduleAddExports"+    say "    S.moduleAddExports \$ V.collect"     cont="["     writeHs() {         local -r name="${1?}"+        local -r minVersion="${4-}"         local -r className="Listener${name}"         local -r classVar="c_${className}" -        say "      ${cont} S.ExportClass ${classVar}"+        if [[ -n $minVersion ]]; then+            say "      ${cont} V.test (F.qtVersion >= ${minVersion}) \$ S.ExportClass ${classVar}"+        else+            say "      ${cont} V.just \$ S.ExportClass ${classVar}"+        fi         if [[ $cont = '[' ]]; then cont=','; fi     }     forEachListener writeHs
src/Graphics/UI/Qtah/Generator/Common.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/Flag.hs
@@ -1,35 +0,0 @@--- This file is part of Qtah.------ Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>------ 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/>.---- | Utilities for conditional compilation of parts of Qt interfaces.-module Graphics.UI.Qtah.Generator.Flag (-  collect,-  just,-  test,-  ) where--import Data.Maybe (catMaybes)--collect :: [Maybe a] -> [a]-collect = catMaybes--just :: a -> Maybe a-just = Just--test :: Bool -> a -> Maybe a-test True = Just-test False = const Nothing
src/Graphics/UI/Qtah/Generator/Flags.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,15 +17,23 @@  module Graphics.UI.Qtah.Generator.Interface.Core (modules) where +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.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 import qualified Graphics.UI.Qtah.Generator.Interface.Core.QDir as QDir import qualified Graphics.UI.Qtah.Generator.Interface.Core.QEvent as QEvent+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QItemSelection as QItemSelection+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionModel as QItemSelectionModel+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionRange as QItemSelectionRange import qualified Graphics.UI.Qtah.Generator.Interface.Core.QList as QList import qualified Graphics.UI.Qtah.Generator.Interface.Core.QMargins as QMargins import qualified Graphics.UI.Qtah.Generator.Interface.Core.QMarginsF as QMarginsF+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex as QModelIndex import qualified Graphics.UI.Qtah.Generator.Interface.Core.QObject as QObject+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPersistentModelIndex as QPersistentModelIndex import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPoint as QPoint import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPointF as QPointF import qualified Graphics.UI.Qtah.Generator.Interface.Core.QRect as QRect@@ -34,6 +42,8 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Core.QSizeF as QSizeF 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.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 import qualified Graphics.UI.Qtah.Generator.Interface.Core.QVector as QVector@@ -45,14 +55,22 @@ modules :: [AModule] modules =   concat-  [ [ QChar.aModule+  [ [ QAbstractItemModel.aModule+    , QAbstractListModel.aModule+    , QAbstractTableModel.aModule+    , QChar.aModule     , QChildEvent.aModule     , QCoreApplication.aModule     , QDir.aModule     , QEvent.aModule+    , QItemSelection.aModule+    , QItemSelectionModel.aModule+    , QItemSelectionRange.aModule     , QMargins.aModule     , QMarginsF.aModule+    , QModelIndex.aModule     , QObject.aModule+    , QPersistentModelIndex.aModule     , QPoint.aModule     , QPointF.aModule     , QRect.aModule@@ -61,6 +79,8 @@     , QSizeF.aModule     , QString.aModule     , QStringList.aModule+    , QStringListModel.aModule+    , QTimer.aModule     , QTimerEvent.aModule     , QVariant.aModule     , Types.aModule
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractItemModel.hs view
@@ -0,0 +1,179 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QAbstractItemModel (+  aModule,+  c_QAbstractItemModel,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportEnum, ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkMethod,+  mkMethod',+  )+import Foreign.Hoppy.Generator.Types (+  bitspaceT,+  boolT,+  enumT,+  intT,+  objT,+  voidT,+  )+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+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.QVariant (c_QVariant)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (+  bs_ItemFlags,+  e_ItemDataRole,+  e_Orientation,+  e_SortOrder,+  )+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  c_Listener,+  c_ListenerQModelIndexIntInt,+  c_ListenerQModelIndexIntIntQModelIndexInt,+  c_ListenerQModelIndexQModelIndexQVectorInt,+  )+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", "QAbstractItemModel"] $+  QtExport (ExportClass c_QAbstractItemModel) :+  map QtExportSignal signals +++  [ QtExport $ ExportEnum e_LayoutChangeHint ]++c_QAbstractItemModel =+  addReqIncludes [includeStd "QAbstractItemModel"] $+  classSetEntityPrefix "" $+  makeClass (ident "QAbstractItemModel") Nothing [c_QObject] $+  collect+  [ just $ mkConstMethod "buddy" [objT c_QModelIndex] $ objT c_QModelIndex+    -- TODO canDropMimeData+  , just $ mkConstMethod "canFetchMore" [objT c_QModelIndex] boolT+  , just $ mkConstMethod' "columnCount" "columnCount" [] intT+  , just $ mkConstMethod' "columnCount" "columnCountAt" [objT c_QModelIndex] intT+  , just $ mkConstMethod' "data" "getData" [objT c_QModelIndex] $ objT c_QVariant+  , just $ mkConstMethod' "data" "getDataWithRole"+    [objT c_QModelIndex, enumT e_ItemDataRole] $ objT c_QVariant+    -- TODO dropMimeData+  , just $ mkMethod "fetchMore" [objT c_QModelIndex] voidT+  , just $ mkConstMethod "flags" [objT c_QModelIndex] $ bitspaceT bs_ItemFlags+  , just $ mkConstMethod' "hasChildren" "hasChildren" [] boolT+  , just $ mkConstMethod' "hasChildren" "hasChildrenAt" [objT c_QModelIndex] boolT+  , just $ mkConstMethod' "hasIndex" "hasIndex" [intT, intT] boolT+  , just $ mkConstMethod' "hasIndex" "hasIndexAt" [intT, intT, objT c_QModelIndex] boolT+  , just $ mkConstMethod' "headerData" "headerData" [intT, enumT e_Orientation] $ objT c_QVariant+  , just $ mkConstMethod' "headerData" "headerDataWithRole"+    [intT, enumT e_Orientation, enumT e_ItemDataRole] $ objT c_QVariant+  , just $ mkConstMethod' "index" "index" [intT, intT] $ objT c_QModelIndex+  , just $ mkConstMethod' "index" "indexAt" [intT, intT, objT c_QModelIndex] $ objT c_QModelIndex+  , just $ mkMethod' "insertColumn" "insertColumn" [intT] boolT+  , just $ mkMethod' "insertColumn" "insertColumnAt" [intT, objT c_QModelIndex] boolT+  , just $ mkMethod' "insertColumns" "insertColumns" [intT, intT] boolT+  , just $ mkMethod' "insertColumns" "insertColumnsAt" [intT, intT, objT c_QModelIndex] boolT+  , just $ mkMethod' "insertRow" "insertRow" [intT] boolT+  , just $ mkMethod' "insertRow" "insertRowAt" [intT, objT c_QModelIndex] boolT+  , just $ mkMethod' "insertRows" "insertRows" [intT, intT] boolT+  , just $ mkMethod' "insertRows" "insertRowsAt" [intT, intT, objT c_QModelIndex] boolT+    -- TODO itemData+    -- TODO match+    -- TODO mimeData+    -- TODO mimeTypes+  , test (qtVersion >= [5, 0]) $ mkMethod "moveColumn"+    [objT c_QModelIndex, intT, objT c_QModelIndex, intT] boolT+  , test (qtVersion >= [5, 0]) $ mkMethod "moveColumns"+    [objT c_QModelIndex, intT, intT, objT c_QModelIndex, intT] boolT+  , test (qtVersion >= [5, 0]) $ mkMethod "moveRow"+    [objT c_QModelIndex, intT, objT c_QModelIndex, intT] boolT+  , test (qtVersion >= [5, 0]) $ mkMethod "moveRows"+    [objT c_QModelIndex, intT, intT, objT c_QModelIndex, intT] boolT+  , just $ mkConstMethod "parent" [objT c_QModelIndex] $ objT c_QModelIndex+  , just $ mkMethod' "removeColumn" "removeColumn" [intT] boolT+  , just $ mkMethod' "removeColumn" "removeColumnAt" [intT, objT c_QModelIndex] boolT+  , just $ mkMethod' "removeColumns" "removeColumns" [intT, intT] boolT+  , just $ mkMethod' "removeColumns" "removeColumnsAt" [intT, intT, objT c_QModelIndex] boolT+  , just $ mkMethod' "removeRow" "removeRow" [intT] boolT+  , just $ mkMethod' "removeRow" "removeRowAt" [intT, objT c_QModelIndex] boolT+  , just $ mkMethod' "removeRows" "removeRows" [intT, intT] boolT+  , just $ mkMethod' "removeRows" "removeRowsAt" [intT, intT, objT c_QModelIndex] boolT+  , just $ mkMethod "revert" [] voidT+    -- TODO roleNames (>=4.6)+  , just $ mkConstMethod' "rowCount" "rowCount" [] intT+  , just $ mkConstMethod' "rowCount" "rowCountAt" [objT c_QModelIndex] intT+  , just $ mkMethod' "setData" "setData" [objT c_QModelIndex, objT c_QVariant] boolT+  , just $ mkMethod' "setData" "setDataWithRole"+    [objT c_QModelIndex, objT c_QVariant, enumT e_ItemDataRole] boolT+  , just $ mkMethod' "setHeaderData" "setHeaderData"+    [intT, enumT e_Orientation, objT c_QVariant] boolT+  , just $ mkMethod' "setHeaderData" "setHeaderDataWithRole"+    [intT, enumT e_Orientation, objT c_QVariant, enumT e_ItemDataRole] boolT+    -- TODO setItemData+  , just $ mkConstMethod "sibling" [intT, intT, objT c_QModelIndex] $ objT c_QModelIndex+  , just $ mkMethod' "sort" "sort" [intT] voidT+  , just $ mkMethod' "sort" "sortWithOrder" [intT, enumT e_SortOrder] voidT+  , just $ mkConstMethod "span" [objT c_QModelIndex] $ objT c_QSize+  , just $ mkMethod "submit" [] boolT+    -- TODO suportedDragActions+    -- TODO supportedDropActions (>=4.2)+  ]++signals =+  collect+  [ just $ makeSignal c_QAbstractItemModel "columnsAboutToBeInserted" c_ListenerQModelIndexIntInt+  , test (qtVersion >= [4, 6]) $ makeSignal c_QAbstractItemModel "columnsAboutToBeMoved"+    c_ListenerQModelIndexIntIntQModelIndexInt+  , just $ makeSignal c_QAbstractItemModel "columnsAboutToBeRemoved" c_ListenerQModelIndexIntInt+  , just $ makeSignal c_QAbstractItemModel "columnsInserted" c_ListenerQModelIndexIntInt+  , test (qtVersion >= [4, 6]) $ makeSignal c_QAbstractItemModel "columnsMoved"+    c_ListenerQModelIndexIntIntQModelIndexInt+  , just $ makeSignal c_QAbstractItemModel "columnsRemoved" c_ListenerQModelIndexIntInt+  , just $ makeSignal c_QAbstractItemModel "dataChanged" c_ListenerQModelIndexQModelIndexQVectorInt+    -- TODO layoutAboutToBeChanged (>=5.0)+    -- TODO layoutChanged (>=5.0)+  , test (qtVersion >= [4, 2]) $ makeSignal c_QAbstractItemModel "modelAboutToBeReset" c_Listener+  , test (qtVersion >= [4, 1]) $ makeSignal c_QAbstractItemModel "modelReset" c_Listener+  , just $ makeSignal c_QAbstractItemModel "rowsAboutToBeInserted" c_ListenerQModelIndexIntInt+  , test (qtVersion >= [4, 6]) $ makeSignal c_QAbstractItemModel "rowsAboutToBeMoved"+    c_ListenerQModelIndexIntIntQModelIndexInt+  , just $ makeSignal c_QAbstractItemModel "rowsAboutToBeRemoved" c_ListenerQModelIndexIntInt+  , just $ makeSignal c_QAbstractItemModel "rowsInserted" c_ListenerQModelIndexIntInt+  , test (qtVersion >= [4, 6]) $ makeSignal c_QAbstractItemModel "rowsMoved"+    c_ListenerQModelIndexIntIntQModelIndexInt+  , just $ makeSignal c_QAbstractItemModel "rowsRemoved" c_ListenerQModelIndexIntInt+  ]++e_LayoutChangeHint =+  makeQtEnum (ident1 "QAbstractItemModel" "LayoutChangeHint") [includeStd "QAbstractItemModel"]+  [ (0, ["no", "layout", "change", "hint"])+  , (1, ["vertical", "sort", "hint"])+  , (2, ["horizontal", "sort", "hint"])+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractItemModel.hs-boot view
@@ -0,0 +1,26 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QAbstractItemModel (+  c_QAbstractItemModel,+  ) where++import Foreign.Hoppy.Generator.Spec (Class)++{-# ANN module "HLint: ignore Use camelCase" #-}++c_QAbstractItemModel :: Class
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractListModel.hs view
@@ -0,0 +1,46 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QAbstractListModel (+  aModule,+  c_QAbstractListModel,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (c_QAbstractItemModel)+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", "QAbstractListModel"] $+  [ QtExport $ ExportClass c_QAbstractListModel ]++c_QAbstractListModel =+  addReqIncludes [includeStd "QAbstractListModel"] $+  classSetEntityPrefix "" $+  makeClass (ident "QAbstractListModel") Nothing [c_QAbstractItemModel]+  []
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractTableModel.hs view
@@ -0,0 +1,46 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QAbstractTableModel (+  aModule,+  c_QAbstractTableModel,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (c_QAbstractItemModel)+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", "QAbstractTableModel"] $+  [ QtExport $ ExportClass c_QAbstractTableModel ]++c_QAbstractTableModel =+  addReqIncludes [includeStd "QAbstractTableModel"] $+  classSetEntityPrefix "" $+  makeClass (ident "QAbstractTableModel") Nothing [c_QAbstractItemModel]+  []
src/Graphics/UI/Qtah/Generator/Interface/Core/QChar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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@@ -57,7 +57,7 @@   classAddFeatures,   ) import Foreign.Hoppy.Generator.Types (boolT, charT, intT, enumT, objT, refT, ucharT, ushortT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (qtVersion) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Imports
src/Graphics/UI/Qtah/Generator/Interface/Core/QChildEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,7 +47,7 @@   classAddFeatures,   ) import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, intT, objT, refT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
src/Graphics/UI/Qtah/Generator/Interface/Core/QEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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
@@ -0,0 +1,101 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QItemSelection (+  aModule,+  c_QItemSelection,+  ) where++import Foreign.Hoppy.Generator.Language.Haskell (+  HsTypeSide (HsHsSide),+  addImports,+  cppTypeToHsTypeAndUse,+  sayLn,+  )+import Foreign.Hoppy.Generator.Spec (+  ClassHaskellConversion (+    ClassHaskellConversion,+    classHaskellConversionFromCppFn,+    classHaskellConversionToCppFn,+    classHaskellConversionType+    ),+  Export (ExportClass),+  addAddendumHaskell,+  addReqIncludes,+  classSetEntityPrefix,+  classSetHaskellConversion,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod,+  mkStaticMethod,+  )+import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, objT, ptrT, voidT)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionModel (+  bs_SelectionFlags,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionRange (c_QItemSelectionRange)+import Graphics.UI.Qtah.Generator.Interface.Core.QList (+  c_QListQItemSelectionRange,+  c_QListQModelIndex,+  inheritHasContents,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex (c_QModelIndex)+import Graphics.UI.Qtah.Generator.Interface.Imports (importForRuntime)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types+import Language.Haskell.Syntax (+  HsQName (Special),+  HsSpecialCon (HsListCon),+  HsType (HsTyApp, HsTyCon),+  )++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QItemSelection"]+  [ QtExport $ ExportClass c_QItemSelection ]++c_QItemSelection =+  addReqIncludes [includeStd "QItemSelection"] $+  -- This conversion mirrors QList but doesn't have a to-C++ conversion.+  classSetHaskellConversion+    ClassHaskellConversion+    { classHaskellConversionType = Just $ do+      hsType <- cppTypeToHsTypeAndUse HsHsSide $ objT c_QItemSelectionRange+      return $ HsTyApp (HsTyCon $ Special $ HsListCon) hsType+    , classHaskellConversionToCppFn = Nothing+    , classHaskellConversionFromCppFn = Just $ do+      addImports importForRuntime+      sayLn "QtahFHR.toContents"+    } $+  addAddendumHaskell+    (inheritHasContents c_QItemSelection c_QListQItemSelectionRange $ objT c_QItemSelectionRange) $+  classSetEntityPrefix "" $+  makeClass (ident "QItemSelection") Nothing [c_QListQItemSelectionRange] $+  [ mkCtor "new" []+  , mkCtor "newWithRange" [objT c_QModelIndex, objT c_QModelIndex]+  , mkConstMethod "contains" [objT c_QModelIndex] boolT+  , mkConstMethod "indexes" [] $ objT c_QListQModelIndex+  , mkMethod "merge" [objT c_QItemSelection, bitspaceT bs_SelectionFlags] voidT+  , mkMethod "select" [objT c_QModelIndex, objT c_QModelIndex] voidT+  , mkStaticMethod "split"+    [objT c_QItemSelectionRange, objT c_QItemSelectionRange, ptrT $ objT c_QItemSelection] voidT+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelectionModel.hs view
@@ -0,0 +1,141 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QItemSelectionModel (+  aModule,+  c_QItemSelectionModel,+  bs_SelectionFlags,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportBitspace, ExportEnum, ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkCtor,+  mkMethod,+  mkMethod',+  )+import Foreign.Hoppy.Generator.Types (+  bitspaceT,+  boolT,+  constT,+  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.QItemSelection (c_QItemSelection)+import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQModelIndex)+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.Internal.Listener (+  c_ListenerPtrQAbstractItemModel,+  c_ListenerRefConstQItemSelectionRefConstQItemSelection,+  c_ListenerQModelIndexQModelIndex,+  )+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", "QItemSelectionModel"] $+  [ QtExport $ ExportClass c_QItemSelectionModel ] +++  map QtExportSignal signals +++  [ QtExport $ ExportEnum e_SelectionFlag+  , QtExport $ ExportBitspace bs_SelectionFlags+  ]++c_QItemSelectionModel =+  addReqIncludes [includeStd "QItemSelectionModel"] $+  classSetEntityPrefix "" $+  makeClass (ident "QItemSelectionModel") Nothing [c_QObject] $+  collect+  [ -- The nullary constructor requires at least Qt >=5.0.  Release notes[1]+    -- point at QItemSelectionModel gaining some methods in 5.5:+    --+    --     QAbstractItemModel* model()+    --     void modelChanged(QAbstractItemModel* model)+    --     void setModel(QAbstractItemModel* model)+    --+    -- So I suspect that this constructor appeared at that point.+    --+    -- [1] https://doc.qt.io/qt-5/newclasses55.html+    test (qtVersion >= [5, 5]) $ mkCtor "new" []+  , just $ mkCtor "newWithModel" [ptrT $ objT c_QAbstractItemModel]+  , just $ mkCtor "newWithModelAndParent" [ptrT $ objT c_QAbstractItemModel, ptrT $ objT c_QObject]+  , just $ mkMethod "clear" [] voidT+  , test (qtVersion >= [5, 0]) $ mkMethod "clearCurrentIndex" [] voidT+  , just $ mkMethod "clearSelection" [] voidT+  , just $ mkConstMethod "columnIntersectsSelection" [intT, objT c_QModelIndex] boolT+  , just $ mkConstMethod "currentIndex" [] $ objT c_QModelIndex+  , just $ mkConstMethod "hasSelection" [] boolT+  , just $ mkConstMethod "isColumnSelected" [intT, objT c_QModelIndex] boolT+  , just $ mkConstMethod "isRowSelected" [intT, objT c_QModelIndex] boolT+  , just $ mkConstMethod "isSelected" [objT c_QModelIndex] boolT+  , test (qtVersion >= [5, 5]) $ mkMethod' "model" "model" [] $ ptrT $ objT c_QAbstractItemModel+  , just $ mkConstMethod' "model" "modelConst" [] $ ptrT $ constT $ objT c_QAbstractItemModel+  , just $ mkMethod "reset" [] voidT+  , just $ mkConstMethod "rowIntersectsSelection" [intT, objT c_QModelIndex] boolT+  , just $ mkMethod' "select" "selectIndex" [objT c_QModelIndex, bitspaceT bs_SelectionFlags] voidT+  , just $ mkMethod' "select" "selectSelection" [objT c_QItemSelection, bitspaceT bs_SelectionFlags]+    voidT+  , just $ mkConstMethod "selectedColumns" [intT] $ objT c_QListQModelIndex+  , test (qtVersion >= [5, 5]) $ mkConstMethod "selectedIndexes" [] $ objT c_QListQModelIndex+  , just $ mkConstMethod "selectedRows" [intT] $ objT c_QListQModelIndex+  , just $ mkConstMethod "selection" [] $ objT c_QItemSelection+  , just $ mkMethod "setCurrentIndex" [objT c_QModelIndex, bitspaceT bs_SelectionFlags] voidT+  , test (qtVersion >= [5, 5]) $ mkMethod "setModel" [ptrT $ objT c_QAbstractItemModel] voidT+  ]++signals =+  collect+  [ just $ makeSignal c_QItemSelectionModel "currentChanged" c_ListenerQModelIndexQModelIndex+  , just $ makeSignal c_QItemSelectionModel "currentColumnChanged" c_ListenerQModelIndexQModelIndex+  , just $ makeSignal c_QItemSelectionModel "currentRowChanged" c_ListenerQModelIndexQModelIndex+  , test (qtVersion >= [5, 5]) $ makeSignal c_QItemSelectionModel "modelChanged"+    c_ListenerPtrQAbstractItemModel+  , just $ makeSignal c_QItemSelectionModel "selectionChanged"+    c_ListenerRefConstQItemSelectionRefConstQItemSelection+  ]++(e_SelectionFlag, bs_SelectionFlags) =+  makeQtEnumBitspace (ident1 "QItemSelectionModel" "SelectionFlag") "SelectionFlags"+  [includeStd "QItemSelectionModel"]+  [ (0x00, ["no", "update"])+    -- Renamed from just "clear" because it clashes with the "clear" method.+  , (0x01, ["clear", "flag"])+  , (0x02, ["select"])+  , (0x04, ["deselect"])+  , (0x08, ["toggle"])+  , (0x10, ["current"])+  , (0x20, ["rows"])+  , (0x40, ["columns"])+  , (0x12, ["select", "current"])+  , (0x18, ["toggle", "current"])+  , (0x03, ["clear", "and", "select"])+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelectionModel.hs-boot view
@@ -0,0 +1,24 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QItemSelectionModel (+  bs_SelectionFlags,+  ) where++import Foreign.Hoppy.Generator.Spec (Bitspace)++bs_SelectionFlags :: Bitspace
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelectionRange.hs view
@@ -0,0 +1,93 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QItemSelectionRange (+  aModule,+  c_QItemSelectionRange,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkCtor,+  mkMethod,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (boolT, constT, intT, objT, ptrT, refT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQModelIndex)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (+  c_QAbstractItemModel,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex (c_QModelIndex)+import Graphics.UI.Qtah.Generator.Interface.Core.QPersistentModelIndex (c_QPersistentModelIndex)+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", "QItemSelectionRange"]+  [ QtExport $ ExportClass c_QItemSelectionRange ]++c_QItemSelectionRange =+  addReqIncludes [includeStd "QItemSelectionRange"] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QItemSelectionRange") Nothing [] $+  collect+  [ just $ mkCtor "new" []+  , just $ mkCtor "newWithIndex" [objT c_QModelIndex]+  , just $ mkCtor "newWithIndices" [objT c_QModelIndex, objT c_QModelIndex]+  , just $ mkConstMethod "bottom" [] intT+  , just $ mkConstMethod "bottomRight" [] $+    if qtVersion >= [5, 0]+    then refT $ constT $ objT c_QPersistentModelIndex+    else objT c_QModelIndex+  , just $ mkConstMethod' "contains" "containsIndex" [objT c_QModelIndex] boolT+  , just $ mkConstMethod' "contains" "containsBelowParent" [intT, intT, objT c_QModelIndex] boolT+  , just $ mkConstMethod "height" [] intT+  , just $ mkConstMethod "indexes" [] $ objT c_QListQModelIndex+  , just $ mkConstMethod "intersected" [objT c_QItemSelectionRange] $ objT c_QItemSelectionRange+  , just $ mkConstMethod "intersects" [objT c_QItemSelectionRange] boolT+  , just $ mkConstMethod "isEmpty" [] boolT+  , just $ mkConstMethod "isValid" [] boolT+  , just $ mkConstMethod "left" [] intT+  , just $ mkConstMethod "model" [] $ ptrT $ constT $ objT c_QAbstractItemModel+  , just $ mkConstMethod "parent" [] $ objT c_QModelIndex+  , just $ mkConstMethod "right" [] intT+  , test (qtVersion >= [5, 6]) $ mkMethod "swap" [refT $ objT c_QItemSelectionRange] voidT+  , just $ mkConstMethod "top" [] intT+  , just $ mkConstMethod "topLeft" [] $+    if qtVersion >= [5, 0]+    then refT $ constT $ objT c_QPersistentModelIndex+    else objT c_QModelIndex+  , just $ mkConstMethod "width" [] intT+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QList.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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@@ -23,13 +23,13 @@   Options (..),   defaultOptions,   Contents (..),-  instantiate,-  instantiate',-  toExports,+  inheritHasContents,   -- * Instantiations   allModules,   c_QListInt,   c_QListQAbstractButton,+  c_QListQItemSelectionRange,+  c_QListQModelIndex,   c_QListQObject,   c_QListQString,   c_QListQVariant,@@ -41,6 +41,7 @@ import Data.Monoid (mconcat, mempty) #endif import Foreign.Hoppy.Generator.Language.Haskell (+  Generator,   HsTypeSide (HsHsSide),   addImports,   cppTypeToHsTypeAndUse,@@ -49,6 +50,7 @@   prettyPrint,   sayLn,   saysLn,+  toHsCastMethodName,   toHsClassEntityName',   toHsDataTypeName,   )@@ -89,12 +91,16 @@ 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.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.QString (c_QString) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant) import Graphics.UI.Qtah.Generator.Interface.Imports-import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton (c_QAbstractButton)-import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton (+  c_QAbstractButton,+  )+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), QtModule, makeQtModule) import Graphics.UI.Qtah.Generator.Types import Language.Haskell.Syntax (@@ -258,6 +264,22 @@      { c_QList = list      } +-- | Used in an addendum for a class that inherits from QList, this generates a+-- HasContents instance that uses the HasContents instance on the parent list+-- class.+inheritHasContents :: Class -> Class -> Type -> Generator ()+inheritHasContents cls listClass t =+  forM_ [Const, Nonconst] $ \cst -> do+    hsDataTypeName <- toHsDataTypeName cst cls+    hsValueType <- cppTypeToHsTypeAndUse HsHsSide $ case cst of+      Const -> constT t+      Nonconst -> t+    castToListFn <- toHsCastMethodName cst listClass+    addImports importForRuntime+    saysLn ["instance QtahFHR.HasContents ", hsDataTypeName,+            " (", prettyPrint hsValueType, ") where"]+    indent $ saysLn ["toContents = QtahFHR.toContents . ", castToListFn]+ -- | Converts an instantiation into a list of exports to be included in a -- module. toExports :: Contents -> [QtExport]@@ -271,6 +293,8 @@   map AQtModule   [ qmod_Int   , qmod_QAbstractButton+  , qmod_QItemSelectionRange+  , qmod_QModelIndex   , qmod_QObject   , qmod_QString   , qmod_QVariant@@ -295,6 +319,25 @@  c_QListQAbstractButton :: Class c_QListQAbstractButton = c_QList contents_QAbstractButton++qmod_QItemSelectionRange :: QtModule+qmod_QItemSelectionRange = createModule "QItemSelectionRange" contents_QItemSelectionRange++contents_QItemSelectionRange :: Contents+contents_QItemSelectionRange =+  instantiate "QListQItemSelectionRange" (objT c_QItemSelectionRange) mempty++c_QListQItemSelectionRange :: Class+c_QListQItemSelectionRange = c_QList contents_QItemSelectionRange++qmod_QModelIndex :: QtModule+qmod_QModelIndex = createModule "QModelIndex" contents_QModelIndex++contents_QModelIndex :: Contents+contents_QModelIndex = instantiate "QListQModelIndex" (objT c_QModelIndex) mempty++c_QListQModelIndex :: Class+c_QListQModelIndex = c_QList contents_QModelIndex  qmod_QObject :: QtModule qmod_QObject = createModule "QObject" contents_QObject
src/Graphics/UI/Qtah/Generator/Interface/Core/QList.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,9 +17,12 @@  -- | Bindings for @QList@. module Graphics.UI.Qtah.Generator.Interface.Core.QList (+  c_QListQModelIndex,   c_QListQObject,   ) where  import Foreign.Hoppy.Generator.Spec (Class)++c_QListQModelIndex :: Class  c_QListQObject :: Class
src/Graphics/UI/Qtah/Generator/Interface/Core/QMargins.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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
@@ -0,0 +1,85 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QModelIndex (+  aModule,+  c_QModelIndex,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  classSetConversionToGc,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkCtor,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (+  bitspaceT,+  boolT,+  constT,+  enumT,+  intT,+  objT,+  ptrT,+  )+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (+  c_QAbstractItemModel,+  )+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_ItemFlags, e_ItemDataRole)+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", "QModelIndex"]+  [ QtExport $ ExportClass c_QModelIndex ]++c_QModelIndex =+  addReqIncludes [includeStd "QModelIndex"] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QModelIndex") Nothing [] $+  collect+  [ just $ mkCtor "new" []+  , just $ mkConstMethod "child" [intT, intT] $ objT c_QModelIndex+  , just $ mkConstMethod "column" [] intT+  , just $ mkConstMethod' "data" "getData" [] $ objT c_QVariant+  , just $ mkConstMethod' "data" "getDataWithRole" [enumT e_ItemDataRole] $ objT c_QVariant+  , test (qtVersion >= [4, 2]) $ mkConstMethod "flags" [] $ bitspaceT bs_ItemFlags+    -- TODO internalId+    -- TODO internalPointer+  , just $ mkConstMethod "isValid" [] boolT+  , just $ mkConstMethod "model" [] $ ptrT $ constT $ objT c_QAbstractItemModel+  , just $ mkConstMethod "parent" [] $ objT c_QModelIndex+  , just $ mkConstMethod "row" [] intT+  , just $ mkConstMethod "sibling" [intT, intT] $ objT c_QModelIndex+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QObject.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (qtVersion) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener+                        (c_ListenerPtrQObject, c_ListenerQString) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQObject) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QPersistentModelIndex.hs view
@@ -0,0 +1,90 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QPersistentModelIndex (+  aModule,+  c_QPersistentModelIndex,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  classSetConversionToGc,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkCtor,+  mkMethod,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (+  bitspaceT,+  boolT,+  constT,+  enumT,+  intT,+  objT,+  ptrT,+  refT,+  voidT,+  )+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (+  c_QAbstractItemModel,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex (c_QModelIndex)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_ItemFlags, e_ItemDataRole)+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", "QPersistentModelIndex"]+  [ QtExport $ ExportClass c_QPersistentModelIndex ]++c_QPersistentModelIndex =+  addReqIncludes [includeStd "QPersistentModelIndex"] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QPersistentModelIndex") Nothing [] $+  collect+  [ just $ mkCtor "new" []+  , just $ mkCtor "newFromIndex" [objT c_QModelIndex]+  , just $ mkConstMethod "child" [intT, intT] $ objT c_QPersistentModelIndex+  , just $ mkConstMethod "column" [] intT+  , just $ mkConstMethod' "data" "getData" [] $ objT c_QVariant+  , just $ mkConstMethod' "data" "getDataWithRole" [enumT e_ItemDataRole] $ objT c_QVariant+  , test (qtVersion >= [4, 2]) $ mkConstMethod "flags" [] $ bitspaceT bs_ItemFlags+  , just $ mkConstMethod "isValid" [] boolT+  , just $ mkConstMethod "model" [] $ ptrT $ constT $ objT c_QAbstractItemModel+  , just $ mkConstMethod "parent" [] $ objT c_QPersistentModelIndex+  , just $ mkConstMethod "row" [] intT+  , just $ mkConstMethod "sibling" [intT, intT] $ objT c_QPersistentModelIndex+  , test (qtVersion >= [5, 0]) $ mkMethod "swap" [refT $ objT c_QPersistentModelIndex] voidT+    -- TODO operator const QModelIndex&()+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QPoint.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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@@ -59,7 +59,7 @@   ) import Foreign.Hoppy.Generator.Std.String (c_string) import Foreign.Hoppy.Generator.Types (charT, constT, intT, objT, ptrT, refT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar) import Graphics.UI.Qtah.Generator.Interface.Imports
src/Graphics/UI/Qtah/Generator/Interface/Core/QString.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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
@@ -0,0 +1,56 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QStringListModel (+  aModule,+  c_QStringListModel,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  mkProp,+  )+import Foreign.Hoppy.Generator.Types (objT, ptrT)+import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractListModel (c_QAbstractListModel)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)+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", "QStringListModel"] $+  [ QtExport $ ExportClass c_QStringListModel ]++c_QStringListModel =+  addReqIncludes [includeStd "QStringListModel"] $+  classSetEntityPrefix "" $+  makeClass (ident "QStringListModel") Nothing [c_QAbstractListModel]+  [ mkCtor "new" []+  , mkCtor "newWithParent" [ptrT $ objT c_QObject]+  , mkCtor "newWithContents" [objT c_QStringList]+  , mkCtor "newWithContentsAndParent" [objT c_QStringList, ptrT $ objT c_QObject]+  , mkProp "stringList" $ objT c_QStringList+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QTimer.hs view
@@ -0,0 +1,72 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QTimer (+  aModule,+  c_QTimer+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export(ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkMethod,+  mkConstMethod,+  mkCtor,+  )+import Foreign.Hoppy.Generator.Types (boolT, intT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+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", "QTimer"]+  [ QtExport $ ExportClass c_QTimer+  , QtExportSignal s_timeout+  ]++c_QTimer =+  addReqIncludes [includeStd "QTimer"] $+  classSetEntityPrefix "" $+  makeClass (ident "QTimer") Nothing [c_QObject] $+  collect+  [ just $ mkCtor "new" []+  , just $ mkConstMethod "interval" [] intT+  -- , just $ mkConstMethod "intervalAsDuration" [] $ objT c_std::chrono::milliseconds+  , just $ mkConstMethod "isActive" [] boolT+  , just $ mkConstMethod "isSingleShot" [] boolT+  , test (qtVersion >= [5, 0]) $ mkConstMethod "remainingTime" [] intT+  -- , just $ mkConstMethod "remainingTimeAsDuration" [] $ objT c_std::chrono::milliseconds+  , just $ mkMethod "setInterval" [intT] voidT+  -- , just $ mkMethod' "setInterval" "setInterval" [objT c_std::chrono::milliseconds] voidT+  , just $ mkMethod "setSingleShot" [boolT] voidT+  -- , just $ mkMethod "setTimerType" [objT c_Qt::TimerType] voidT+  , just $ mkMethod "start" [intT] voidT+  , just $ mkConstMethod "timerId" [] intT+  -- , just $ mkConstMethod "timerType" [] $ objT c_Qt::TimerType+  ]++s_timeout = makeSignal c_QTimer "timeout" c_Listener
src/Graphics/UI/Qtah/Generator/Interface/Core/QTimerEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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@@ -23,13 +23,12 @@   Options (..),   defaultOptions,   Contents (..),-  instantiate,-  instantiate',-  toExports,   -- * Instantiations   allModules,+  c_QVectorInt,   c_QVectorQPoint,   c_QVectorQPointF,+  c_QVectorQRgb,   ) where  import Control.Monad (forM_, when)@@ -81,6 +80,7 @@ import Graphics.UI.Qtah.Generator.Flags (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.QPointF (c_QPointF)+import Graphics.UI.Qtah.Generator.Interface.Gui.QColor (qrgb) import Graphics.UI.Qtah.Generator.Interface.Imports import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), QtModule, makeQtModule) import Graphics.UI.Qtah.Generator.Types@@ -254,10 +254,21 @@ allModules :: [AModule] allModules =   map AQtModule-  [ qmod_QPoint+  [ qmod_Int+  , qmod_QPoint   , qmod_QPointF+  , qmod_QRgb   ] +qmod_Int :: QtModule+qmod_Int = createModule "Int" contents_Int++contents_Int :: Contents+contents_Int = instantiate "QVectorInt" intT mempty++c_QVectorInt :: Class+c_QVectorInt = c_QVector contents_Int+ qmod_QPoint :: QtModule qmod_QPoint = createModule "QPoint" contents_QPoint @@ -275,3 +286,12 @@  c_QVectorQPointF :: Class c_QVectorQPointF = c_QVector contents_QPointF++qmod_QRgb :: QtModule+qmod_QRgb = createModule "QRgb" contents_QRgb++contents_QRgb :: Contents+contents_QRgb = instantiate "QVectorQRgb" qrgb mempty++c_QVectorQRgb :: Class+c_QVectorQRgb = c_QVector contents_QRgb
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QVector.hs-boot view
@@ -0,0 +1,24 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Core.QVector (+  c_QVectorInt,+  ) where++import Foreign.Hoppy.Generator.Spec (Class)++c_QVectorInt :: Class
src/Graphics/UI/Qtah/Generator/Interface/Core/Types.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,36 +19,55 @@ module Graphics.UI.Qtah.Generator.Interface.Core.Types (   aModule,   qreal,+  gluint,   e_AlignmentFlag,   bs_Alignment,   e_AspectRatioMode,+  e_BrushStyle,   e_CaseSensitivity,   e_CheckState,   e_Corner,   e_CursorMoveStyle,+  e_DropAction,+  bs_DropActions,   e_EventPriority,   e_FillRule,   e_FocusReason,   e_GlobalColor,+  e_ImageConversionFlag,+  bs_ImageConversionFlags,   e_InputMethodHint,   bs_InputMethodHints,+  e_ItemDataRole,+  e_ItemFlag,+  bs_ItemFlags,+  e_Key,   e_KeyboardModifier,   bs_KeyboardModifiers,   e_LayoutDirection,+  e_MaskMode,   e_MouseButton,   bs_MouseButtons,   e_MouseEventFlag,+  e_MouseEventFlag_minVersion,   bs_MouseEventFlags,   e_MouseEventSource,+  e_MouseEventSource_minVersion,   e_NavigationMode,   e_Orientation,   bs_Orientations,+  e_ScreenOrientation,+  e_ScreenOrientation_minVersion,+  bs_ScreenOrientations,   e_ScrollBarPolicy,   e_ScrollPhase,+  e_ScrollPhase_minVersion,+  e_SortOrder,   e_TextElideMode,   e_TextFormat,   e_TextInteractionFlag,   bs_TextInteractionFlags,+  e_TransformationMode,   e_WindowModality,   e_WindowState,   bs_WindowStates,@@ -67,7 +86,7 @@   includeStd,   makeFn,   )-import Foreign.Hoppy.Generator.Types (doubleT, floatT, objT)+import Foreign.Hoppy.Generator.Types (doubleT, floatT, objT, word32T) import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (qrealFloat, qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)@@ -86,33 +105,47 @@   [ just $ ExportEnum e_AlignmentFlag   , just $ ExportBitspace bs_Alignment   , just $ ExportEnum e_AspectRatioMode+  , just $ ExportEnum e_BrushStyle   , just $ ExportEnum e_CaseSensitivity   , just $ ExportEnum e_CheckState   , just $ ExportEnum e_Corner   , just $ ExportEnum e_CursorMoveStyle+  , just $ ExportEnum e_DropAction+  , just $ ExportBitspace bs_DropActions   , just $ ExportEnum e_EventPriority   , just $ ExportEnum e_FillRule   , just $ ExportEnum e_FocusReason   , just $ ExportEnum e_GlobalColor+  , just $ ExportEnum e_ImageConversionFlag+  , just $ ExportBitspace bs_ImageConversionFlags   , just $ ExportEnum e_InputMethodHint   , just $ ExportBitspace bs_InputMethodHints+  , just $ ExportEnum e_ItemDataRole+  , just $ ExportEnum e_ItemFlag+  , just $ ExportBitspace bs_ItemFlags+  , just $ ExportEnum e_Key   , just $ ExportEnum e_KeyboardModifier   , just $ ExportBitspace bs_KeyboardModifiers   , just $ ExportEnum e_LayoutDirection+  , just $ ExportEnum e_MaskMode   , just $ ExportEnum e_MouseButton   , just $ ExportBitspace bs_MouseButtons-  , test (qtVersion >= e_MouseEventFlag_version) $ ExportEnum e_MouseEventFlag-  , test (qtVersion >= e_MouseEventFlag_version) $ ExportBitspace bs_MouseEventFlags-  , test (qtVersion >= e_MouseEventSource_version) $ ExportEnum e_MouseEventSource+  , test (qtVersion >= e_MouseEventFlag_minVersion) $ ExportEnum e_MouseEventFlag+  , test (qtVersion >= e_MouseEventFlag_minVersion) $ ExportBitspace bs_MouseEventFlags+  , test (qtVersion >= e_MouseEventSource_minVersion) $ ExportEnum e_MouseEventSource   , just $ ExportEnum e_NavigationMode   , just $ ExportEnum e_Orientation   , just $ ExportBitspace bs_Orientations+  , test (qtVersion >= e_ScreenOrientation_minVersion) $ ExportEnum e_ScreenOrientation+  , test (qtVersion >= e_ScreenOrientation_minVersion) $ ExportBitspace bs_ScreenOrientations   , just $ ExportEnum e_ScrollBarPolicy-  , test (qtVersion >= e_ScrollPhase_version) $ ExportEnum e_ScrollPhase+  , test (qtVersion >= e_ScrollPhase_minVersion) $ ExportEnum e_ScrollPhase+  , just $ ExportEnum e_SortOrder   , just $ ExportEnum e_TextElideMode   , just $ ExportEnum e_TextFormat   , just $ ExportEnum e_TextInteractionFlag   , just $ ExportBitspace bs_TextInteractionFlags+  , just $ ExportEnum e_TransformationMode   , just $ ExportEnum e_WindowModality   , just $ ExportEnum e_WindowState   , just $ ExportBitspace bs_WindowStates@@ -127,6 +160,9 @@ qreal :: Type qreal = if qrealFloat then floatT else doubleT +gluint :: Type+gluint = word32T+ (e_AlignmentFlag, bs_Alignment) =   makeQtEnumBitspace (ident1 "Qt" "AlignmentFlag") "Alignment" qtInclude   [ -- Horizontal flags.@@ -149,6 +185,29 @@   , (2, ["keep", "aspect", "ratio", "by", "expanding"])   ] +e_BrushStyle =+  makeQtEnum (ident1 "Qt" "BrushStyle") qtInclude+  [ (0, ["no", "brush"])+  , (1, ["solid", "pattern"])+  , (2, ["dense", "1", "pattern"])+  , (3, ["dense", "2", "pattern"])+  , (4, ["dense", "3", "pattern"])+  , (5, ["dense", "4", "pattern"])+  , (6, ["dense", "5", "pattern"])+  , (7, ["dense", "6", "pattern"])+  , (8, ["dense", "7", "pattern"])+  , (9, ["hor", "pattern"])+  , (10, ["ver", "pattern"])+  , (11, ["cross", "pattern"])+  , (12, ["b", "diag", "pattern"])+  , (13, ["f", "diag", "pattern"])+  , (14, ["diag", "cross", "pattern"])+  , (15, ["linear", "gradient", "pattern"])+  , (16, ["radial", "gradient", "pattern"])+  , (17, ["conical", "gradient", "pattern"])+  , (24, ["texture", "pattern"])+  ]+ e_CaseSensitivity =   makeQtEnum (ident1 "Qt" "CaseSensitivity") qtInclude   [ (0, ["case", "insensitive"])@@ -176,6 +235,16 @@   , (1, ["visual", "move", "style"])   ] +(e_DropAction, bs_DropActions) =+  makeQtEnumBitspace (ident1 "Qt" "DropAction") "DropActions" qtInclude+  [ (0x0, ["ignore", "action"])+  , (0x1, ["copy", "action"])+  , (0x2, ["move", "action"])+  , (0x4, ["link", "action"])+  , (0xff, ["action", "mask"])+  , (0x8002, ["target", "move", "action"])+  ]+ e_EventPriority =   makeQtEnum (ident1 "Qt" "EventPriority") qtInclude   [ (1, ["high", "event", "priority"])@@ -225,6 +294,26 @@   , (1, ["color1"])   ] +(e_ImageConversionFlag, bs_ImageConversionFlags) =+  makeQtEnumBitspace (ident1 "Qt" "ImageConversionFlag") "ImageConversionFlags" qtInclude+  -- TODO Lots of synonyms for 0x0.  Hoppy doesn't support these.+  [ (0x0, ["auto"])  -- Not real, this is because Hoppy doesn't support duplicate enum values.+    -- Color/mono preference:+  , (0x3, ["color", "only"])+  , (0x2, ["mono", "only"])+    -- Dithering mode preference for RGB channels:+  , (0x10, ["ordered", "dither"])+  , (0x20, ["threshold", "dither"])+    -- Dithering mode preference for alpha channel:+  , (0x4, ["ordered", "alpha", "dither"])+  , (0x8, ["diffuse", "alpha", "dither"])+    -- Color matching versus dithering preference:+  , (0x40, ["prefer", "dither"])+  , (0x80, ["avoid", "dither"])+  , (0x100, ["no", "opaque", "detection"])+  , (0x200, ["no", "format", "conversion"])+  ]+ (e_InputMethodHint, bs_InputMethodHints) =   makeQtEnumBitspace (ident1 "Qt" "InputMethodHint") "InputMethodHints" qtInclude   [ (0x0, ["imh", "none"])@@ -250,6 +339,195 @@   , (0xffff0000, ["imh", "exclusive", "input", "mask"])   ] +-- TODO Support for custom ItemDataRole values.+e_ItemDataRole =+  makeQtEnum (ident1 "Qt" "ItemDataRole") qtInclude $+  collect+  [ -- General-purpose roles:+    just (0, ["display", "role"])+  , just (1, ["decoration", "role"])+  , just (2, ["edit", "role"])+  , just (3, ["tool", "tip", "role"])+  , just (4, ["status", "tip", "role"])+  , just (5, ["whats", "this", "role"])+  , just (13, ["size", "hint", "role"])++    -- Roles describing appearance and metadata:+  , just (6, ["font", "role"])+  , just (7, ["text", "alignment", "role"])+  , just (8, ["background", "role"])+  , just (9, ["foreground", "role"])+  , just (10, ["check", "state", "role"])+  , test (qtVersion >= [4, 8]) (14, ["initial", "sort", "order", "role"])++    -- Accessibility roles:+  , just (11, ["accessible", "text", "role"])+  , just (12, ["accessible", "description", "role"])++    -- User roles:+  , just (0x0100, ["user", "role"])+  ]++(e_ItemFlag, bs_ItemFlags) =+  makeQtEnumBitspace (ident1 "Qt" "ItemFlag") "ItemFlags" qtInclude $+  collect+  [ just (0, ["no", "item", "flags"])+  , just (1, ["item", "is", "selectable"])+  , just (2, ["item", "is", "editable"])+  , just (4, ["item", "is", "drag", "enabled"])+  , just (8, ["item", "is", "drop", "enabled"])+  , just (16, ["item", "is", "user", "checkable"])+  , just (32, ["item", "is", "enabled"])+  , just (64, ["item", "is", "auto", "tristate"])+  , just (128, ["item", "never", "has", "children"])+  , test (qtVersion >= [5, 5]) (256, ["item", "is", "user", "tristate"])+  ]++e_Key =+  makeQtEnum (ident1 "Qt" "Key") qtInclude+  [ (0x01000000, ["key", "escape"])+  , (0x01000001, ["key", "tab"])+  , (0x01000002, ["key", "backtab"])+  , (0x01000003, ["key", "backspace"])+  , (0x01000004, ["key", "return"])+  , (0x01000005, ["key", "enter"])+  , (0x01000006, ["key", "insert"])+  , (0x01000007, ["key", "delete"])+  , (0x01000008, ["key", "pause"])+  , (0x01000009, ["key", "print"])+  , (0x0100000a, ["key", "sys", "req"])+  , (0x0100000b, ["key", "clear"])+  , (0x01000010, ["key", "home"])+  , (0x01000011, ["key", "end"])+  , (0x01000012, ["key", "left"])+  , (0x01000013, ["key", "up"])+  , (0x01000014, ["key", "right"])+  , (0x01000015, ["key", "down"])+  , (0x01000016, ["key", "page", "up"])+  , (0x01000017, ["key", "page", "down"])+  , (0x01000020, ["key", "shift"])+  , (0x01000021, ["key", "control"])+  , (0x01000022, ["key", "meta"])+  , (0x01000023, ["key", "alt"])+  , (0x01001103, ["key", "alt", "gr"])+  , (0x01000024, ["key", "caps", "lock"])+  , (0x01000025, ["key", "num", "lock"])+  , (0x01000026, ["key", "scroll", "lock"])+  , (0x01000030, ["key", "f1"])+  , (0x01000031, ["key", "f2"])+  , (0x01000032, ["key", "f3"])+  , (0x01000033, ["key", "f4"])+  , (0x01000034, ["key", "f5"])+  , (0x01000035, ["key", "f6"])+  , (0x01000036, ["key", "f7"])+  , (0x01000037, ["key", "f8"])+  , (0x01000038, ["key", "f9"])+  , (0x01000039, ["key", "f10"])+  , (0x0100003a, ["key", "f11"])+  , (0x0100003b, ["key", "f12"])+  , (0x0100003c, ["key", "f13"])+  , (0x0100003d, ["key", "f14"])+  , (0x0100003e, ["key", "f15"])+  , (0x0100003f, ["key", "f16"])+  , (0x01000040, ["key", "f17"])+  , (0x01000041, ["key", "f18"])+  , (0x01000042, ["key", "f19"])+  , (0x01000043, ["key", "f20"])+  , (0x01000044, ["key", "f21"])+  , (0x01000045, ["key", "f22"])+  , (0x01000046, ["key", "f23"])+  , (0x01000047, ["key", "f24"])+  , (0x01000048, ["key", "f25"])+  , (0x01000049, ["key", "f26"])+  , (0x0100004a, ["key", "f27"])+  , (0x0100004b, ["key", "f28"])+  , (0x0100004c, ["key", "f29"])+  , (0x0100004d, ["key", "f30"])+  , (0x0100004e, ["key", "f31"])+  , (0x0100004f, ["key", "f32"])+  , (0x01000050, ["key", "f33"])+  , (0x01000051, ["key", "f34"])+  , (0x01000052, ["key", "f35"])+  , (0x01000053, ["key", "super", "l"])+  , (0x01000054, ["key", "super", "r"])+  , (0x01000055, ["key", "menu"])+  , (0x01000056, ["key", "hyper", "l"])+  , (0x01000057, ["key", "hyper", "r"])+  , (0x01000058, ["key", "help"])+  , (0x01000059, ["key", "direction", "l"])+  , (0x01000060, ["key", "direction", "r"])+  , (0x00000020, ["key", "space"])  -- Aka Key_Any.+  , (0x00000021, ["key", "exclam"])+  , (0x00000022, ["key", "quote", "dbl"])+  , (0x00000023, ["key", "number", "sign"])+  , (0x00000024, ["key", "dollar"])+  , (0x00000025, ["key", "percent"])+  , (0x00000026, ["key", "ampersand"])+  , (0x00000027, ["key", "apostrophe"])+  , (0x00000028, ["key", "paren", "left"])+  , (0x00000029, ["key", "paren", "right"])+  , (0x0000002a, ["key", "asterisk"])+  , (0x0000002b, ["key", "plus"])+  , (0x0000002c, ["key", "comma"])+  , (0x0000002d, ["key", "minus"])+  , (0x0000002e, ["key", "period"])+  , (0x0000002f, ["key", "slash"])+  , (0x00000030, ["key", "0"])+  , (0x00000031, ["key", "1"])+  , (0x00000032, ["key", "2"])+  , (0x00000033, ["key", "3"])+  , (0x00000034, ["key", "4"])+  , (0x00000035, ["key", "5"])+  , (0x00000036, ["key", "6"])+  , (0x00000037, ["key", "7"])+  , (0x00000038, ["key", "8"])+  , (0x00000039, ["key", "9"])+  , (0x0000003a, ["key", "colon"])+  , (0x0000003b, ["key", "semicolon"])+  , (0x0000003c, ["key", "less"])+  , (0x0000003d, ["key", "equal"])+  , (0x0000003e, ["key", "greater"])+  , (0x0000003f, ["key", "question"])+  , (0x00000040, ["key", "at"])+  , (0x00000041, ["key", "a"])+  , (0x00000042, ["key", "b"])+  , (0x00000043, ["key", "c"])+  , (0x00000044, ["key", "d"])+  , (0x00000045, ["key", "e"])+  , (0x00000046, ["key", "f"])+  , (0x00000047, ["key", "g"])+  , (0x00000048, ["key", "h"])+  , (0x00000049, ["key", "i"])+  , (0x0000004a, ["key", "j"])+  , (0x0000004b, ["key", "k"])+  , (0x0000004c, ["key", "l"])+  , (0x0000004d, ["key", "m"])+  , (0x0000004e, ["key", "n"])+  , (0x0000004f, ["key", "o"])+  , (0x00000050, ["key", "p"])+  , (0x00000051, ["key", "q"])+  , (0x00000052, ["key", "r"])+  , (0x00000053, ["key", "s"])+  , (0x00000054, ["key", "t"])+  , (0x00000055, ["key", "u"])+  , (0x00000056, ["key", "v"])+  , (0x00000057, ["key", "w"])+  , (0x00000058, ["key", "x"])+  , (0x00000059, ["key", "y"])+  , (0x0000005a, ["key", "z"])+  , (0x0000005b, ["key", "bracket", "left"])+  , (0x0000005c, ["key", "backslash"])+  , (0x0000005d, ["key", "bracket", "right"])+  , (0x0000005e, ["key", "ascii", "circum"])+  , (0x0000005f, ["key", "underscore"])+  , (0x00000060, ["key", "quote", "left"])+  , (0x0000007b, ["key", "brace", "left"])+  , (0x0000007c, ["key", "bar"])+  , (0x0000007d, ["key", "brace", "right"])+  , (0x0000007e, ["key", "ascii", "tilde"])+    -- TODO Additional Qt::Key_* constants.+  ]+ (e_KeyboardModifier, bs_KeyboardModifiers) =   makeQtEnumBitspace (ident1 "Qt" "KeyboardModifier") "KeyboardModifiers" qtInclude   [ (0x00000000, ["no", "modifier"])@@ -268,6 +546,12 @@   , (2, ["layout", "direction", "auto"])   ] +e_MaskMode =+  makeQtEnum (ident1 "Qt" "MaskMode") qtInclude+  [ (0, ["mask", "in", "color"])+  , (1, ["mask", "out", "color"])+  ]+ (e_MouseButton, bs_MouseButtons) =   makeQtEnumBitspace (ident1 "Qt" "MouseButton") "MouseButtons" qtInclude   [ (0x00000000, ["no", "button"])@@ -283,7 +567,7 @@   [ (0x01, ["mouse", "event", "created", "double", "click"])   ] -e_MouseEventFlag_version = [5, 3]+e_MouseEventFlag_minVersion = [5, 3]  e_MouseEventSource =   makeQtEnum (ident1 "Qt" "MouseEventSource") qtInclude@@ -292,7 +576,7 @@   , (2, ["mouse", "event", "synthesized", "by", "qt"])   ] -e_MouseEventSource_version = [5, 3]+e_MouseEventSource_minVersion = [5, 3]  e_NavigationMode =   makeQtEnum (ident1 "Qt" "NavigationMode") qtInclude@@ -309,6 +593,17 @@   , (2, ["vertical"])   ] +(e_ScreenOrientation, bs_ScreenOrientations) =+  makeQtEnumBitspace (ident1 "Qt" "ScreenOrientation") "ScreenOrientations" qtInclude+  [ (0x0, ["primary", "orientation"])+  , (0x1, ["portrait", "orientation"])+  , (0x2, ["landscape", "orientation"])+  , (0x4, ["inverted", "portrait", "orientation"])+  , (0x8, ["inverted", "landscape", "orientation"])+  ]++e_ScreenOrientation_minVersion = [5, 0]+ e_ScrollBarPolicy =   makeQtEnum (ident1 "Qt" "ScrollBarPolicy") qtInclude   [ (0, ["scroll", "bar", "as", "needed"])@@ -323,8 +618,14 @@   , (3, ["scroll", "end"])   ] -e_ScrollPhase_version = [5, 2]+e_ScrollPhase_minVersion = [5, 2] +e_SortOrder =+  makeQtEnum (ident1 "Qt" "SortOrder") qtInclude+  [ (0, ["ascending", "order"])+  , (1, ["descending", "order"])+  ]+ e_TextElideMode =   makeQtEnum (ident1 "Qt" "TextElideMode") qtInclude   [ (0, ["elide", "left"])@@ -361,6 +662,12 @@      , (textEditorInteraction, ["text", "editor", "interaction"])      , (textBrowserInteraction, ["text", "browser", "interaction"])      ]++e_TransformationMode =+  makeQtEnum (ident1 "Qt" "TransformationMode") qtInclude+  [ (0, ["fast", "transformation"])+  , (1, ["smooth", "transformation"])+  ]  e_WindowModality =   makeQtEnum (ident1 "Qt" "WindowModality") qtInclude
src/Graphics/UI/Qtah/Generator/Interface/Gui.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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.Gui (modules) where  import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QActionEvent as QActionEvent+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QBrush as QBrush import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QClipboard as QClipboard import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QCloseEvent as QCloseEvent import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QColor as QColor@@ -25,18 +26,33 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QEnterEvent as QEnterEvent import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QExposeEvent as QExposeEvent import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QFocusEvent as QFocusEvent+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.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 import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QKeyEvent as QKeyEvent import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QMouseEvent as QMouseEvent+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QOpenGLWindow as QOpenGLWindow+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QPaintDevice as QPaintDevice+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QPaintDeviceWindow as QPaintDeviceWindow+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QPaintEvent as QPaintEvent+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.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.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 import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QWheelEvent as QWheelEvent+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QWindow as QWindow+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QtahOpenGLWindow as QtahOpenGLWindow+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QtahRasterWindow as QtahRasterWindow import Graphics.UI.Qtah.Generator.Module (AModule)  {-# ANN module "HLint: ignore Use camelCase" #-}@@ -44,23 +60,39 @@ modules :: [AModule] modules =   [ QActionEvent.aModule+  , QBrush.aModule   , QClipboard.aModule   , QCloseEvent.aModule   , QColor.aModule   , QDoubleValidator.aModule   , QEnterEvent.aModule-  , QFocusEvent.aModule   , QExposeEvent.aModule+  , QFocusEvent.aModule+  , QFont.aModule   , QHideEvent.aModule   , QHoverEvent.aModule+  , QImage.aModule   , QInputEvent.aModule   , QIntValidator.aModule   , QKeyEvent.aModule   , QMouseEvent.aModule+  , QOpenGLWindow.aModule+  , QPaintDevice.aModule+  , QPaintDeviceWindow.aModule+  , QPaintEvent.aModule+  , QPainter.aModule+  , QPainterPath.aModule+  , QPen.aModule   , QPolygon.aModule   , QPolygonF.aModule+  , QRasterWindow.aModule   , QRegion.aModule   , QShowEvent.aModule+  , QSurface.aModule+  , QTransform.aModule   , QValidator.aModule   , QWheelEvent.aModule+  , QWindow.aModule+  , QtahOpenGLWindow.aModule+  , QtahRasterWindow.aModule   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QActionEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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
@@ -0,0 +1,73 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QBrush (+  aModule,+  c_QBrush,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod,+  mkMethod',+  mkProp,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+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.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", "QBrush"]+  [ QtExport $ ExportClass c_QBrush ]++c_QBrush =+  addReqIncludes [includeStd "QBrush"] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QBrush") Nothing [] $+  [ mkCtor "new" []+  , mkCtor "newWithColor" [objT c_QColor]+  , mkProp "color" $ objT c_QColor+    -- TODO mkConstMethod "gradient" [] $ ptrT $ constT $ objT c_QGradient+  , mkConstMethod "isOpaque" [] boolT+    -- TODO mkProp "matrix" $ objT c_QMatrix+  , 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 "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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QClipboard.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QColor (   aModule,   c_QColor,+  qrgb,   ) where  import Control.Monad (forM_)@@ -39,7 +40,8 @@     classHaskellConversionToCppFn,     classHaskellConversionType   ),-  Export (ExportEnum, ExportClass),+  Export (ExportEnum, ExportFn, ExportClass),+  Purity (Pure),   addReqIncludes,   classSetEntityPrefix,   classSetHaskellConversion,@@ -49,6 +51,7 @@   ident1,   includeStd,   makeClass,+  makeFn,   mkConstMethod,   mkConstMethod',   mkCtor,@@ -56,12 +59,13 @@   mkMethod',   mkProp,   mkStaticMethod,+  toExtName,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),   classAddFeatures,   )-import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, uintT, voidT) 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)@@ -85,9 +89,18 @@   [ just $ QtExport $ ExportClass c_QColor   , test (qtVersion >= [5, 2]) $ QtExport $ ExportEnum e_NameFormat   , just $ QtExport $ ExportEnum e_Spec+  , just $ QtExport $ ExportFn f_qAlpha+  , just $ QtExport $ ExportFn f_qBlue+  , just $ QtExport $ ExportFn f_qGray+  , just $ QtExport $ ExportFn f_qGrayFromRgb+  , just $ QtExport $ ExportFn f_qGreen+  , test (qtVersion >= [5, 3]) $ QtExport $ ExportFn f_qPremultiply+  , just $ QtExport $ ExportFn f_qRed+  , just $ QtExport $ ExportFn f_qRgb+  , just $ QtExport $ ExportFn f_qRgba+  , test (qtVersion >= [5, 3]) $ QtExport $ ExportFn f_qUnpremultiply   ] --- TODO Everything using QRgb. c_QColor =   addReqIncludes [includeStd "QColor"] $   classSetHaskellConversion conversion $@@ -96,6 +109,7 @@   makeClass (ident "QColor") Nothing [] $   collect   [ just $ mkCtor "new" []+  , just $ mkCtor "newQRgb" [qrgb]   , just $ mkCtor "newRgb" [intT, intT, intT]   , just $ mkCtor "newRgba" [intT, intT, intT, intT]   , just $ mkCtor "newNamedColor" [objT c_QString]@@ -137,6 +151,8 @@     mkConstMethod' "name" "nameWithFormat" [enumT e_NameFormat] $ objT c_QString   , just $ mkProp "red" intT   , just $ mkProp "redF" qreal+  , just $ mkConstMethod "rgb" [] qrgb+  , just $ mkConstMethod "rgba" [] qrgb   , just $ mkConstMethod "saturation" [] intT   , just $ mkConstMethod "saturationF" [] qreal   , just $ mkMethod' "setCmyk" "setCmyk" [intT, intT, intT, intT] voidT@@ -152,6 +168,8 @@   , just $ mkMethod' "setHsvF" "setHsvF" [qreal, qreal, qreal] voidT   , just $ mkMethod' "setHsvF" "setHsvaF" [qreal, qreal, qreal, qreal] voidT   , just $ mkMethod "setNamedColor" [objT c_QString] voidT+  , just $ mkMethod' "setRgb" "setQRgb" [qrgb] voidT+  , just $ mkMethod' "setRgb" "setQRgba" [qrgb] voidT   , just $ mkMethod' "setRgb" "setRgb" [intT, intT, intT] voidT   , just $ mkMethod' "setRgb" "setRgba" [intT, intT, intT, intT] voidT   , just $ mkMethod' "setRgbF" "setRgbF" [qreal, qreal, qreal] voidT@@ -232,3 +250,31 @@   , (3, ["cmyk"])   , (4, ["hsl"])   ]++-- | This is a typedef QRgb that holds a AARRGGBB value and is+-- "equivalent to an unsigned int."+qrgb = uintT++-- TODO Qrgba64 overloads (and methods above).++f_qAlpha = makeFn (ident "qAlpha") Nothing Pure [qrgb] intT++f_qBlue = makeFn (ident "qBlue") Nothing Pure [qrgb] intT++f_qGray = makeFn (ident "qGray") Nothing Pure [qrgb] intT++f_qGrayFromRgb =+  makeFn (ident "qGray") (Just $ toExtName "qGrayFromRgb") Pure+  [intT, intT, intT] intT++f_qGreen = makeFn (ident "qGreen") Nothing Pure [qrgb] intT++f_qPremultiply = makeFn (ident "qPremultiply") Nothing Pure [qrgb] qrgb++f_qRed = makeFn (ident "qRed") Nothing Pure [qrgb] intT++f_qRgb = makeFn (ident "qRgb") Nothing Pure [intT, intT, intT] qrgb++f_qRgba = makeFn (ident "qRgba") Nothing Pure [intT, intT, intT, intT] qrgb++f_qUnpremultiply = makeFn (ident "qUnpremultiply") Nothing Pure [qrgb] qrgb
src/Graphics/UI/Qtah/Generator/Interface/Gui/QDoubleValidator.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,7 +34,7 @@   mkProp,   ) import Foreign.Hoppy.Generator.Types (doubleT, enumT, intT, objT, ptrT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject) import Graphics.UI.Qtah.Generator.Interface.Gui.QValidator (c_QValidator)
src/Graphics/UI/Qtah/Generator/Interface/Gui/QEnterEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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
@@ -0,0 +1,63 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QFont (+  aModule,+  c_QFont,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  mkMethod,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (intT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just)+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", "QFont"]+  [ QtExport $ ExportClass c_QFont+  ]++c_QFont =+  addReqIncludes [includeStd "QFont"] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QFont") Nothing [] $+  collect+  [ just $ mkCtor "new" []+  , just $ mkMethod "setPixelSize" [intT] voidT+  , just $ mkMethod "setPointSize" [intT] voidT+  ]++-- TODO The rest of QFont.
src/Graphics/UI/Qtah/Generator/Interface/Gui/QHideEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QImage.hs view
@@ -0,0 +1,277 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QImage (+  aModule,+  c_QImage,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass, ExportEnum),+  MethodApplicability (MStatic),+  Purity (Nonpure),+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  ident1,+  ident2,+  includeLocal,+  includeStd,+  makeClass,+  makeFnMethod,+  mkConstMethod,+  mkConstMethod',+  mkCtor,+  mkMethod,+  mkMethod',+  mkProp,+  mkStaticMethod',+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (+  boolT,+  callbackT,+  constT,+  enumT,+  intT,+  objT,+  objToHeapT,+  ptrT,+  refT,+  toGcT,+  ucharT,+  uintT,+  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.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.QVector (c_QVectorQRgb)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (+  e_AspectRatioMode,+  e_GlobalColor,+  e_MaskMode,+  e_TransformationMode,+  qreal,+  )+import Graphics.UI.Qtah.Generator.Interface.Gui.QColor (c_QColor, qrgb)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPaintDevice (c_QPaintDevice)+import Graphics.UI.Qtah.Generator.Interface.Gui.QTransform (c_QTransform)+import Graphics.UI.Qtah.Generator.Interface.Internal.Callback (cb_Void)+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", "QImage"]+  [ QtExport $ ExportClass c_QImage+  , QtExport $ ExportEnum e_Format+  , QtExport $ ExportEnum e_InvertMode+  ]++c_QImage =+  addReqIncludes [ includeStd "QImage"+                 , includeLocal "wrap_qimage.hpp"+                 ] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QImage") Nothing [c_QPaintDevice] $+  collect+  [ -- Lots of constructors here!+    just $ mkCtor "new" []+  , just $ mkCtor "newWithSize" [objT c_QSize, enumT e_Format]+  , just $ mkCtor "newWithSizeRaw" [intT, intT, enumT e_Format]+  , just $ mkCtor "newWithData"+    [ptrT ucharT, intT, intT, enumT e_Format]+  , test (qtVersion >= [5, 0]) $+    makeFnMethod (ident2 "qtah" "qimage" "create") "newWithDataAndCleanup" MStatic Nonpure+    [ptrT ucharT, intT, intT, enumT e_Format, callbackT cb_Void] $ ptrT $ objT c_QImage+  , just $ mkCtor "newWithConstData"+    [ptrT $ constT ucharT, intT, intT, enumT e_Format]+  , test (qtVersion >= [5, 0]) $+    makeFnMethod (ident2 "qtah" "qimage" "create") "newWithConstDataAndCleanup" MStatic Nonpure+    [ptrT $ constT ucharT, intT, intT, enumT e_Format, callbackT cb_Void] $ ptrT $ objT c_QImage+  , just $ mkCtor "newWithDataAndBytesPerLine"+    [ptrT ucharT, intT, intT, enumT e_Format]+  , test (qtVersion >= [5, 0]) $+    makeFnMethod (ident2 "qtah" "qimage" "create") "newWithDataAndBytesPerLineAndCleanup"+    MStatic Nonpure [ptrT ucharT, intT, intT, intT, enumT e_Format, callbackT cb_Void] $+    ptrT $ objT c_QImage+  , just $ mkCtor "newWithConstDataAndBytesPerLine"+    [ptrT $ constT ucharT, intT, intT, enumT e_Format]+  , test (qtVersion >= [5, 0]) $+    makeFnMethod (ident2 "qtah" "qimage" "create") "newWithConstDataAndBytesPerLineAndCleanup"+    MStatic Nonpure [ptrT $ constT ucharT, intT, intT, intT, enumT e_Format, callbackT cb_Void] $+    ptrT $ objT c_QImage+    -- TODO newWithXpm (but nicely)+  , just $ mkCtor "newWithFile" [objT c_QString]+  , just $ makeFnMethod (ident2 "qtah" "qimage" "create") "newWithFileAndFormat" MStatic Nonpure+    [objT c_QString, objT c_QString] $ ptrT $ objT c_QImage++    -- Finally methods.+  , just $ mkConstMethod "allGray" [] boolT+  , just $ mkConstMethod "bitPlaneCount" [] intT+  , just $ mkMethod "bits" [] $ ptrT ucharT+  , just $ mkConstMethod' "bits" "bitsConst" [] $ ptrT $ constT ucharT+  , just $ mkConstMethod "byteCount" [] intT+  , just $ mkConstMethod "bytesPerLine" [] intT+    -- TODO cacheKey+  , just $ mkConstMethod "color" [intT] qrgb+  , just $ mkProp "colorCount" intT+  , just $ mkConstMethod "colorTable" [] $ toGcT $ objT c_QVectorQRgb+    -- OMIT constBits, this is provided by the const version of bits().+  , just $ mkConstMethod "constScanLine" [intT] $ ptrT $ constT ucharT+    -- TODO convertToFormat+  , just $ mkConstMethod' "copy" "copyRect" [objT c_QRect] $ objT c_QImage+  , just $ mkConstMethod' "copy" "copyRaw" [intT, intT, intT, intT] $ objT c_QImage+  , just $ mkConstMethod "createAlphaMask" [] $ objT c_QImage  -- TODO Overload.+  , just $ mkConstMethod' "createHeuristicMask" "createHeuristicMask" [] $ objT c_QImage+  , just $ mkConstMethod' "createHeuristicMask" "createHeuristicMaskWithClipTight"+    [boolT] $ objT c_QImage+  , just $ mkConstMethod' "createMaskFromColor" "createMaskFromColor" [qrgb] $ objT c_QImage+  , just $ mkConstMethod' "createMaskFromColor" "createMaskFromColorWithMode"+    [qrgb, enumT e_MaskMode] $ objT c_QImage+    -- TODO createMaskFromColor+  , just $ mkConstMethod "depth" [] intT+  , test (qtVersion >= [5, 0]) $ mkProp "devicePixelRatio" qreal+  , just $ mkProp "dotsPerMeterX" intT+  , just $ mkProp "dotsPerMeterY" intT+  , just $ mkMethod' "fill" "fillWithPixel" [uintT] voidT+  , 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+    [ptrT $ constT ucharT, intT, objT c_QString] $ ptrT $ objT c_QImage+  , just $ mkConstMethod "hasAlphaChannel" [] boolT+  , just $ mkConstMethod "height" [] intT+  , just $ mkMethod' "invertPixels" "invertPixels" [] voidT+  , just $ mkMethod' "invertPixels" "invertPixelsWithMode" [enumT e_InvertMode] voidT+  , just $ mkConstMethod "isGrayscale" [] boolT+  , just $ mkConstMethod "isNull" [] boolT+  , just $ mkMethod' "load" "load" [objT c_QString] boolT+  , 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"+    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+  , just $ mkConstMethod' "pixel" "pixelAtRaw" [intT, intT] qrgb+  , test (qtVersion >= [5, 6]) $ mkConstMethod' "pixelColor" "pixelColorAtPoint"+    [objT c_QPoint] $ objT c_QColor+  , test (qtVersion >= [5, 6]) $ mkConstMethod' "pixelColor" "pixelColorAtRaw"+    [intT, intT] $ objT c_QColor+    -- TODO QPixelFormat pixelFormat() const+  , just $ mkConstMethod' "pixelIndex" "pixelIndexAtPoint" [objT c_QPoint] intT+  , just $ mkConstMethod' "pixelIndex" "pixelIndexAtRaw" [intT, intT] intT+  , just $ mkConstMethod "rect" [] $ objT c_QRect+  , just $ mkConstMethod "rgbSwapped" [] $ objT c_QImage+  , just $ mkMethod' "save" "save" [objT c_QString] boolT+  , just $ makeFnMethod (ident2 "qtah" "qimage" "save") "saveAll" MStatic Nonpure+    [refT $ objT c_QImage, objT c_QString, objT c_QString, intT] boolT+    -- TODO save(QIODevice*, ...)+  , just $ mkConstMethod' "scaled" "scaled" [objT c_QSize] $ objT c_QImage+  , just $ mkConstMethod' "scaled" "scaledAll"+    [objT c_QSize, enumT e_AspectRatioMode, enumT e_TransformationMode] $ objT c_QImage+  , just $ mkConstMethod' "scaled" "scaledWithRaw" [intT, intT] $ objT c_QImage+  , just $ mkConstMethod' "scaled" "scaledWithRawAll"+    [intT, intT, enumT e_AspectRatioMode, enumT e_TransformationMode] $ objT c_QImage+  , just $ mkConstMethod' "scaledToHeight" "scaledToHeight" [intT] $ objT c_QImage+  , just $ mkConstMethod' "scaledToHeight" "scaledToHeightAll"+    [intT, enumT e_TransformationMode] $ objT c_QImage+  , just $ mkConstMethod' "scaledToWidth" "scaledToWidth" [intT] $ objT c_QImage+  , just $ mkConstMethod' "scaledToWidth" "scaledToWidthAll"+    [intT, enumT e_TransformationMode] $ objT c_QImage+  , just $ mkMethod' "scanLine" "scanLine" [intT] $ ptrT ucharT+  , just $ mkConstMethod' "scanLine" "scanLineConst" [intT] $ ptrT $ constT ucharT+  , just $ mkMethod "setColor" [intT, qrgb] voidT+  , just $ mkMethod "setColorTable" [objT c_QVectorQRgb] voidT+  , just $ mkMethod' "setPixel" "setPixelAtPoint" [objT c_QPoint, uintT] voidT+  , just $ mkMethod' "setPixel" "setPixelAtRaw" [intT, intT, uintT] voidT+  , test (qtVersion >= [5, 6]) $ mkMethod' "setPixelColor" "setPixelColorAtPoint"+    [objT c_QPoint, objT c_QColor] voidT+  , test (qtVersion >= [5, 6]) $ mkMethod' "setPixelColor" "setPixelColorAtRaw"+    [intT, intT, objT c_QColor] voidT+  , just $ mkMethod "setText" [objT c_QString, objT c_QString] voidT+  , just $ mkConstMethod "size" [] $ objT c_QSize+  , just $ mkMethod "swap" [refT $ objT c_QImage] voidT+  , just $ mkConstMethod "text" [objT c_QString] $ objT c_QString+  , just $ mkConstMethod "textKeys" [] $ objT c_QStringList+    -- TODO toImageFormat+    -- TODO toPixelFormat+  , just $ mkConstMethod' "transformed" "transformedWithTransform" [objT c_QTransform] $+    objT c_QImage+  , just $ mkConstMethod' "transformed" "transformedWithTransformAll"+    [objT c_QTransform, enumT e_TransformationMode] $ objT c_QImage+    -- TODO transformed(const QMatrix&, ...)+  , just $ mkStaticMethod' "trueMatrix" "trueMatrixWithTransform"+    [objT c_QTransform, intT, intT] $ objT c_QTransform+    -- TODO trueMatrix(const QMatrix&, ...)+  , just $ mkConstMethod' "valid" "validAtPoint" [objT c_QPoint] boolT+  , just $ mkConstMethod' "valid" "validAtRaw" [intT, intT] boolT+  , just $ mkConstMethod "width" [] intT+  ]++e_Format =+  makeQtEnum (ident1 "QImage" "Format") [includeStd "QImage"] $+  [ (0, ["format", "invalid"])+  , (1, ["format", "mono"])+  , (2, ["format", "mono", "l", "s", "b"])+  , (3, ["format", "indexed", "8"])+  , (4, ["format", "r", "g", "b", "32"])+  , (5, ["format", "a", "r", "g", "b", "32"])+  , (6, ["format", "a", "r", "g", "b", "32", "premultiplied"])+  , (7, ["format", "r", "g", "b", "16"])+  , (8, ["format", "a", "r", "g", "b", "8565", "premultiplied"])+  , (9, ["format", "r", "g", "b", "666"])+  , (10, ["format", "a", "r", "g", "b", "666", "premultiplied"])+  , (11, ["format", "r", "g", "b", "555"])+  , (12, ["format", "a", "r", "g", "b", "8555", "premultiplied"])+  , (13, ["format", "r", "g", "b", "888"])+  , (14, ["format", "r", "g", "b", "444"])+  , (15, ["format", "a", "r", "g", "b", "4444", "premultiplied"])+  , (16, ["format", "r", "g", "b", "x", "8888"])+  , (17, ["format", "r", "g", "b", "a", "8888"])+  , (18, ["format", "r", "g", "b", "a", "8888", "premultiplied"])+  , (19, ["format", "b", "g", "r", "30"])+  , (20, ["format", "a", "2", "b", "g", "r", "30", "premultiplied"])+  , (21, ["format", "r", "g", "b", "30"])+  , (22, ["format", "a", "2", "r", "g", "b", "30", "premultiplied"])+  , (23, ["format", "alpha", "8"])+  , (24, ["format", "grayscale", "8"])+  ]++e_InvertMode =+  makeQtEnum (ident1 "QImage" "InvertMode") [includeStd "QImage"] $+  [ (0, ["invert", "rgb"])+  , (1, ["invert", "rgba"])+  ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QInputEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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
@@ -0,0 +1,84 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QOpenGLWindow (+  minVersion,+  aModule,+  c_QOpenGLWindow,+  e_UpdateBehavior,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass, ExportEnum),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod,+  )+import Foreign.Hoppy.Generator.Types (boolT, enumT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (gluint)+import Graphics.UI.Qtah.Generator.Interface.Gui.QImage (c_QImage)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPaintDeviceWindow (c_QPaintDeviceWindow)+import Graphics.UI.Qtah.Generator.Interface.Gui.QWindow (c_QWindow)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++minVersion = [5, 4]++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Gui", "QOpenGLWindow"] minVersion $+  [ QtExport $ ExportClass c_QOpenGLWindow ] +++  map QtExportSignal signals +++  [ QtExport $ ExportEnum e_UpdateBehavior ]++c_QOpenGLWindow =+  addReqIncludes [includeStd "QOpenGLWindow"] $+  classSetEntityPrefix "" $+  makeClass (ident "QOpenGLWindow") Nothing [c_QPaintDeviceWindow]+  [ mkCtor "new" []+  , mkCtor "newWithUpdateBehavior" [enumT e_UpdateBehavior]+  , mkCtor "newWithUpdateBehaviorAndParent" [enumT e_UpdateBehavior, ptrT $ objT c_QWindow]+    -- TODO QOpenGLWindow(QOpenGLContext*, ...)+    -- TODO QOpenGLContext* context() const+  , mkConstMethod "defaultFramebufferObject" [] gluint+  , mkMethod "doneCurrent" [] voidT+  , mkMethod "grabFramebuffer" [] $ objT c_QImage+  , mkConstMethod "isValid" [] boolT+  , mkMethod "makeCurrent" [] voidT+    -- TODO QOpenGLContext* shareContext() const+  , mkConstMethod "updateBehavior" [] $ enumT e_UpdateBehavior+  ]++signals =+  [ makeSignal c_QOpenGLWindow "frameSwapped" c_Listener+  ]++e_UpdateBehavior =+  makeQtEnum (ident1 "QOpenGLWindow" "UpdateBehavior") [includeStd "QOpenGLWindow"]+  [ (0, ["no", "partial", "update"])+  , (1, ["partial", "update", "blit"])+  , (2, ["partial", "update", "blend"])+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QPaintDevice.hs view
@@ -0,0 +1,84 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QPaintDevice (+  aModule,+  c_QPaintDevice,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass, ExportEnum),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  )+import Foreign.Hoppy.Generator.Types (boolT, intT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal)+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", "QPaintDevice"]+  [ QtExport $ ExportClass c_QPaintDevice+  , QtExport $ ExportEnum e_PaintDeviceMetric+  ]++c_QPaintDevice =+  addReqIncludes [includeStd "QPaintDevice"] $+  classSetEntityPrefix "" $+  makeClass (ident "QPaintDevice") Nothing [] $+  collect+  [ just $ mkConstMethod "colorCount" [] intT+  , just $ mkConstMethod "depth" [] intT+  , test (qtVersion >= [5, 0]) $ mkConstMethod "devicePixelRatio" [] intT+  , test (qtVersion >= [5, 6]) $ mkConstMethod "devicePixelRatioF" [] qreal+  , just $ mkConstMethod "height" [] intT+  , just $ mkConstMethod "heightMM" [] intT+  , just $ mkConstMethod "logicalDpiX" [] intT+  , just $ mkConstMethod "logicalDpiY" [] intT+    -- TODO paintEngine+  , just $ mkConstMethod "paintingActive" [] boolT+  , just $ mkConstMethod "physicalDpiX" [] intT+  , just $ mkConstMethod "physicalDpiY" [] intT+  , just $ mkConstMethod "width" [] intT+  , just $ mkConstMethod "widthMM" [] intT+  ]++e_PaintDeviceMetric =+  makeQtEnum (ident1 "QPaintDevice" "PaintDeviceMetric") [includeStd "QPaintDevice"] $+  [ (1, ["pdm", "width"])+  , (2, ["pdm", "height"])+  , (3, ["pdm", "width", "mm"])+  , (4, ["pdm", "height", "mm"])+  , (5, ["pdm", "num", "colors"])+  , (6, ["pdm", "depth"])+  , (7, ["pdm", "dpi", "x"])+  , (8, ["pdm", "dpi", "y"])+  , (9, ["pdm", "physical", "dpi", "x"])+  , (10, ["pdm", "physical", "dpi", "y"])+  , (11, ["pdm", "device", "pixel", "ratio"])+  , (12, ["pdm", "device", "pixel", "ratio", "scaled"])+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QPaintDeviceWindow.hs view
@@ -0,0 +1,57 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QPaintDeviceWindow (+  aModule,+  c_QPaintDeviceWindow,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkMethod',+  )+import Foreign.Hoppy.Generator.Types (objT, voidT)+import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)+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.QWindow (c_QWindow)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++minVersion = [5, 4]++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Gui", "QPaintDeviceWindow"] minVersion+  [ QtExport $ ExportClass c_QPaintDeviceWindow+  ]++c_QPaintDeviceWindow =+  addReqIncludes [includeStd "QPaintDeviceWindow"] $+  classSetEntityPrefix "" $+  makeClass (ident "QPaintDeviceWindow") Nothing [c_QWindow, c_QPaintDevice]+  [ mkMethod' "update" "update" [] voidT+  , mkMethod' "update" "updateRect" [objT c_QRect] voidT+  , mkMethod' "update" "updateRegion" [objT c_QRegion] voidT+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QPaintEvent.hs view
@@ -0,0 +1,55 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QPaintEvent (+  aModule,+  c_QPaintEvent,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  )+import Foreign.Hoppy.Generator.Types (constT, objT, refT)+import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)+import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent)+import Graphics.UI.Qtah.Generator.Interface.Gui.QRegion (c_QRegion)+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", "QPaintEvent"]+  [ QtExportEvent c_QPaintEvent+  ]++c_QPaintEvent =+  addReqIncludes [includeStd "QPaintEvent"] $+  classSetEntityPrefix "" $+  makeClass (ident "QPaintEvent") Nothing [c_QEvent]+  [ mkCtor "newWithRect" [objT c_QRect]+  , mkCtor "newWithRegion" [objT c_QRegion]+  , mkConstMethod "rect" [] $ refT $ constT $ objT c_QRect+  , mkConstMethod "region" [] $ refT $ constT $ objT c_QRegion+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QPainter.hs view
@@ -0,0 +1,79 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QPainter (+  aModule,+  c_QPainter,+  e_RenderHint,+  bs_RenderHints,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass, ExportEnum, ExportBitspace),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkCtor,+  mkMethod,+  mkMethod',+  )+import Foreign.Hoppy.Generator.Types (bitspaceT, enumT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just)+-- import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_ImageConversionFlags, e_GlobalColor)+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.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Gui", "QPainter"] $+  (QtExport $ ExportClass c_QPainter) :+  (QtExport $ ExportEnum e_RenderHint) :+  (QtExport $ ExportBitspace bs_RenderHints) :+  []++c_QPainter =+  addReqIncludes [includeStd "QPainter"] $+  classSetEntityPrefix "" $+  makeClass (ident "QPainter") Nothing [] $+  collect+  [ just $ mkCtor "new" []+  , just $ mkCtor "newWithDevice" [ptrT $ objT c_QPaintDevice]+  , just $ mkMethod' "drawImage" "drawImageAtRaw" [intT, intT, objT c_QImage] voidT+  , just $ mkMethod' "drawImage" "drawImageAtRawAll"+    [intT, intT, objT c_QImage, intT, intT, intT, intT, bitspaceT bs_ImageConversionFlags] voidT+  , just $ mkMethod' "fillRect" "fillRectWithGlobalColor" [objT c_QRect, enumT e_GlobalColor] voidT+  , just $ mkMethod "setRenderHint" [enumT e_RenderHint] voidT+  ]++(e_RenderHint, bs_RenderHints) =+  makeQtEnumBitspace (ident1 "QPainter" "RenderHint") "RenderHints" [includeStd "QPainter"] $+  [ (0x01, ["antialiasing"])+  , (0x02, ["text","antialiasing"])+  , (0x04, ["smooth","pixmap","transform"])+  , (0x08, ["high","quality","antialiasing"])+  , (0x10, ["non","cosmetic","default","pen"])+  , (0x20, ["qt4","compatible","painting"])+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QPainterPath.hs view
@@ -0,0 +1,61 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QPainterPath (+  aModule,+  c_QPainterPath,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  mkMethod',+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (voidT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal)+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", "QPainterPath"]+  [ QtExport $ ExportClass c_QPainterPath ]++c_QPainterPath =+  addReqIncludes [includeStd "QPainterPath"] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QPainterPath") Nothing [] $+  collect+  [ just $ mkCtor "new" []+  , just $ mkMethod' "addRect" "addRectRaw" [qreal, qreal, qreal, qreal] voidT+  ]+
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QPen.hs view
@@ -0,0 +1,57 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QPen (+  aModule,+  c_QPen,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (objT)+import Graphics.UI.Qtah.Generator.Interface.Gui.QColor (c_QColor)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Gui", "QPen"]+  [ QtExport $ ExportClass c_QPen ]++c_QPen =+  addReqIncludes [includeStd "QPen"] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QPen") Nothing [] $+  [ mkCtor "new" []+  , mkCtor "newWithColor" [objT c_QColor]+  ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPolygon.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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.Gui.QPolygonF (   aModule,+  c_QPolygonF   ) where  import Foreign.Hoppy.Generator.Spec (
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QRasterWindow.hs view
@@ -0,0 +1,54 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QRasterWindow (+  minVersion,+  aModule,+  c_QRasterWindow,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  )+import Foreign.Hoppy.Generator.Types (objT, ptrT)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPaintDeviceWindow (c_QPaintDeviceWindow)+import Graphics.UI.Qtah.Generator.Interface.Gui.QWindow (c_QWindow)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++minVersion = [5, 4]++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Gui", "QRasterWindow"] minVersion $+  [ QtExport $ ExportClass c_QRasterWindow ]++c_QRasterWindow =+  addReqIncludes [includeStd "QRasterWindow"] $+  classSetEntityPrefix "" $+  makeClass (ident "QRasterWindow") Nothing [c_QPaintDeviceWindow]+  [ mkCtor "new" []+  , mkCtor "newWithParent" [ptrT $ objT c_QWindow]+  ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QRegion.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QShowEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QSurface.hs view
@@ -0,0 +1,77 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QSurface (+  aModule,+  c_QSurface,+  e_SurfaceType,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass, ExportEnum),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  )+import Foreign.Hoppy.Generator.Types (boolT, enumT, objT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++minVersion = [5, 0]++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Gui", "QSurface"] minVersion $+  [ QtExport $ ExportClass c_QSurface+  , QtExport $ ExportEnum e_SurfaceClass+  , QtExport $ ExportEnum e_SurfaceType+  ]++c_QSurface =+  addReqIncludes [includeStd "QSurface"] $+  classSetEntityPrefix "" $+  makeClass (ident "QSurface") Nothing [] $+  collect+  [ -- TODO mkConstMethod "surfaceFormat" $ objT c_QSurfaceFormat+    just $ mkConstMethod "size" [] $ objT c_QSize+  , test (qtVersion >= [5, 3]) $ mkConstMethod "supportsOpenGL" [] boolT+  , just $ mkConstMethod "surfaceClass" [] $ enumT e_SurfaceClass+    -- TODO mkConstMethod "surfaceHandle" [] $ ptrT $ objT c_QPlatformSurface+  , just $ mkConstMethod "surfaceType" [] $ enumT e_SurfaceType+  ]++e_SurfaceClass =+  makeQtEnum (ident1 "QSurface" "SurfaceClass") [includeStd "QSurface"]+  [ (0, ["window"])+  , (1, ["offscreen"])+  ]++e_SurfaceType =+  makeQtEnum (ident1 "QSurface" "SurfaceType") [includeStd "QSurface"]+  [ (0, ["raster", "surface"])+  , (1, ["open", "g", "l", "surface"])+  , (2, ["raster", "g", "l", "surface"])+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QTransform.hs view
@@ -0,0 +1,55 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QTransform (+  aModule,+  c_QTransform,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal)+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", "QTransform"]+  [ QtExport $ ExportClass c_QTransform ]++c_QTransform =+  addReqIncludes [includeStd "QTransform"] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QTransform") Nothing [] $+  [ mkCtor "new2x2" [qreal, qreal, qreal, qreal, qreal, qreal]+  ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QValidator.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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
@@ -0,0 +1,201 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QWindow (+  minVersion,+  aModule,+  c_QWindow,+  e_Visibility,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass, ExportEnum),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkBoolIsProp,+  mkConstMethod,+  mkConstMethod',+  mkCtor,+  mkMethod,+  mkMethod',+  mkProp,+  )+import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, 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.QObject (c_QObject)+import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint)+import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)+import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (+  bs_WindowFlags,+  e_ScreenOrientation,+  e_WindowModality,+  e_WindowState,+  e_WindowType,+  qreal,+  )+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 (+  c_Listener,+  c_ListenerBool,+  c_ListenerInt,+  c_ListenerPtrQObject,+  c_ListenerQreal,+  c_ListenerQString,+  c_ListenerQWindowVisibility,+  c_ListenerScreenOrientation,+  c_ListenerWindowModality,+  c_ListenerWindowState,+  )+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++minVersion = [5, 0]++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Gui", "QWindow"] minVersion $+  [ QtExport $ ExportClass c_QWindow ] +++  map QtExportSignal signals +++  [ QtExport $ ExportEnum e_AncestorMode+  , QtExport $ ExportEnum e_Visibility+  ]++c_QWindow =+  addReqIncludes [includeStd "QWindow"] $+  classSetEntityPrefix "" $+  makeClass (ident "QWindow") Nothing [c_QObject, c_QSurface] $+  collect+  [ just $ mkCtor "new" []+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QWindow]+    -- TODO mkCtor "newWithScreen" [ptrT $ objT c_QScreen]+  , test (qtVersion >= [5, 1]) $ mkMethod "alert" [intT] voidT+  , just $ mkProp "baseSize" $ objT c_QSize+  , just $ mkMethod "close" [] voidT+  , just $ mkConstMethod "contentOrientation" [] $ enumT e_ScreenOrientation+  , just $ mkMethod "create" [] voidT+    -- TODO mkProp "cursor" $ objT c_QCursor+  , just $ mkMethod "destroy" [] voidT+  , just $ mkConstMethod "devicePixelRatio" [] qreal+  , just $ mkProp "filePath" $ objT c_QString+  , just $ mkProp "flags" $ bitspaceT bs_WindowFlags+  , just $ mkConstMethod "focusObject" [] $ ptrT $ objT c_QObject+  , just $ mkConstMethod "frameGeometry" [] $ objT c_QRect+  , just $ mkConstMethod "frameMargins" [] $ objT c_QMargins+  , just $ mkProp "framePosition" $ objT c_QPoint+  , just $ mkProp "geometry" $ objT c_QRect+  , just $ mkProp "height" intT+  , just $ mkMethod "hide" [] voidT+    -- TODO 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+  , just $ mkConstMethod "isModal" [] boolT+  , just $ mkConstMethod "isTopLevel" [] boolT+  , just $ mkMethod "lower" [] voidT+  , just $ mkConstMethod "mapFromGlobal" [objT c_QPoint] $ objT c_QPoint+  , just $ mkConstMethod "mapToGlobal" [objT c_QPoint] $ objT c_QPoint+  , just $ mkProp "mask" $ objT c_QRegion+  , just $ mkProp "maximumHeight" intT+  , just $ mkProp "maximumSize" $ objT c_QSize+  , just $ mkProp "maximumWidth" intT+  , just $ mkProp "minimumHeight" intT+  , just $ mkProp "minimumSize" $ objT c_QSize+  , just $ mkProp "minimumWidth" intT+  , just $ mkProp "modality" $ enumT e_WindowModality+  , test (qtVersion >= [5, 1]) $ mkProp "opacity" qreal+  , just $ mkProp "parent" $ ptrT $ objT c_QWindow+  , just $ mkProp "position" $ objT c_QPoint+  , just $ mkMethod "raise" [] voidT+  , just $ mkMethod "reportContentOrientationChange" [enumT e_ScreenOrientation] voidT+  , just $ mkMethod "requestActivate" [] voidT+  , test (qtVersion >= [5, 1]) $ mkMethod "requestUpdate" [] voidT+    -- TODO mkConstMethod "requestedFormat" [] $ objT c_QSurfaceFormat+  , just $ mkMethod' "resize" "resize" [objT c_QSize] voidT+  , just $ mkMethod' "resize" "resizeRaw" [intT, intT] voidT+    -- TODO mkProp "screen" $ ptrT $ objT c_QScreen+    -- TODO mkMethod "setFormat" [objT c_QSurfaceFormat] voidT+  , just $ mkMethod' "setGeometry" "setGeometryRaw" [intT, intT, intT, intT] voidT+  , just $ mkMethod "setKeyboardGrabEnabled" [boolT] voidT+  , just $ mkMethod "setMouseGrabEnabled" [boolT] voidT+  , just $ mkMethod' "setPosition" "setPositionRaw" [intT, intT] voidT+  , just $ mkMethod "setSurfaceType" [enumT e_SurfaceType] voidT+  , just $ mkMethod "show" [] voidT+  , just $ mkMethod "showFullScreen" [] voidT+  , just $ mkMethod "showMaximized" [] voidT+  , just $ mkMethod "showMinimized" [] voidT+  , just $ mkMethod "showNormal" [] voidT+  , just $ mkProp "sizeIncrement" $ objT c_QSize+  , just $ mkProp "title" $ objT c_QString+  , just $ mkProp "transientParent" $ ptrT $ objT c_QWindow+  , just $ mkConstMethod' "type" "getType" [] $ enumT e_WindowType+  , just $ mkMethod "unsetCursor" [] voidT+  , test (qtVersion >= [5, 1]) $ mkProp "visibility" $ enumT e_Visibility+  , just $ mkBoolIsProp "visible"+  , just $ mkProp "width" intT+    -- TODO winId+  , just $ mkProp "windowState" $ enumT e_WindowState+  , just $ mkProp "x" intT+  , just $ mkProp "y" intT+  ]++signals =+  [ makeSignal c_QWindow "activeChanged" c_Listener+  , makeSignal c_QWindow "contentOrientationChanged" c_ListenerScreenOrientation+  , makeSignal c_QWindow "focusObjectChanged" c_ListenerPtrQObject+  , makeSignal c_QWindow "heightChanged" c_ListenerInt+  , makeSignal c_QWindow "maximumHeightChanged" c_ListenerInt+  , makeSignal c_QWindow "maximumWidthChanged" c_ListenerInt+  , makeSignal c_QWindow "minimumHeightChanged" c_ListenerInt+  , makeSignal c_QWindow "minimumWidthChanged" c_ListenerInt+  , makeSignal c_QWindow "modalityChanged" c_ListenerWindowModality+  , makeSignal c_QWindow "opacityChanged" c_ListenerQreal+    -- TODO makeSignal c_QWindow "screenChanged" c_ListenerPtrQScreen+  , makeSignal c_QWindow "visibilityChanged" c_ListenerQWindowVisibility+  , makeSignal c_QWindow "visibleChanged" c_ListenerBool+  , makeSignal c_QWindow "widthChanged" c_ListenerInt+  , makeSignal c_QWindow "windowStateChanged" c_ListenerWindowState+  , makeSignal c_QWindow "windowTitleChanged" c_ListenerQString+  , makeSignal c_QWindow "xChanged" c_ListenerInt+  , makeSignal c_QWindow "yChanged" c_ListenerInt+  ]++e_AncestorMode =+  makeQtEnum (ident1 "QWindow" "AncestorMode") [includeStd "QWindow"]+  [ (0, ["exclude", "transients"])+  , (1, ["include", "transients"])+  ]++e_Visibility =+  makeQtEnum (ident1 "QWindow" "Visibility") [includeStd "QWindow"]+  [ (0, ["hidden"])+  , (1, ["automatic", "visibility"])+  , (2, ["windowed"])+  , (3, ["minimized"])+  , (4, ["maximized"])+  , (5, ["full", "screen"])+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QWindow.hs-boot view
@@ -0,0 +1,28 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QWindow (+  minVersion,+  e_Visibility,+  ) where++import Foreign.Hoppy.Generator.Spec (CppEnum)+import Graphics.UI.Qtah.Generator.Flags (Version)++minVersion :: Version++e_Visibility :: CppEnum
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QtahOpenGLWindow.hs view
@@ -0,0 +1,65 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QtahOpenGLWindow (+  aModule,+  c_QtahOpenGLWindow,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident2,+  includeLocal,+  makeClass,+  mkCtor,+  mkMethod,+  )+import Foreign.Hoppy.Generator.Types (callbackT, enumT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Interface.Gui.QOpenGLWindow (+  c_QOpenGLWindow,+  e_UpdateBehavior,+  minVersion,+  )+import Graphics.UI.Qtah.Generator.Interface.Gui.QWindow (c_QWindow)+import Graphics.UI.Qtah.Generator.Interface.Internal.Callback (cb_Void, cb_IntIntVoid)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Gui", "QtahOpenGLWindow"] minVersion $+  [ QtExport $ ExportClass c_QtahOpenGLWindow ]++c_QtahOpenGLWindow =+  addReqIncludes [includeLocal "qtahopenglwindow.hpp"] $+  classSetEntityPrefix "" $+  makeClass (ident2 "qtah" "qtahopenglwindow" "QtahOpenGLWindow") Nothing [c_QOpenGLWindow]+  [ mkCtor "new" []+  , mkCtor "newWithUpdateBehavior" [enumT e_UpdateBehavior]+  , mkCtor "newWithUpdateBehaviorAndParent" [enumT e_UpdateBehavior, ptrT $ objT c_QWindow]+    -- TODO QtahOpenGLWindow(QOpenGLContext*, ...)+    -- TODO QOpenGLContext* context() const+  , mkMethod "onInitializeGL" [callbackT cb_Void] voidT+  , mkMethod "onPaintGL" [callbackT cb_Void] voidT+  , mkMethod "onPaintOverGL" [callbackT cb_Void] voidT+  , mkMethod "onPaintUnderGL" [callbackT cb_Void] voidT+  , mkMethod "onResizeGL" [callbackT cb_IntIntVoid] voidT+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QtahRasterWindow.hs view
@@ -0,0 +1,54 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QtahRasterWindow (+  aModule,+  c_QtahRasterWindow,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident2,+  includeLocal,+  makeClass,+  mkCtor,+  mkMethod,+  )+import Foreign.Hoppy.Generator.Types (callbackT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Interface.Gui.QRasterWindow (c_QRasterWindow, minVersion)+import Graphics.UI.Qtah.Generator.Interface.Gui.QWindow (c_QWindow)+import Graphics.UI.Qtah.Generator.Interface.Internal.Callback (cb_PtrQPaintEventVoid)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Gui", "QtahRasterWindow"] minVersion $+  [ QtExport $ ExportClass c_QtahRasterWindow ]++c_QtahRasterWindow =+  addReqIncludes [includeLocal "qtahrasterwindow.hpp"] $+  classSetEntityPrefix "" $+  makeClass (ident2 "qtah" "qtahrasterwindow" "QtahRasterWindow") Nothing [c_QRasterWindow]+  [ mkCtor "new" []+  , mkCtor "newWithParent" [ptrT $ objT c_QWindow]+  , mkMethod "onPaintEvent" [callbackT cb_PtrQPaintEventVoid] voidT+  ]
src/Graphics/UI/Qtah/Generator/Interface/Imports.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,6 +24,7 @@   importForForeign,   importForForeignC,   importForPrelude,+  importForSceneEvent,   importForSignal,   importForRuntime,   ) where@@ -44,6 +45,9 @@  importForPrelude :: HsImportSet importForPrelude = hsQualifiedImport "Prelude" "QtahP"++importForSceneEvent :: HsImportSet+importForSceneEvent = hsQualifiedImport "Graphics.UI.Qtah.SceneEvent" "QtahSceneEvent"  importForSignal :: HsImportSet importForSignal = hsQualifiedImport "Graphics.UI.Qtah.Signal" "QtahSignal"
src/Graphics/UI/Qtah/Generator/Interface/Internal.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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.Internal.Callback as Callback import qualified Graphics.UI.Qtah.Generator.Interface.Internal.EventListener as EventListener import qualified Graphics.UI.Qtah.Generator.Interface.Internal.Listener as Listener+import qualified Graphics.UI.Qtah.Generator.Interface.Internal.SceneEventListener as SceneEventListener import Graphics.UI.Qtah.Generator.Module (AModule)  {-# ANN module "HLint: ignore Use camelCase" #-}@@ -29,4 +30,5 @@   [ Callback.aModule   , EventListener.aModule   , Listener.aModule+  , SceneEventListener.aModule   ]
src/Graphics/UI/Qtah/Generator/Interface/Internal/Callback.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,19 +26,43 @@   moduleModify',   toExtName,   )-import Foreign.Hoppy.Generator.Types (boolT, doubleT, enumT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (+  boolT,+  constT,+  doubleT,+  enumT,+  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.QAbstractItemModel (c_QAbstractItemModel) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent)+import Graphics.UI.Qtah.Generator.Interface.Core.QItemSelection (c_QItemSelection)+import Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex (c_QModelIndex) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)-import {-# SOURCE #-} qualified Graphics.UI.Qtah.Generator.Interface.Gui.QClipboard as QClipboard-import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton (-  c_QAbstractButton,-  )-import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractSlider (-  e_SliderAction,+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVector (c_QVectorInt)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (+  e_ScreenOrientation,+  e_ScreenOrientation_minVersion,+  e_WindowModality,+  e_WindowState,+  qreal,   )+import {-# SOURCE #-} qualified Graphics.UI.Qtah.Generator.Interface.Gui.QClipboard as QClipboard+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 {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AHoppyModule))@@ -49,24 +73,38 @@   AHoppyModule $   moduleModify' (makeModule "callback" "b_callback.hpp" "b_callback.cpp") $ do     moduleAddHaskellName ["Internal", "Callback"]-    moduleAddExports-      [ ExportCallback cb_BoolVoid-      , ExportCallback cb_DoubleVoid-      , ExportCallback cb_IntVoid-      , ExportCallback cb_IntBoolVoid-      , ExportCallback cb_IntIntVoid-      , ExportCallback cb_PtrQAbstractButtonVoid-      , ExportCallback cb_PtrQAbstractButtonBoolVoid-      , ExportCallback cb_PtrQActionVoid-      , ExportCallback cb_PtrQObjectPtrQEventBool-      , ExportCallback cb_PtrQObjectVoid-      , ExportCallback cb_PtrQWidgetPtrQWidgetVoid-      , ExportCallback cb_QAbstractSliderActionVoid-      , ExportCallback cb_QClipboardModeVoid-      , ExportCallback cb_QPointVoid-      , ExportCallback cb_QSizeVoid-      , ExportCallback cb_QStringVoid-      , ExportCallback cb_Void+    moduleAddExports $ collect+      [ just $ ExportCallback cb_BoolVoid+      , just $ ExportCallback cb_DoubleVoid+      , just $ ExportCallback cb_IntVoid+      , just $ ExportCallback cb_IntBoolVoid+      , just $ ExportCallback cb_IntIntVoid+      , just $ ExportCallback cb_PtrQAbstractButtonVoid+      , just $ ExportCallback cb_PtrQAbstractButtonBoolVoid+      , just $ ExportCallback cb_PtrQAbstractItemModelVoid+      , just $ ExportCallback cb_PtrQActionVoid+      , just $ ExportCallback cb_PtrQGraphicsItemPtrQEventBool+      , just $ ExportCallback cb_PtrQObjectPtrQEventBool+      , just $ ExportCallback cb_PtrQObjectVoid+      , just $ ExportCallback cb_PtrQPaintEventVoid+      , just $ ExportCallback cb_PtrQWidgetPtrQWidgetVoid+      , just $ ExportCallback cb_QAbstractSliderActionVoid+      , just $ ExportCallback cb_QClipboardModeVoid+      , just $ ExportCallback cb_QModelIndexVoid+      , just $ ExportCallback cb_QModelIndexIntIntVoid+      , just $ ExportCallback cb_QModelIndexIntIntQModelIndexIntVoid+      , just $ ExportCallback cb_QModelIndexQModelIndexVoid+      , just $ ExportCallback cb_QModelIndexQModelIndexQVectorIntVoid+      , test (qtVersion >= QWindow.minVersion) $ ExportCallback cb_QWindowVisibilityVoid+      , just $ ExportCallback cb_QPointVoid+      , just $ ExportCallback cb_QrealVoid+      , just $ ExportCallback cb_QSizeVoid+      , just $ ExportCallback cb_QStringVoid+      , just $ ExportCallback cb_RefConstQItemSelectionRefConstQItemSelectionVoid+      , test (qtVersion >= e_ScreenOrientation_minVersion) $ ExportCallback cb_ScreenOrientationVoid+      , just $ ExportCallback cb_WindowModalityVoid+      , just $ ExportCallback cb_WindowStateVoid+      , just $ ExportCallback cb_Void       ]  cb_BoolVoid =@@ -97,10 +135,18 @@   makeCallback (toExtName "CallbackPtrQAbstractButtonBoolVoid")   [ptrT $ objT c_QAbstractButton, boolT] voidT +cb_PtrQAbstractItemModelVoid =+  makeCallback (toExtName "CallbackPtrQAbstractItemModelVoid")+  [ptrT $ objT c_QAbstractItemModel] voidT+ cb_PtrQActionVoid =   makeCallback (toExtName "CallbackPtrQActionVoid")   [ptrT $ objT c_QAction] voidT +cb_PtrQGraphicsItemPtrQEventBool =+  makeCallback (toExtName "CallbackPtrQGraphicsItemPtrQEventBool")+  [ptrT $ objT c_QGraphicsItem, ptrT $ objT c_QEvent] boolT+ cb_PtrQObjectPtrQEventBool =   makeCallback (toExtName "CallbackPtrQObjectPtrQEventBool")   [ptrT $ objT c_QObject, ptrT $ objT c_QEvent] boolT@@ -109,6 +155,10 @@   makeCallback (toExtName "CallbackPtrQObjectVoid")   [ptrT $ objT c_QObject] voidT +cb_PtrQPaintEventVoid =+  makeCallback (toExtName "CallbackPtrQPaintEventVoid")+  [ptrT $ objT c_QPaintEvent] voidT+ cb_PtrQWidgetPtrQWidgetVoid =   makeCallback (toExtName "CallbackPtrQWidgetPtrQWidgetVoid")   [ptrT $ objT c_QWidget, ptrT $ objT c_QWidget] voidT@@ -121,10 +171,38 @@   makeCallback (toExtName "CallbackQClipboardModeVoid")   [enumT QClipboard.e_Mode] voidT +cb_QModelIndexVoid =+  makeCallback (toExtName "CallbackQModelIndexVoid")+  [objT c_QModelIndex] voidT++cb_QModelIndexIntIntVoid =+  makeCallback (toExtName "CallbackQModelIndexIntIntVoid")+  [objT c_QModelIndex, intT, intT] voidT++cb_QModelIndexIntIntQModelIndexIntVoid =+  makeCallback (toExtName "CallbackQModelIndexIntIntQModelIndexIntVoid")+  [objT c_QModelIndex, intT, intT, objT c_QModelIndex, intT] voidT++cb_QModelIndexQModelIndexVoid =+  makeCallback (toExtName "CallbackQModelIndexQModelIndexVoid")+  [objT c_QModelIndex, objT c_QModelIndex] voidT++cb_QModelIndexQModelIndexQVectorIntVoid =+  makeCallback (toExtName "CallbackQModelIndexQModelIndexQVectorIntVoid")+  [objT c_QModelIndex, objT c_QModelIndex, toGcT $ objT c_QVectorInt] voidT++cb_QWindowVisibilityVoid =+  makeCallback (toExtName "CallbackQWindowVisibilityVoid")+  [enumT QWindow.e_Visibility] voidT+ cb_QPointVoid =   makeCallback (toExtName "CallbackQPointVoid")   [objT c_QPoint] voidT +cb_QrealVoid =+  makeCallback (toExtName "CallbackQrealVoid")+  [qreal] voidT+ cb_QSizeVoid =   makeCallback (toExtName "CallbackQSizeVoid")   [objT c_QSize] voidT@@ -132,6 +210,22 @@ cb_QStringVoid =   makeCallback (toExtName "CallbackQStringVoid")   [objT c_QString] voidT++cb_RefConstQItemSelectionRefConstQItemSelectionVoid =+  makeCallback (toExtName "CallbackRefConstQItemSelectionRefConstQItemSelectionVoid")+  [refT $ constT $ objT c_QItemSelection, refT $ constT $ objT c_QItemSelection] voidT++cb_ScreenOrientationVoid =+  makeCallback (toExtName "CallbackScreenOrientationVoid")+  [enumT e_ScreenOrientation] voidT++cb_WindowModalityVoid =+  makeCallback (toExtName "CallbackWindowModalityVoid")+  [enumT e_WindowModality] voidT++cb_WindowStateVoid =+  makeCallback (toExtName "CallbackWindowStateVoid")+  [enumT e_WindowState] voidT  cb_Void =   makeCallback (toExtName "CallbackVoid")
src/Graphics/UI/Qtah/Generator/Interface/Internal/EventListener.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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@@ -27,10 +27,11 @@   includeLocal,   makeClass,   mkCtor,+  mkMethod,   )-import Foreign.Hoppy.Generator.Types (callbackT, intT, ptrT)+import Foreign.Hoppy.Generator.Types (callbackT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)-import Graphics.UI.Qtah.Generator.Interface.Internal.Callback (cb_PtrQObjectPtrQEventBool)+import Graphics.UI.Qtah.Generator.Interface.Internal.Callback (cb_PtrQObjectPtrQEventBool, cb_Void) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -45,5 +46,6 @@   addReqIncludes [includeLocal "event.hpp"] $   classSetEntityPrefix "" $   makeClass (ident2 "qtah" "event" "EventListener") Nothing [c_QObject]-  [ mkCtor "new" [callbackT cb_PtrQObjectPtrQEventBool, ptrT intT]+  [ mkCtor "new" [ptrT $ objT c_QObject, callbackT cb_PtrQObjectPtrQEventBool, callbackT cb_Void]+  , mkMethod "doNotNotifyOnDelete" [] voidT   ]
src/Graphics/UI/Qtah/Generator/Interface/Internal/Listener.hs view
@@ -2,6 +2,8 @@  module Graphics.UI.Qtah.Generator.Interface.Internal.Listener where +import qualified Foreign.Hoppy.Generator.Version as V+import qualified Graphics.UI.Qtah.Generator.Flags as F import qualified Foreign.Hoppy.Generator.Spec as S import qualified Foreign.Hoppy.Generator.Types as S import qualified Foreign.Hoppy.Generator.Std.String as String@@ -74,6 +76,15 @@     [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT   ] +c_ListenerPtrQAbstractItemModel =+  S.makeClass (S.ident "ListenerPtrQAbstractItemModel") Nothing [QObject.c_QObject]+  [ S.mkCtor "new" [S.callbackT C.cb_PtrQAbstractItemModelVoid]+  , S.mkCtor "newWithParent"+    [S.callbackT C.cb_PtrQAbstractItemModelVoid, 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_ListenerPtrQAction =   S.makeClass (S.ident "ListenerPtrQAction") Nothing [QObject.c_QObject]   [ S.mkCtor "new" [S.callbackT C.cb_PtrQActionVoid]@@ -101,6 +112,24 @@     [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_ListenerQAbstractSliderAction =   S.makeClass (S.ident "ListenerQAbstractSliderAction") Nothing [QObject.c_QObject]   [ S.mkCtor "new" [S.callbackT C.cb_QAbstractSliderActionVoid]@@ -119,6 +148,51 @@     [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT   ] +c_ListenerQModelIndex =+  S.makeClass (S.ident "ListenerQModelIndex") Nothing [QObject.c_QObject]+  [ S.mkCtor "new" [S.callbackT C.cb_QModelIndexVoid]+  , S.mkCtor "newWithParent"+    [S.callbackT C.cb_QModelIndexVoid, 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_ListenerQModelIndexIntInt =+  S.makeClass (S.ident "ListenerQModelIndexIntInt") Nothing [QObject.c_QObject]+  [ S.mkCtor "new" [S.callbackT C.cb_QModelIndexIntIntVoid]+  , S.mkCtor "newWithParent"+    [S.callbackT C.cb_QModelIndexIntIntVoid, 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_ListenerQModelIndexIntIntQModelIndexInt =+  S.makeClass (S.ident "ListenerQModelIndexIntIntQModelIndexInt") Nothing [QObject.c_QObject]+  [ S.mkCtor "new" [S.callbackT C.cb_QModelIndexIntIntQModelIndexIntVoid]+  , S.mkCtor "newWithParent"+    [S.callbackT C.cb_QModelIndexIntIntQModelIndexIntVoid, 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_ListenerQModelIndexQModelIndex =+  S.makeClass (S.ident "ListenerQModelIndexQModelIndex") Nothing [QObject.c_QObject]+  [ S.mkCtor "new" [S.callbackT C.cb_QModelIndexQModelIndexVoid]+  , S.mkCtor "newWithParent"+    [S.callbackT C.cb_QModelIndexQModelIndexVoid, 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_ListenerQModelIndexQModelIndexQVectorInt =+  S.makeClass (S.ident "ListenerQModelIndexQModelIndexQVectorInt") Nothing [QObject.c_QObject]+  [ S.mkCtor "new" [S.callbackT C.cb_QModelIndexQModelIndexQVectorIntVoid]+  , S.mkCtor "newWithParent"+    [S.callbackT C.cb_QModelIndexQModelIndexQVectorIntVoid, 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_ListenerQPoint =   S.makeClass (S.ident "ListenerQPoint") Nothing [QObject.c_QObject]   [ S.mkCtor "new" [S.callbackT C.cb_QPointVoid]@@ -128,6 +202,15 @@     [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT   ] +c_ListenerQreal =+  S.makeClass (S.ident "ListenerQreal") Nothing [QObject.c_QObject]+  [ S.mkCtor "new" [S.callbackT C.cb_QrealVoid]+  , S.mkCtor "newWithParent"+    [S.callbackT C.cb_QrealVoid, 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_ListenerQSize =   S.makeClass (S.ident "ListenerQSize") Nothing [QObject.c_QObject]   [ S.mkCtor "new" [S.callbackT C.cb_QSizeVoid]@@ -146,6 +229,33 @@     [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]+  , S.mkCtor "newWithParent"+    [S.callbackT C.cb_QWindowVisibilityVoid, 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]+  , S.mkCtor "newWithParent"+    [S.callbackT C.cb_WindowModalityVoid, 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_ListenerWindowState =+  S.makeClass (S.ident "ListenerWindowState") Nothing [QObject.c_QObject]+  [ S.mkCtor "new" [S.callbackT C.cb_WindowStateVoid]+  , S.mkCtor "newWithParent"+    [S.callbackT C.cb_WindowStateVoid, 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_Listener =   S.makeClass (S.ident "Listener") Nothing [QObject.c_QObject]   [ S.mkCtor "new" [S.callbackT C.cb_Void]@@ -161,21 +271,33 @@   S.addReqIncludes [S.includeLocal "listener.hpp"] $   S.moduleModify' (S.makeModule "listener" "b_listener.hpp" "b_listener.cpp") $ do     S.moduleAddHaskellName ["Internal", "Listener"]-    S.moduleAddExports-      [ S.ExportClass c_ListenerBool-      , S.ExportClass c_ListenerDouble-      , S.ExportClass c_ListenerInt-      , S.ExportClass c_ListenerIntBool-      , S.ExportClass c_ListenerIntInt-      , S.ExportClass c_ListenerPtrQAbstractButton-      , S.ExportClass c_ListenerPtrQAbstractButtonBool-      , S.ExportClass c_ListenerPtrQAction-      , S.ExportClass c_ListenerPtrQObject-      , S.ExportClass c_ListenerPtrQWidgetPtrQWidget-      , S.ExportClass c_ListenerQAbstractSliderAction-      , S.ExportClass c_ListenerQClipboardMode-      , S.ExportClass c_ListenerQPoint-      , S.ExportClass c_ListenerQSize-      , S.ExportClass c_ListenerQString-      , S.ExportClass c_Listener+    S.moduleAddExports $ V.collect+      [ V.just $ S.ExportClass c_ListenerBool+      , V.just $ S.ExportClass c_ListenerDouble+      , V.just $ S.ExportClass c_ListenerInt+      , V.just $ S.ExportClass c_ListenerIntBool+      , V.just $ S.ExportClass c_ListenerIntInt+      , 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_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+      , V.just $ S.ExportClass c_ListenerQModelIndexIntInt+      , V.just $ S.ExportClass c_ListenerQModelIndexIntIntQModelIndexInt+      , V.just $ S.ExportClass c_ListenerQModelIndexQModelIndex+      , V.just $ S.ExportClass c_ListenerQModelIndexQModelIndexQVectorInt+      , V.just $ S.ExportClass c_ListenerQPoint+      , V.just $ S.ExportClass c_ListenerQreal+      , V.just $ S.ExportClass c_ListenerQSize+      , V.just $ S.ExportClass c_ListenerQString+      , V.test (F.qtVersion >= [5, 0]) $ S.ExportClass c_ListenerQWindowVisibility+      , 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
@@ -11,12 +11,24 @@ c_ListenerIntInt :: Class c_ListenerPtrQAbstractButton :: Class c_ListenerPtrQAbstractButtonBool :: Class+c_ListenerPtrQAbstractItemModel :: Class c_ListenerPtrQAction :: Class c_ListenerPtrQObject :: Class c_ListenerPtrQWidgetPtrQWidget :: Class+c_ListenerRefConstQItemSelectionRefConstQItemSelection :: Class+c_ListenerScreenOrientation :: Class c_ListenerQAbstractSliderAction :: Class c_ListenerQClipboardMode :: Class+c_ListenerQModelIndex :: Class+c_ListenerQModelIndexIntInt :: Class+c_ListenerQModelIndexIntIntQModelIndexInt :: Class+c_ListenerQModelIndexQModelIndex :: Class+c_ListenerQModelIndexQModelIndexQVectorInt :: Class c_ListenerQPoint :: Class+c_ListenerQreal :: Class c_ListenerQSize :: Class c_ListenerQString :: Class+c_ListenerQWindowVisibility :: Class+c_ListenerWindowModality :: Class+c_ListenerWindowState :: Class c_Listener :: Class
+ src/Graphics/UI/Qtah/Generator/Interface/Internal/SceneEventListener.hs view
@@ -0,0 +1,53 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.Internal.SceneEventListener (+  aModule,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident2,+  includeLocal,+  makeClass,+  mkCtor,+  mkMethod,+  )+import Foreign.Hoppy.Generator.Types (callbackT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Interface.Internal.Callback+  (cb_PtrQGraphicsItemPtrQEventBool, cb_Void)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsItem (c_QGraphicsItem)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Internal", "SceneEventListener"]+  [ QtExport $ ExportClass c_SceneEventListener ]++c_SceneEventListener =+  addReqIncludes [includeLocal "event.hpp"] $+  classSetEntityPrefix "" $+  makeClass (ident2 "qtah" "event" "SceneEventListener") Nothing [c_QGraphicsItem]+  [ mkCtor "new"+      [ptrT $ objT c_QGraphicsItem, callbackT cb_PtrQGraphicsItemPtrQEventBool, callbackT cb_Void]+  , mkMethod "doNotNotifyOnDelete" [] voidT+  ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,8 @@ module Graphics.UI.Qtah.Generator.Interface.Widgets (modules) where  import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton as QAbstractButton+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractGraphicsShapeItem as QAbstractGraphicsShapeItem+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractItemView as QAbstractItemView import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractScrollArea as QAbstractScrollArea import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractSlider as QAbstractSlider import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractSpinBox as QAbstractSpinBox@@ -34,6 +36,15 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QFileDialog as QFileDialog import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QFormLayout as QFormLayout import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QFrame as QFrame+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsEllipseItem as QGraphicsEllipseItem+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsItem as QGraphicsItem+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsPolygonItem as QGraphicsPolygonItem+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsRectItem as QGraphicsRectItem+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsScene as QGraphicsScene+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsSceneEvent as QGraphicsSceneEvent+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsSceneMouseEvent as QGraphicsSceneMouseEvent+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsSceneWheelEvent as QGraphicsSceneWheelEvent+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsView as QGraphicsView import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QGridLayout as QGridLayout import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QGroupBox as QGroupBox import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QHBoxLayout as QHBoxLayout@@ -42,10 +53,12 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QLayout as QLayout import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QLayoutItem as QLayoutItem import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QLineEdit as QLineEdit+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QListView as QListView import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QMainWindow as QMainWindow import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu as QMenu import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QMenuBar as QMenuBar import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QMessageBox as QMessageBox+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QOpenGLWidget as QOpenGLWidget import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QProgressBar as QProgressBar import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QPushButton as QPushButton import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QRadioButton as QRadioButton@@ -71,6 +84,8 @@ modules :: [AModule] modules =   [ QAbstractButton.aModule+  , QAbstractGraphicsShapeItem.aModule+  , QAbstractItemView.aModule   , QAbstractScrollArea.aModule   , QAbstractSlider.aModule   , QAbstractSpinBox.aModule@@ -87,6 +102,15 @@   , QFileDialog.aModule   , QFormLayout.aModule   , QFrame.aModule+  , QGraphicsEllipseItem.aModule+  , QGraphicsItem.aModule+  , QGraphicsPolygonItem.aModule+  , QGraphicsRectItem.aModule+  , QGraphicsScene.aModule+  , QGraphicsSceneEvent.aModule+  , QGraphicsSceneMouseEvent.aModule+  , QGraphicsSceneWheelEvent.aModule+  , QGraphicsView.aModule   , QGridLayout.aModule   , QGroupBox.aModule   , QHBoxLayout.aModule@@ -95,10 +119,12 @@   , QLayout.aModule   , QLayoutItem.aModule   , QLineEdit.aModule+  , QListView.aModule   , QMainWindow.aModule   , QMenu.aModule   , QMenuBar.aModule   , QMessageBox.aModule+  , QOpenGLWidget.aModule   , QProgressBar.aModule   , QPushButton.aModule   , QRadioButton.aModule
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractButton.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QAbstractButton.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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
@@ -0,0 +1,56 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QAbstractGraphicsShapeItem (+  aModule,+  c_QAbstractGraphicsShapeItem,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkMethod+  )+import Foreign.Hoppy.Generator.Types (objT, voidT)+import Graphics.UI.Qtah.Generator.Interface.Gui.QBrush (c_QBrush)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPen (c_QPen)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsItem (c_QGraphicsItem)+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", "QAbstractGraphicsShapeItem"]+  [ QtExport $ ExportClass c_QAbstractGraphicsShapeItem+  ]++c_QAbstractGraphicsShapeItem =+  addReqIncludes [includeStd "QAbstractGraphicsShapeItem"] $+  classSetEntityPrefix "" $+  makeClass (ident "QAbstractGraphicsShapeItem") Nothing [c_QGraphicsItem]+  [ mkConstMethod "brush" [] $ objT c_QBrush+  , mkConstMethod "pen" [] $ objT c_QPen+  , mkMethod "setBrush" [objT c_QBrush] voidT+  , mkMethod "setPen" [objT c_QPen] voidT+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractItemView.hs view
@@ -0,0 +1,196 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QAbstractItemView (+  aModule,+  c_QAbstractItemView,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportBitspace, ExportEnum, ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkBoolHasProp,+  mkConstMethod,+  mkMethod,+  mkMethod',+  mkProp,+  )+import Foreign.Hoppy.Generator.Types (+  bitspaceT,+  boolT,+  enumT,+  intT,+  objT,+  ptrT,+  voidT,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (c_QAbstractItemModel)+import Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionModel (c_QItemSelectionModel)+import Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex (c_QModelIndex)+import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint)+import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)+import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (+  e_DropAction,+  e_TextElideMode,+  )+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  c_Listener,+  c_ListenerQModelIndex,+  c_ListenerQSize,+  )+import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractScrollArea (c_QAbstractScrollArea)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Widgets", "QAbstractItemView"] $+  QtExport (ExportClass c_QAbstractItemView) :+  map QtExportSignal signals +++  [ QtExport $ ExportEnum e_DragDropMode+  , QtExport $ ExportEnum e_EditTrigger+  , QtExport $ ExportBitspace bs_EditTriggers+  , QtExport $ ExportEnum e_ScrollHint+  , QtExport $ ExportEnum e_ScrollMode+  , QtExport $ ExportEnum e_SelectionBehavior+  , QtExport $ ExportEnum e_SelectionMode+  ]++c_QAbstractItemView =+  addReqIncludes [includeStd "QAbstractItemView"] $+  classSetEntityPrefix "" $+  makeClass (ident "QAbstractItemView") Nothing [c_QAbstractScrollArea] $+  [ mkProp "alternatingRowColors" boolT+  , mkBoolHasProp "autoScroll"+  , mkProp "autoScrollMargin" intT+  , mkMethod "clearSelection" [] voidT+  , mkMethod "closePersistentEditor" [objT c_QModelIndex] voidT+  , mkProp "currentIndex" $ objT c_QModelIndex+  , mkProp "defaultDropAction" $ enumT e_DropAction+  , mkProp "dragDropMode" $ enumT e_DragDropMode+  , mkProp "dragDropOverwriteMode" boolT+  , mkProp "dragEnabled" boolT+  , mkMethod "edit" [objT c_QModelIndex] voidT+  , mkProp "editTriggers" $ bitspaceT bs_EditTriggers+  , mkProp "horizontalScrollMode" $ enumT e_ScrollMode+  , mkProp "iconSize" $ objT c_QSize+  , mkConstMethod "indexAt" [objT c_QPoint] $ objT c_QModelIndex+  , mkConstMethod "indexWidget" [objT c_QModelIndex] $ ptrT $ objT c_QWidget+    -- TODO mkConstMethod' "itemDelegate" "itemDelegate" [] $ ptrT $ objT c_QAbstractItemDelegate+    -- TODO mkConstMethod' "itemDelegate" "itemDelegateAt" [objT c_QModelIndex] $+    --      ptrT $ objT c_QAbstractItemDelegate+    -- TODO mkConstMethod "itemDelegateForColumn" [intT] $ ptrT $ objT c_QAbstractItemDelegate+    -- TODO mkConstMethod "itemDelegateForRow" [intT] $ ptrT $ objT c_QAbstractItemDelegate+  , mkMethod "keyboardSearch" [objT c_QString] voidT+  , mkProp "model" $ ptrT $ objT c_QAbstractItemModel+  , mkMethod "openPersistentEditor" [objT c_QModelIndex] voidT+  , mkMethod "reset" [] voidT+  , mkProp "rootIndex" $ objT c_QModelIndex+  , mkMethod' "scrollTo" "scrollTo" [objT c_QModelIndex] voidT+  , mkMethod' "scrollTo" "scrollToWithHint" [objT c_QModelIndex, enumT e_ScrollHint] voidT+  , mkMethod "scrollToBottom" [] voidT+  , mkMethod "scrollToTop" [] voidT+  , mkMethod "selectAll" [] voidT+  , mkProp "selectionBehavior" $ enumT e_SelectionBehavior+  , mkProp "selectionMode" $ enumT e_SelectionMode+  , mkProp "selectionModel" $ ptrT $ objT c_QItemSelectionModel+  , mkMethod "setDropIndicatorShown" [boolT] voidT+  , mkMethod "setIndexWidget" [objT c_QModelIndex, ptrT $ objT c_QWidget] voidT+    -- TODO mkMethod "setItemDelegate" [ptrT $ objT c_QAbstractItemDelegate] voidT+    -- TODO mkMethod "setItemDelegateForColumn" [intT, ptrT $ objT c_QAbstractItemDelegate] voidT+    -- TODO mkMethod "setItemDelegateForRow" [intT, ptrT $ objT c_QAbstractItemDelegate] voidT+  , mkConstMethod "showDropIndicator" [] boolT+  , mkConstMethod "sizeHintForColumn" [intT] intT+  , mkConstMethod "sizeHintForIndex" [objT c_QModelIndex] $ objT c_QSize+  , mkConstMethod "sizeHintForRow" [intT] intT+  , mkProp "tabKeyNavigation" boolT+  , mkProp "textElideMode" $ enumT e_TextElideMode+  , mkMethod "update" [objT c_QModelIndex] voidT+  , mkProp "verticalScrollMode" $ enumT e_ScrollMode+  , mkConstMethod "visualRect" [objT c_QModelIndex] $ objT c_QRect+  ]++signals =+  [ makeSignal c_QAbstractItemView "activated" c_ListenerQModelIndex+  , makeSignal c_QAbstractItemView "clicked" c_ListenerQModelIndex+  , makeSignal c_QAbstractItemView "doubleClicked" c_ListenerQModelIndex+  , makeSignal c_QAbstractItemView "entered" c_ListenerQModelIndex+  , makeSignal c_QAbstractItemView "iconSizeChanged" c_ListenerQSize+  , makeSignal c_QAbstractItemView "pressed" c_ListenerQModelIndex+  , makeSignal c_QAbstractItemView "viewportEntered" c_Listener+  ]++e_DragDropMode =+  makeQtEnum (ident1 "QAbstractItemView" "DragDropMode") [includeStd "QAbstractItemView"]+  [ (0, ["no", "drag", "drop"])+  , (1, ["drag", "only"])+  , (2, ["drop", "only"])+  , (3, ["drag", "drop"])+  , (4, ["internal", "move"])+  ]++(e_EditTrigger, bs_EditTriggers) =+  makeQtEnumBitspace (ident1 "QAbstractItemView" "EditTrigger") "EditTriggers"+  [includeStd "QAbstractItemView"]+  [ (0, ["no", "edit", "triggers"])+  , (1, ["current", "changed"])+  , (2, ["double", "clicked"])+  , (4, ["selected", "clicked"])+  , (8, ["edit", "key", "pressed"])+  , (16, ["any", "key", "pressed"])+  , (31, ["all", "edit", "triggers"])+  ]++e_ScrollHint =+  makeQtEnum (ident1 "QAbstractItemView" "ScrollHint") [includeStd "QAbstractItemView"]+  [ (0, ["ensure", "visible"])+  , (1, ["position", "at", "top"])+  , (2, ["position", "at", "bottom"])+  , (3, ["position", "at", "center"])+  ]++e_ScrollMode =+  makeQtEnum (ident1 "QAbstractItemView" "ScrollMode") [includeStd "QAbstractItemView"]+  [ (0, ["scroll", "per", "item"])+  , (1, ["scroll", "per", "pixel"])+  ]++e_SelectionBehavior =+  makeQtEnum (ident1 "QAbstractItemView" "SelectionBehavior") [includeStd "QAbstractItemView"]+  [ (0, ["select", "items"])+  , (1, ["select", "rows"])+  , (2, ["select", "columns"])+  ]++e_SelectionMode =+  makeQtEnum (ident1 "QAbstractItemView" "SelectionMode") [includeStd "QAbstractItemView"]+  [ (0, ["no", "selection"])+  , (1, ["single", "selection"])+  , (2, ["multi", "selection"])+  , (3, ["extended", "selection"])+  , (4, ["contiguous", "selection"])+  ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractScrollArea.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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@@ -30,12 +30,12 @@   mkConstMethod,   mkCtor,   mkMethod,-  mkProp,   ) import Foreign.Hoppy.Generator.Types (bitspaceT, enumT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize) import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment, e_ScrollBarPolicy) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QScrollBar (c_QScrollBar) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -53,12 +53,18 @@   [ mkCtor "new" []   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkMethod "addScrollBarWidget" [ptrT $ objT c_QWidget, bitspaceT bs_Alignment] voidT-  , mkProp "cornerWidget" $ ptrT $ objT c_QWidget-    -- TODO horizontalScrollBar-  , mkProp "horizontalScrollBarPolicy" $ enumT e_ScrollBarPolicy+  , mkConstMethod "cornerWidget" [] $ ptrT $ objT c_QWidget+  , mkConstMethod "horizontalScrollBar" [] $ ptrT $ objT c_QScrollBar+  , mkConstMethod "horizontalScrollBarPolicy" [] $ enumT e_ScrollBarPolicy   , mkConstMethod "maximumViewportSize" [] $ objT c_QSize-    -- TODO scrollBarWidgets-    -- TODO verticalScrollBar-  , mkProp "verticalScrollBarPolicy" $ enumT e_ScrollBarPolicy-  , mkProp "viewport" $ ptrT $ objT c_QWidget+  -- TODO mkMethod "scrollBarWidgets" [enumT e_Alignment] $ objT c_QWidgetList+  , mkMethod "setCornerWidget" [ptrT $ objT c_QWidget] voidT+  , mkMethod "setHorizontalScrollBar" [ptrT $ objT c_QScrollBar] voidT+  , mkMethod "setHorizontalScrollBarPolicy" [enumT e_ScrollBarPolicy] voidT+  , mkMethod "setVerticalScrollBar" [ptrT $ objT c_QScrollBar] voidT+  , mkMethod "setVerticalScrollBarPolicy" [enumT e_ScrollBarPolicy] voidT+  , mkMethod "setViewport" [ptrT $ objT c_QWidget] voidT+  , mkConstMethod "verticalScrollBar" [] $ ptrT $ objT c_QScrollBar+  , mkConstMethod "verticalScrollBarPolicy" [] $ enumT e_ScrollBarPolicy+  , mkConstMethod "viewport" [] $ ptrT $ objT c_QWidget   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractSlider.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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@@ -40,7 +40,7 @@   mkProp,   ) import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, refT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+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.Types (bs_Alignment)
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAction.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,7 +35,7 @@   mkProp,   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, objT, ptrT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+import Foreign.Hoppy.Generator.Version (collect, just, test) 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)
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAction.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QApplication.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,7 +39,7 @@   mkStaticProp,   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (keypadNavigation, qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QCoreApplication (c_QCoreApplication) import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQWidget)
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QBoxLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QCheckBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,7 +35,7 @@   mkStaticMethod',   ) import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, objT, ptrT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QDir (bs_Filters, c_QDir) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QFormLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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
@@ -0,0 +1,52 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QGraphicsEllipseItem (+  aModule,+  c_QGraphicsEllipseItem,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractGraphicsShapeItem+  (c_QAbstractGraphicsShapeItem)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Widgets", "QGraphicsEllipseItem"]+  [ QtExport $ ExportClass c_QGraphicsEllipseItem+  ]++c_QGraphicsEllipseItem =+  addReqIncludes [includeStd "QGraphicsEllipseItem"] $+  classSetEntityPrefix "" $+  makeClass (ident "QGraphicsEllipseItem") Nothing [c_QAbstractGraphicsShapeItem]+  [ mkCtor "new" []+  , mkCtor "newWithRaw" [qreal, qreal, qreal, qreal]+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsItem.hs view
@@ -0,0 +1,403 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QGraphicsItem (+  aModule,+  c_QGraphicsItem,+  e_CacheMode,+  e_GraphicsItemChange,+  e_PanelModality,+  bs_GraphicsItemFlags+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass, ExportEnum, ExportBitspace),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkMethod,+  mkConstMethod,+  mkMethod',+  mkConstMethod'+  )+import Foreign.Hoppy.Generator.Types (voidT, objT, ptrT, boolT, constT, intT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal)+import Graphics.UI.Qtah.Generator.Interface.Core.QPointF (c_QPointF)+import Graphics.UI.Qtah.Generator.Interface.Core.QRectF (c_QRectF)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+-- import Graphics.UI.Qtah.Generator.Interface.Gui.QPolygonF (c_QPolygonF)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPainterPath (c_QPainterPath)+-- import Graphics.UI.Qtah.Generator.Interface.Gui.QTransform (c_QTransform)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsScene (c_QGraphicsScene)+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", "QGraphicsItem"] $+  map QtExport $+    ExportClass c_QGraphicsItem :+    map ExportEnum+      [ e_CacheMode+      , e_GraphicsItemChange+      , e_GraphicsItemFlag+      , e_PanelModality+      ] +++    map ExportBitspace [bs_GraphicsItemFlags]++c_QGraphicsItem =+  addReqIncludes [includeStd "QGraphicsItem"] $+  classSetEntityPrefix "" $+  makeClass (ident "QGraphicsItem") Nothing []+  [ mkConstMethod "acceptDrops" [] boolT+  , mkConstMethod "acceptHoverEvents" [] boolT+  , mkConstMethod "acceptTouchEvents" [] boolT+  -- TODO mkConstMethod "acceptedMouseButtons" [] $ objT c_Qt::MouseButtons+  , mkMethod "advance" [intT] voidT+  , mkConstMethod "boundingRect" [] $ objT c_QRectF+  -- TODO mkConstMethod "boundingRegion" [objT c_QTransform] $ objT c_QRegion+  , mkConstMethod "boundingRegionGranularity" [] qreal+  -- TODO mkConstMethod "cacheMode" [] $ objT bs_CacheMode+  -- TODO mkConstMethod "childItems" [] $ objT c_QList<QGraphicsItem $ objT c_*>+  , mkConstMethod "childrenBoundingRect" [] $ objT c_QRectF+  , mkMethod "clearFocus" [] voidT+  , mkConstMethod "clipPath" [] $ objT c_QPainterPath+  , mkConstMethod "collidesWithItem" [ptrT $ constT $ objT c_QGraphicsItem] boolT+  -- TODO mkConstMethod' "collidesWithItem" "collidesWithItemAll"+  --   [ptrT $ constT $ objT c_QGraphicsItem, objT c_Qt::ItemSelectionMode] boolT+  , mkConstMethod "collidesWithPath" [objT c_QPainterPath] boolT+  -- TODO mkConstMethod' "collidesWithPath" "collidesWithPathAll"+  --   [objT c_QPainterPath, objT c_Qt::ItemSelectionMode] boolT+  -- TODO mkConstMethod "collidingItems" [] $ objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "collidingItems" "collidingItemsAll"+  --   [objT c_Qt::ItemSelectionMode] $ objT c_QList<QGraphicsItem $ objT c_*>+  , mkConstMethod "commonAncestorItem" [ptrT $ constT $ objT c_QGraphicsItem] $+      ptrT $ objT c_QGraphicsItem+  , mkConstMethod "contains" [objT c_QPointF] boolT+  -- TODO mkConstMethod "cursor" [] $ objT c_QCursor+  -- TODO mkConstMethod "data" [intT] $ objT c_QVariant+  -- TODO mkConstMethod "deviceTransform" [objT c_QTransform] $ objT c_QTransform+  , mkConstMethod "effectiveOpacity" [] qreal+  , mkMethod "ensureVisible" [] voidT+  , mkMethod' "ensureVisible" "ensureVisibleRectFAll" [objT c_QRectF, intT, intT] voidT+  , mkMethod' "ensureVisible" "ensureVisibleRaw"+      [qreal, qreal, qreal, qreal] voidT+  , mkMethod' "ensureVisible" "ensureVisibleRawAll"+      [qreal, qreal, qreal, qreal, intT, intT] voidT+  , mkConstMethod "filtersChildEvents" [] boolT+  -- TODO mkConstMethod "flags" [] $ objT c_GraphicsItemFlags+  , mkConstMethod "focusItem" [] $ ptrT $ objT c_QGraphicsItem+  , mkConstMethod "focusProxy" [] $ ptrT $ objT c_QGraphicsItem+  , mkMethod "grabKeyboard" [] voidT+  , mkMethod "grabMouse" [] voidT+  -- TODO mkConstMethod "graphicsEffect" [] $ ptrT $ objT c_QGraphicsEffect+  -- TODO mkConstMethod "group" [] $ ptrT $ objT c_QGraphicsItemGroup+  , mkConstMethod "hasCursor" [] boolT+  , mkConstMethod "hasFocus" [] boolT+  , mkMethod "hide" [] voidT+  -- TODO mkConstMethod "inputMethodHints" [] $ objT c_Qt::InputMethodHints+  , mkMethod "installSceneEventFilter" [ptrT $ objT c_QGraphicsItem] voidT+  , mkConstMethod "isActive" [] boolT+  , mkConstMethod "isAncestorOf" [ptrT $ constT $ objT c_QGraphicsItem] boolT+  , mkConstMethod "isBlockedByModalPanel" [] boolT+  , mkConstMethod' "isBlockedByModalPanel" "isBlockedByModalPanelAll"+      [ptrT $ ptrT $ objT c_QGraphicsItem] boolT+  , mkConstMethod "isClipped" [] boolT+  , mkConstMethod "isEnabled" [] boolT+  , mkConstMethod "isObscured" [] boolT+  , mkConstMethod' "isObscured" "isObscuredRaw" [qreal, qreal, qreal, qreal] boolT+  , mkConstMethod' "isObscured" "isObscuredRectF" [objT c_QRectF] boolT+  , mkConstMethod "isObscuredBy" [ptrT $ constT $ objT c_QGraphicsItem] boolT+  , mkConstMethod "isPanel" [] boolT+  , mkConstMethod "isSelected" [] boolT+  , mkConstMethod "isUnderMouse" [] boolT+  , mkConstMethod "isVisible" [] boolT+  , mkConstMethod "isVisibleTo" [ptrT $ constT $ objT c_QGraphicsItem] boolT+  , mkConstMethod "isWidget" [] boolT+  , mkConstMethod "isWindow" [] boolT+  -- TODO mkConstMethod "itemTransform" [ptrT $ constT $ objT c_QGraphicsItem] $+  --   objT c_QTransform+  -- TODO mkConstMethod' "itemTransform" "itemTransformAll"+  --   [ptrT $ constT $ objT c_QGraphicsItem, ptrT $ boolT] $ objT c_QTransform+  -- TODO mkConstMethod' "mapFromItem" "mapFromItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, objT c_QPointF] $ objT c_QPointF+  -- TODO mkConstMethod' "mapFromItem" "mapFromItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, objT c_QRectF] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapFromItem" "mapFromItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, objT c_QPolygonF] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapFromItem" "mapFromItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, objT c_QPainterPath] $ objT c_QPainterPath+  -- TODO mkConstMethod' "mapFromItem" "mapFromItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, qreal, qreal, qreal, qreal] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapFromItem" "mapFromItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, qreal, qreal] $ objT c_QPointF+  -- TODO mkConstMethod' "mapFromParent" "mapFromParent"+  --   [objT c_QPointF] $ objT c_QPointF+  -- TODO mkConstMethod' "mapFromParent" "mapFromParent"+  --   [objT c_QRectF] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapFromParent" "mapFromParent"+  --   [objT c_QPolygonF] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapFromParent" "mapFromParent"+  --   [objT c_QPainterPath] $ objT c_QPainterPath+  -- TODO mkConstMethod' "mapFromParent" "mapFromParent"+  --   [qreal, qreal, qreal, qreal] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapFromParent" "mapFromParent"+  --   [qreal, qreal] $ objT c_QPointF+  -- TODO mkConstMethod' "mapFromScene" "mapFromScene"+  --   [objT c_QPointF] $ objT c_QPointF+  -- TODO mkConstMethod' "mapFromScene" "mapFromScene"+  --   [objT c_QRectF] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapFromScene" "mapFromScene"+  --   [objT c_QPolygonF] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapFromScene" "mapFromScene"+  --   [objT c_QPainterPath] $ objT c_QPainterPath+  -- TODO mkConstMethod' "mapFromScene" "mapFromScene"+  --   [qreal, qreal, qreal, qreal] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapFromScene" "mapFromScene"+  --   [qreal, qreal] $ objT c_QPointF+  -- TODO mkConstMethod' "mapRectFromItem" "mapRectFromItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, objT c_QRectF] $ objT c_QRectF+  -- TODO mkConstMethod' "mapRectFromItem" "mapRectFromItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, qreal, qreal, qreal, qreal] $ objT c_QRectF+  -- TODO mkConstMethod' "mapRectFromParent" "mapRectFromParent"+  --   [objT c_QRectF] $ objT c_QRectF+  -- TODO mkConstMethod' "mapRectFromParent" "mapRectFromParent"+  --   [qreal, qreal, qreal, qreal] $ objT c_QRectF+  -- TODO mkConstMethod' "mapRectFromScene" "mapRectFromScene"+  --   [objT c_QRectF] $ objT c_QRectF+  -- TODO mkConstMethod' "mapRectFromScene" "mapRectFromScene"+  --   [qreal, qreal, qreal, qreal] $ objT c_QRectF+  -- TODO mkConstMethod' "mapRectToItem" "mapRectToItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, objT c_QRectF] $ objT c_QRectF+  -- TODO mkConstMethod' "mapRectToItem" "mapRectToItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, qreal, qreal, qreal, qreal] $ objT c_QRectF+  -- TODO mkConstMethod' "mapRectToParent" "mapRectToParent"+  --   [objT c_QRectF] $ objT c_QRectF+  -- TODO mkConstMethod' "mapRectToParent" "mapRectToParent"+  --   [qreal, qreal, qreal, qreal] $ objT c_QRectF+  -- TODO mkConstMethod' "mapRectToScene" "mapRectToScene"+  --   [objT c_QRectF] $ objT c_QRectF+  -- TODO mkConstMethod' "mapRectToScene" "mapRectToScene"+  --   [qreal, qreal, qreal, qreal] $ objT c_QRectF+  -- TODO mkConstMethod' "mapToItem" "mapToItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, objT c_QPointF] $ objT c_QPointF+  -- TODO mkConstMethod' "mapToItem" "mapToItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, objT c_QRectF] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapToItem" "mapToItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, objT c_QPolygonF] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapToItem" "mapToItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, objT c_QPainterPath] $ objT c_QPainterPath+  -- TODO mkConstMethod' "mapToItem" "mapToItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, qreal, qreal, qreal, qreal] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapToItem" "mapToItem"+  --   [ptrT $ constT $ objT c_QGraphicsItem, qreal, qreal] $ objT c_QPointF+  -- TODO mkConstMethod' "mapToParent" "mapToParent"+  --   [objT c_QPointF] $ objT c_QPointF+  -- TODO mkConstMethod' "mapToParent" "mapToParent"+  --   [objT c_QRectF] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapToParent" "mapToParent"+  --   [objT c_QPolygonF] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapToParent" "mapToParent"+  --   [objT c_QPainterPath] $ objT c_QPainterPath+  -- TODO mkConstMethod' "mapToParent" "mapToParent"+  --   [qreal, qreal, qreal, qreal] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapToParent" "mapToParent"+  --   [qreal, qreal] $ objT c_QPointF+  -- TODO mkConstMethod' "mapToScene" "mapToScene"+  --   [objT c_QPointF] $ objT c_QPointF+  -- TODO mkConstMethod' "mapToScene" "mapToScene"+  --   [objT c_QRectF] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapToScene" "mapToScene"+  --   [objT c_QPolygonF] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapToScene" "mapToScene"+  --   [objT c_QPainterPath] $ objT c_QPainterPath+  -- TODO mkConstMethod' "mapToScene" "mapToScene"+  --   [qreal, qreal, qreal, qreal] $ objT c_QPolygonF+  -- TODO mkConstMethod' "mapToScene" "mapToScene"+  --   [qreal, qreal] $ objT c_QPointF+  , mkMethod "moveBy" [qreal, qreal] voidT+  , mkConstMethod "opacity" [] qreal+  , mkConstMethod "opaqueArea" [] $ objT c_QPainterPath+  -- TODO mkMethod "paint"+  --   [ptrT $ objT c_QPainter, ptrT $ constT $ objT c_QStyleOptionGraphicsItem] voidT+  -- TODO mkMethod' "paint" "paintAll"+  --   [ ptrT $ objT c_QPainter+  --   , ptrT $ constT $ objT c_QStyleOptionGraphicsItem+  --   , ptrT $ objT c_QWidget+  --   ] voidT+  , mkConstMethod "panel" [] $ ptrT $ objT c_QGraphicsItem+  -- TODO mkConstMethod "panelModality" [] $ objT c_PanelModality+  , mkConstMethod "parentItem" [] $ ptrT $ objT c_QGraphicsItem+  -- TODO mkConstMethod "parentObject" [] $ ptrT $ objT c_QGraphicsObject+  -- TODO mkConstMethod "parentWidget" [] $ ptrT $ objT c_QGraphicsWidget+  , mkConstMethod "pos" [] $ objT c_QPointF+  , mkMethod "removeSceneEventFilter" [ptrT $ objT c_QGraphicsItem] voidT+  , mkMethod "resetTransform" [] voidT+  , mkConstMethod "rotation" [] qreal+  , mkConstMethod "scale" [] qreal+  , mkConstMethod "scene" [] $ ptrT $ objT c_QGraphicsScene+  , mkConstMethod "sceneBoundingRect" [] $ objT c_QRectF+  , mkConstMethod "scenePos" [] $ objT c_QPointF+  -- TODO mkConstMethod "sceneTransform" [] $ objT c_QTransform+  , mkMethod "scroll" [qreal, qreal] voidT+  , mkMethod' "scroll" "scrollAll" [qreal, qreal, objT c_QRectF] voidT+  , mkMethod "setAcceptDrops" [boolT] voidT+  , mkMethod "setAcceptHoverEvents" [boolT] voidT+  , mkMethod "setAcceptTouchEvents" [boolT] voidT+  -- TODO mkMethod "setAcceptedMouseButtons" [objT c_Qt::MouseButtons] voidT+  , mkMethod "setActive" [boolT] voidT+  , mkMethod "setBoundingRegionGranularity" [qreal] voidT+  -- TODO mkMethod "setCacheMode" [objT c_CacheMode] voidT+  -- TODO mkMethod' "setCacheMode" "setCacheModeAll" [objT c_CacheMode, objT c_QSize] voidT+  -- TODO mkMethod "setCursor" [objT c_QCursor] voidT+  -- TODO mkMethod "setData" [intT, objT c_QVariant] voidT+  , mkMethod "setEnabled" [boolT] voidT+  , mkMethod "setFiltersChildEvents" [boolT] voidT+  -- TODO mkMethod "setFlag" [objT c_GraphicsItemFlag] voidT+  -- TODO mkMethod' "setFlag" "setFlagAll" [objT c_GraphicsItemFlag, boolT] voidT+  -- TODO mkMethod "setFlags" [objT c_GraphicsItemFlags] voidT+  , mkMethod "setFocus" [] voidT+ --  , mkMethod' "setFocus" "setFocusAll" [objT c_Qt::FocusReason] voidT+  , mkMethod "setFocusProxy" [ptrT $ objT c_QGraphicsItem] voidT+  -- TODO mkMethod "setGraphicsEffect" [ptrT $ objT c_QGraphicsEffect] voidT+  -- TODO mkMethod "setGroup" [ptrT $ objT c_QGraphicsItemGroup] voidT+  -- TODO mkMethod "setInputMethodHints" [objT c_Qt::InputMethodHints] voidT+  , mkMethod "setOpacity" [qreal] voidT+  -- TODO mkMethod "setPanelModality" [objT c_PanelModality] voidT+  , mkMethod "setParentItem" [ptrT $ objT c_QGraphicsItem] voidT+  , mkMethod' "setPos" "setPosPointF" [objT c_QPointF] voidT+  , mkMethod' "setPos" "setPosRaw" [qreal, qreal] voidT+  , mkMethod "setRotation" [qreal] voidT+  , mkMethod "setScale" [qreal] voidT+  , mkMethod "setSelected" [boolT] voidT+  , mkMethod "setToolTip" [objT c_QString] voidT+  -- TODO mkMethod "setTransform" [objT c_QTransform] voidT+  -- TODO mkMethod' "setTransform" "setTransformAll" [objT c_QTransform, boolT] voidT+  , mkMethod' "setTransformOriginPoint" "setTransformOriginPointF" [objT c_QPointF] voidT+  , mkMethod' "setTransformOriginPoint" "setTransformOriginPointRaw" [qreal, qreal] voidT+  -- TODO mkMethod "setTransformations" [objT c_QList<QGraphicsTransform] voidT+  , mkMethod "setVisible" [boolT] voidT+  , mkMethod "setX" [qreal] voidT+  , mkMethod "setY" [qreal] voidT+  , mkMethod "setZValue" [qreal] voidT+  , mkConstMethod "shape" [] $ objT c_QPainterPath+  , mkMethod "show" [] voidT+  , mkMethod "stackBefore" [ptrT $ constT $ objT c_QGraphicsItem] voidT+  -- TODO mkMethod' "toGraphicsObject" "toGraphicsObject" [] $+  --   ptrT $ objT c_QGraphicsObject+  -- TODO mkConstMethod' "toGraphicsObject" "toGraphicsObject" [] $+  --   ptrT $ constT $ objT c_QGraphicsObject+  , mkConstMethod "toolTip" [] $ objT c_QString+  , mkConstMethod "topLevelItem" [] $ ptrT $ objT c_QGraphicsItem+  -- TODO mkConstMethod "topLevelWidget" [] $ ptrT $ objT c_QGraphicsWidget+  -- TODO mkConstMethod "transform" [] $ objT c_QTransform+  , mkConstMethod "transformOriginPoint" [] $ objT c_QPointF+  -- TODO mkConstMethod "transformations" [] $ objT c_QList<QGraphicsTransform $ objT c_*>+  , mkConstMethod' "type" "itemType" [] intT+  , mkMethod "ungrabKeyboard" [] voidT+  , mkMethod "ungrabMouse" [] voidT+  , mkMethod "unsetCursor" [] voidT+  , mkMethod "update" [] voidT+  , mkMethod' "update" "updateRectF" [objT c_QRectF] voidT+  , mkMethod' "update" "updateRaw" [qreal, qreal, qreal, qreal] voidT+  -- TODO mkConstMethod "window" [] $ ptrT $ objT c_QGraphicsWidget+  , mkConstMethod "x" [] qreal+  , mkConstMethod "y" [] qreal+  , mkConstMethod "zValue" [] qreal+  ]++e_CacheMode =+  makeQtEnum (ident1 "QGraphicsItem" "CacheMode") [includeStd "QGraphicsItem"]+  [ (0, ["no","cache"])+  , (1, ["item","coordinate","cache"])+  , (2, ["device","coordinate","cache"])+  ]++e_GraphicsItemChange =+  makeQtEnum (ident1 "QGraphicsItem" "GraphicsItemChange") [includeStd "QGraphicsItem"]+  [ (3, ["item","enabled","change"])+  , (13, ["item","enabled","has","changed"])+  , (1, ["item","matrix","change"])+  , (0, ["item","position","change"])+  , (9, ["item","position","has","changed"])+  , (8, ["item","transform","change"])+  , (10, ["item","transform","has","changed"])+  , (28, ["item","rotation","change"])+  , (29, ["item","rotation","has","changed"])+  , (30, ["item","scale","change"])+  , (31, ["item","scale","has","changed"])+  , (32, ["item","transform","origin","point","change"])+  , (33, ["item","transform","origin","point","has","changed"])+  , (4, ["item","selected","change"])+  , (14, ["item","selected","has","changed"])+  , (2, ["item","visible","change"])+  , (12, ["item","visible","has","changed"])+  , (5, ["item","parent","change"])+  , (15, ["item","parent","has","changed"])+  , (6, ["item","child","added","change"])+  , (7, ["item","child","removed","change"])+  , (11, ["item","scene","change"])+  , (16, ["item","scene","has","changed"])+  , (17, ["item","cursor","change"])+  , (18, ["item","cursor","has","changed"])+  , (19, ["item","tool","tip","change"])+  , (20, ["item","tool","tip","has","changed"])+  , (21, ["item","flags","change"])+  , (22, ["item","flags","have","changed"])+  , (23, ["item","z","value","change"])+  , (24, ["item","z","value","has","changed"])+  , (25, ["item","opacity","change"])+  , (26, ["item","opacity","has","changed"])+  , (27, ["item","scene","position","has","changed"])+  ]++(e_GraphicsItemFlag, bs_GraphicsItemFlags) =+  makeQtEnumBitspace (ident1 "QGraphicsItem" "GraphicsItemFlag") "GraphicsItemFlags"+    [includeStd "QGraphicsItem"] $+  collect+  [ just $ (0x1, ["item","is","movable"])+  , just $ (0x2, ["item","is","selectable"])+  , just $ (0x4, ["item","is","focusable"])+  , just $ (0x8, ["item","clips","to","shape"])+  , just $ (0x10, ["item","clips","children","to","shape"])+  , just $ (0x20, ["item","ignores","transformations"])+  , just $ (0x40, ["item","ignores","parent","opacity"])+  , just $ (0x80, ["item","doesnt","propagate","opacity","to","children"])+  , just $ (0x100, ["item","stacks","behind","parent"])+  , just $ (0x200, ["item","uses","extended","style","option"])+  , just $ (0x400, ["item","has","no","contents"])+  , just $ (0x800, ["item","sends","geometry","changes"])+  , just $ (0x1000, ["item","accepts","input","method"])+  , just $ (0x2000, ["item","negative","z","stacks","behind","parent"])+  , just $ (0x4000, ["item","is","panel"])+  , just $ (0x10000, ["item","sends","scene","position","changes"])+  , test (qtVersion >= [5, 4]) $ (0x80000, ["item","contains","children","in","shape"])+  ]++e_PanelModality =+  makeQtEnum (ident1 "QGraphicsItem" "PanelModality") [includeStd "QGraphicsItem"]+  [ (0, ["non","modal"])+  , (1, ["panel","modal"])+  , (2, ["scene","modal"])+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsItem.hs-boot view
@@ -0,0 +1,24 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QGraphicsItem (+  c_QGraphicsItem,+  ) where++import Foreign.Hoppy.Generator.Spec (Class)++c_QGraphicsItem :: Class
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsPolygonItem.hs view
@@ -0,0 +1,51 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QGraphicsPolygonItem (+  aModule,+  c_QGraphicsPolygonItem,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  )+import Foreign.Hoppy.Generator.Types ()+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractGraphicsShapeItem+  (c_QAbstractGraphicsShapeItem)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Widgets", "QGraphicsPolygonItem"]+  [ QtExport $ ExportClass c_QGraphicsPolygonItem+  ]++c_QGraphicsPolygonItem =+  addReqIncludes [includeStd "QGraphicsPolygonItem"] $+  classSetEntityPrefix "" $+  makeClass (ident "QGraphicsPolygonItem") Nothing [c_QAbstractGraphicsShapeItem]+  [ mkCtor "new" []+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsRectItem.hs view
@@ -0,0 +1,58 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QGraphicsRectItem (+  aModule,+  c_QGraphicsRectItem,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkMethod',+  mkConstMethod,+  mkCtor,+  )+import Foreign.Hoppy.Generator.Types (voidT, objT)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal)+import Graphics.UI.Qtah.Generator.Interface.Core.QRectF (c_QRectF)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractGraphicsShapeItem+  (c_QAbstractGraphicsShapeItem)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Widgets", "QGraphicsRectItem"]+  [ QtExport $ ExportClass c_QGraphicsRectItem+  ]++c_QGraphicsRectItem =+  addReqIncludes [includeStd "QGraphicsRectItem"] $+  classSetEntityPrefix "" $+  makeClass (ident "QGraphicsRectItem") Nothing [c_QAbstractGraphicsShapeItem]+  [ mkCtor "new" []+  , mkCtor "newWithRaw" [qreal, qreal, qreal, qreal]+  , mkConstMethod "rect" [] $ objT c_QRectF+  , mkMethod' "setRect" "setRectRaw" [qreal, qreal, qreal, qreal] voidT+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsScene.hs view
@@ -0,0 +1,250 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QGraphicsScene (+  aModule,+  c_QGraphicsScene,+  e_ItemIndexMethod,+  e_SceneLayer,+  bs_SceneLayers,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass, ExportEnum, ExportBitspace),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkMethod,+  mkMethod',+  mkCtor,+  mkConstMethod,+  mkConstMethod',+  )+import Foreign.Hoppy.Generator.Types (voidT, objT, ptrT, intT, boolT, enumT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal)+import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent)+-- import Graphics.UI.Qtah.Generator.Interface.Core.QLineF (c_QLineF)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Graphics.UI.Qtah.Generator.Interface.Core.QPointF (c_QPointF)+import Graphics.UI.Qtah.Generator.Interface.Core.QRectF (c_QRectF)+-- 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.QPainterPath (c_QPainterPath)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPen (c_QPen)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPolygonF (c_QPolygonF)+import Graphics.UI.Qtah.Generator.Interface.Gui.QTransform (c_QTransform)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsEllipseItem (c_QGraphicsEllipseItem)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsItem (c_QGraphicsItem)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsPolygonItem (c_QGraphicsPolygonItem)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsRectItem (c_QGraphicsRectItem)+-- 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 =+  AQtModule $+  makeQtModule ["Widgets", "QGraphicsScene"] $+  (QtExport $ ExportClass c_QGraphicsScene) :+  map (QtExport . ExportEnum)+    [ e_ItemIndexMethod+    , e_SceneLayer+    ] +++  map (QtExport . ExportBitspace)+    [ bs_SceneLayers+    ]++-- Due to a parsing bug types of the form `T<S*>` were generated incorrectly.+c_QGraphicsScene =+  addReqIncludes [includeStd "QGraphicsScene"] $+  classSetEntityPrefix "" $+  makeClass (ident "QGraphicsScene") Nothing [c_QObject] $+  collect+  [ just $ mkCtor "new" []+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]+  , just $ mkCtor "newWithRect" [objT c_QRectF]+  , just $ mkCtor "newWithRaw" [qreal, qreal, qreal, qreal]+  , just $ mkConstMethod "activePanel" [] $ ptrT $ objT c_QGraphicsItem+  -- TODO mkConstMethod "activeWindow" [] $ ptrT $ objT c_QGraphicsWidget+  , just $ mkMethod' "addEllipse" "addEllipseRectF"+      [objT c_QRectF] $ ptrT $ objT c_QGraphicsEllipseItem+  , just $ mkMethod' "addEllipse" "addEllipseRectFAll"+      [objT c_QRectF, objT c_QPen, objT c_QBrush] $ ptrT $ objT c_QGraphicsEllipseItem+  , just $ mkMethod' "addEllipse" "addEllipseRaw"+      [qreal, qreal, qreal, qreal] $ ptrT $ objT c_QGraphicsEllipseItem+  , just $ mkMethod' "addEllipse" "addEllipseRawAll"+      [qreal, qreal, qreal, qreal, objT c_QPen, objT c_QBrush] $+        ptrT $ objT c_QGraphicsEllipseItem+  , just $ mkMethod "addItem" [ptrT $ objT c_QGraphicsItem] voidT+  -- TODO mkMethod' "addLine" "addLine" [objT c_QLineF] $+  --   ptrT $ objT c_QGraphicsLineItem+  -- TODO mkMethod' "addLine" "addLineAll" [objT c_QLineF, objT c_QPen] $+  --   ptrT $ objT c_QGraphicsLineItem+  -- TODO mkMethod' "addLine" "addLine" [qreal, qreal, qreal, qreal] $+  --   ptrT $ objT c_QGraphicsLineItem+  -- TODO mkMethod' "addLine" "addLineAll" [qreal, qreal, qreal, qreal, objT c_QPen] $+  --   ptrT $ objT c_QGraphicsLineItem+  -- TODO mkMethod "addPath" [objT c_QPainterPath] $ ptrT $ objT c_QGraphicsPathItem+  -- TODO mkMethod' "addPath" "addPathAll" [objT c_QPainterPath, objT c_QPen, objT c_QBrush] $+  --   ptrT $ objT c_QGraphicsPathItem+  -- TODO mkMethod "addPixmap" [objT c_QPixmap] $ ptrT $ objT c_QGraphicsPixmapItem+  , just $ mkMethod "addPolygon" [objT c_QPolygonF] $ ptrT $ objT c_QGraphicsPolygonItem+  , just $ mkMethod' "addPolygon" "addPolygonAll" [objT c_QPolygonF, objT c_QPen, objT c_QBrush] $+      ptrT $ objT c_QGraphicsPolygonItem+  , just $ mkMethod "addRect" [objT c_QRectF] $ ptrT $ objT c_QGraphicsRectItem+  , just $ mkMethod' "addRect" "addRectAll" [objT c_QRectF, objT c_QPen, objT c_QBrush] $+      ptrT $ objT c_QGraphicsRectItem+  , just $ mkMethod' "addRect" "addRectRaw" [qreal, qreal, qreal, qreal] $+      ptrT $ objT c_QGraphicsRectItem+  , just $ mkMethod' "addRect" "addRectRawAll"+      [qreal, qreal, qreal, qreal, objT c_QPen, objT c_QBrush] $+        ptrT $ objT c_QGraphicsRectItem+  -- TODO mkMethod "addSimpleText" [objT c_QString] $ ptrT $ objT c_QGraphicsSimpleTextItem+  -- TODO mkMethod' "addSimpleText" "addSimpleTextAll" [objT c_QString, objT c_QFont] $+  --   ptrT $ objT c_QGraphicsSimpleTextItem+  -- TODO mkMethod "addText" [objT c_QString] $ ptrT $ objT c_QGraphicsTextItem+  -- TODO mkMethod' "addText" "addTextAll" [objT c_QString, objT c_QFont] $+  --   ptrT $ objT c_QGraphicsTextItem+  -- TODO mkMethod "addWidget" [ptrT $ objT c_QWidget] $ ptrT $ objT c_QGraphicsProxyWidget+  -- TODO mkMethod' "addWidget" "addWidgetAll" [ptrT $ objT c_QWidget, bitspaceT bs_WindowFlags] $+  --   ptrT $ objT c_QGraphicsProxyWidget+  , just $ mkConstMethod "backgroundBrush" [] $ objT c_QBrush+  , just $ mkConstMethod "bspTreeDepth" [] intT+  , just $ mkMethod "clearFocus" [] voidT+  -- TODO mkConstMethod "collidingItems" [ptrT $ objT c_QGraphicsItem] $+  --   objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "collidingItems" "collidingItemsAll"+  --   [ptrT $ objT c_QGraphicsItem, objT c_Qt::ItemSelectionMode] $+  --     objT c_QList<QGraphicsItem $ objT c_*>+  -- 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 $ mkConstMethod "foregroundBrush" [] $ objT c_QBrush+  , just $ mkConstMethod "hasFocus" [] boolT+  , just $ mkConstMethod "height" [] qreal+  -- TODO mkConstMethod "inputMethodQuery" [objT c_Qt::InputMethodQuery] $ objT c_QVariant+  , just $ mkMethod "invalidate" [qreal, qreal, qreal, qreal] voidT+  -- TODO mkMethod' "invalidate" "invalidateAll"+  --   [qreal, qreal, qreal, qreal, objT c_SceneLayers] voidT+  , just $ mkConstMethod "isActive" [] boolT+  , just $ mkConstMethod' "itemAt" "itemAtPointF" [objT c_QPointF, objT c_QTransform] $+      ptrT $ objT c_QGraphicsItem+  , just $ mkConstMethod' "itemAt" "itemAtRaw" [qreal, qreal, objT c_QTransform] $+      ptrT $ objT c_QGraphicsItem+  -- TODO mkConstMethod "itemIndexMethod" [] $ objT c_ItemIndexMethod+  -- TODO mkConstMethod' "items" "items" [] $ objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "items" "itemsAll" [enumT e_SortOrder] $+  --   objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "items" "items" [objT c_QPointF] $+  --   objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "items" "itemsAll"+  --   [objT c_QPointF, objT c_Qt::ItemSelectionMode, objT c_Qt::SortOrder, objT c_QTransform] $+  --     objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "items" "items" [objT c_QRectF] $+  --   objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "items" "itemsAll"+  --   [objT c_QRectF, objT c_Qt::ItemSelectionMode, objT c_Qt::SortOrder, objT c_QTransform] $+  --     objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "items" "items" [objT c_QPolygonF] $+  --   objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "items" "itemsAll"+  --   [objT c_QPolygonF, objT c_Qt::ItemSelectionMode, objT c_Qt::SortOrder, objT c_QTransform] $+  --     objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "items" "items" [objT c_QPainterPath] $+  --   objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "items" "itemsAll"+  --   [objT c_QPainterPath, objT c_Qt::ItemSelectionMode+  --   , objT c_Qt::SortOrder, objT c_QTransform+  --   ] $ objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "items" "items"+  --   [qreal, qreal, qreal, qreal, objT c_Qt::ItemSelectionMode, objT c_Qt::SortOrder] $+  --     objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod' "items" "itemsAll"+  --   [ qreal, qreal, qreal, qreal, objT c_Qt::ItemSelectionMode+  --   , objT c_Qt::SortOrder, objT c_QTransform+  --   ] $ objT c_QList<QGraphicsItem $ objT c_*>+  , just $ mkConstMethod "itemsBoundingRect" [] $ objT c_QRectF+  , test (qtVersion >= [5, 4]) $ mkConstMethod "minimumRenderSize" [] qreal+  , just $ mkConstMethod "mouseGrabberItem" [] $ ptrT $ objT c_QGraphicsItem+  -- TODO mkConstMethod "palette" [] $ objT c_QPalette+  , just $ mkMethod "removeItem" [ptrT $ objT c_QGraphicsItem] voidT+  -- TODO mkMethod "render" [ptrT $ objT c_QPainter] voidT+  -- TODO mkMethod' "render" "renderAll"+  --   [ptrT $ objT c_QPainter, objT c_QRectF, objT c_QRectF, enumT e_AspectRatioMode] voidT+  , just $ mkConstMethod "sceneRect" [] $ objT c_QRectF+  -- TODO mkConstMethod "selectedItems" [] $ objT c_QList<QGraphicsItem $ objT c_*>+  , just $ mkConstMethod "selectionArea" [] $ objT c_QPainterPath+  , just $ mkMethod "sendEvent" [ptrT $ objT c_QGraphicsItem, ptrT $ objT c_QEvent] boolT+  , just $ mkMethod "setActivePanel" [ptrT $ objT c_QGraphicsItem] voidT+  -- TODO mkMethod "setActiveWindow" [ptrT $ objT c_QGraphicsWidget] voidT+  , just $ mkMethod "setBackgroundBrush" [objT c_QBrush] voidT+  , just $ mkMethod "setBspTreeDepth" [intT] voidT+  , just $ mkMethod "setFocus" [] voidT+  , just $ mkMethod' "setFocus" "setFocusAll" [enumT e_FocusReason] voidT+  , 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+  -- TODO mkMethod "setPalette" [objT c_QPalette] voidT+  , just $ mkMethod "setSceneRect" [objT c_QRectF] voidT+  , just $ mkMethod' "setSceneRect" "setSceneRectRaw" [qreal, qreal, qreal, qreal] voidT+  , test (qtVersion >= [5, 5]) $ mkMethod' "setSelectionArea" "setSelectionAreaTransform"+      [objT c_QPainterPath, objT c_QTransform] voidT+  , test (qtVersion >= [5, 5]) $ mkMethod "setSelectionArea" [objT c_QPainterPath] voidT+  -- TODO mkMethod' "setSelectionArea" "setSelectionAreaAll"+  --   [objT c_QPainterPath, objT c_Qt::ItemSelectionMode, objT c_QTransform] voidT+  -- TODO mkMethod' "setSelectionArea" "setSelectionArea"+  --   [objT c_QPainterPath, objT c_Qt::ItemSelectionOperation] voidT+  -- TODO mkMethod' "setSelectionArea" "setSelectionAreaAll"+  --   [ objT c_QPainterPath, objT c_Qt::ItemSelectionOperation+  --   , objT c_Qt::ItemSelectionMode, objT c_QTransform+  --   ] voidT+  , just $ mkMethod "setStickyFocus" [boolT] voidT+  -- TODO mkMethod "setStyle" [ptrT $ objT c_QStyle] voidT+  , just $ mkConstMethod "stickyFocus" [] boolT+  -- TODO mkConstMethod "style" [] $ ptrT $ objT c_QStyle+  , just $ mkMethod "update" [qreal, qreal, qreal, qreal] voidT+  -- TODO mkConstMethod "views" [] $ objT c_QList<QGraphicsView $ objT c_*>+  , just $ mkConstMethod "width" [] qreal+  ]++e_ItemIndexMethod =+  makeQtEnum (ident1 "QGraphicsScene" "ItemIndexMethod")+    [includeStd "QGraphicsScene"]+  [ (0, ["bsp","tree","index"])+  , (-1, ["no","index"])+  ]++(e_SceneLayer, bs_SceneLayers) =+  makeQtEnumBitspace (ident1 "QGraphicsView" "SceneLayer") "SceneLayers"+    [includeStd "QGraphicsView"]+  [ (0x1, ["item","layer"])+  , (0x2, ["background","layer"])+  , (0x4, ["foreground","layer"])+  , (0xffff, ["all","layers"])+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsScene.hs-boot view
@@ -0,0 +1,24 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QGraphicsScene (+  c_QGraphicsScene,+  ) where++import Foreign.Hoppy.Generator.Spec (Class)++c_QGraphicsScene :: Class
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsSceneEvent.hs view
@@ -0,0 +1,50 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QGraphicsSceneEvent (+  aModule,+  c_QGraphicsSceneEvent,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  )+import Foreign.Hoppy.Generator.Types (objT, ptrT)+import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent)+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 =+  AQtModule $+  makeQtModule ["Widgets", "QGraphicsSceneEvent"]+  [ QtExportEvent c_QGraphicsSceneEvent+  ]++c_QGraphicsSceneEvent =+  addReqIncludes [includeStd "QGraphicsSceneEvent"] $+  classSetEntityPrefix "" $+  makeClass (ident "QGraphicsSceneEvent") Nothing [c_QEvent] $+  [ mkConstMethod "widget" [] $ ptrT $ objT c_QWidget+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsSceneMouseEvent.hs view
@@ -0,0 +1,79 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QGraphicsSceneMouseEvent (+  aModule,+  c_QGraphicsSceneMouseEvent,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  )+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Foreign.Hoppy.Generator.Types (bitspaceT, enumT, objT)+import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint)+import Graphics.UI.Qtah.Generator.Interface.Core.QPointF (c_QPointF)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (+  bs_KeyboardModifiers,+  e_MouseButton,+  bs_MouseButtons,+  bs_MouseEventFlags,+  bs_KeyboardModifiers,+  e_MouseEventSource,+  e_MouseEventFlag_minVersion,+  e_MouseEventSource_minVersion,+  )+import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsSceneEvent (c_QGraphicsSceneEvent)+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", "QGraphicsSceneMouseEvent"]+  [ QtExportEvent c_QGraphicsSceneMouseEvent+  ]++c_QGraphicsSceneMouseEvent =+  addReqIncludes [includeStd "QGraphicsSceneMouseEvent"] $+  classSetEntityPrefix "" $+  makeClass (ident "QGraphicsSceneMouseEvent") Nothing [c_QGraphicsSceneEvent] $+  collect+  [ just $ mkConstMethod "button" [] $ enumT e_MouseButton+  , just $ mkConstMethod "buttonDownPos" [enumT e_MouseButton] $ objT c_QPointF+  , just $ mkConstMethod "buttonDownScenePos" [enumT e_MouseButton] $ objT c_QPointF+  , just $ mkConstMethod "buttonDownScreenPos" [enumT e_MouseButton] $ objT c_QPoint+  , just $ mkConstMethod "buttons" [] $ bitspaceT bs_MouseButtons+  , test (qtVersion >= e_MouseEventFlag_minVersion) $ mkConstMethod "flags" [] $+      bitspaceT bs_MouseEventFlags+  , just $ mkConstMethod "lastPos" [] $ objT c_QPointF+  , just $ mkConstMethod "lastScenePos" [] $ objT c_QPointF+  , just $ mkConstMethod "lastScreenPos" [] $ objT c_QPoint+  , just $ mkConstMethod "modifiers" [] $ bitspaceT bs_KeyboardModifiers+  , just $ mkConstMethod "pos" [] $ objT c_QPointF+  , just $ mkConstMethod "scenePos" [] $ objT c_QPointF+  , just $ mkConstMethod "screenPos" [] $ objT c_QPoint+  , test (qtVersion >= e_MouseEventSource_minVersion) $ mkConstMethod "source" [] $+      enumT e_MouseEventSource+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsSceneWheelEvent.hs view
@@ -0,0 +1,62 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QGraphicsSceneWheelEvent (+  aModule,+  c_QGraphicsSceneWheelEvent,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  )+import Foreign.Hoppy.Generator.Types (bitspaceT, enumT, intT, objT)+import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint)+import Graphics.UI.Qtah.Generator.Interface.Core.QPointF (c_QPointF)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (+  bs_KeyboardModifiers,+  bs_MouseButtons,+  e_Orientation,+  )+import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsSceneEvent (c_QGraphicsSceneEvent)+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", "QGraphicsSceneWheelEvent"]+  [ QtExportEvent c_QGraphicsSceneWheelEvent+  ]++c_QGraphicsSceneWheelEvent =+  addReqIncludes [includeStd "QGraphicsSceneWheelEvent"] $+  classSetEntityPrefix "" $+  makeClass (ident "QGraphicsSceneWheelEvent") Nothing [c_QGraphicsSceneEvent]+  [ mkConstMethod "buttons" [] $ bitspaceT bs_MouseButtons+  , mkConstMethod "delta" [] intT+  , mkConstMethod "modifiers" [] $ bitspaceT bs_KeyboardModifiers+  , mkConstMethod "orientation" [] $ enumT e_Orientation+  , mkConstMethod "pos" [] $ objT c_QPointF+  , mkConstMethod "scenePos" [] $ objT c_QPointF+  , mkConstMethod "screenPos" [] $ objT c_QPoint+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsView.hs view
@@ -0,0 +1,262 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QGraphicsView (+  aModule,+  c_QGraphicsView,+  e_DragMode,+  e_ViewportAnchor,+  e_ViewportUpdateMode,+  e_OptimizationFlag,+  e_CacheModeFlag,+  bs_CacheMode,+  bs_OptimizationFlags+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass, ExportEnum, ExportBitspace),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkMethod,+  mkMethod',+  mkConstMethod,+  mkConstMethod',+  mkCtor+  )+import Foreign.Hoppy.Generator.Types (+  objT,+  constT,+  ptrT,+  intT,+  voidT,+  enumT,+  boolT,+  bitspaceT,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.Types hiding (aModule)+import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint)+import Graphics.UI.Qtah.Generator.Interface.Core.QPointF (c_QPointF)+import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)+import Graphics.UI.Qtah.Generator.Interface.Core.QRectF (c_QRectF)+import Graphics.UI.Qtah.Generator.Interface.Gui.QBrush (c_QBrush)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPainter (c_QPainter, e_RenderHint, bs_RenderHints)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPolygon (c_QPolygon)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPolygonF (c_QPolygonF)+import Graphics.UI.Qtah.Generator.Interface.Gui.QTransform (c_QTransform)+-- import Graphics.UI.Qtah.Generator.Interface.Gui.QPainter+import Graphics.UI.Qtah.Generator.Interface.Gui.QPainterPath (c_QPainterPath)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractScrollArea (c_QAbstractScrollArea)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsItem (c_QGraphicsItem)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsScene (c_QGraphicsScene)+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 =+  AQtModule $+  makeQtModule ["Widgets", "QGraphicsView"] $+  (QtExport $ ExportClass c_QGraphicsView) :+  map (QtExport . ExportEnum)+    [ e_CacheModeFlag+    , e_DragMode+    , e_OptimizationFlag+    , e_ViewportAnchor+    , e_ViewportUpdateMode+    ] +++  map (QtExport . ExportBitspace)+    [ bs_CacheMode+    , bs_OptimizationFlags+    ]++c_QGraphicsView =+  addReqIncludes [includeStd "QGraphicsView"] $+  classSetEntityPrefix "" $+  makeClass (ident "QGraphicsView") Nothing [c_QAbstractScrollArea]+  [ mkCtor "new" []+  , mkCtor "newWithScene" [ptrT $ objT c_QGraphicsScene]+  , mkCtor "newWithParent" [ptrT $ objT c_QWidget]+  , mkCtor "newWithSceneAndParent" [ptrT $ objT c_QGraphicsScene, ptrT $ objT c_QWidget]+  , mkConstMethod "alignment" [] $ bitspaceT bs_Alignment+  , mkConstMethod "backgroundBrush" [] $ objT c_QBrush+  , mkConstMethod "cacheMode" [] $ bitspaceT bs_CacheMode+  , mkMethod' "centerOn" "centerOnPointF" [objT c_QPointF] voidT+  , mkMethod' "centerOn" "centerOnRaw" [qreal, qreal] voidT+  , mkMethod' "centerOn" "centerOnItem" [ptrT $ constT $ objT c_QGraphicsItem] voidT+  , mkConstMethod "dragMode" [] $ enumT e_DragMode+  , mkMethod' "ensureVisible" "ensureVisibleRectF" [objT c_QRectF] voidT+  , mkMethod' "ensureVisible" "ensureVisibleRaw"+      [qreal, qreal, qreal, qreal] voidT+  , mkMethod' "ensureVisible" "ensureVisibleItem"+      [ptrT $ constT $ objT c_QGraphicsItem] voidT+  , mkMethod' "ensureVisible" "ensureVisibleRectFAll"+      [objT c_QRectF, intT, intT] voidT+  , mkMethod' "ensureVisible" "ensureVisibleRawAll"+      [qreal, qreal, qreal, qreal, intT, intT] voidT+  , mkMethod' "ensureVisible" "ensureVisibleItemAll"+      [ptrT $ constT $ objT c_QGraphicsItem, intT, intT] voidT+  , mkMethod' "fitInView" "fitInViewRectF" [objT c_QRectF] voidT+  , mkMethod' "fitInView" "fitInViewRect" [qreal, qreal, qreal, qreal] voidT+  , mkMethod' "fitInView" "fitInViewItem" [ptrT $ constT $ objT c_QGraphicsItem] voidT+  , mkMethod' "fitInView" "fitInViewRectFAll" [objT c_QRectF, enumT e_AspectRatioMode] voidT+  , mkMethod' "fitInView" "fitInViewRectAll"+      [qreal, qreal, qreal, qreal, enumT e_AspectRatioMode] voidT+  , mkMethod' "fitInView" "fitInViewItemAll"+      [ptrT $ constT $ objT c_QGraphicsItem, enumT e_AspectRatioMode] voidT+  , mkConstMethod "foregroundBrush" [] $ objT c_QBrush+  , mkConstMethod "isInteractive" [] boolT+  , mkConstMethod "isTransformed" [] boolT+  , mkConstMethod' "itemAt" "itemAtPoint" [objT c_QPoint] $ ptrT $ objT c_QGraphicsItem+  , mkConstMethod' "itemAt" "itemAtRaw" [intT, intT] $ ptrT $ objT c_QGraphicsItem+  -- TODO mkConstMethod "items" [] $ objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod "items" [objT c_QPoint] $ objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod "items" [intT, intT] $ objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod "items" [intT, intT, intT, intT, objT c_Qt::ItemSelectionMode] $+  --   objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod "items" [objT c_QRect, objT c_Qt::ItemSelectionMode] $+  --   objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod "items" [objT c_QPolygon, objT c_Qt::ItemSelectionMode] $+  --   objT c_QList<QGraphicsItem $ objT c_*>+  -- TODO mkConstMethod "items" [objT c_QPainterPath, objT c_Qt::ItemSelectionMode] $+  --   objT c_QList<QGraphicsItem $ objT c_*>+  , mkConstMethod' "mapFromScene" "mapFromScenePointF"+      [objT c_QPointF] $ objT c_QPoint+  , mkConstMethod' "mapFromScene" "mapFromSceneRectF"+      [objT c_QRectF] $ objT c_QPolygon+  , mkConstMethod' "mapFromScene" "mapFromScenePolygonF"+      [objT c_QPolygonF] $ objT c_QPolygon+  , mkConstMethod' "mapFromScene" "mapFromScenePainterPath"+      [objT c_QPainterPath] $ objT c_QPainterPath+  , mkConstMethod' "mapFromScene" "mapFromScenePointFRaw"+      [qreal, qreal] $ objT c_QPoint+  , mkConstMethod' "mapFromScene" "mapFromSceneRectFRaw"+      [qreal, qreal, qreal, qreal] $ objT c_QPolygon+  , mkConstMethod' "mapToScene" "mapToScenePoint"+      [objT c_QPoint] $ objT c_QPointF+  , mkConstMethod' "mapToScene" "mapToSceneRect"+      [objT c_QRect] $ objT c_QPolygonF+  , mkConstMethod' "mapToScene" "mapToScenePolygon"+      [objT c_QPolygon] $ objT c_QPolygonF+  , mkConstMethod' "mapToScene" "mapToScenePainterPath"+      [objT c_QPainterPath] $ objT c_QPainterPath+  , mkConstMethod' "mapToScene" "mapToScenePointRaw"+      [intT, intT] $ objT c_QPointF+  , mkConstMethod' "mapToScene" "mapToSceneRectRaw"+      [intT, intT, intT, intT] $ objT c_QPolygonF+  -- TODO mkConstMethod "matrix" [] $ objT c_QMatrix+  , mkConstMethod "optimizationFlags" [] $ bitspaceT bs_OptimizationFlags+  , mkMethod "render" [ptrT $ objT c_QPainter] voidT+  , mkMethod' "render" "renderAll"+      [ptrT $ objT c_QPainter, objT c_QRectF, objT c_QRect, enumT e_AspectRatioMode] voidT+  , mkConstMethod "renderHints" [] $ bitspaceT bs_RenderHints+  , mkMethod "resetCachedContent" [] voidT+  , mkMethod "resetMatrix" [] voidT+  , mkMethod "resetTransform" [] voidT+  , mkConstMethod "resizeAnchor" [] $ enumT e_ViewportAnchor+  , mkMethod "rotate" [qreal] voidT+  -- TODO mkConstMethod "rubberBandSelectionMode" [] $ objT c_Qt::ItemSelectionMode+  , mkMethod "scale" [qreal, qreal] voidT+  , mkConstMethod "scene" [] $ ptrT $ objT c_QGraphicsScene+  , mkConstMethod "sceneRect" [] $ objT c_QRectF+  , mkMethod "setAlignment" [bitspaceT bs_Alignment] voidT+  , mkMethod "setBackgroundBrush" [objT c_QBrush] voidT+  , mkMethod "setCacheMode" [bitspaceT bs_CacheMode] voidT+  , mkMethod "setDragMode" [enumT e_DragMode] voidT+  , mkMethod "setForegroundBrush" [objT c_QBrush] voidT+  , mkMethod "setInteractive" [boolT] voidT+  -- TODO mkMethod "setMatrix" [objT c_QMatrix] voidT+  -- TODO mkMethod' "setMatrix" "setMatrixAll" [objT c_QMatrix, boolT] voidT+  , mkMethod "setOptimizationFlag" [enumT e_OptimizationFlag] voidT+  , mkMethod' "setOptimizationFlag" "setOptimizationFlagAll" [enumT e_OptimizationFlag, boolT] voidT+  , mkMethod "setOptimizationFlags" [bitspaceT bs_OptimizationFlags] voidT+  , mkMethod "setRenderHint" [enumT e_RenderHint] voidT+  , mkMethod' "setRenderHint" "setRenderHintAll" [enumT e_RenderHint, boolT] voidT+  , mkMethod "setRenderHints" [bitspaceT bs_RenderHints] voidT+  , mkMethod "setResizeAnchor" [enumT e_ViewportAnchor] voidT+  -- TODO mkMethod "setRubberBandSelectionMode" [objT c_Qt::ItemSelectionMode] voidT+  , mkMethod "setScene" [ptrT $ objT c_QGraphicsScene] voidT+  , mkMethod' "setSceneRect" "setSceneRectF" [objT c_QRectF] voidT+  , mkMethod' "setSceneRect" "setSceneRectRaw" [qreal, qreal, qreal, qreal] voidT+  , mkMethod "setTransform" [objT c_QTransform] voidT+  , mkMethod' "setTransform" "setTransformAll" [objT c_QTransform, boolT] voidT+  , mkMethod "setTransformationAnchor" [enumT e_ViewportAnchor] voidT+  , mkMethod "setViewportUpdateMode" [enumT e_ViewportUpdateMode] voidT+  , mkMethod "shear" [qreal, qreal] voidT+  , mkConstMethod "transform" [] $ objT c_QTransform+  , mkConstMethod "transformationAnchor" [] $ enumT e_ViewportAnchor+  , mkMethod "translate" [qreal, qreal] voidT+  , mkConstMethod "viewportTransform" [] $ objT c_QTransform+  ]++(e_CacheModeFlag, bs_CacheMode) =+  makeQtEnumBitspace (ident1 "QGraphicsView" "CacheModeFlag") "CacheMode"+    [includeStd "QGraphicsView"]+  [ (0x0, ["cache","none"])+  , (0x1, ["cache","background"])+  ]++e_DragMode =+  makeQtEnum (ident1 "QGraphicsView" "DragMode") [includeStd "QGraphicsView"]+  [ (0, ["no", "drag"])+  , (1, ["scroll", "hand", "drag"])+  , (2, ["rubber", "band", "drag"])+  ]++(e_OptimizationFlag, bs_OptimizationFlags) =+  makeQtEnumBitspace (ident1 "QGraphicsView" "OptimizationFlag") "OptimizationFlags"+    [includeStd "QGraphicsView"]+  [ (0x1, ["dont","clip","painter"])+  , (0x2, ["dont","save","painter","state"])+  , (0x4, ["dont","adjust","for","antialiasing"])+  , (0x8, ["indirect","painting"])+  ]++e_ViewportAnchor =+  makeQtEnum (ident1 "QGraphicsView" "ViewportAnchor")+    [includeStd "QGraphicsView"]+  [ (0, ["no", "anchor"])+  , (1, ["anchor", "view", "center"])+  , (2, ["anchor", "under", "mouse"])+  ]++e_ViewportUpdateMode =+  makeQtEnum (ident1 "QGraphicsView" "ViewportUpdateMode")+    [includeStd "QGraphicsView"]+  [ (0, ["full","viewport","update"])+  , (1, ["minimal","viewport","update"])+  , (2, ["smart","viewport","update"])+  , (4, ["bounding","rect","viewport","update"])+  , (3, ["no","viewport","update"])+  ]++-- Methods with optional arguments that weren't handled properly in the bindings above+-- (i.e. `foo` + `fooAll`).+{-+QList<QGraphicsItem *>  items+  (int x, int y, int w, int h, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const+QList<QGraphicsItem *>  items+  (const QRect & rect, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const+QList<QGraphicsItem *>  items+  (const QPolygon & polygon, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const+QList<QGraphicsItem *>  items+  (const QPainterPath & path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const+-}
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGridLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,7 +36,7 @@   mkProp,   ) import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+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.QObject (c_QObject)
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLayout.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QLineEdit.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QListView.hs view
@@ -0,0 +1,48 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QListView (+  aModule,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  )+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 =+  AQtModule $+  makeQtModule ["Widgets", "QListView"]+  [ QtExport $ ExportClass c_QListView ]++c_QListView =+  addReqIncludes [includeStd "QListView"] $+  classSetEntityPrefix "" $+  makeClass (ident "QListView") Nothing [c_QAbstractItemView]+  [ mkCtor "new" []+    -- TODO+  ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMainWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QMenu.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QMenuBar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,7 +35,7 @@   mkProp,   ) import Foreign.Hoppy.Generator.Types (enumT, objT, ptrT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (wsWince) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMessageBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QOpenGLWidget.hs view
@@ -0,0 +1,87 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2017 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.QOpenGLWidget (+  aModule,+  c_QOpenGLWidget,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Export (ExportClass, ExportEnum),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod,+  mkProp,+  )+import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, 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.Types (bs_WindowFlags, gluint)+import Graphics.UI.Qtah.Generator.Interface.Gui.QImage (c_QImage)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++minVersion = [5, 4]++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Widgets", "QOpenGLWidget"] minVersion $+  [ QtExport $ ExportClass c_QOpenGLWidget ] +++  map QtExportSignal signals +++  collect+  [ test (qtVersion >= [5, 5]) $ QtExport $ ExportEnum e_UpdateBehavior ]++c_QOpenGLWidget =+  addReqIncludes [includeStd "QOpenGLWidget"] $+  classSetEntityPrefix "" $+  makeClass (ident "QOpenGLWidget") Nothing [c_QWidget] $+  collect+  [ just $ mkCtor "new" []+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QOpenGLWidget]+  , just $ mkCtor "newWithParentAndFlags" [ptrT $ objT c_QOpenGLWidget, bitspaceT bs_WindowFlags]+    -- TODO mkConstMethod "context" [] $ ptrT $ objT c_QOpenGLContext+  , just $ mkConstMethod "defaultFramebufferObject" [] gluint+  , just $ mkMethod "doneCurrent" [] voidT+    -- TODO mkProp "format" $ objT c_QSurfaceFormat+  , just $ mkMethod "grabFramebuffer" [] $ objT c_QImage+  , just $ mkConstMethod "isValid" [] boolT+  , just $ mkMethod "makeCurrent" [] voidT+  , test (qtVersion >= [5, 5]) $ mkProp "updateBehavior" $ enumT e_UpdateBehavior+  ]++signals =+  [ makeSignal c_QOpenGLWidget "aboutToCompose" c_Listener+  , makeSignal c_QOpenGLWidget "aboutToResize" c_Listener+  , makeSignal c_QOpenGLWidget "frameSwapped" c_Listener+  , makeSignal c_QOpenGLWidget "resized" c_Listener+  ]++e_UpdateBehavior =+  makeQtEnum (ident1 "QOpenGLWidget" "UpdateBehavior") [includeStd "QOpenGLWidget"]+  [ (0, ["no", "partial", "update"])+  , (1, ["partial", "update"])+  ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QProgressBar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QRadioButton.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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.QScrollBar (   aModule,+  c_QScrollBar   ) where  import Foreign.Hoppy.Generator.Spec (
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSizePolicy.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,7 +41,7 @@   classAddFeatures,   ) import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Orientations) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSlider.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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@@ -32,7 +32,7 @@   mkMethod',   ) import Foreign.Hoppy.Generator.Types (enumT, intT, objT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayoutItem (c_QLayoutItem) import Graphics.UI.Qtah.Generator.Interface.Widgets.QSizePolicy (c_QSizePolicy, e_Policy)
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSpinBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,7 +33,7 @@   mkProp,   ) import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+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.Internal.Listener (
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSplitter.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QTabWidget.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QTextEdit.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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/QVBoxLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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,7 +36,7 @@   mkStaticMethod,   ) import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, voidT)-import Graphics.UI.Qtah.Generator.Flag (collect, just, test)+import Foreign.Hoppy.Generator.Version (collect, just, test) import Graphics.UI.Qtah.Generator.Flags (keypadNavigation, qdoc, qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QMargins (c_QMargins) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)@@ -52,6 +52,7 @@   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.Widgets.QAction (c_QAction) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayout (c_QLayout)@@ -90,7 +91,7 @@     -- TODO childrenRegion   , just $ mkMethod "clearFocus" [] voidT   , just $ mkMethod "clearMask" [] voidT-  , just $ mkMethod "close" [] voidT+  , just $ mkMethod "close" [] boolT   , just $ mkConstMethod "contentsMargins" [] $ objT c_QMargins   , just $ mkConstMethod "contentsRect" [] $ objT c_QRect     -- TODO contextMenuPolicy@@ -101,6 +102,7 @@     -- TODO focusPolicy   , 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
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QWidget.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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@@ -115,7 +115,13 @@ import Graphics.UI.Qtah.Generator.Flags (Version, qrealFloat, qtVersion) import Graphics.UI.Qtah.Generator.Common (fromMaybeM) import Graphics.UI.Qtah.Generator.Types (-  QtExport (QtExport, QtExportEvent, QtExportFnRenamed, QtExportSignal, QtExportSpecials),+  QtExport (QtExport,+            QtExportEvent,+            QtExportSceneEvent,+            QtExportFnRenamed,+            QtExportSignal,+            QtExportSpecials+           ),   Signal,   qtExportToExport,   signalClass,@@ -255,6 +261,25 @@     saysLn [classDecodeReexportName, " :: ", prettyPrint decodeFnType]     saysLn [classDecodeReexportName, " = QtahFHR.decode QtahP.. ", toHsCastMethodName' Const cls] +handleEventKind :: [String] -> String -> Class -> Generator ()+handleEventKind path eventKind cls = do+  let typeName = toHsDataTypeName' Nonconst cls+  addImports $ hsImport1 "Prelude" "($)"+  ln+  saysLn ["instance Qtah", eventKind, ".", eventKind, " ", typeName, " where"]+  indent $ do+    saysLn ["on", eventKind, " receiver' handler' = Qtah", eventKind,+              ".onAny", eventKind, " receiver' $ \\_ qevent' ->"]+    indent $+      if path == ["Core", "QEvent"]+      then sayLn "handler' qevent'"+      else do+        addImports $ mconcat [hsImport1 "Prelude" "(==)",+                              importForPrelude,+                              importForRuntime]+        saysLn ["let event' = ", classDownCastReexportName, " qevent'"]+        sayLn "in if event' == QtahFHR.nullptr then QtahP.return QtahP.False else handler' event'"+ sayQtExport :: [String] -> QtExport -> Generator () sayQtExport path qtExport = case qtExport of   QtExport (ExportVariable v) -> do@@ -288,22 +313,15 @@   QtExportEvent cls -> do     sayExportClass cls -    let typeName = toHsDataTypeName' Nonconst cls-    addImports $ mconcat [hsImport1 "Prelude" "($)",-                          importForEvent]-    ln-    saysLn ["instance QtahEvent.Event ", typeName, " where"]-    indent $ do-      sayLn "onEvent receiver' handler' = QtahEvent.onAnyEvent receiver' $ \\_ qevent' ->"-      indent $-        if path == ["Core", "QEvent"]-        then sayLn "handler' qevent'"-        else do-          addImports $ mconcat [hsImport1 "Prelude" "(==)",-                                importForPrelude,-                                importForRuntime]-          saysLn ["let event' = ", classDownCastReexportName, " qevent'"]-          sayLn "in if event' == QtahFHR.nullptr then QtahP.return QtahP.False else handler' event'"+    addImports $ mconcat [importForEvent, importForSceneEvent]+    handleEventKind path "Event" cls+    handleEventKind path "SceneEvent" cls++  QtExportSceneEvent cls -> do+    sayExportClass cls++    addImports importForSceneEvent+    handleEventKind path "SceneEvent" cls    QtExportSpecials -> do     -- Generate a type synonym for qreal.
src/Graphics/UI/Qtah/Generator/Types.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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@@ -52,6 +52,7 @@   | QtExportFnRenamed Function String   | QtExportSignal Signal   | QtExportEvent Class+  | QtExportSceneEvent Class   | QtExportSpecials     -- ^ This is a special value that is exported exactly once, and generates     -- some bindings that need special logic.@@ -62,6 +63,7 @@   QtExportFnRenamed fn _ -> Just $ ExportFn fn   QtExportSignal {} -> Nothing   QtExportEvent cls -> Just $ ExportClass cls+  QtExportSceneEvent cls -> Just $ ExportClass cls   QtExportSpecials -> Nothing  -- | Creates a 'CppEnum' whose 'ExtName' is the concatenation of all part of its
src/Main.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2016 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2017 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