packages feed

qtah-generator 0.5.0 → 0.6.0

raw patch · 263 files changed

+13508/−4995 lines, 263 filesdep +bytestringdep ~basedep ~containersdep ~hoppy-generatorsetup-changedPVP ok

version bump matches the API change (PVP)

Dependencies added: bytestring

Dependency ranges changed: base, containers, hoppy-generator, hoppy-std, mtl

API changes (from Hackage documentation)

Files

Setup.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,15 +1,15 @@ name: qtah-generator-version: 0.5.0+version: 0.6.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-2018 The Qtah Authors.+copyright: Copyright 2015-2019 The Qtah Authors. category: Graphics build-type: Custom-cabal-version: >=1.10+cabal-version: 1.20 description:   Qtah is a set of Qt bindings for Haskell.  This package is a Hoppy FFI   generator.  You shouldn't need it directly; rather, qtah-cpp and qtah use it@@ -37,60 +37,126 @@  executable qtah-generator   build-depends:-      base >=4 && <5-    , containers >=0.5 && <0.6+      base >=4.8 && <5+    , bytestring >=0.10 && <0.11+    , containers >=0.5 && <0.7     , directory >=1.2 && <1.4     , filepath >=1.3 && <1.5-    , hoppy-generator >=0.5 && <0.6-    , hoppy-std >=0.5 && <0.6+    , hoppy-generator >=0.7 && <0.8+    , hoppy-std >=0.7 && <0.8     , haskell-src >=1.0 && <1.1-    , mtl >=2.1 && <2.3+    , mtl >=2.2.1 && <2.3     , process >=1.2 && <1.7     , transformers >=0.3 && <0.6   hs-source-dirs: src   main-is: Main.hs   other-modules:       Graphics.UI.Qtah.Generator.Common+    , Graphics.UI.Qtah.Generator.Config+    , Graphics.UI.Qtah.Generator.Enum     , Graphics.UI.Qtah.Generator.Flags     , Graphics.UI.Qtah.Generator.Interface.Core+    , Graphics.UI.Qtah.Generator.Interface.Core.QAbstractAnimation     , 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.QAnimationGroup+    , Graphics.UI.Qtah.Generator.Interface.Core.QBuffer     , Graphics.UI.Qtah.Generator.Interface.Core.QByteArray     , Graphics.UI.Qtah.Generator.Interface.Core.QChar     , Graphics.UI.Qtah.Generator.Interface.Core.QChildEvent     , Graphics.UI.Qtah.Generator.Interface.Core.QCoreApplication+    , Graphics.UI.Qtah.Generator.Interface.Core.QCryptographicHash     , Graphics.UI.Qtah.Generator.Interface.Core.QDate+    , Graphics.UI.Qtah.Generator.Interface.Core.QDateTime+    , Graphics.UI.Qtah.Generator.Interface.Core.QDebug+    , Graphics.UI.Qtah.Generator.Interface.Core.QDebugStateSaver     , Graphics.UI.Qtah.Generator.Interface.Core.QDir+    , Graphics.UI.Qtah.Generator.Interface.Core.QDirIterator     , Graphics.UI.Qtah.Generator.Interface.Core.QEvent+    , Graphics.UI.Qtah.Generator.Interface.Core.QFile+    , Graphics.UI.Qtah.Generator.Interface.Core.QFileDevice+    , Graphics.UI.Qtah.Generator.Interface.Core.QFileInfo+    , Graphics.UI.Qtah.Generator.Interface.Core.QFileSelector+    , Graphics.UI.Qtah.Generator.Interface.Core.QFileSystemWatcher+    , Graphics.UI.Qtah.Generator.Interface.Core.QIODevice     , 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.QLatin1Char+    , Graphics.UI.Qtah.Generator.Interface.Core.QLatin1String+    , Graphics.UI.Qtah.Generator.Interface.Core.QLibrary+    , Graphics.UI.Qtah.Generator.Interface.Core.QLibraryInfo     , Graphics.UI.Qtah.Generator.Interface.Core.QList+    , Graphics.UI.Qtah.Generator.Interface.Core.QLockFile+    , Graphics.UI.Qtah.Generator.Interface.Core.QLoggingCategory     , Graphics.UI.Qtah.Generator.Interface.Core.QMargins     , Graphics.UI.Qtah.Generator.Interface.Core.QMarginsF+    , Graphics.UI.Qtah.Generator.Interface.Core.QMessageAuthenticationCode+    , Graphics.UI.Qtah.Generator.Interface.Core.QMessageLogContext+    , Graphics.UI.Qtah.Generator.Interface.Core.QMessageLogger+    , Graphics.UI.Qtah.Generator.Interface.Core.QMetaClassInfo+    , Graphics.UI.Qtah.Generator.Interface.Core.QMetaEnum+    , Graphics.UI.Qtah.Generator.Interface.Core.QMetaMethod+    , Graphics.UI.Qtah.Generator.Interface.Core.QMetaObject+    , Graphics.UI.Qtah.Generator.Interface.Core.QMetaObject.Connection+    , Graphics.UI.Qtah.Generator.Interface.Core.QMetaProperty     , Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex     , Graphics.UI.Qtah.Generator.Interface.Core.QObject+    , Graphics.UI.Qtah.Generator.Interface.Core.QOperatingSystemVersion+    , Graphics.UI.Qtah.Generator.Interface.Core.QPair+    , Graphics.UI.Qtah.Generator.Interface.Core.QPalette+    , Graphics.UI.Qtah.Generator.Interface.Core.QParallelAnimationGroup+    , Graphics.UI.Qtah.Generator.Interface.Core.QPauseAnimation     , Graphics.UI.Qtah.Generator.Interface.Core.QPersistentModelIndex+    , Graphics.UI.Qtah.Generator.Interface.Core.QPluginLoader     , Graphics.UI.Qtah.Generator.Interface.Core.QPoint     , Graphics.UI.Qtah.Generator.Interface.Core.QPointF+    , Graphics.UI.Qtah.Generator.Interface.Core.QProcess+    , Graphics.UI.Qtah.Generator.Interface.Core.QProcessEnvironment+    , Graphics.UI.Qtah.Generator.Interface.Core.QPropertyAnimation+    , Graphics.UI.Qtah.Generator.Interface.Core.QRandomGenerator+    , Graphics.UI.Qtah.Generator.Interface.Core.QRandomGenerator64     , Graphics.UI.Qtah.Generator.Interface.Core.QRect     , Graphics.UI.Qtah.Generator.Interface.Core.QRectF+    , Graphics.UI.Qtah.Generator.Interface.Core.QResource+    , Graphics.UI.Qtah.Generator.Interface.Core.QSaveFile+    , Graphics.UI.Qtah.Generator.Interface.Core.QSequentialAnimationGroup     , Graphics.UI.Qtah.Generator.Interface.Core.QSettings     , Graphics.UI.Qtah.Generator.Interface.Core.QSize     , Graphics.UI.Qtah.Generator.Interface.Core.QSizeF+    , Graphics.UI.Qtah.Generator.Interface.Core.QStandardPaths+    , Graphics.UI.Qtah.Generator.Interface.Core.QStaticPlugin     , 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.QSysInfo     , Graphics.UI.Qtah.Generator.Interface.Core.QTextCodec+    , Graphics.UI.Qtah.Generator.Interface.Core.QTextDecoder+    , Graphics.UI.Qtah.Generator.Interface.Core.QTextEncoder+    , Graphics.UI.Qtah.Generator.Interface.Core.QThread+    , Graphics.UI.Qtah.Generator.Interface.Core.QTime+    , Graphics.UI.Qtah.Generator.Interface.Core.QTimeZone     , Graphics.UI.Qtah.Generator.Interface.Core.QTimer     , Graphics.UI.Qtah.Generator.Interface.Core.QTimerEvent+    , Graphics.UI.Qtah.Generator.Interface.Core.QTranslator     , Graphics.UI.Qtah.Generator.Interface.Core.QVariant+    , Graphics.UI.Qtah.Generator.Interface.Core.QVariantAnimation     , Graphics.UI.Qtah.Generator.Interface.Core.QVector-    , Graphics.UI.Qtah.Generator.Interface.Core.QPalette+    , Graphics.UI.Qtah.Generator.Interface.Core.QVersionNumber+    , Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamAttribute+    , Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamAttributes+    , Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamEntityDeclaration+    , Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamEntityResolver+    , Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamNamespaceDeclaration+    , Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamNotationDeclaration+    , Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamReader+    , Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamWriter     , 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.QBackingStore+    , Graphics.UI.Qtah.Generator.Interface.Gui.QBitmap     , Graphics.UI.Qtah.Generator.Interface.Gui.QBrush     , Graphics.UI.Qtah.Generator.Interface.Gui.QClipboard     , Graphics.UI.Qtah.Generator.Interface.Gui.QCloseEvent@@ -101,6 +167,8 @@     , 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.QFontDatabase+    , Graphics.UI.Qtah.Generator.Interface.Gui.QGradient     , Graphics.UI.Qtah.Generator.Interface.Gui.QHideEvent     , Graphics.UI.Qtah.Generator.Interface.Gui.QHoverEvent     , Graphics.UI.Qtah.Generator.Interface.Gui.QIcon@@ -150,6 +218,7 @@     , Graphics.UI.Qtah.Generator.Interface.Widgets.QBoxLayout     , Graphics.UI.Qtah.Generator.Interface.Widgets.QButtonGroup     , Graphics.UI.Qtah.Generator.Interface.Widgets.QCheckBox+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QComboBox     , Graphics.UI.Qtah.Generator.Interface.Widgets.QDateEdit     , Graphics.UI.Qtah.Generator.Interface.Widgets.QDateTimeEdit     , Graphics.UI.Qtah.Generator.Interface.Widgets.QDial@@ -162,6 +231,7 @@     , 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.QGraphicsPixmapItem     , Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsPolygonItem     , Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsRectItem     , Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsScene@@ -206,12 +276,15 @@     , Graphics.UI.Qtah.Generator.Interface.Widgets.QToolButton     , Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeView     , Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidget+    , Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidgetItem     , Graphics.UI.Qtah.Generator.Interface.Widgets.QVBoxLayout     , Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget     , Graphics.UI.Qtah.Generator.Module     , Graphics.UI.Qtah.Generator.Types   ghc-options: -W -fwarn-incomplete-patterns -fwarn-unused-do-bind   default-language: Haskell2010+  default-extensions:+      ScopedTypeVariables  custom-setup   setup-depends:
qtah-listener-gen view
@@ -2,7 +2,7 @@  # This file is part of Qtah. #-# Copyright 2015-2018 The Qtah Authors.+# Copyright 2015-2019 The Qtah Authors. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by@@ -77,13 +77,19 @@      # Keep the includes in the C++ section up-to-date with the types used here.     $fn Bool "bool"+    $fn Direction "QAbstractAnimation::Direction"     $fn DockWidgetArea "Qt::DockWidgetArea"     $fn DockWidgetAreas "Qt::DockWidgetAreas"     $fn Double "double"     $fn Int "int"     $fn IntBool "int|bool"+    $fn IntExitStatus "int|QProcess::ExitStatus"     $fn IntInt "int|int"+    $fn IntQlonglong "int|qlonglong"     $fn Orientation "Qt::Orientation"+    $fn OrientationIntInt "Qt::Orientation|int|int"+    $fn ProcessError "QProcess::ProcessError"+    $fn ProcessState "QProcess::ProcessState"     $fn PtrQAbstractButton "QAbstractButton*"     $fn PtrQAbstractButtonBool "QAbstractButton*|bool"     $fn PtrQAbstractItemModel "QAbstractItemModel*"@@ -93,6 +99,7 @@     $fn PtrQTreeWidgetItemInt "QTreeWidgetItem*|int"     $fn PtrQTreeWidgetItemPtrQTreeWidgetItem "QTreeWidgetItem*|QTreeWidgetItem*"     $fn PtrQWidgetPtrQWidget "QWidget*|QWidget*"+    $fn QAbstractAnimation "QAbstractAnimation*"     $fn QAbstractSliderAction "QAbstractSlider::SliderAction"     $fn QClipboardMode "QClipboard::Mode"     $fn QDate "QDate"@@ -103,14 +110,19 @@     $fn QModelIndexQModelIndex "QModelIndex|QModelIndex"     $fn QModelIndexQModelIndexQVectorInt "QModelIndex|QModelIndex|QVector<int>"     $fn QPoint "QPoint"-    $fn Qreal "qreal"     $fn QSize "QSize"     $fn QString "QString"     $fn QSystemTrayIconActivationReason "QSystemTrayIcon::ActivationReason"     $fn QWindowVisibility "QWindow::Visibility" 0x050000 '[5, 0]'+    $fn Qlonglong "qlonglong"+    $fn Qreal "qreal"     $fn RefConstQIcon "const QIcon&"     $fn RefConstQItemSelectionRefConstQItemSelection "const QItemSelection&|const QItemSelection&"+    $fn RefConstQListQModelIndex "const QList<QModelIndex>&"+    $fn RefConstQModelIndex "const QModelIndex&"+    $fn RefConstQVariant "const QVariant&"     $fn ScreenOrientation "Qt::ScreenOrientation" 0x050000 '[5, 0]'+    $fn StateState "QAbstractAnimation::State|QAbstractAnimation::State"     $fn ToolBarAreas "Qt::ToolBarAreas"     $fn ToolButtonStyle "Qt::ToolButtonStyle"     $fn WindowModality "Qt::WindowModality"@@ -133,9 +145,7 @@     sayHpp '#ifndef QTAH_LISTENERS_HPP'     sayHpp '#define QTAH_LISTENERS_HPP'     sayHpp-    sayHpp '#include <string>'-    sayHpp '#include <Qt>'-    sayHpp '#include <QtGlobal>'+    sayHpp '#include <QAbstractAnimation>'     sayHpp '#include <QAbstractButton>'     sayHpp '#include <QAbstractSlider>'     sayHpp '#include <QAction>'@@ -143,14 +153,20 @@     sayHpp '#include <QDockWidget>'     sayHpp '#include <QIcon>'     sayHpp '#include <QItemSelection>'+    sayHpp '#include <QMetaObject>'     sayHpp '#include <QModelIndex>'     sayHpp '#include <QObject>'     sayHpp '#include <QPoint>'+    sayHpp '#include <QProcess>'     sayHpp '#include <QSize>'     sayHpp '#include <QSystemTrayIcon>'     sayHpp '#include <QTreeWidgetItem>'+    sayHpp '#include <QVariant>'     sayHpp '#include <QVector>'     sayHpp '#include <QWidget>'+    sayHpp '#include <Qt>'+    sayHpp '#include <QtGlobal>'+    sayHpp '#include <string>'     sayHpp '#if QT_VERSION >= 0x050000'     sayHpp '#include <QWindow>'     sayHpp '#endif'@@ -192,15 +208,17 @@         sayHpp         sayHpp "public:"         sayHpp "    typedef ${callbackClassName} callback;"-        sayHpp "    ${className}(callback f, QObject* parent = 0);"-        sayHpp "    bool connectListener(QObject* source, const std::string& signal);"         sayHpp+        sayHpp "    ${className}(QObject* source, const std::string& signal, callback f);"+        sayHpp "    ~${className}();"+        sayHpp "    bool isValid() const;"+        sayHpp         sayHpp "public slots:"         sayHpp "    void invoke(${paramList});"         sayHpp         sayHpp "private:"         sayHpp "    callback f_;"-        sayHpp "    bool connected_;"+        sayHpp "    QMetaObject::Connection connection_;"         sayHpp "};"         if [[ -n $minVersion ]]; then             sayHpp@@ -212,21 +230,19 @@             sayCpp "#if QT_VERSION >= ${minVersion}"         fi         sayCpp-        sayCpp "${className}::${className}(${className}::callback f, QObject* parent) :"-        sayCpp "    QObject(parent), f_(f), connected_(false) {}"+        sayCpp "${className}::${className}(QObject* source, const std::string& signal, ${className}::callback f) :"+        sayCpp "    QObject(source), f_(f) {"+        sayCpp "    connection_ = connect(source, signal.c_str(), this, SLOT(invoke(${paramTypeList})));"+        sayCpp "}"         sayCpp-        sayCpp "bool ${className}::connectListener(QObject* source, const std::string& signal) {"-        sayCpp "    if (connected_) {"-        sayCpp "        std::cerr <<"-        sayCpp "            \"${className}::connectListener: Internal error, already connected.  \""-        sayCpp "            \"Not connecting again.\\n\" << std::flush;"-        sayCpp "        return false;"-        sayCpp "    }"-        sayCpp "    setParent(source);"-        sayCpp "    connected_ = connect(source, signal.c_str(), SLOT(invoke(${paramTypeList})));"-        sayCpp "    return connected_;"+        sayCpp "${className}::~${className}() {"+        sayCpp "    QObject::disconnect(connection_);"         sayCpp "}"         sayCpp+        sayCpp "bool ${className}::isValid() const {"+        sayCpp "    return static_cast<bool>(connection_);"+        sayCpp "}"+        sayCpp         sayCpp "void ${className}::invoke(${paramList}) {"         sayCpp "    f_(${paramNameList});"         sayCpp "}"@@ -256,14 +272,15 @@     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'-    say 'import qualified Graphics.UI.Qtah.Generator.Module as M'+    say 'import qualified Foreign.Hoppy.Generator.Types as T'+    say 'import qualified Foreign.Hoppy.Generator.Version as V'+    say 'import qualified Graphics.UI.Qtah.Generator.Config as Config'     say 'import qualified Graphics.UI.Qtah.Generator.Interface.Core.QObject as QObject'     say 'import qualified Graphics.UI.Qtah.Generator.Interface.Internal.Callback as C'+    say 'import qualified Graphics.UI.Qtah.Generator.Module as M'+    say 'import qualified Graphics.UI.Qtah.Generator.Types as U'     say     say '{-# ANN module "HLint: ignore Use camelCase" #-}' @@ -272,16 +289,17 @@         local -r className="Listener${name}"         local -r classVar="c_${className}"         local -r callbackVar="cb_${name}Void"+        local -r listenerVar="listener${name}"          say         say "${classVar} ="         say "  S.makeClass (S.ident \"${className}\") Nothing [QObject.c_QObject]"-        say "  [ S.mkCtor \"new\" [S.callbackT C.${callbackVar}]"-        say "  , S.mkCtor \"newWithParent\""-        say "    [S.callbackT C.${callbackVar}, S.ptrT \$ S.objT QObject.c_QObject]"-        say "  , S.mkMethod \"connectListener\""-        say "    [S.ptrT \$ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT"+        say "  [ S.mkCtor \"new\""+        say "    [T.ptrT \$ T.objT QObject.c_QObject, T.objT String.c_string, T.callbackT C.${callbackVar}]"+        say "  , S.mkConstMethod \"isValid\" S.np T.boolT"         say "  ]"+        say+        say "${listenerVar} = U.ListenerInfo ${classVar} C.${callbackVar}"     }     forEachListener writeHs @@ -301,9 +319,9 @@         local -r classVar="c_${className}"          if [[ -n $minVersion ]]; then-            say "      ${cont} V.test (F.qtVersion >= ${minVersion}) \$ S.ExportClass ${classVar}"+            say "      ${cont} V.test (Config.qtVersion >= ${minVersion}) \$ S.Export ${classVar}"         else-            say "      ${cont} V.just \$ S.ExportClass ${classVar}"+            say "      ${cont} V.just \$ S.Export ${classVar}"         fi         if [[ $cont = '[' ]]; then cont=','; fi     }@@ -325,14 +343,17 @@     say 'module Graphics.UI.Qtah.Generator.Interface.Internal.Listener where'     say     say 'import Foreign.Hoppy.Generator.Spec (Class)'+    say 'import Graphics.UI.Qtah.Generator.Types (ListenerInfo)'     say      writeHs() {         local -r name="${1?}"         local -r className="Listener${name}"         local -r classVar="c_${className}"+        local -r listenerVar="listener${name}"          say "${classVar} :: Class"+        say "${listenerVar} :: ListenerInfo"     }     forEachListener writeHs 
src/Graphics/UI/Qtah/Generator/Common.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,27 +15,21 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- -- | General routines. module Graphics.UI.Qtah.Generator.Common (   splitOn,+  butLast,+  replaceLast,   fromMaybeM,   maybeFail,   firstM,-  writeFileIfDifferent,+  lowerFirst,   ) where -#if !MIN_VERSION_base(4,8,0)-import Control.Applicative ((<$>))-#endif-import Control.Exception (evaluate)-import Control.Monad (when) import Control.Monad.Trans.Maybe (MaybeT (MaybeT), runMaybeT)+import Data.Char (toLower) import Data.Foldable (asum) import Data.List (findIndex)-import System.Directory (doesFileExist)-import System.IO (IOMode (ReadMode), hGetContents, withFile)  -- | Splits a list at elements for which a predicate returns true.  The matching -- elements themselves are dropped.@@ -50,6 +44,18 @@ splitOn :: Eq a => a -> [a] -> [[a]] splitOn x = splitWhen (== x) +-- | Drops the last item from the list, if non-empty.+butLast :: [a] -> [a]+butLast [] = []+butLast xs = take (length xs - 1) xs++-- | Replaces the last element in a list, if the list is non-empty.  Returns the+-- empty list when given it.+replaceLast :: a -> [a] -> [a]+replaceLast _ [] = []+replaceLast y [_] = [y]+replaceLast y (x:xs) = x:replaceLast y xs+ -- | @fromMaybeM m x = maybe m return x@ fromMaybeM :: Monad m => m a -> Maybe a -> m a fromMaybeM = flip maybe return@@ -63,18 +69,7 @@ firstM :: (Functor m, Monad m) => [m (Maybe a)] -> m (Maybe a) firstM = runMaybeT . asum . map MaybeT --- | If the file specified does not exist or its contents does not match the--- given string, then this writes the string to the file.-writeFileIfDifferent :: FilePath -> String -> IO ()-writeFileIfDifferent path newContents = do-  exists <- doesFileExist path-  -- We need to read the file strictly, otherwise lazy IO might try to write the-  -- file while it's still open and locked for reading.-  doWrite <- if exists-             then (newContents /=) <$> readStrictly-             else return True-  when doWrite $ writeFile path newContents-  where readStrictly = withFile path ReadMode $ \handle -> do-            contents <- hGetContents handle-            _ <- evaluate $ length contents-            return contents+-- | Lower cases the first character of a string, if nonempty.+lowerFirst :: String -> String+lowerFirst "" = ""+lowerFirst (c:cs) = toLower c : cs
+ src/Graphics/UI/Qtah/Generator/Config.hs view
@@ -0,0 +1,230 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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/>.++-- | Haskell definitions for preprocessor flags that Qt uses for conditional+-- compilation.+--+-- A list of flags enabled on your system can be obtained with:+--+-- > gcc -dM -E $(pkg-config --cflags QtCore) /usr/include/qt4/Qt/qconfig.h | grep '#define QT'+--+-- Using @qglobal.h@ and @#define Q@ provides additional defintions,+-- e.g. version and windowing system information.+module Graphics.UI.Qtah.Generator.Config (+  Version,+  qtVersion,+  qmakeExecutable,+  qmakeArguments,+  keypadNavigation,+  qdoc,+  qrealFloat,+  wsWince,+  ) where++import Control.Monad (unless)+import Data.Char (isDigit, isSpace)+import Data.List (intercalate, isPrefixOf)+import Graphics.UI.Qtah.Generator.Common (firstM, fromMaybeM, splitOn)+import System.Directory (findExecutable)+import System.Environment (lookupEnv)+import System.Exit (ExitCode (ExitSuccess))+import System.IO.Unsafe (unsafePerformIO)+import System.Process (readProcessWithExitCode)++-- | A type synonym for Qt version specifications.  These are just lists of+-- integers, of length two.  Examples are @[4, 8]@ and @[5, 0]@ to denote+-- versions 4.8 and 5.0 respectively.  A third component may be used in the+-- future, if necessary.+type Version = [Int]++showVersion :: Version -> String+showVersion = intercalate "." . map show++-- | An internal record of Qt configuration info.+data QtConfig = QtConfig+  { configVersion :: Version+  , configQmakeExecutable :: FilePath+  , configQmakeArguments :: [String]+  }++-- | This is initialized at program startup with the version of Qt that the+-- generator will work with, along with the corresponding QMake binary and+-- arguments necessary to invoke it.  The Qt version which functions and types+-- are made available in the API.+--+-- The Qt version determined the following method:+--+-- * If @QTAH_QT=x.y@ is in the environment, then this value will be used.+--+-- * Otherwise, if @QTAH_QT=x@ is in the environment, then we query @qmake+-- -qt=$QTAH_QT -version@ for the version of Qt to use.+--+-- * Otherwise, we query @qmake -version@ for the version of Qt to use.  Setting+-- @QT_SELECT@ in the environment can select a major version of Qt to use.+--+-- For more information on @qmake -qt@ and @QT_SELECT@, see @man qtchooser@.+qtConfig :: QtConfig+{-# NOINLINE qtConfig #-}+qtConfig = unsafePerformIO readQt++qtVersion :: Version+qtVersion = configVersion qtConfig++qmakeExecutable :: FilePath+qmakeExecutable = configQmakeExecutable qtConfig++qmakeArguments :: [String]+qmakeArguments = configQmakeArguments qtConfig++-- If this ever gets made a proper flag, then QEvent::EnterEditFocus and+-- QEvent::LeaveEditFocus should get added, conditional on it.+keypadNavigation :: Bool+keypadNavigation = False++qdoc :: Bool+qdoc = False++-- | Whether Qt was configured with qreal=float instead of double.+qrealFloat :: Bool+{-# NOINLINE qrealFloat #-}+qrealFloat = unsafePerformIO $ readBool "QTAH_QREAL_FLOAT" False++wsWince :: Bool+wsWince = False++-- | Reads a Qt version from the environment variable @QTAH_QT@, and looks up a+-- qmake binary.+readQt :: IO QtConfig+readQt = do+  maybeStr <- (\x -> case x of+                 Just "" -> Nothing+                 _ -> x) <$>+              lookupEnv "QTAH_QT"+  case maybeStr of+    Just str -> do+      let strs = splitOn '.' str+      unless (length strs `elem` [1, 2] && all (\n -> not (null n) && all isDigit n) strs) $+        fail $ concat+        ["qtah-generator requires QTAH_QT=x or QTAH_QT=x.y, can't parse value ", show str, "."]+      let version = map (read :: String -> Int) strs+      case version of+        [x] -> queryQmake $ Just x+        [x, y] -> do+          config <- queryQmake $ Just x+          case configVersion config of+            foundVersion@(x':y':_) | x /= x' || y /= y' ->+              fail $ "qtah-generator: Mismatch between requested and installed " +++              "Qt versions.  Requested " ++ showVersion version ++ ", found " +++              showVersion foundVersion ++ "."+            _ -> return ()+          return config+        _ -> fail $ concat+             ["qtah-generator: Internal error, incorrect parsing of QTAH_QT value ", show str, "."]+    Nothing -> queryQmake Nothing++  where -- | When we don't have a preferred qmake version, then we'll search for+        -- qmake's executables, first unqualified, then qualified by version+        -- number in decreasing order.+        allQmakeExecutableNames :: [String]+        allQmakeExecutableNames = ["qmake", "qmake-qt5", "qmake-qt4"]++        -- | When we /do/ have a prefered qmake version, then try the qualified+        -- version name first, falling back to the generic qmake executable if+        -- possible.+        qmakeExecutableNamesForVersion :: Int -> [String]+        qmakeExecutableNamesForVersion major = ["qmake-qt" ++ show major, "qmake"]++        queryQmake :: Maybe Int -> IO QtConfig+        queryQmake maybePreferredMajorVersion =+          case maybePreferredMajorVersion of+            Nothing ->+              -- No major version preference, so take whatever Qt is available.+              queryQmake' allQmakeExecutableNames []+            Just preferredMajorVersion -> do+              -- Even though we have a preferred major version, we don't want to+              -- run "qmake -qt=X -version" initially because we might be on a+              -- system (NixOS) where qtchooser isn't available and the only+              -- qmake available *is* the desired version (in NixOS's case, the+              -- binary is called "qmake", not "qmake-qtX").  Only pass "-qt=X"+              -- if we get the wrong default version.+              let executableNames = qmakeExecutableNamesForVersion preferredMajorVersion+              defaultConfig <- queryQmake' executableNames []+              case configVersion defaultConfig of+                (x:_) | x == preferredMajorVersion -> return defaultConfig+                _ -> queryQmake' executableNames ["-qt=" ++ show preferredMajorVersion]++        queryQmake' :: [String] -> [String] -> IO QtConfig+        queryQmake' executableNames extraArgs = do+          qmakePath <- findQMake executableNames+          let args = extraArgs ++ ["-version"]+          (exitCode, out, err) <- readProcessWithExitCode qmakePath args ""+          let qmakeDebugWords =+                ["  Ran ", show (qmakePath : args), ".\nStdout:\n", out, "\nStderr:\n", err]+          unless (exitCode == ExitSuccess) $+            fail $ concat $ "qtah-generator: qmake returned non-zero exit code." : qmakeDebugWords++          let versionLinePrefix = "Using Qt version "++              maybeVersionStrs = do+                versionLine <- expectSingle $+                               filter (versionLinePrefix `isPrefixOf`) $+                               lines out+                let str = takeWhile (not . isSpace) $ drop (length versionLinePrefix) versionLine+                    strs = take 2 $ splitOn '.' str+                if length strs == 2 && all (\n -> not (null n) && all isDigit n) strs+                  then Just strs+                  else Nothing++          case maybeVersionStrs of+            Just strs ->+              return QtConfig+              { configVersion = map (read :: String -> Int) strs+              , configQmakeExecutable = qmakePath+              , configQmakeArguments = extraArgs+              }+            Nothing ->+              fail $ concat $+              "qtah-generator: Can't parse Qt version from qmake output." : qmakeDebugWords++        expectSingle :: [a] -> Maybe a+        expectSingle [x] = Just x+        expectSingle _ = Nothing++-- | Reads a boolean value from the program's environment.  If the variable is+-- set and non-empty, then if must be one of the strings @true@ or @false@.  An+-- empty or unset value is treated as the provided default value.+readBool :: String -> Bool -> IO Bool+readBool name defaultValue = do+  maybeStr <- lookupEnv name+  case maybeStr of+    Nothing -> return defaultValue+    Just str -> case str of+      "" -> return defaultValue+      "true" -> return True+      "false" -> return False+      s -> fail $ concat+           ["qtah-generator: Expected a boolean value for ", name,+            " (true/false).  Got ", show s, "."]++findQMake :: [String] -> IO FilePath+findQMake executableNames = lookupEnv "QTAH_QMAKE" >>= fromMaybeM findBinary+  where findBinary =+          firstM (map findExecutable executableNames) >>=+          fromMaybeM+          (fail $ "qtah-generator: Can't find qmake named any of " +++           show executableNames ++ ".  Please ensure qmake is installed " +++           "and set QTAH_QMAKE to qmake's path.")
src/Graphics/UI/Qtah/Generator/Empty.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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/Enum.hs view
@@ -0,0 +1,71 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.Enum (installEnumCalculator) where++import qualified Data.ByteString.Lazy as B+import Data.Maybe (isJust)+import Foreign.Hoppy.Generator.Hook (+  EnumEvaluator,+  enumEvaluatorArgsKeepOutputsOnFailure,+  hookEvaluateEnums,+  interpretOutputToEvaluateEnums,+  makeCppSourceToEvaluateEnums,+  )+import Foreign.Hoppy.Generator.Spec (Interface, interfaceModifyHooks)+import Foreign.Hoppy.Generator.Util (withTempDirectory)+import Graphics.UI.Qtah.Generator.Config (+  qmakeArguments,+  qmakeExecutable,+  )+import System.Directory (withCurrentDirectory)+import System.FilePath ((</>))+import System.IO (hPutStrLn, stderr)+import System.Process (callProcess, readProcess)++installEnumCalculator :: Interface -> Interface+installEnumCalculator = interfaceModifyHooks $ \hooks ->+  hooks { hookEvaluateEnums = calculateEnumValues }++calculateEnumValues :: EnumEvaluator+calculateEnumValues args =+  withTempDirectory "qtahenum" removeBuildFailures $ \dir ->+  withCurrentDirectory dir $ do+  let sourceFile = "qtahenum.cpp"+      qmakeFile = "qtahenum.pro"+  B.writeFile sourceFile $ makeCppSourceToEvaluateEnums args+  writeFile qmakeFile $+    unlines+    [ "# This file is generated by qtah-generator."+    , ""+    , "QT += core gui"+    , "greaterThan(QT_MAJOR_VERSION, 4): QT += widgets"+    , "TARGET = qtahenum"+    , "SOURCES += " ++ sourceFile+    ]+  callProcess qmakeExecutable $ qmakeArguments ++ [qmakeFile]+  -- TODO This should read from a QTAH_MAKE environment variable:+  callProcess "make" []+  out <- readProcess ("." </> "qtahenum") [] ""+  result <- case interpretOutputToEvaluateEnums args out of+    Left err -> do hPutStrLn stderr err+                   return Nothing+    Right values -> return $ Just values+  let remove = False && (isJust result || removeBuildFailures)+  return (remove, result)++  where removeBuildFailures = not $ enumEvaluatorArgsKeepOutputsOnFailure args
src/Graphics/UI/Qtah/Generator/Flags.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,214 +15,397 @@ -- 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/>. --- | Haskell definitions for preprocessor flags that Qt uses for conditional--- compilation.------ A list of flags enabled on your system can be obtained with:------ > gcc -dM -E $(pkg-config --cflags QtCore) /usr/include/qt4/Qt/qconfig.h | grep '#define QT'------ Using @qglobal.h@ and @#define Q@ provides additional defintions,--- e.g. version and windowing system information. module Graphics.UI.Qtah.Generator.Flags (-  Version,-  qtVersion,-  qmakeExecutable,-  qmakeArguments,-  keypadNavigation,-  qdoc,-  qrealFloat,-  wsWince,+  -- * Data type+  Flags, flagsT,+  -- * Construction+  makeFlags,+  -- * Properties+  flagsExtName,+  flagsIdentifier,+  flagsEnum,+  flagsReqs,+  flagsAddendum,+  -- * Haskell generator+  -- ** Names+  toHsFlagsTypeName',+  toHsFlagsTypeclassName',+  toHsFlagsBindingName,+  toHsFlagsBindingName',   ) where -import Control.Monad (unless)-import Data.Char (isDigit, isSpace)-import Data.List (intercalate, isPrefixOf)-import Graphics.UI.Qtah.Generator.Common (firstM, fromMaybeM, splitOn)-import System.Directory (findExecutable)-import System.Environment (lookupEnv)-import System.Exit (ExitCode (ExitSuccess))-import System.IO.Unsafe (unsafePerformIO)-import System.Process (readProcessWithExitCode)+import Control.Monad (forM_, when)+import Control.Monad.Except (throwError)+import qualified Data.Map as M+import qualified Foreign.Hoppy.Generator.Language.Cpp as LC+import qualified Foreign.Hoppy.Generator.Language.Haskell as LH+import Foreign.Hoppy.Generator.Spec (+  Addendum,+  Constness (Nonconst),+  ConversionMethod (CustomConversion),+  ConversionSpec,+  Exportable,+  ExtName,+  ForeignLanguage (Haskell),+  HasAddendum,+  HasExtNames,+  HasReqs,+  Identifier,+  Reqs,+  Type,+  conversionSpecCppConversionFromCppExpr,+  conversionSpecCppConversionToCppExpr,+  conversionSpecCppConversionType,+  conversionSpecHaskell,+  conversionSpecHaskellHsArgType,+  evaluatedEnumType,+  evaluatedEnumValueMap,+  getAddendum,+  getPrimaryExtName,+  getReqs,+  hsImport1,+  hsImports,+  identifierParts,+  idPartBase,+  makeConversionSpec,+  makeConversionSpecCpp,+  makeConversionSpecHaskell,+  makeIdentifier,+  makeIdPart,+  modifyAddendum,+  modifyReqs,+  sayExportCpp,+  sayExportHaskell,+  setAddendum,+  setReqs,+  toExtName,+  )+import qualified Foreign.Hoppy.Generator.Spec.Enum as Enum+import Foreign.Hoppy.Generator.Types (manualT)+import Graphics.UI.Qtah.Generator.Common (lowerFirst, replaceLast)+import Graphics.UI.Qtah.Generator.Interface.Imports (+  importForBits,+  importForFlags,+  importForPrelude,+  importForRuntime,+  )+import Language.Haskell.Syntax (+  HsName (HsIdent),+  HsQName (UnQual),+  HsQualType (HsQualType),+  HsType (HsTyCon, HsTyVar),+  ) --- | A type synonym for Qt version specifications.  These are just lists of--- integers, of length two.  Examples are @[4, 8]@ and @[5, 0]@ to denote--- versions 4.8 and 5.0 respectively.  A third component may be used in the--- future, if necessary.-type Version = [Int]+-- | This is an exportable wrapper around a 'Enum.CppEnum' that also generates+-- support for a @QFlags\<Enum\>@ typedef.+--+-- This does not export any ExtNames of its own.+--+-- In generated Haskell code, in addition to what is generated for the+-- 'Enum.CppEnum', we generate a newtype wrapper around an enum value to+-- represent a combination of flags, and an @IsXXX@ typeclass for converting+-- various types (flags type, enum type, raw number) to a newtype'd value.+data Flags = Flags+  { flagsExtName :: ExtName+  , flagsIdentifier :: Identifier+  , flagsEnum :: Enum.CppEnum+  , flagsReqs :: Reqs+  , flagsAddendum :: Addendum+  } -showVersion :: Version -> String-showVersion = intercalate "." . map show+instance Show Flags where+  show flags =+    "<Flags " +++    show (flagsExtName flags) ++ " " +++    LC.renderIdentifier (flagsIdentifier flags) ++ ">" --- | An internal record of Qt configuration info.-data QtConfig = QtConfig-  { configVersion :: Version-  , configQmakeExecutable :: FilePath-  , configQmakeArguments :: [String]-  }+instance HasAddendum Flags where+  getAddendum = flagsAddendum+  setAddendum a flags = flags { flagsAddendum = a }+  modifyAddendum f flags = flags { flagsAddendum = f $ flagsAddendum flags } --- | This is initialized at program startup with the version of Qt that the--- generator will work with, along with the corresponding QMake binary and--- arguments necessary to invoke it.  The Qt version which functions and types--- are made available in the API.------ The Qt version determined the following method:------ * If @QTAH_QT=x.y@ is in the environment, then this value will be used.------ * Otherwise, if @QTAH_QT=x@ is in the environment, then we query @qmake--- -qt=$QTAH_QT -version@ for the version of Qt to use.------ * Otherwise, we query @qmake -version@ for the version of Qt to use.  Setting--- @QT_SELECT@ in the environment can select a major version of Qt to use.------ For more information on @qmake -qt@ and @QT_SELECT@, see @man qtchooser@.-qtConfig :: QtConfig-{-# NOINLINE qtConfig #-}-qtConfig = unsafePerformIO readQt+instance HasExtNames Flags where+  getPrimaryExtName = flagsExtName -qtVersion :: Version-qtVersion = configVersion qtConfig+instance HasReqs Flags where+  getReqs = flagsReqs+  setReqs r flags = flags { flagsReqs = r }+  modifyReqs f flags = flags { flagsReqs = f $ flagsReqs flags } -qmakeExecutable :: FilePath-qmakeExecutable = configQmakeExecutable qtConfig+instance Exportable Flags where+  -- Nothing to generate for flags here.  (Enums don't have any generated C+++  -- code here either.)+  sayExportCpp _ _ = return () -qmakeArguments :: [String]-qmakeArguments = configQmakeArguments qtConfig+  sayExportHaskell mode flags = sayHsExport mode flags -keypadNavigation :: Bool-keypadNavigation = False+makeFlags :: Enum.CppEnum -> String -> Flags+makeFlags enum flagsName =+  let identifierWords =+        replaceLast flagsName $ map idPartBase $ identifierParts $ Enum.enumIdentifier enum+      identifier = makeIdentifier $ map (\s -> makeIdPart s Nothing) identifierWords+  in Flags+     { flagsExtName = toExtName $ concat identifierWords+     , flagsIdentifier = identifier+     , flagsEnum = enum+     , flagsReqs = Enum.enumReqs enum  -- Copy reqs from the underlying enum.+     , flagsAddendum = mempty+     } -qdoc :: Bool-qdoc = False+flagsT :: Flags -> Type+flagsT = manualT . makeConversion --- | Whether Qt was configured with qreal=float instead of double.-qrealFloat :: Bool-{-# NOINLINE qrealFloat #-}-qrealFloat = unsafePerformIO $ readBool "QTAH_QREAL_FLOAT" False+makeConversion :: Flags -> ConversionSpec+makeConversion flags =+  (makeConversionSpec (show flags) cpp)+  { conversionSpecHaskell = Just hs }+  where extName = flagsExtName flags+        identifier = flagsIdentifier flags+        identifierStr = LC.renderIdentifier identifier+        enum = flagsEnum flags -wsWince :: Bool-wsWince = False+        cpp =+          (makeConversionSpecCpp identifierStr (return $ Enum.enumReqs enum))+          { conversionSpecCppConversionType =+              Just . evaluatedEnumType <$> Enum.cppGetEvaluatedEnumData (Enum.enumExtName enum) --- | Reads a Qt version from the environment variable @QTAH_QT@, and looks up a--- qmake binary.-readQt :: IO QtConfig-readQt = do-  maybeStr <- fmap (\x -> case x of-                      Just "" -> Nothing-                      _ -> x) $-              lookupEnv "QTAH_QT"-  case maybeStr of-    Just str -> do-      let strs = splitOn '.' str-      unless (length strs `elem` [1, 2] && all (\n -> not (null n) && all isDigit n) strs) $-        fail $ concat-        ["qtah-generator requires QTAH_QT=x or QTAH_QT=x.y, can't parse value ", show str, "."]-      let version = map (read :: String -> Int) strs-      case version of-        [x] -> queryQmake $ Just x-        [x, y] -> do-          config <- queryQmake $ Just x-          case configVersion config of-            foundVersion@(x':y':_) | x /= x' || y /= y' ->-              fail $ "qtah-generator: Mismatch between requested and installed " ++-              "Qt versions.  Requested " ++ showVersion version ++ ", found " ++-              showVersion foundVersion ++ "."-            _ -> return ()-          return config-        _ -> fail $ concat-             ["qtah-generator: Internal error, incorrect parsing of QTAH_QT value ", show str, "."]-    Nothing -> queryQmake Nothing+          , conversionSpecCppConversionToCppExpr = Just $ \fromVar maybeToVar -> case maybeToVar of+              Just toVar ->+                LC.says [identifierStr, " "] >> toVar >> LC.say "(" >> fromVar >> LC.say ");\n"+              Nothing -> LC.says [identifierStr, "("] >> fromVar >> LC.say ")" -  where -- | When we don't have a preferred qmake version, then we'll search for-        -- qmake's executables, first unqualified, then qualified by version-        -- number in decreasing order.-        allQmakeExecutableNames :: [String]-        allQmakeExecutableNames = ["qmake", "qmake-qt5", "qmake-qt4"]+          , conversionSpecCppConversionFromCppExpr = Just $ \fromVar maybeToVar -> do+              t <- evaluatedEnumType <$> Enum.cppGetEvaluatedEnumData (Enum.enumExtName enum)+              forM_ maybeToVar $ \toVar -> do+                LC.sayType Nothing t+                LC.say " "+                toVar+                LC.say " = "+              LC.say "static_cast<"+              LC.sayType Nothing t+              LC.say ">("+              fromVar+              LC.say $ case maybeToVar of+                Just _ -> ");\n"+                Nothing -> ")"+          } -        -- | When we /do/ have a prefered qmake version, then try the qualified-        -- version name first, falling back to the generic qmake executable if-        -- possible.-        qmakeExecutableNamesForVersion :: Int -> [String]-        qmakeExecutableNamesForVersion major = ["qmake-qt" ++ show major, "qmake"]+        hs =+          (makeConversionSpecHaskell+             (HsTyCon . UnQual . HsIdent <$> LH.toHsTypeName Nonconst extName)+             (Just $ do evaluatedData <- Enum.hsGetEvaluatedEnumData $ Enum.enumExtName enum+                        LH.cppTypeToHsTypeAndUse LH.HsCSide $ evaluatedEnumType evaluatedData)+             (CustomConversion $ do+                LH.addImports $ mconcat [hsImport1 "Prelude" "(.)",+                                         importForFlags,+                                         importForPrelude]+                convertFn <- toHsFlagsConvertFnName flags+                LH.saysLn ["QtahP.return . QtahFlags.flagsToNum . ", convertFn])+             (CustomConversion $ do+                LH.addImports $ mconcat [hsImport1 "Prelude" "(.)",+                                         importForFlags,+                                         importForPrelude]+                LH.sayLn "QtahP.return . QtahFlags.numToFlags"))+          { conversionSpecHaskellHsArgType = Just $ \typeVar -> do+              typeclassName <- toHsFlagsTypeclassName flags+              return $+                HsQualType [(UnQual $ HsIdent typeclassName, [HsTyVar typeVar])] $+                HsTyVar typeVar+          } -        queryQmake :: Maybe Int -> IO QtConfig-        queryQmake maybePreferredMajorVersion = do-          case maybePreferredMajorVersion of-            Nothing ->-              -- No major version preference, so take whatever Qt is available.-              queryQmake' allQmakeExecutableNames []-            Just preferredMajorVersion -> do-              -- Even though we have a preferred major version, we don't want to-              -- run "qmake -qt=X -version" initially because we might be on a-              -- system (NixOS) where qtchooser isn't available and the only-              -- qmake available *is* the desired version (in NixOS's case, the-              -- binary is called "qmake", not "qmake-qtX").  Only pass "-qt=X"-              -- if we get the wrong default version.-              let executableNames = qmakeExecutableNamesForVersion preferredMajorVersion-              defaultConfig <- queryQmake' executableNames []-              case configVersion defaultConfig of-                (x:_) | x == preferredMajorVersion -> return defaultConfig-                _ -> queryQmake' executableNames ["-qt=" ++ show preferredMajorVersion]+sayHsExport :: LH.SayExportMode -> Flags -> LH.Generator ()+sayHsExport mode flags =+  LH.withErrorContext ("generating " ++ show flags) $ do -        queryQmake' :: [String] -> [String] -> IO QtConfig-        queryQmake' executableNames extraArgs = do-          qmakePath <- findQMake executableNames-          let args = extraArgs ++ ["-version"]-          (exitCode, out, err) <- readProcessWithExitCode qmakePath args ""-          let qmakeDebugWords =-                ["  Ran ", show (qmakePath : args), ".\nStdout:\n", out, "\nStderr:\n", err]-          unless (exitCode == ExitSuccess) $-            fail $ concat $ "qtah-generator: qmake returned non-zero exit code." : qmakeDebugWords+  -- Ensure that the flags is exported from the same module as its underlying+  -- enum.  We always want this to be the case.+  checkInFlagsEnumModule -          let versionLinePrefix = "Using Qt version "+  case mode of+    LH.SayExportForeignImports -> return () -              maybeVersionStrs = do-                versionLine <- expectSingle $-                               filter (versionLinePrefix `isPrefixOf`) $-                               lines out-                let str = takeWhile (not . isSpace) $ drop (length versionLinePrefix) versionLine-                    strs = take 2 $ splitOn '.' str-                if length strs == 2 && all (\n -> not (null n) && all isDigit n) strs-                  then Just strs-                  else Nothing+    LH.SayExportDecls -> do+      typeName <- toHsFlagsTypeName flags+      typeclassName <- toHsFlagsTypeclassName flags+      convertFnName <- toHsFlagsConvertFnName flags+      -- We'll use the type name as the data constructor name as well:+      let ctorName = typeName+          enum = flagsEnum flags+      enumTypeName <- Enum.toHsEnumTypeName enum+      enumData <- Enum.hsGetEvaluatedEnumData $ Enum.enumExtName enum+      numericType <- LH.cppTypeToHsTypeAndUse LH.HsCSide $ evaluatedEnumType enumData+      let numericTypeStr = LH.prettyPrint numericType -          case maybeVersionStrs of-            Just strs ->-              return QtConfig-              { configVersion = map (read :: String -> Int) strs-              , configQmakeExecutable = qmakePath-              , configQmakeArguments = extraArgs-              }-            Nothing ->-              fail $ concat $-              "qtah-generator: Can't parse Qt version from qmake output." : qmakeDebugWords+      -- Emit the newtype wrapper.+      LH.addExport typeName+      LH.addImports $ mconcat [hsImports "Prelude" ["($)", "(.)"],+                               hsImports "Data.Bits" ["(.&.)", "(.|.)"],+                               importForBits,+                               importForFlags,+                               importForPrelude,+                               importForRuntime]+      LH.ln+      LH.saysLn ["newtype ", typeName, " = ", ctorName, " (", numericTypeStr,+                 ") deriving (QtahP.Eq, QtahP.Ord, QtahP.Show)"] -        expectSingle :: [a] -> Maybe a-        expectSingle [x] = Just x-        expectSingle _ = Nothing+      -- Emit the Flags instance.+      LH.ln+      LH.saysLn ["instance QtahFlags.Flags (", numericTypeStr, ") ",+                 enumTypeName, " ", typeName, " where"]+      LH.indent $ do+        LH.saysLn ["enumToFlags = ", ctorName, " . QtahFHR.fromCppEnum"]+        LH.saysLn ["flagsToEnum (", ctorName, " x') = QtahFHR.toCppEnum x'"] --- | Reads a boolean value from the program's environment.  If the variable is--- set and non-empty, then if must be one of the strings @true@ or @false@.  An--- empty or unset value is treated as the provided default value.-readBool :: String -> Bool -> IO Bool-readBool name defaultValue = do-  maybeStr <- lookupEnv name-  case maybeStr of-    Nothing -> return defaultValue-    Just str -> case str of-      "" -> return defaultValue-      "true" -> return True-      "false" -> return False-      s -> fail $ concat-           ["qtah-generator: Expected a boolean value for ", name,-            " (true/false).  Got ", show s, "."]+      -- Emit an IsXXX typeclass with a method to convert arguments to flag+      -- values.+      LH.addExport' typeclassName+      LH.ln+      LH.saysLn ["class ", typeclassName, " a where"]+      LH.indent $ do+        LH.saysLn [convertFnName, " :: a -> ", typeName] -findQMake :: [String] -> IO FilePath-findQMake executableNames = lookupEnv "QTAH_QMAKE" >>= fromMaybeM findBinary-  where findBinary =-          firstM (map findExecutable executableNames) >>=-          fromMaybeM-          (fail $ "qtah-generator: Can't find qmake named any of " ++-           show executableNames ++ ".  Please ensure qmake is installed " ++-           "and set QTAH_QMAKE to qmake's path.")+      -- Emit IsXXX instances for the flags, enum, and numeric types.+      LH.ln+      LH.saysLn ["instance ", typeclassName, " ", typeName,+                 " where ", convertFnName, " = QtahP.id"]+      LH.saysLn ["instance ", typeclassName, " ", enumTypeName,+                 " where ", convertFnName, " = QtahFlags.enumToFlags"]+      LH.saysLn ["instance ", typeclassName, " (", numericTypeStr,+                 ") where ", convertFnName, " = QtahFlags.numToFlags"]++      -- Emit Haskell bindings for flags entries.+      forM_ (M.toList $ evaluatedEnumValueMap enumData) $ \(words, num) -> do+        let words' = Enum.enumGetOverriddenEntryName Haskell enum words+        bindingName <- toHsFlagsBindingName flags words'+        LH.addExport bindingName+        LH.ln+        LH.saysLn [bindingName, " :: ", typeName]+        LH.saysLn [bindingName, " = ", ctorName, " (", show num, ")"]++      -- Emit the Bits instance.  This code is the same as what Hoppy uses to+      -- emit enum Bits instances.+      LH.ln+      LH.saysLn ["instance QtahDB.Bits ", typeName, " where"]+      LH.indent $ do+        let fun1 f =+              LH.saysLn [f, " x = QtahFlags.numToFlags $ QtahDB.",+                         f, " $ QtahFlags.flagsToNum x"]+            fun1Int f =+              LH.saysLn [f, " x i = QtahFlags.numToFlags $ QtahDB.",+                         f, " (QtahFlags.flagsToNum x) i"]+            fun2 f =+              LH.saysLn [f, " x y = QtahFlags.numToFlags $ QtahDB.",+                         f, " (QtahFlags.flagsToNum x) (QtahFlags.flagsToNum y)"]+            op2 op =+              LH.saysLn ["x ", op, " y = QtahFlags.numToFlags ",+                         "(QtahFlags.flagsToNum x ", op, " QtahFlags.flagsToNum y)"]+        op2 ".&."+        op2 ".|."+        fun2 "xor"+        fun1 "complement"+        fun1Int "shift"+        fun1Int "rotate"+        LH.sayLn "bitSize x = case QtahDB.bitSizeMaybe x of"+        LH.indent $ do+          LH.sayLn "  QtahP.Just n -> n"+          -- Same error message as the prelude here:+          LH.sayLn "  QtahP.Nothing -> QtahP.error \"bitSize is undefined\""+        LH.sayLn "bitSizeMaybe = QtahDB.bitSizeMaybe . QtahFlags.flagsToNum"+        LH.sayLn "isSigned = QtahDB.isSigned . QtahFlags.flagsToNum"+        LH.sayLn "testBit x i = QtahDB.testBit (QtahFlags.flagsToNum x) i"+        LH.sayLn "bit = QtahFlags.numToFlags . QtahDB.bit"+        LH.sayLn "popCount = QtahDB.popCount . QtahFlags.flagsToNum"++    LH.SayExportBoot -> do+      -- Emit a minimal version of the regular binding code.+      typeName <- toHsFlagsTypeName flags+      typeclassName <- toHsFlagsTypeclassName flags+      convertFnName <- toHsFlagsConvertFnName flags+      -- We'll use the type name as the data constructor name as well:+      let ctorName = typeName+          enum = flagsEnum flags+      enumTypeName <- Enum.toHsEnumTypeName enum+      enumData <- Enum.hsGetEvaluatedEnumData $ Enum.enumExtName enum+      numericType <- LH.cppTypeToHsTypeAndUse LH.HsCSide $ evaluatedEnumType enumData+      let numericTypeStr = LH.prettyPrint numericType++      LH.addImports $ mconcat [importForBits, importForFlags, importForPrelude]+      LH.ln+      LH.addExport typeName+      LH.saysLn ["newtype ", typeName, " = ", ctorName, " (", numericTypeStr, ")"]+      LH.saysLn ["instance QtahDB.Bits ", typeName]+      LH.saysLn ["instance QtahP.Eq ", typeName]+      LH.saysLn ["instance QtahP.Ord ", typeName]+      LH.saysLn ["instance QtahP.Show ", typeName]+      LH.ln+      LH.saysLn ["instance QtahFlags.Flags (", numericTypeStr, ") ", enumTypeName, " ", typeName]+      LH.ln+      LH.addExport' typeclassName+      LH.saysLn ["class ", typeclassName, " a where"]+      LH.indent $ do+        LH.saysLn [convertFnName, " :: a -> ", typeName]+      LH.ln+      LH.saysLn ["instance ", typeclassName, " ", typeName]+      LH.saysLn ["instance ", typeclassName, " ", enumTypeName]+      LH.saysLn ["instance ", typeclassName, " ", numericTypeStr]+      LH.ln+      forM_ (M.toList $ evaluatedEnumValueMap enumData) $ \(words, _) -> do+        let words' = Enum.enumGetOverriddenEntryName Haskell enum words+        bindingName <- toHsFlagsBindingName flags words'+        LH.addExport bindingName+        LH.saysLn [bindingName, " :: ", typeName]++    where checkInFlagsEnumModule = do+            currentModule <- LH.askModule+            enumModule <- LH.getExtNameModule $ Enum.enumExtName $ flagsEnum flags+            when (currentModule /= enumModule) $+              throwError $ show flags ++ " and " ++ show (flagsEnum flags) +++              "are not exported from the same module."++-- | Imports and returns the Haskell type name for a 'Flags'.+toHsFlagsTypeName :: Flags -> LH.Generator String+toHsFlagsTypeName flags =+  LH.inFunction "toHsFlagsTypeName" $+  LH.addExtNameModule (flagsExtName flags) $ toHsFlagsTypeName' flags++-- | Pure version of 'toHsTypeName' that doesn't create a qualified name.+toHsFlagsTypeName' :: Flags -> String+toHsFlagsTypeName' = LH.toHsTypeName' Nonconst . flagsExtName++-- | Imports and returns the Haskell \"IsFooFlags\" typeclass for a 'Flags'.+toHsFlagsTypeclassName :: Flags -> LH.Generator String+toHsFlagsTypeclassName flags =+  LH.inFunction "toHsFlagsTypeclassName" $+  LH.addExtNameModule (flagsExtName flags) $ toHsFlagsTypeclassName' flags++-- | Pure version of 'toHsFlagsTypeclassName' that doesn't create a qualified+-- name.+toHsFlagsTypeclassName' :: Flags -> String+toHsFlagsTypeclassName' flags = 'I':'s':toHsFlagsTypeName' flags++-- | Imports and returns the Haskell \"toFooFlags\" typeclass method for a+-- 'Flags', in the typeclass named with 'toHsFlagsTypeclassName'.+toHsFlagsConvertFnName :: Flags -> LH.Generator String+toHsFlagsConvertFnName flags =+  LH.inFunction "toHsFlagsConvertFnName" $+  LH.addExtNameModule (flagsExtName flags) $ toHsFlagsConvertFnName' flags++-- | Pure version of 'toHsFlagsConvertFnName' that doesn't create a qualified+-- name.+toHsFlagsConvertFnName' :: Flags -> String+toHsFlagsConvertFnName' flags = 't':'o':toHsFlagsTypeName' flags++-- | Constructs the name of the binding for a specific flags entry.+--+-- This is the equivalent enum data constructor name, converted to a valid+-- binding name by lower-casing the first letter.+toHsFlagsBindingName :: Flags -> [String] -> LH.Generator String+toHsFlagsBindingName flags words =+  LH.inFunction "toHsFlagsBindingName" $+  LH.addExtNameModule (flagsExtName flags) $ toHsFlagsBindingName' flags words++-- | Pure version of 'toHsFlagsBindingName' that doesn't create a qualified+-- name.+toHsFlagsBindingName' :: Flags -> [String] -> String+toHsFlagsBindingName' flags words =+  lowerFirst $ Enum.toHsEnumCtorName' (flagsEnum flags) words
src/Graphics/UI/Qtah/Generator/Interface/Core.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,41 +17,102 @@  module Graphics.UI.Qtah.Generator.Interface.Core (modules) where +import qualified Graphics.UI.Qtah.Generator.Interface.Core.QAbstractAnimation as QAbstractAnimation 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.QAnimationGroup as QAnimationGroup import qualified Graphics.UI.Qtah.Generator.Interface.Core.QByteArray as QByteArray+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QBuffer as QBuffer 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.QDate as QDate+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QDateTime as QDateTime+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QDebug as QDebug+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QDebugStateSaver as QDebugStateSaver import qualified Graphics.UI.Qtah.Generator.Interface.Core.QDir as QDir+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QDirIterator as QDirIterator import qualified Graphics.UI.Qtah.Generator.Interface.Core.QEvent as QEvent+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QFile as QFile+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QFileDevice as QFileDevice+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QFileInfo as QFileInfo+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QFileSelector as QFileSelector+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QFileSystemWatcher as QFileSystemWatcher+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QCryptographicHash as QCryptographicHash+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QIODevice as QIODevice 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.QLatin1Char as QLatin1Char+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QLatin1String as QLatin1String+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QLibrary as QLibrary+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QLibraryInfo as QLibraryInfo import qualified Graphics.UI.Qtah.Generator.Interface.Core.QList as QList+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QLockFile as QLockFile+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QLoggingCategory as QLoggingCategory 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.QMessageAuthenticationCode as QMessageAuthenticationCode+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QMessageLogContext as QMessageLogContext+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QMessageLogger as QMessageLogger+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QMetaClassInfo as QMetaClassInfo+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QMetaEnum as QMetaEnum+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QMetaMethod as QMetaMethod+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QMetaObject as QMetaObject+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QMetaObject.Connection as QMetaObjectConnection+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QMetaProperty as QMetaProperty 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.QOperatingSystemVersion as QOperatingSystemVersion+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPair as QPair+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QParallelAnimationGroup as QParallelAnimationGroup+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPauseAnimation as QPauseAnimation import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPalette as QPalette import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPersistentModelIndex as QPersistentModelIndex+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPluginLoader as QPluginLoader+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QProcess as QProcess+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QProcessEnvironment as QProcessEnvironment+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QPropertyAnimation as QPropertyAnimation 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.QRandomGenerator as QRandomGenerator+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QRandomGenerator64 as QRandomGenerator64 import qualified Graphics.UI.Qtah.Generator.Interface.Core.QRect as QRect import qualified Graphics.UI.Qtah.Generator.Interface.Core.QRectF as QRectF+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QResource as QResource+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QSaveFile as QSaveFile+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QSequentialAnimationGroup as QSequentialAnimationGroup import qualified Graphics.UI.Qtah.Generator.Interface.Core.QSettings as QSettings import qualified Graphics.UI.Qtah.Generator.Interface.Core.QSize as QSize import qualified Graphics.UI.Qtah.Generator.Interface.Core.QSizeF as QSizeF+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QStandardPaths as QStandardPaths+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QStaticPlugin as QStaticPlugin 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.QSysInfo as QSysInfo import qualified Graphics.UI.Qtah.Generator.Interface.Core.QTextCodec as QTextCodec+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QTextDecoder as QTextDecoder+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QTextEncoder as QTextEncoder+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QThread as QThread+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QTime as QTime 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.QTimeZone as QTimeZone+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QTranslator as QTranslator import qualified Graphics.UI.Qtah.Generator.Interface.Core.QVariant as QVariant+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QVariantAnimation as QVariantAnimation import qualified Graphics.UI.Qtah.Generator.Interface.Core.QVector as QVector+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QVersionNumber as QVersionNumber+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamAttribute as QXmlStreamAttribute+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamAttributes as QXmlStreamAttributes+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamEntityDeclaration as QXmlStreamEntityDeclaration+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamEntityResolver as QXmlStreamEntityResolver+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamNamespaceDeclaration as QXmlStreamNamespaceDeclaration+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamNotationDeclaration as QXmlStreamNotationDeclaration+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamReader as QXmlStreamReader+import qualified Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamWriter as QXmlStreamWriter import qualified Graphics.UI.Qtah.Generator.Interface.Core.Types as Types import Graphics.UI.Qtah.Generator.Module (AModule) @@ -60,41 +121,102 @@ modules :: [AModule] modules =   concat-  [ [ QAbstractItemModel.aModule+  [ [ QAbstractAnimation.aModule+    , QAbstractItemModel.aModule     , QAbstractListModel.aModule     , QAbstractTableModel.aModule+    , QAnimationGroup.aModule     , QByteArray.aModule+    , QBuffer.aModule     , QChar.aModule     , QChildEvent.aModule     , QCoreApplication.aModule     , QDate.aModule+    , QDateTime.aModule+    , QDebug.aModule+    , QDebugStateSaver.aModule     , QDir.aModule+    , QDirIterator.aModule     , QEvent.aModule+    , QFile.aModule+    , QFileDevice.aModule+    , QFileInfo.aModule+    , QFileSelector.aModule+    , QFileSystemWatcher.aModule+    , QCryptographicHash.aModule+    , QIODevice.aModule     , QItemSelection.aModule     , QItemSelectionModel.aModule     , QItemSelectionRange.aModule+    , QLatin1Char.aModule+    , QLatin1String.aModule+    , QLibrary.aModule+    , QLibraryInfo.aModule+    , QLockFile.aModule+    , QLoggingCategory.aModule     , QMargins.aModule     , QMarginsF.aModule+    , QMessageAuthenticationCode.aModule+    , QMessageLogContext.aModule+    , QMessageLogger.aModule+    , QMetaClassInfo.aModule+    , QMetaEnum.aModule+    , QMetaMethod.aModule+    , QMetaObject.aModule+    , QMetaObjectConnection.aModule+    , QMetaProperty.aModule     , QModelIndex.aModule     , QObject.aModule+    , QOperatingSystemVersion.aModule     , QPalette.aModule+    , QParallelAnimationGroup.aModule+    , QPauseAnimation.aModule     , QPersistentModelIndex.aModule+    , QProcess.aModule+    , QProcessEnvironment.aModule+    , QPropertyAnimation.aModule+    , QPluginLoader.aModule     , QPoint.aModule     , QPointF.aModule+    , QRandomGenerator.aModule+    , QRandomGenerator64.aModule     , QRect.aModule     , QRectF.aModule+    , QResource.aModule+    , QSaveFile.aModule+    , QSequentialAnimationGroup.aModule     , QSettings.aModule     , QSize.aModule     , QSizeF.aModule+    , QStandardPaths.aModule+    , QStaticPlugin.aModule     , QString.aModule     , QStringList.aModule     , QStringListModel.aModule+    , QSysInfo.aModule     , QTextCodec.aModule+    , QTextDecoder.aModule+    , QTextEncoder.aModule+    , QThread.aModule+    , QTime.aModule     , QTimer.aModule     , QTimerEvent.aModule+    , QTimeZone.aModule+    , QTranslator.aModule     , QVariant.aModule+    , QVariantAnimation.aModule+    , QVersionNumber.aModule+    , QXmlStreamAttribute.aModule+    , QXmlStreamAttributes.aModule+    , QXmlStreamEntityDeclaration.aModule+    , QXmlStreamEntityResolver.aModule+    , QXmlStreamNamespaceDeclaration.aModule+    , QXmlStreamNotationDeclaration.aModule+    , QXmlStreamReader.aModule+    , QXmlStreamWriter.aModule     , Types.aModule     ]   , QList.allModules   , QVector.allModules+  , QPair.allModules   ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractAnimation.hs view
@@ -0,0 +1,108 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QAbstractAnimation (+  aModule,+  c_QAbstractAnimation,+  e_DeletionPolicy,+  e_Direction,+  e_State,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkMethod',+  mkMethod,+  np,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listener,+  listenerDirection,+  listenerInt,+  listenerStateState,+  )+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QAbstractAnimation"] [4, 6] $+  qtExport c_QAbstractAnimation :+  map QtExportSignal signals +++  collect+  [ just $ qtExport e_DeletionPolicy+  , just $ qtExport e_Direction+  , just $ qtExport e_State+  ]++c_QAbstractAnimation =+  addReqIncludes [ includeStd "QAbstractAnimation" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QAbstractAnimation") Nothing [c_QObject] $+  collect+  [ just $ mkConstMethod "currentLoopTime" np intT+  , just $ mkConstMethod "duration" np intT+  --, just $ mkConstMethod "group" np $ ptrT $ objT c_QAnimationGroup+  , just $ mkMethod "pause" np voidT+  , just $ mkMethod "resume" np voidT+  , just $ mkMethod "setPaused" [boolT] voidT+  , just $ mkMethod' "start" "start" np voidT+  , just $ mkMethod' "start" "startWithDeletionPolicy" [enumT e_DeletionPolicy] voidT+  , just $ mkMethod "stop" np voidT+  , just $ mkConstMethod "totalDuration" np intT++    -- TODO+  ]++signals :: [Signal]+signals =+  collect+  [ just $ makeSignal c_QAbstractAnimation "currentLoopChanged" listenerInt+  , just $ makeSignal c_QAbstractAnimation "directionChanged" listenerDirection+  , just $ makeSignal c_QAbstractAnimation "finished" listener+  , just $ makeSignal c_QAbstractAnimation "stateChanged" listenerStateState+  ]++e_DeletionPolicy =+  makeQtEnum (ident1 "QAbstractAnimation" "DeletionPolicy") [includeStd "QAbstractAnimation"]+  [ "KeepWhenStopped"+  , "DeleteWhenStopped"+  ]++e_Direction =+  makeQtEnum (ident1 "QAbstractAnimation" "Direction") [includeStd "QAbstractAnimation"]+  [ "Forward"+  , "Backward"+  ]++e_State =+  makeQtEnum (ident1 "QAbstractAnimation" "State") [includeStd "QAbstractAnimation"]+  [ "Stopped"+  , "Paused"+  , "Running"+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractItemModel.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,10 +18,13 @@ module Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (   aModule,   c_QAbstractItemModel,+  e_LayoutChangeHint,+  e_CheckIndexOption,+  fl_CheckIndexOptions,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),+  Scoped (Scoped),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -32,32 +35,38 @@   mkConstMethod',   mkMethod,   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Types (-  bitspaceT,   boolT,   enumT,   intT,   objT,   voidT,+  refT,+  constT,   ) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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.QStringList (c_QStringList) import Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant) import Graphics.UI.Qtah.Generator.Interface.Core.Types (-  bs_ItemFlags,   e_ItemDataRole,+  fl_ItemFlags,   e_Orientation,   e_SortOrder,+  fl_DropActions,   ) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_Listener,-  c_ListenerQModelIndexIntInt,-  c_ListenerQModelIndexIntIntQModelIndexInt,-  c_ListenerQModelIndexQModelIndexQVectorInt,+  listener,+  listenerQModelIndexIntInt,+  listenerQModelIndexIntIntQModelIndexInt,+  listenerQModelIndexQModelIndexQVectorInt,+  listenerOrientationIntInt   ) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types@@ -67,10 +76,15 @@ aModule =   AQtModule $   makeQtModule ["Core", "QAbstractItemModel"] $-  QtExport (ExportClass c_QAbstractItemModel) :+  qtExport c_QAbstractItemModel :   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_LayoutChangeHint ]+  collect+  [ just $ qtExport e_LayoutChangeHint+  , test (qtVersion >= [5, 11]) $ qtExport e_CheckIndexOption+  , test (qtVersion >= [5, 11]) $ qtExport fl_CheckIndexOptions+  ] + c_QAbstractItemModel =   addReqIncludes [includeStd "QAbstractItemModel"] $   classSetEntityPrefix "" $@@ -79,15 +93,17 @@   [ just $ mkConstMethod "buddy" [objT c_QModelIndex] $ objT c_QModelIndex     -- TODO canDropMimeData   , just $ mkConstMethod "canFetchMore" [objT c_QModelIndex] boolT-  , just $ mkConstMethod' "columnCount" "columnCount" [] intT+  , test (qtVersion >= [5, 11]) $ mkConstMethod' "checkIndex" "checkIndex" [refT $ constT $ objT c_QModelIndex] boolT+  , test (qtVersion >= [5, 11]) $ mkConstMethod' "checkIndex" "checkIndexWithOptions" [refT $ constT $ objT c_QModelIndex, flagsT fl_CheckIndexOptions] boolT+  , just $ mkConstMethod' "columnCount" "columnCount" np 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 "flags" [objT c_QModelIndex] $ flagsT fl_ItemFlags+  , just $ mkConstMethod' "hasChildren" "hasChildren" np 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@@ -107,7 +123,7 @@     -- TODO itemData     -- TODO match     -- TODO mimeData-    -- TODO mimeTypes+  , just $ mkConstMethod "mimeTypes" np $ objT c_QStringList   , test (qtVersion >= [5, 0]) $ mkMethod "moveColumn"     [objT c_QModelIndex, intT, objT c_QModelIndex, intT] boolT   , test (qtVersion >= [5, 0]) $ mkMethod "moveColumns"@@ -125,9 +141,9 @@   , 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+  , just $ mkMethod "revert" np voidT     -- TODO roleNames (>=4.6)-  , just $ mkConstMethod' "rowCount" "rowCount" [] intT+  , just $ mkConstMethod' "rowCount" "rowCount" np intT   , just $ mkConstMethod' "rowCount" "rowCountAt" [objT c_QModelIndex] intT   , just $ mkMethod' "setData" "setData" [objT c_QModelIndex, objT c_QVariant] boolT   , just $ mkMethod' "setData" "setDataWithRole"@@ -141,39 +157,49 @@   , 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)+  , just $ mkMethod "submit" np boolT+  , just $ mkConstMethod "supportedDragActions" np $ flagsT fl_DropActions+  , test (qtVersion >= [4, 2]) $ mkConstMethod "supportedDropActions" np $ flagsT fl_DropActions   ]  signals =   collect-  [ just $ makeSignal c_QAbstractItemModel "columnsAboutToBeInserted" c_ListenerQModelIndexIntInt+  [ just $ makeSignal c_QAbstractItemModel "columnsAboutToBeInserted" 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+    listenerQModelIndexIntIntQModelIndexInt+  , just $ makeSignal c_QAbstractItemModel "columnsAboutToBeRemoved" listenerQModelIndexIntInt+  , just $ makeSignal c_QAbstractItemModel "columnsInserted" 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+    listenerQModelIndexIntIntQModelIndexInt+  , just $ makeSignal c_QAbstractItemModel "columnsRemoved" listenerQModelIndexIntInt+  , just $ makeSignal c_QAbstractItemModel "dataChanged" listenerQModelIndexQModelIndexQVectorInt+  , just $ makeSignal c_QAbstractItemModel "headerDataChanged" listenerOrientationIntInt     -- 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, 2]) $ makeSignal c_QAbstractItemModel "modelAboutToBeReset" listener+  , test (qtVersion >= [4, 1]) $ makeSignal c_QAbstractItemModel "modelReset" listener+  , just $ makeSignal c_QAbstractItemModel "rowsAboutToBeInserted" 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+    listenerQModelIndexIntIntQModelIndexInt+  , just $ makeSignal c_QAbstractItemModel "rowsAboutToBeRemoved" listenerQModelIndexIntInt+  , just $ makeSignal c_QAbstractItemModel "rowsInserted" listenerQModelIndexIntInt   , test (qtVersion >= [4, 6]) $ makeSignal c_QAbstractItemModel "rowsMoved"-    c_ListenerQModelIndexIntIntQModelIndexInt-  , just $ makeSignal c_QAbstractItemModel "rowsRemoved" c_ListenerQModelIndexIntInt+    listenerQModelIndexIntIntQModelIndexInt+  , just $ makeSignal c_QAbstractItemModel "rowsRemoved" listenerQModelIndexIntInt   ]  e_LayoutChangeHint =   makeQtEnum (ident1 "QAbstractItemModel" "LayoutChangeHint") [includeStd "QAbstractItemModel"]-  [ (0, ["no", "layout", "change", "hint"])-  , (1, ["vertical", "sort", "hint"])-  , (2, ["horizontal", "sort", "hint"])+  [ "NoLayoutChangeHint"+  , "VerticalSortHint"+  , "HorizontalSortHint"+  ]++(e_CheckIndexOption, fl_CheckIndexOptions) =+  makeQtEnumAndFlags' (ident1 "QAbstractItemModel" "CheckIndexOption") "CheckIndexOptions" Scoped+  [ includeStd "QAbstractItemModel" ]+  [ "NoOption"+  , "IndexIsValid"+  , "DoNotUseParent"+  , "ParentIsInvalid"   ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractItemModel.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by
src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractListModel.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -36,8 +35,8 @@  aModule =   AQtModule $-  makeQtModule ["Core", "QAbstractListModel"] $-  [ QtExport $ ExportClass c_QAbstractListModel ]+  makeQtModule ["Core", "QAbstractListModel"]+  [ qtExport c_QAbstractListModel ]  c_QAbstractListModel =   addReqIncludes [includeStd "QAbstractListModel"] $
src/Graphics/UI/Qtah/Generator/Interface/Core/QAbstractTableModel.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -36,8 +35,8 @@  aModule =   AQtModule $-  makeQtModule ["Core", "QAbstractTableModel"] $-  [ QtExport $ ExportClass c_QAbstractTableModel ]+  makeQtModule ["Core", "QAbstractTableModel"]+  [ qtExport c_QAbstractTableModel ]  c_QAbstractTableModel =   addReqIncludes [includeStd "QAbstractTableModel"] $
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QAnimationGroup.hs view
@@ -0,0 +1,60 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QAnimationGroup (+  aModule,+  c_QAnimationGroup,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Types (intT, voidT, objT, ptrT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractAnimation (c_QAbstractAnimation)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QAnimationGroup"] [4, 6] $+  [qtExport c_QAnimationGroup]++c_QAnimationGroup =+  addReqIncludes [ includeStd "QAnimationGroup" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QAnimationGroup") Nothing [c_QAbstractAnimation] $+  collect+  [ just $ mkMethod "addAnimation" [ptrT $ objT c_QAbstractAnimation] voidT+  , just $ mkConstMethod "animationAt" [intT] $ ptrT $ objT c_QAbstractAnimation+  , just $ mkConstMethod "animationCount" np intT+  , just $ mkMethod "clear" np voidT+  , just $ mkConstMethod "duration" np intT+  , just $ mkConstMethod "indexOfAnimation" [ptrT $ objT c_QAbstractAnimation] intT+  , just $ mkMethod "insertAnimation" [intT, ptrT $ objT c_QAbstractAnimation] voidT+  , just $ mkMethod "removeAnimation" [ptrT $ objT c_QAbstractAnimation] voidT+  , just $ mkMethod "takeAnimation" [intT] $ ptrT $ objT c_QAbstractAnimation+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QBuffer.hs view
@@ -0,0 +1,65 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QBuffer (+  aModule,+  c_QBuffer,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod',+  mkCtor,+  mkMethod',+  mkMethod,+  np,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QIODevice (c_QIODevice)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Foreign.Hoppy.Generator.Types (intT, charT, voidT, constT, objT, ptrT, refT)+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 ["Core", "QBuffer"]+  [ qtExport c_QBuffer ]++c_QBuffer =+  addReqIncludes [ includeStd "QBuffer" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QBuffer") Nothing [c_QIODevice] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]+  , just $ mkCtor "newWithByteArray" [ptrT $ objT c_QByteArray]+  , just $ mkCtor "newWithByteArrayAndParent" [ptrT $ objT c_QByteArray, ptrT $ objT c_QObject]+  , just $ mkMethod' "buffer" "buffer" np $ refT $ objT c_QByteArray+  , just $ mkConstMethod' "buffer" "bufferConst" np $ refT $ constT $ objT c_QByteArray+  , just $ mkConstMethod' "data" "getData" np $ refT $ constT $ objT c_QByteArray+  , just $ mkMethod "setBuffer" [ptrT $ objT c_QByteArray] voidT+  , just $ mkMethod' "setData" "setDataByteArray" [refT $ constT $ objT c_QByteArray] voidT+  , just $ mkMethod' "setData" "setDataRaw" [ptrT $ constT charT, intT] voidT+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QByteArray.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,16 +15,13 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- module Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (   aModule,   c_QByteArray,+  e_Base64Option,+  fl_Base64Options,   ) where -#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat)-#endif import Foreign.Hoppy.Generator.Language.Haskell (   addImports,   indent,@@ -39,13 +36,13 @@     classHaskellConversionToCppFn,     classHaskellConversionType   ),-  Export (ExportClass),   addAddendumHaskell,   addReqIncludes,   classSetEntityPrefix,   classSetHaskellConversion,   hsImport1,   ident,+  ident1,   includeStd,   makeClass,   mkConstMethod,@@ -53,13 +50,17 @@   mkCtor,   mkMethod,   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Comparable, Equatable),   classAddFeatures,   )-import Foreign.Hoppy.Generator.Types (boolT, charT, constT, intT, ptrT, voidT)-import Foreign.Hoppy.Generator.Version (collect, just)+import Foreign.Hoppy.Generator.Types (ushortT, shortT, uintT, floatT, doubleT, boolT, charT, constT, intT, ptrT, voidT, refT, objT, enumT)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_CaseSensitivity)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Imports import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types@@ -74,8 +75,11 @@ aModule :: AModule aModule =   AQtModule $-  makeQtModule ["Core", "QByteArray"]-  [ QtExport $ ExportClass c_QByteArray+  makeQtModule ["Core", "QByteArray"] $+  collect+  [ just $ qtExport c_QByteArray+  , test (qtVersion >= [5, 2]) $ qtExport e_Base64Option+  , test (qtVersion >= [5, 2]) $ qtExport fl_Base64Options   ]  c_QByteArray :: Class@@ -87,17 +91,131 @@   classSetEntityPrefix "" $   makeClass (ident "QByteArray") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newFromData" [ptrT $ constT charT]   , just $ mkCtor "newFromDataAndSize" [ptrT $ constT charT, intT]   , just $ mkCtor "newFromRepeatedChar" [intT, charT]++  , just $ mkMethod' "append" "append" [objT c_QByteArray] $ refT $ objT c_QByteArray+  , test (qtVersion >= [5, 7]) $ mkMethod' "append" "appendCountAndChar" [intT, charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "append" "appendPtrConstChar" [ptrT $ constT charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "append" "appendPtrConstCharAndSize" [ptrT $ constT charT, intT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "append" "appendChar" [charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "append" "appendString" [objT c_QString] $ refT $ objT c_QByteArray++  , just $ mkMethod' "insert" "insert" [intT, objT c_QByteArray] $ refT $ objT c_QByteArray+  , test (qtVersion >= [5, 7]) $ mkMethod' "insert" "insertCountAndChar" [intT, intT, charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "insert" "insertPtrConstChar" [intT, ptrT $ constT charT] $ refT $ objT c_QByteArray+  , test (qtVersion >= [4, 6]) $  mkMethod' "insert" "insertPtrConstCharAndSize" [intT, ptrT $ constT charT, intT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "insert" "insertChar" [intT, charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "insert" "insertString" [intT, objT c_QString] $ refT $ objT c_QByteArray++  , just $ mkMethod' "prepend" "prepend" [objT c_QByteArray] $ refT $ objT c_QByteArray+  , test (qtVersion >= [5, 7]) $ mkMethod' "prepend" "prependCountAndChar" [intT, charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "prepend" "prependPtrConstChar" [ptrT $ constT charT] $ refT $ objT c_QByteArray+  , test (qtVersion >= [4, 6]) $ mkMethod' "prepend" "prependPtrConstCharAndSize" [ptrT $ constT charT, intT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "prepend" "prependChar" [charT] $ refT $ objT c_QByteArray++  , just $ mkMethod' "replace" "replaceRangeWithByteArray" [intT, intT, objT c_QByteArray] $ refT $ objT c_QByteArray+  , test (qtVersion >= [4, 7]) $ mkMethod' "replace" "replaceRangeWithPtrConstCharAndSize" [intT, intT, ptrT $ constT charT, intT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "replace" "replaceRangeWithPtrConstChar" [intT, intT, ptrT $ constT charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "replace" "replaceCharWithPtrConstChar" [charT, ptrT $ constT charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "replace" "replaceCharWithByteArray" [charT, objT c_QByteArray] $ refT $ objT c_QByteArray+  , just $ mkMethod' "replace" "replacePtrConstChar" [ptrT $ constT charT, ptrT $ constT charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "replace" "replacePtrConstCharAndSize" [ptrT $ constT charT, intT, ptrT $ constT charT, intT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "replace" "replaceByteArray" [objT c_QByteArray, objT c_QByteArray] $ refT $ objT c_QByteArray+  , just $ mkMethod' "replace" "replaceByteArrayWithPtrConstChar" [objT c_QByteArray, ptrT $ constT charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "replace" "replacePtrConstCharWithByteArray" [ptrT $ constT charT, objT c_QByteArray] $ refT $ objT c_QByteArray+  , just $ mkMethod' "replace" "replaceChar" [charT, charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "replace" "replaceStringWithPtrConstChar" [objT c_QString, ptrT $ constT charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "replace" "replaceCharWithString" [charT, objT c_QString] $ refT $ objT c_QByteArray+  , just $ mkMethod' "replace" "replaceStringWithByteArray" [objT c_QString, objT c_QByteArray] $ refT $ objT c_QByteArray++  , just $ mkConstMethod' "indexOf" "indexOf" [objT c_QByteArray] intT+  , just $ mkConstMethod' "indexOf" "indexOfFrom" [objT c_QByteArray, intT] intT+  , just $ mkConstMethod' "indexOf" "indexOfPtrConstChar" [ptrT $ constT charT] intT+  , just $ mkConstMethod' "indexOf" "indexOfPtrConstCharFrom" [ptrT $ constT charT, intT] intT+  , just $ mkConstMethod' "indexOf" "indexOfChar" [charT] intT+  , just $ mkConstMethod' "indexOf" "indexOfCharFrom" [charT, intT] intT+  , just $ mkConstMethod' "indexOf" "indexOfString" [objT c_QString, intT] intT+  , just $ mkConstMethod' "indexOf" "indexOfStringFrom" [objT c_QString, intT] intT++  , just $ mkConstMethod' "lastIndexOf" "lastIndexOf" [objT c_QByteArray] intT+  , just $ mkConstMethod' "lastIndexOf" "lastIndexOfFrom" [objT c_QByteArray, intT] intT+  , just $ mkConstMethod' "lastIndexOf" "lastIndexOfPtrConstChar" [ptrT $ constT charT] intT+  , just $ mkConstMethod' "lastIndexOf" "lastIndexOfPtrConstCharFrom" [ptrT $ constT charT, intT] intT+  , just $ mkConstMethod' "lastIndexOf" "lastIndexOfChar" [charT] intT+  , just $ mkConstMethod' "lastIndexOf" "lastIndexOfCharFrom" [charT, intT] intT+  , just $ mkConstMethod' "lastIndexOf" "lastIndexOfString" [objT c_QString, intT] intT+  , just $ mkConstMethod' "lastIndexOf" "lastIndexOfStringFrom" [objT c_QString, intT] intT++  , just $ mkMethod' "setNum" "setNumInt" [intT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumIntWithBase" [intT, intT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumUshort" [ushortT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumUshortWithBase" [ushortT, intT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumShort" [shortT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumShortWithBase" [shortT, intT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumUint" [uintT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumUintWithBase" [uintT, intT] $ refT $ objT c_QByteArray+  --, just $ mkMethod' "setNum" "setNumQlonglong" [qlonglong] $ refT $ objT c_QByteArray+  --, just $ mkMethod' "setNum" "setNumQlonglongWithBase" [qlonglong, intT] $ refT $ objT c_QByteArray+  --, just $ mkMethod' "setNum" "setNumQulonglong" [qulonglong] $ refT $ objT c_QByteArray+  --, just $ mkMethod' "setNum" "setNumQulonglongWithBase" [qulonglong, intT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumFloat" [floatT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumFloatWithFormat" [floatT, charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumFloatWithFormatAndPrecision" [floatT, charT, intT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumDouble" [doubleT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumDoubleWithFormat" [doubleT, charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "setNum" "setNumDoubleWithFormatAndPrecision" [doubleT, charT, intT] $ refT $ objT c_QByteArray+   , just $ mkConstMethod "at" [intT] charT-  , just $ mkMethod "clear" [] voidT-  , just $ mkMethod' "data" "getData" [] $ ptrT charT-  , just $ mkConstMethod' "data" "getDataConst" [] $ ptrT $ constT charT-  , just $ mkConstMethod "isEmpty" [] boolT-  , just $ mkConstMethod "isNull" [] boolT-  , just $ mkConstMethod "size" [] intT+  , test (qtVersion >= [5, 10]) $ mkConstMethod "back" np charT+  -- TODO QByteRef back()+  -- TODO QByteArray::iterator begin()+  -- TODO QByteArray::const_iterator begin() const+  , just $ mkConstMethod "capacity" np intT+  -- QByteArray::const_iterator cbegin() const+  -- QByteArray::const_iterator cend() const+  , just $ mkMethod "chop" [intT] voidT+  , test (qtVersion >= [5, 10]) $ mkConstMethod "chopped" [intT] $ objT c_QByteArray+  , test (qtVersion >= [5, 12]) $ mkConstMethod' "compare" "comparePtrConstChar" [ptrT $ constT charT] intT+  , test (qtVersion >= [5, 12]) $ mkConstMethod' "compare" "comparePtrConstCharWithCase" [ptrT $ constT charT, enumT e_CaseSensitivity] intT+  , test (qtVersion >= [5, 12]) $ mkConstMethod' "compare" "compare" [objT c_QByteArray] intT+  , test (qtVersion >= [5, 12]) $ mkConstMethod' "compare" "compareWithCase" [objT c_QByteArray, enumT e_CaseSensitivity] intT+  -- TODO QByteArray::const_iterator constBegin() const+  , just $ mkConstMethod "constData" np $ ptrT $ constT charT+  -- TODO QByteArray::const_iterator constEnd() const+  , just $ mkConstMethod' "contains" "contains" [objT c_QByteArray] boolT+  , just $ mkConstMethod' "contains" "containsPtrConstChar" [ptrT $ constT charT] boolT+  , just $ mkConstMethod' "contains" "containsChar" [charT] boolT+  , just $ mkConstMethod' "count" "countByteArray" [objT c_QByteArray] intT+  , just $ mkConstMethod' "count" "countPtrConstChar" [ptrT $ constT charT] intT+  , just $ mkConstMethod' "count" "countChar" [charT] intT+  , just $ mkConstMethod' "count" "count" np intT+  -- TODO QByteArray::const_reverse_iterator crbegin() const+  -- TODO QByteArray::const_reverse_iterator crend() const+  , just $ mkMethod "clear" np voidT+  , just $ mkMethod' "data" "getData" np $ ptrT charT+  , just $ mkConstMethod' "data" "getDataConst" np $ ptrT $ constT charT+  -- TODO QByteArray::iterator end()+  -- TODO QByteArray::const_iterator end() const+  , just $ mkConstMethod' "endsWith" "endsWith" [objT c_QByteArray] boolT+  , just $ mkConstMethod' "endsWith" "endsWithPtrConstChar" [ptrT $ constT charT] boolT+  , just $ mkConstMethod' "endsWith" "endsWithChar" [charT] boolT+  , just $ mkMethod' "fill" "fill" [charT] $ refT $ objT c_QByteArray+  , just $ mkMethod' "fill" "fillWithSize" [charT, intT] $ refT $ objT c_QByteArray+  , test (qtVersion >= [5, 10]) $ mkConstMethod "front" np charT+  -- TODO QByteRef front()+  , just $ mkConstMethod "isEmpty" np boolT+  , test (qtVersion >= [5, 12]) $ mkConstMethod "isLower" np boolT+  , just $ mkConstMethod "isNull" np boolT+  , test (qtVersion >= [5, 12]) $ mkConstMethod "isUpper" np boolT+  , just $ mkConstMethod "left" [intT] $ objT c_QByteArray+  , just $ mkConstMethod' "leftJustified" "leftJustified" [intT] $ objT c_QByteArray+  , just $ mkConstMethod' "leftJustified" "leftJustifiedWithChar" [intT, charT] $ objT c_QByteArray+  , just $ mkConstMethod' "leftJustified" "leftJustifiedWithCharAndTruncate" [intT, charT, boolT] $ objT c_QByteArray+  , just $ mkConstMethod "length" np intT+  , just $ mkConstMethod "size" np intT     -- TODO Lots more methods.   ] @@ -129,3 +247,11 @@     sayLn "d <- getDataConst ba"     sayLn "len <- size ba"     sayLn "QtahDBS.packCStringLen (d, len)"++(e_Base64Option, fl_Base64Options) =+  makeQtEnumAndFlags (ident1 "QByteArray" "Base64Option") "Base64Options" [includeStd "QByteArray"]+  [ "Base64Encoding"+  , "KeepTrailingEquals"+  , "Base64UrlEncoding"+  , "OmitTrailingEquals"+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QChar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,16 +15,11 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- module Graphics.UI.Qtah.Generator.Interface.Core.QChar (   aModule,   c_QChar,   ) where -#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat)-#endif import Foreign.Hoppy.Generator.Language.Haskell (   addImports,   sayLn,@@ -36,7 +31,6 @@     classHaskellConversionToCppFn,     classHaskellConversionType   ),-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   classSetHaskellConversion,@@ -51,14 +45,15 @@   mkMethod',   mkStaticMethod,   mkStaticMethod',+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Comparable, Equatable),   classAddFeatures,   )-import Foreign.Hoppy.Generator.Types (boolT, charT, intT, enumT, objT, refT, ucharT, ushortT)+import Foreign.Hoppy.Generator.Types (boolT, charT, intT, enumT, objT, refT, ucharT, ushortT, uintT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Imports import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -75,14 +70,15 @@   AQtModule $   makeQtModule ["Core", "QChar"] $   collect-  [ just $ QtExport $ ExportClass c_QChar-  , just $ QtExport $ ExportEnum e_Category-  , just $ QtExport $ ExportEnum e_Decomposition-  , test (qtVersion < [5, 3]) $ QtExport $ ExportEnum e_Joining-  , test (qtVersion >= [5, 3]) $ QtExport $ ExportEnum e_JoiningType-  , just $ QtExport $ ExportEnum e_Direction-  , just $ QtExport $ ExportEnum e_SpecialCharacter-  , just $ QtExport $ ExportEnum e_UnicodeVersion+  [ just $ qtExport c_QChar+  , just $ qtExport e_Category+  , just $ qtExport e_Decomposition+  , test (qtVersion < [5, 3]) $ qtExport e_Joining+  , test (qtVersion >= [5, 3]) $ qtExport e_JoiningType+  , test (qtVersion >= [5, 1]) $ qtExport e_Script+  , just $ qtExport e_Direction+  , just $ qtExport e_SpecialCharacter+  , just $ qtExport e_UnicodeVersion   ]  -- TODO Add more QChar methods.@@ -105,176 +101,378 @@   classSetEntityPrefix "" $   makeClass (ident "QChar") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newFromCellRow" [ucharT, ucharT]   , just $ mkCtor "newFromInt" [intT]   , just $ mkCtor "newFromSpecialCharacter" [enumT e_SpecialCharacter]   , test (qtVersion < [5]) $ mkStaticMethod' "fromAscii" "newFromAscii" [charT] $ objT c_QChar-  , just $ mkStaticMethod' "fromLatin1" "newFromLatin1" [charT] $ objT c_QChar-  , just $ mkConstMethod "category" [] $ enumT e_Category-  , just $ mkConstMethod "cell" [] ucharT-  , just $ mkConstMethod "combiningClass" [] ucharT-  , just $ mkStaticMethod "currentUnicodeVersion" [] $ enumT e_UnicodeVersion-  , just $ mkConstMethod "decomposition" [] $ objT c_QString-  , just $ mkConstMethod "decompositionTag" [] $ enumT e_Decomposition-  , just $ mkConstMethod "digitValue" [] intT-  , just $ mkConstMethod "direction" [] $ enumT e_Direction-  , just $ mkConstMethod "hasMirrored" [] boolT-  , just $ mkConstMethod "isDigit" [] boolT-  , just $ mkConstMethod "isHighSurrogate" [] boolT-  , just $ mkConstMethod "isLetter" [] boolT-  , just $ mkConstMethod "isLetterOrNumber" [] boolT-  , just $ mkConstMethod "isLowSurrogate" [] boolT-  , just $ mkConstMethod "isLower" [] boolT-  , just $ mkConstMethod "isMark" [] boolT-  , just $ mkConstMethod "isNull" [] boolT-  , just $ mkConstMethod "isNumber" [] boolT-  , just $ mkConstMethod "isPrint" [] boolT-  , just $ mkConstMethod "isPunct" [] boolT-  , just $ mkConstMethod "isSpace" [] boolT-  , just $ mkConstMethod "isSymbol" [] boolT-  , just $ mkConstMethod "isTitleCase" [] boolT-  , just $ mkConstMethod "isUpper" [] boolT-  , test (qtVersion < [5, 3]) $ mkConstMethod "joining" [] $ enumT e_Joining-  , test (qtVersion >= [5, 3]) $ mkConstMethod "joiningType" [] $ enumT e_JoiningType-  , just $ mkConstMethod "mirroredChar" [] $ objT c_QChar-  , just $ mkConstMethod "row" [] ucharT-    -- TODO script (>=5.1)-  , test (qtVersion < [5]) $ mkConstMethod "toAscii" [] charT-  , just $ mkConstMethod "toCaseFolded" [] $ objT c_QChar-  , just $ mkConstMethod "toLatin1" [] charT-  , just $ mkConstMethod "toLower" [] $ objT c_QChar-  , just $ mkConstMethod "toTitleCase" [] $ objT c_QChar-  , just $ mkConstMethod "toUpper" [] $ objT c_QChar-  , just $ mkConstMethod' "unicode" "unicode" [] ushortT-  , just $ mkMethod' "unicode" "unicodeRef" [] $ refT ushortT-  , just $ mkConstMethod "unicodeVersion" [] $ enumT e_UnicodeVersion+  , just $ mkConstMethod "category" np $ enumT e_Category+  , just $ mkConstMethod "cell" np ucharT+  , just $ mkConstMethod "combiningClass" np ucharT+  , just $ mkConstMethod "decomposition" np $ objT c_QString+  , just $ mkConstMethod "decompositionTag" np $ enumT e_Decomposition+  , just $ mkConstMethod "digitValue" np intT+  , just $ mkConstMethod "direction" np $ enumT e_Direction+  , just $ mkConstMethod "hasMirrored" np boolT+  , just $ mkConstMethod "isDigit" np boolT+  , just $ mkConstMethod "isHighSurrogate" np boolT+  , just $ mkConstMethod "isLetter" np boolT+  , just $ mkConstMethod "isLetterOrNumber" np boolT+  , just $ mkConstMethod "isLowSurrogate" np boolT+  , just $ mkConstMethod "isLower" np boolT+  , just $ mkConstMethod "isMark" np boolT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "isNumber" np boolT+  , just $ mkConstMethod "isPrint" np boolT+  , just $ mkConstMethod "isPunct" np boolT+  , just $ mkConstMethod "isSpace" np boolT+  , just $ mkConstMethod "isSymbol" np boolT+  , just $ mkConstMethod "isTitleCase" np boolT+  , just $ mkConstMethod "isUpper" np boolT+  , test (qtVersion < [5, 3]) $ mkConstMethod "joining" np $ enumT e_Joining+  , test (qtVersion >= [5, 3]) $ mkConstMethod "joiningType" np $ enumT e_JoiningType+  , just $ mkConstMethod "mirroredChar" np $ objT c_QChar+  , just $ mkConstMethod "row" np ucharT+  , test (qtVersion >= [5, 1]) $ mkConstMethod "script" np $ enumT e_Script+  , test (qtVersion < [5]) $ mkConstMethod "toAscii" np charT+  , just $ mkConstMethod "toCaseFolded" np $ objT c_QChar+  , just $ mkConstMethod "toLatin1" np charT+  , just $ mkConstMethod "toLower" np $ objT c_QChar+  , just $ mkConstMethod "toTitleCase" np $ objT c_QChar+  , just $ mkConstMethod "toUpper" np $ objT c_QChar+  , just $ mkConstMethod' "unicode" "unicode" np ushortT+  , just $ mkMethod' "unicode" "unicodeRef" np $ refT ushortT+  , just $ mkConstMethod "unicodeVersion" np $ enumT e_UnicodeVersion++  , just $ mkStaticMethod "fromLatin1" [charT] $ objT c_QChar+  , just $ mkStaticMethod "currentUnicodeVersion" np $ enumT e_UnicodeVersion+  , just $ mkStaticMethod' "category" "categoryStatic" [uintT] $ enumT e_Category+  , just $ mkStaticMethod' "combiningClass" "combiningClassStatic" [uintT] ucharT+  , just $ mkStaticMethod' "decomposition" "decompositionStatic" [uintT] $ objT c_QString+  , just $ mkStaticMethod' "decompositionTag" "decompositionTagStatic" [uintT] $ enumT e_Decomposition+  , just $ mkStaticMethod' "digitValue" "digitValueStatic" [uintT] intT+  , just $ mkStaticMethod' "direction" "directionStatic" [uintT] $ enumT e_Direction+  , test (qtVersion >= [5]) $ mkStaticMethod' "hasMirrored" "hasMirroredStatic" [uintT] boolT+  , just $ mkStaticMethod "highSurrogate" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isDigit" "isDigitStatic" [uintT] boolT+  , just $ mkStaticMethod' "isHighSurrogate" "isHighSurrogateStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isLetter" "isLetterStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isLetterOrNumber" "isLetterOrNumberStatic" [uintT] boolT+  , just $ mkStaticMethod' "isLowSurrogate" "isLowSurrogateStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isLower" "isLowerStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isMark" "isMarkStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isNonCharacter" "isNonCharacterStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isNumber" "isNumberStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isPrint" "isPrintStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isPunct" "isPunctStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isSpace" "isSpaceStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isSurrogate" "isSurrogateStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isSymbol" "isSymbolStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isTitleCase" "isTitleCaseStatic" [uintT] boolT+  , test (qtVersion >= [5]) $ mkStaticMethod' "isUpper" "isUpperStatic" [uintT] boolT+  , test (qtVersion >= [5, 3]) $ mkStaticMethod' "joiningType" "joiningTypeStatic" [uintT] $ enumT e_JoiningType+  , just $ mkStaticMethod "lowSurrogate" [uintT] ushortT+  , just $ mkStaticMethod' "mirroredChar" "mirroredCharStatic" [uintT] uintT+  , just $ mkStaticMethod "requiresSurrogates" [uintT] boolT+  , test (qtVersion >= [5, 1]) $ mkStaticMethod' "script" "scriptStatic" [uintT] $ enumT e_Script+  , just $ mkStaticMethod' "surrogateToUcs4" "surrogateToUcs4" [ushortT, ushortT] uintT+  , just $ mkStaticMethod' "surrogateToUcs4" "surrogateToUcs4WithQChar" [objT c_QChar, objT c_QChar] uintT+  , just $ mkStaticMethod' "toCaseFolded" "toCaseFoldedStatic" [uintT] uintT+  , just $ mkStaticMethod' "toLower" "toLowerStatic" [uintT] uintT+  , just $ mkStaticMethod' "toTitleCase" "toTitleCaseStatic" [uintT] uintT+  , just $ mkStaticMethod' "toUpper" "toUpperStatic" [uintT] uintT+  , just $ mkStaticMethod' "unicodeVersion" "unicodeVersionStatic" [uintT] $ enumT e_UnicodeVersion   ]  e_Category =-  makeQtEnum (ident1 "QChar" "Category") [includeStd "QChar"]+  makeQtEnum (ident1 "QChar" "Category") [includeStd "QChar"] $+  collect   [ -- Normative.-    (1, ["mark", "non", "spacing"])-  , (2, ["mark", "spacing", "combining"])-  , (3, ["mark", "enclosing"])-  , (4, ["number", "decimal", "digit"])-  , (5, ["number", "letter"])-  , (6, ["number", "other"])-  , (7, ["separator", "space"])-  , (8, ["separator", "line"])-  , (9, ["separator", "paragraph"])-  , (10, ["other", "control"])-  , (11, ["other", "format"])-  , (12, ["other", "surrogate"])-  , (13, ["other", "private", "use"])-  , (14, ["other", "not", "assigned"])+    just "Mark_NonSpacing"+  , just "Mark_SpacingCombining"+  , just "Mark_Enclosing"+  , just "Number_DecimalDigit"+  , just "Number_Letter"+  , just "Number_Other"+  , just "Separator_Space"+  , just "Separator_Line"+  , just "Separator_Paragraph"+  , just "Other_Control"+  , just "Other_Format"+  , just "Other_Surrogate"+  , just "Other_PrivateUse"+  , just "Other_NotAssigned"     -- Informative.-  , (15, ["letter", "uppercase"])-  , (16, ["letter", "lowercase"])-  , (17, ["letter", "titlecase"])-  , (18, ["letter", "modifier"])-  , (19, ["letter", "other"])-  , (20, ["punctuation", "connector"])-  , (21, ["punctuation", "dash"])-  , (22, ["punctuation", "open"])-  , (23, ["punctuation", "close"])-  , (24, ["punctuation", "initial", "quote"])-  , (25, ["punctuation", "final", "quote"])-  , (26, ["punctuation", "other"])-  , (27, ["symbol", "math"])-  , (28, ["symbol", "currency"])-  , (29, ["symbol", "modifier"])-  , (30, ["symbol", "other"])-  , (0, ["no", "category"])+  , just "Letter_Uppercase"+  , just "Letter_Lowercase"+  , just "Letter_Titlecase"+  , just "Letter_Modifier"+  , just "Letter_Other"+  , just "Punctuation_Connector"+  , just "Punctuation_Dash"+  , just "Punctuation_Open"+  , just "Punctuation_Close"+  , just "Punctuation_InitialQuote"+  , just "Punctuation_FinalQuote"+  , just "Punctuation_Other"+  , just "Symbol_Math"+  , just "Symbol_Currency"+  , just "Symbol_Modifier"+  , just "Symbol_Other"+  , test (qtVersion <= [5, 0]) "NoCategory"   ]  e_Decomposition =   makeQtEnum (ident1 "QChar" "Decomposition") [includeStd "QChar"]-  [ (0, ["no", "decomposition"])-  , (1, ["canonical"])-  , (8, ["circle"])-  , (16, ["compat"])-  , (6, ["final"])-  , (2, ["font"])-  , (17, ["fraction"])-  , (4, ["initial"])-  , (7, ["isolated"])-  , (5, ["medial"])-  , (13, ["narrow"])-  , (3, ["no", "break"])-  , (14, ["small"])-  , (15, ["square"])-  , (10, ["sub"])-  , (9, ["super"])-  , (11, ["vertical"])-  , (12, ["wide"])+  [ "NoDecomposition"+  , "Canonical"+  , "Circle"+  , "Compat"+  , "Final"+  , "Font"+  , "Fraction"+  , "Initial"+  , "Isolated"+  , "Medial"+  , "Narrow"+  , "NoBreak"+  , "Small"+  , "Square"+  , "Sub"+  , "Super"+  , "Vertical"+  , "Wide"   ]  e_Direction =   makeQtEnum (ident1 "QChar" "Direction") [includeStd "QChar"]-  [ (13, ["dir", "al"])-  , (5, ["dir", "an"])-  , (7, ["dir", "b"])-  , (18, ["dir", "bn"])-  , (6, ["dir", "cs"])-  , (2, ["dir", "en"])-  , (3, ["dir", "es"])-  , (4, ["dir", "et"])-  , (0, ["dir", "l"])-  , (11, ["dir", "lre"])-  , (12, ["dir", "lro"])-  , (17, ["dir", "nsm"])-  , (10, ["dir", "on"])-  , (16, ["dir", "pdf"])-  , (1, ["dir", "r"])-  , (14, ["dir", "rle"])-  , (15, ["dir", "rlo"])-  , (8, ["dir", "s"])-  , (9, ["dir", "ws"])+  [ "DirAL"+  , "DirAN"+  , "DirB"+  , "DirBN"+  , "DirCS"+  , "DirEN"+  , "DirES"+  , "DirET"+  , "DirL"+  , "DirLRE"+  , "DirLRO"+  , "DirNSM"+  , "DirON"+  , "DirPDF"+  , "DirR"+  , "DirRLE"+  , "DirRLO"+  , "DirS"+  , "DirWS"   ]  -- | Removed in Qt 5.3.0. e_Joining =   makeQtEnum (ident1 "QChar" "Joining") [includeStd "QChar"]-  [ (3, ["center"])-  , (1, ["dual"])-  , (0, ["other", "joining"])-  , (2, ["right"])+  [ "Center"+  , "Dual"+  , "OtherJoining"+  , "Right"   ]  -- | Since Qt 5.3.0. e_JoiningType =   makeQtEnum (ident1 "QChar" "JoiningType") [includeStd "QChar"]-  [ (0, ["joining", "none"])-  , (1, ["joining", "causing"])-  , (2, ["joining", "dual"])-  , (3, ["joining", "right"])-  , (4, ["joining", "left"])-  , (5, ["joining", "transparent"])+  [ "Joining_None"+  , "Joining_Causing"+  , "Joining_Dual"+  , "Joining_Right"+  , "Joining_Left"+  , "Joining_Transparent"   ]  e_SpecialCharacter =-  makeQtEnum (ident1 "QChar" "SpecialCharacter") [includeStd "QChar"]-  [ (0x0000, ["null"])-  , (0x00a0, ["nbsp"])-  , (0x2028, ["line", "separator"])-  , (0x2029, ["paragraph", "separator"])-  , (0xfffc, ["object", "replacement", "character"])-  , (0xfffd, ["replacement", "character"])-  , (0xfeff, ["byte", "order", "mark"])-  , (0xfffe, ["byte", "order", "swapped"])+  makeQtEnum (ident1 "QChar" "SpecialCharacter") [includeStd "QChar"] $+  collect+  [ just "Null"+  , test (qtVersion >= [5, 0]) "Tabulation"+  , test (qtVersion >= [5, 0]) "LineFeed"+  , test (qtVersion >= [5, 0]) "CarriageReturn"+  , test (qtVersion >= [5, 0]) "Space"+  , just "Nbsp"+  , test (qtVersion >= [5, 0]) "SoftHyphen"+  , just "ReplacementCharacter"+  , just "ObjectReplacementCharacter"+  , just "ByteOrderMark"+  , just "ByteOrderSwapped"+  , just "ParagraphSeparator"+  , just "LineSeparator"+  , test (qtVersion >= [5, 0]) "LastValidCodePoint"   ]  e_UnicodeVersion =-  makeQtEnum (ident1 "QChar" "UnicodeVersion") [includeStd "QChar"]-  [ (1, ["unicode", "1_1"])-  , (2, ["unicode", "2_0"])-  , (3, ["unicode", "2_1_2"])-  , (4, ["unicode", "3_0"])-  , (5, ["unicode", "3_1"])-  , (6, ["unicode", "3_2"])-  , (7, ["unicode", "4_0"])-  , (8, ["unicode", "4_1"])-  , (9, ["unicode", "5_0"])-  , (0, ["unicode", "unassigned"])+  makeQtEnum (ident1 "QChar" "UnicodeVersion") [includeStd "QChar"] $+  collect+  [ just "Unicode_1_1"+  , just "Unicode_2_0"+  , just "Unicode_2_1_2"+  , just "Unicode_3_0"+  , just "Unicode_3_1"+  , just "Unicode_3_2"+  , just "Unicode_4_0"+  , just "Unicode_4_1"+  , just "Unicode_5_0"+  , just "Unicode_5_1"+  , just "Unicode_5_2"+  , just "Unicode_6_0"+  , just "Unicode_6_1"+  , just "Unicode_6_2"+  , test (qtVersion >= [5, 3]) "Unicode_6_3"+  , test (qtVersion >= [5, 5]) "Unicode_7_0"+  , test (qtVersion >= [5, 6]) "Unicode_8_0"+  , test (qtVersion >= [5, 11]) "Unicode_9_0"+  , test (qtVersion >= [5, 11]) "Unicode_10_0"+  , just "Unicode_Unassigned"   ]++e_Script =+    makeQtEnum (ident1 "QChar" "Script") [includeStd "QChar"]+    [ "Script_Unknown"+    , "Script_Inherited"+    , "Script_Common"+    , "Script_Latin"+    , "Script_Greek"+    , "Script_Cyrillic"+    , "Script_Armenian"+    , "Script_Hebrew"+    , "Script_Arabic"+    , "Script_Syriac"+    , "Script_Thaana"+    , "Script_Devanagari"+    , "Script_Bengali"+    , "Script_Gurmukhi"+    , "Script_Gujarati"+    , "Script_Oriya"+    , "Script_Tamil"+    , "Script_Telugu"+    , "Script_Kannada"+    , "Script_Malayalam"+    , "Script_Sinhala"+    , "Script_Thai"+    , "Script_Lao"+    , "Script_Tibetan"+    , "Script_Myanmar"+    , "Script_Georgian"+    , "Script_Hangul"+    , "Script_Ethiopic"+    , "Script_Cherokee"+    , "Script_CanadianAboriginal"+    , "Script_Ogham"+    , "Script_Runic"+    , "Script_Khmer"+    , "Script_Mongolian"+    , "Script_Hiragana"+    , "Script_Katakana"+    , "Script_Bopomofo"+    , "Script_Han"+    , "Script_Yi"+    , "Script_OldItalic"+    , "Script_Gothic"+    , "Script_Deseret"+    , "Script_Tagalog"+    , "Script_Hanunoo"+    , "Script_Buhid"+    , "Script_Tagbanwa"+    , "Script_Coptic"+    , "Script_Limbu"+    , "Script_TaiLe"+    , "Script_LinearB"+    , "Script_Ugaritic"+    , "Script_Shavian"+    , "Script_Osmanya"+    , "Script_Cypriot"+    , "Script_Braille"+    , "Script_Buginese"+    , "Script_NewTaiLue"+    , "Script_Glagolitic"+    , "Script_Tifinagh"+    , "Script_SylotiNagri"+    , "Script_OldPersian"+    , "Script_Kharoshthi"+    , "Script_Balinese"+    , "Script_Cuneiform"+    , "Script_Phoenician"+    , "Script_PhagsPa"+    , "Script_Nko"+    , "Script_Sundanese"+    , "Script_Lepcha"+    , "Script_OlChiki"+    , "Script_Vai"+    , "Script_Saurashtra"+    , "Script_KayahLi"+    , "Script_Rejang"+    , "Script_Lycian"+    , "Script_Carian"+    , "Script_Lydian"+    , "Script_Cham"+    , "Script_TaiTham"+    , "Script_TaiViet"+    , "Script_Avestan"+    , "Script_EgyptianHieroglyphs"+    , "Script_Samaritan"+    , "Script_Lisu"+    , "Script_Bamum"+    , "Script_Javanese"+    , "Script_MeeteiMayek"+    , "Script_ImperialAramaic"+    , "Script_OldSouthArabian"+    , "Script_InscriptionalParthian"+    , "Script_InscriptionalPahlavi"+    , "Script_OldTurkic"+    , "Script_Kaithi"+    , "Script_Batak"+    , "Script_Brahmi"+    , "Script_Mandaic"+    , "Script_Chakma"+    , "Script_MeroiticCursive"+    , "Script_MeroiticHieroglyphs"+    , "Script_Miao"+    , "Script_Sharada"+    , "Script_SoraSompeng"+    , "Script_Takri"+    , "Script_CaucasianAlbanian"+    , "Script_BassaVah"+    , "Script_Duployan"+    , "Script_Elbasan"+    , "Script_Grantha"+    , "Script_PahawhHmong"+    , "Script_Khojki"+    , "Script_LinearA"+    , "Script_Mahajani"+    , "Script_Manichaean"+    , "Script_MendeKikakui"+    , "Script_Modi"+    , "Script_Mro"+    , "Script_OldNorthArabian"+    , "Script_Nabataean"+    , "Script_Palmyrene"+    , "Script_PauCinHau"+    , "Script_OldPermic"+    , "Script_PsalterPahlavi"+    , "Script_Siddham"+    , "Script_Khudawadi"+    , "Script_Tirhuta"+    , "Script_WarangCiti"+    , "Script_Ahom"+    , "Script_AnatolianHieroglyphs"+    , "Script_Hatran"+    , "Script_Multani"+    , "Script_OldHungarian"+    , "Script_SignWriting"+    , "Script_Adlam"+    , "Script_Bhaiksuki"+    , "Script_Marchen"+    , "Script_Newa"+    , "Script_Osage"+    , "Script_Tangut"+    , "Script_MasaramGondi"+    , "Script_Nushu"+    , "Script_Soyombo"+    , "Script_ZanabazarSquare"+    ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QChildEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,6 +27,7 @@   makeClass,   mkConstMethod,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent, e_Type)@@ -47,8 +48,8 @@   classSetEntityPrefix "" $   makeClass (ident "QChildEvent") Nothing [c_QEvent]   [ mkCtor "new" [enumT e_Type, ptrT $ objT c_QObject]-  , mkConstMethod "added" [] boolT-  , mkConstMethod "child" [] $ ptrT $ objT c_QObject-  , mkConstMethod "polished" [] boolT-  , mkConstMethod "removed" [] boolT+  , mkConstMethod "added" np boolT+  , mkConstMethod "child" np $ ptrT $ objT c_QObject+  , mkConstMethod "polished" np boolT+  , mkConstMethod "removed" np boolT   ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QCoreApplication.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   MethodApplicability (MStatic),   Purity (Nonpure),   addReqIncludes,@@ -34,10 +33,12 @@   makeClass,   mkStaticMethod,   mkStaticMethod',+  np,   )-import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT, voidT, enumT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qlonglong, e_ApplicationAttribute)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)@@ -50,7 +51,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QCoreApplication"]-  [ QtExport $ ExportClass c_QCoreApplication ]+  [ qtExport c_QCoreApplication ]  c_QCoreApplication =   addReqIncludes [ includeStd "QCoreApplication"@@ -61,25 +62,60 @@   collect   [ just $ makeFnMethod (ident2 "qtah" "qcoreapplication" "create") "new" MStatic Nonpure     [objT c_QStringList] $ ptrT $ objT c_QCoreApplication-  , just $ mkStaticMethod "applicationName" [] $ objT c_QString-  , just $ mkStaticMethod "applicationVersion" [] $ objT c_QString-  , test (qtVersion >= [4, 1]) $ mkStaticMethod "arguments" [] $ objT c_QStringList-  , just $ mkStaticMethod "exec" [] voidT++  , just $ mkStaticMethod "addLibraryPath" [objT c_QString] voidT+  , just $ mkStaticMethod "applicationDirPath" np $ objT c_QString+  , just $ mkStaticMethod "applicationFilePath" np $ objT c_QString+  , just $ mkStaticMethod "applicationName" np $ objT c_QString+  , test (qtVersion >= [4, 4]) $ mkStaticMethod "applicationPid" np qlonglong+  , just $ mkStaticMethod "applicationVersion" np $ objT c_QString+  , test (qtVersion >= [4, 1]) $ mkStaticMethod "arguments" np $ objT c_QStringList+  , just $ mkStaticMethod "closingDown" np boolT+  -- TODO QAbstractEventDispatcher * eventDispatcher()+  , just $ mkStaticMethod "exec" np voidT   , just $ mkStaticMethod "exit" [intT] voidT-  , just $ mkStaticMethod' "instance" "getInstance" [] $ ptrT $ objT c_QCoreApplication-  , test (qtVersion >= [5, 0]) $ mkStaticMethod "isQuitLockEnabled" [] boolT-  , just $ mkStaticMethod "organizationDomain" [] $ objT c_QString-  , just $ mkStaticMethod "organizationName" [] $ objT c_QString+  -- TODO bool installTranslator(QTranslator *translationFile)+  , just $ mkStaticMethod' "instance" "getInstance" np $ ptrT $ objT c_QCoreApplication+  , test (qtVersion >= [5, 0]) $ mkStaticMethod "isQuitLockEnabled" np boolT+  , test (qtVersion >= [5, 3]) $ mkStaticMethod "isSetuidAllowed" np boolT+  , just $ mkStaticMethod "libraryPaths" np $ objT c_QStringList+  , just $ mkStaticMethod "organizationDomain" np $ objT c_QString+  , just $ mkStaticMethod "organizationName" np $ objT c_QString   , test (qtVersion >= [4, 3]) $ mkStaticMethod' "postEvent" "postEvent"     [ptrT $ objT c_QObject, ptrT $ objT c_QEvent] voidT   , test (qtVersion >= [4, 3]) $ mkStaticMethod' "postEvent" "postEventWithPriority"     [ptrT $ objT c_QObject, ptrT $ objT c_QEvent, intT] voidT-  , just $ mkStaticMethod "quit" [] voidT+  -- TODO void processEvents(QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents)+  -- TODO void processEvents(QEventLoop::ProcessEventsFlags flags, int maxtime)+  , just $ mkStaticMethod "quit" np voidT+  , just $ mkStaticMethod "removeLibraryPath" [objT c_QString] voidT+  , just $ mkStaticMethod' "removePostedEvents" "removePostedEvents" [ptrT $ objT c_QObject] voidT+  , just $ mkStaticMethod' "removePostedEvents" "removePostedEventsWithEventType" [ ptrT $ objT c_QObject, intT] voidT+  -- TODO bool QCoreApplication::removeTranslator(QTranslator *translationFile)   , just $ mkStaticMethod "sendEvent" [ptrT $ objT c_QObject, ptrT $ objT c_QEvent] boolT+  , just $ mkStaticMethod' "sendPostedEvents" "sendPostedEvents" np voidT+  , just $ mkStaticMethod' "sendPostedEvents" "sendPostedEventsWithObject" [ptrT $ objT c_QObject] voidT+  , just $ mkStaticMethod' "sendPostedEvents" "sendPostedEventsWithObjectAndEventType" [ ptrT $ objT c_QObject, intT] voidT   , just $ mkStaticMethod "setApplicationName" [objT c_QString] voidT   , just $ mkStaticMethod "setApplicationVersion" [objT c_QString] voidT+  , just $ mkStaticMethod' "setAttribute" "setAttribute" [enumT e_ApplicationAttribute] voidT+  , just $ mkStaticMethod' "setAttribute" "setAttributeWithBool" [enumT e_ApplicationAttribute, boolT] voidT+  -- TODO void setEventDispatcher(QAbstractEventDispatcher *eventDispatcher)+  , just $ mkStaticMethod "setLibraryPaths" [objT c_QStringList] voidT   , just $ mkStaticMethod "setOrganizationDomain" [objT c_QString] voidT   , just $ mkStaticMethod "setOrganizationName" [objT c_QString] voidT   , test (qtVersion >= [5, 0]) $ mkStaticMethod "setQuitLockEnabled" [boolT] voidT-    -- TODO Other methods.+  , test (qtVersion >= [5, 3]) $ mkStaticMethod "setSetuidAllowed" [boolT] voidT+  , just $ mkStaticMethod "startingUp" np boolT+  , just $ mkStaticMethod "testAttribute" [enumT e_ApplicationAttribute] boolT+    -- TODO QString wrappers for these.+  , just $ makeFnMethod (ident2 "qtah" "qcoreapplication" "translate")+    "translate" MStatic Nonpure+    [objT c_QString, objT c_QString] $ objT c_QString+  , just $ makeFnMethod (ident2 "qtah" "qcoreapplication" "translate")+    "translateWithDisambiguation" MStatic Nonpure+    [objT c_QString, objT c_QString, objT c_QString] $ objT c_QString+  , just $ makeFnMethod (ident2 "qtah" "qcoreapplication" "translate")+    "translateWithDisambiguationAndNum" MStatic Nonpure+    [objT c_QString, objT c_QString, objT c_QString, intT] $ objT c_QString   ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QCryptographicHash.hs view
@@ -0,0 +1,89 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QCryptographicHash (+  aModule,+  c_QCryptographicHash,+  e_Algorithm,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkStaticMethod,+  mkCtor,+  mkMethod',+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Types (boolT, charT, intT, voidT, enumT, constT, objT, ptrT, refT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QIODevice (c_QIODevice)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QCryptographicHash"] [4, 3] $+  collect+  [ just $ qtExport c_QCryptographicHash+  , just $ qtExport e_Algorithm+  ]++c_QCryptographicHash =+  addReqIncludes [ includeStd "QCryptographicHash" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QCryptographicHash") Nothing [] $+  collect+  [ just $ mkCtor "new" [enumT e_Algorithm]+  , just $ mkMethod' "addData" "addDataRaw" [ptrT $ constT charT, intT] voidT+  , just $ mkMethod' "addData" "addDataByteArray" [refT $ constT $ objT c_QByteArray] voidT+  , test (qtVersion >= [5, 0]) $ mkMethod' "addData" "addDataIODevice" [ptrT $ objT c_QIODevice] boolT+  , just $ mkStaticMethod "hash" [refT $ constT $ objT c_QByteArray, enumT e_Algorithm] $ objT c_QByteArray+  , test (qtVersion >= [5, 12]) $ mkStaticMethod "hashLength" [enumT e_Algorithm] intT+  , just $ mkMethod "reset" np $ voidT+  , just $ mkConstMethod "result" np $ objT c_QByteArray+  ]++e_Algorithm =+  makeQtEnum (ident1 "QCryptographicHash" "Algorithm") [includeStd "QCryptographicHash"] $+  collect+  [ just "Md4"+  , just "Md5"+  , just "Sha1"+  , test (qtVersion >= [5, 0]) "Sha224"+  , test (qtVersion >= [5, 0]) "Sha256"+  , test (qtVersion >= [5, 0]) "Sha384"+  , test (qtVersion >= [5, 0]) "Sha512"+  , test (qtVersion >= [5, 1]) "Sha3_224"+  , test (qtVersion >= [5, 1]) "Sha3_256"+  , test (qtVersion >= [5, 1]) "Sha3_384"+  , test (qtVersion >= [5, 1]) "Sha3_512"+  , test (qtVersion >= [5, 9, 2]) "Keccak_224"+  , test (qtVersion >= [5, 9, 2]) "Keccak_256"+  , test (qtVersion >= [5, 9, 2]) "Keccak_384"+  , test (qtVersion >= [5, 9, 2]) "Keccak_512"+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QDate.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2018 The Qtah Authors.+-- Copyright 2018-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,11 +21,11 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,   ident,+  ident1,   includeStd,   makeClass,   mkConstMethod,@@ -34,75 +34,80 @@   mkMethod,   mkStaticMethod,   mkStaticMethod',+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (-  ClassFeature (Assignable, Copyable, Equatable),+  ClassFeature (Assignable, Copyable, Equatable, Comparable),   classAddFeatures,   )-import Foreign.Hoppy.Generator.Types (-  boolT, intT, int64T, objT,-  )+import Foreign.Hoppy.Generator.Types (boolT, intT, int64T, objT, enumT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_DateFormat) import Graphics.UI.Qtah.Generator.Types  {-# ANN module "HLint: ignore Use camelCase" #-}  aModule =   AQtModule $-  makeQtModule ["Core", "QDate"]-  [ QtExport $ ExportClass c_QDate+  makeQtModule ["Core", "QDate"] $+  collect+  [ just $ qtExport c_QDate+  , test (qtVersion >= [4, 5]) $ qtExport e_MonthNameType   ]  c_QDate =   addReqIncludes [includeStd "QDate"] $   classSetConversionToGc $-  classAddFeatures [Assignable, Copyable, Equatable] $+  classAddFeatures [Assignable, Copyable, Equatable, Comparable] $   classSetEntityPrefix "" $   makeClass (ident "QDate") Nothing [] $   collect   [   -- Public Functions-    just $ mkCtor "new" []+    just $ mkCtor "new" np   , just $ mkCtor "newWithYmd" [intT, intT, intT]   , just $ mkConstMethod "addDays" [int64T] (objT c_QDate)   , just $ mkConstMethod "addMonths" [intT] (objT c_QDate)   , just $ mkConstMethod "addYears" [intT] (objT c_QDate)-  , just $ mkConstMethod "day" [] intT-  , just $ mkConstMethod "dayOfWeek" [] intT-  , just $ mkConstMethod "dayOfYear" [] intT-  , just $ mkConstMethod "daysInMonth" [] intT-  , just $ mkConstMethod "daysInYear" [] intT+  , just $ mkConstMethod "day" np intT+  , just $ mkConstMethod "dayOfWeek" np intT+  , just $ mkConstMethod "dayOfYear" np intT+  , just $ mkConstMethod "daysInMonth" np intT+  , just $ mkConstMethod "daysInYear" np intT   , just $ mkConstMethod "daysTo" [objT c_QDate] int64T   -- TODO test (qtVersion >= [4, 5]) $ mkConstMethod "getDate"   --      (intT *year, intT *month, intT *day) voidT-  , just $ mkConstMethod "isNull" [] boolT-  , just $ mkConstMethod "isValid" [] boolT-  , just $ mkConstMethod "month" [] intT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "isValid" np boolT+  , just $ mkConstMethod "month" np intT   , test (qtVersion >= [4, 2]) $ mkMethod "setDate" [intT, intT, intT] boolT-  , just $ mkConstMethod "toJulianDay" [] int64T-  , just $ mkConstMethod'-      "toString" "toStringWithStringFormat" [objT c_QString] (objT c_QString)-  , just $ mkConstMethod "toString" [] (objT c_QString)-  -- TODO just $ mkConstMethod' "toString" "toStringWithDateFormat"-  --      [DateFormat] (objT c_QString)+  , just $ mkConstMethod "toJulianDay" np int64T+  , just $ mkConstMethod' "toString" "toStringWithStringFormat" [objT c_QString] (objT c_QString)+  , just $ mkConstMethod' "toString" "toStringWithDateFormat" [enumT e_DateFormat] (objT c_QString)+  , just $ mkConstMethod "toString" np (objT c_QString)   -- TODO just $ mkConstMethod' "toString" "toStringWithStringViewFormat"   --      [objT c_QStringView] (objT c_QString)-  , just $ mkConstMethod "weekNumber" [] intT+  , just $ mkConstMethod "weekNumber" np intT   -- TODO just $ mkConstMethod' "weekNumber" "weekNumberWithYearNumber"   --      (intT *yearNumber = Q_NULLPTR) intT-  , just $ mkConstMethod "year" [] intT+  , just $ mkConstMethod "year" np intT    -- Static Public Members-  , just $ mkStaticMethod "currentDate" [] (objT c_QDate)+  , just $ mkStaticMethod "currentDate" np (objT c_QDate)   , just $ mkStaticMethod "fromJulianDay" [int64T] (objT c_QDate)   , just $ mkStaticMethod "fromString" [objT c_QString] (objT c_QDate)-  -- TODO just $ mkStaticMethod' "fromString" "fromStringWithDateFormat"-  --      [objT c_QString, Qt::DateFormat] (objT c_QDate)+  , just $ mkStaticMethod' "fromString" "fromStringWithDateFormat" [objT c_QString, enumT e_DateFormat] (objT c_QDate)   , just $ mkStaticMethod' "fromString" "fromStringWithStringFormat"     [objT c_QString, objT c_QString] (objT c_QDate)   , just $ mkStaticMethod "isLeapYear" [intT] boolT   , just $ mkStaticMethod' "isValid" "isValidYmd" [intT, intT, intT] boolT+  ]++e_MonthNameType =+  makeQtEnum (ident1 "QDate" "MonthNameType") [includeStd "QDate"]+  [ "DateFormat"+  , "StandaloneFormat"   ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QDateTime.hs view
@@ -0,0 +1,131 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QDateTime (+  aModule,+  c_QDateTime,+  ) where++import Foreign.Hoppy.Generator.Spec (+  classSetConversionToGc,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkStaticMethod,+  mkStaticMethod',+  mkCtor,+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Comparable, Equatable, Copyable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (boolT, intT, voidT, enumT, constT, objT, refT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QDate (c_QDate)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QTime (c_QTime)+import Graphics.UI.Qtah.Generator.Interface.Core.QTimeZone (c_QTimeZone)+--import Graphics.UI.Qtah.Generator.Interface.Core.QDataStream (c_QDataStream)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qint64, e_TimeSpec, e_DateFormat)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QDateTime"] $+  [qtExport c_QDateTime]++c_QDateTime =+  addReqIncludes [ includeStd "QDateTime" ] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Comparable, Equatable, Copyable] $+  classSetEntityPrefix "" $+  makeClass (ident "QDateTime") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithDate" [refT $ constT $ objT c_QDate]+  , just $ mkCtor "newWithDateAndTime" [refT $ constT $ objT c_QDate, refT $ constT $ objT c_QTime]+  , just $ mkCtor "newWithDateAndTimeAndTimeSpec" [refT $ constT $ objT c_QDate, refT $ constT $ objT c_QTime, enumT e_TimeSpec]+  , test (qtVersion >= [5, 2]) $ mkCtor "newWithDateAndTimeAndTimeSpecAndOffset" [refT $ constT $ objT c_QDate, refT $ constT $ objT c_QTime, enumT e_TimeSpec, intT]+  , test (qtVersion >= [5, 2]) $ mkCtor "newWithDateAndTimeAndTimeZone" [refT $ constT $ objT c_QDate, refT $ constT $ objT c_QTime, refT $ constT $ objT c_QTimeZone]+  , just $ mkConstMethod "addDays" [qint64] $ objT c_QDateTime+  , just $ mkConstMethod "addMSecs" [qint64] $ objT c_QDateTime+  , just $ mkConstMethod "addMonths" [intT] $ objT c_QDateTime+  , just $ mkConstMethod "addSecs" [qint64] $ objT c_QDateTime+  , just $ mkConstMethod "addYears" [intT] $ objT c_QDateTime+  , just $ mkStaticMethod "currentDateTime" np $ objT c_QDateTime+  , test (qtVersion >= [4, 7]) $ mkStaticMethod "currentDateTimeUtc" np $ objT c_QDateTime+  , test (qtVersion >= [4, 7]) $ mkStaticMethod "currentMSecsSinceEpoch" np qint64+  , test (qtVersion >= [5, 8]) $ mkStaticMethod "currentSecsSinceEpoch" np qint64+  , just $ mkConstMethod "date" np $ objT c_QDate+  , just $ mkConstMethod "daysTo" [refT $ constT $ objT c_QDateTime] qint64+  --, test (qtVersion >= [5, 5]) $ mkStaticMethod "fromCFDate" [objT c_CFDateRef] $ objT c_QDateTime+  , test (qtVersion >= [4, 7]) $ mkStaticMethod' "fromMSecsSinceEpoch" "fromMSecsSinceEpoch" [qint64] $ objT c_QDateTime+  , test (qtVersion >= [5, 2]) $ mkStaticMethod' "fromMSecsSinceEpoch" "fromMSecsSinceEpochWithTimeSpec" [qint64, enumT e_TimeSpec] $ objT c_QDateTime+  , test (qtVersion >= [5, 2]) $ mkStaticMethod' "fromMSecsSinceEpoch" "fromMSecsSinceEpochWithTimeSpecAndOffset" [qint64, enumT e_TimeSpec, intT] $ objT c_QDateTime+  , test (qtVersion >= [5, 2]) $ mkStaticMethod' "fromMSecsSinceEpoch" "fromMSecsSinceEpochWithTimeZone" [qint64, refT $ constT $ objT c_QTimeZone] $ objT c_QDateTime+  --, test (qtVersion >= [5, 5]) $ mkStaticMethod "fromNSDate" [ptrT $ constT $ objT c_NSDate] $ objT c_QDateTime+  , test (qtVersion >= [5, 8]) $ mkStaticMethod' "fromSecsSinceEpoch" "fromSecsSinceEpoch" [qint64] $ objT c_QDateTime+  , test (qtVersion >= [5, 8]) $ mkStaticMethod' "fromSecsSinceEpoch" "fromSecsSinceEpochWithTimeSpec" [qint64, enumT e_TimeSpec] $ objT c_QDateTime+  , test (qtVersion >= [5, 8]) $ mkStaticMethod' "fromSecsSinceEpoch" "fromSecsSinceEpochWithTimeSpecAndOffset" [qint64, enumT e_TimeSpec, intT] $ objT c_QDateTime+  , test (qtVersion >= [5, 8]) $ mkStaticMethod' "fromSecsSinceEpoch" "fromSecsSinceEpochWithTimeZone" [qint64, refT $ constT $ objT c_QTimeZone] $ objT c_QDateTime+  , just $ mkStaticMethod' "fromString" "fromString" [refT $ constT $ objT c_QString] $ objT c_QDateTime+  , just $ mkStaticMethod' "fromString" "fromStringWithDateFormat" [refT $ constT $ objT c_QString, enumT e_DateFormat] $ objT c_QDateTime+  , just $ mkStaticMethod' "fromString" "fromStringWithStringFormat" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] $ objT c_QDateTime+  , test (qtVersion >= [5, 2]) $ mkConstMethod "isDaylightTime" np boolT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "isValid" np boolT+  , just $ mkConstMethod "msecsTo" [refT $ constT $ objT c_QDateTime] qint64+  , test (qtVersion >= [5, 2]) $ mkConstMethod "offsetFromUtc" np intT+  , just $ mkConstMethod "secsTo" [refT $ constT $ objT c_QDateTime] qint64+  , just $ mkMethod "setDate" [refT $ constT $ objT c_QDate] voidT+  , test (qtVersion >= [4, 7]) $ mkMethod "setMSecsSinceEpoch" [qint64] voidT+  , test (qtVersion >= [5, 2]) $ mkMethod "setOffsetFromUtc" [intT] voidT+  , test (qtVersion >= [5, 8]) $ mkMethod "setSecsSinceEpoch" [qint64] voidT+  , just $ mkMethod "setTime" [refT $ constT $ objT c_QTime] voidT+  , just $ mkMethod "setTimeSpec" [enumT e_TimeSpec] voidT+  , test (qtVersion >= [5, 2]) $ mkMethod "setTimeZone" [refT $ constT $ objT c_QTimeZone] voidT+  , test (qtVersion >= [5, 0]) $ mkMethod "swap" [refT $ objT c_QDateTime] voidT+  , just $ mkConstMethod "time" np $ objT c_QTime+  , just $ mkConstMethod "timeSpec" np $ enumT e_TimeSpec+  , test (qtVersion >= [5, 2]) $ mkConstMethod "timeZone" np $ objT c_QTimeZone+  , test (qtVersion >= [5, 2]) $ mkConstMethod "timeZoneAbbreviation" np $ objT c_QString+  --, test (qtVersion >= [5, 5]) $ mkConstMethod "toCFDate" np $ objT c_CFDateRef+  , just $ mkConstMethod "toLocalTime" np $ objT c_QDateTime+  , test (qtVersion >= [4, 7]) $ mkConstMethod "toMSecsSinceEpoch" np qint64+  --, test (qtVersion >= [5, 5]) $ mkConstMethod "toNSDate" np $ ptrT $ objT c_NSDate+  , test (qtVersion >= [5, 2]) $ mkConstMethod "toOffsetFromUtc" [intT] $ objT c_QDateTime+  , test (qtVersion >= [5, 8]) $ mkConstMethod "toSecsSinceEpoch" np qint64+  , just $ mkConstMethod' "toString" "toString" np $ objT c_QString+  , just $ mkConstMethod' "toString" "toStringWithDateFormat" [enumT e_DateFormat] $ objT c_QString+  , just $ mkConstMethod' "toString" "toStringWithStringFormat" [enumT e_DateFormat] $ objT c_QString+    -- TODO QString toString(QStringView)+  , just $ mkConstMethod "toTimeSpec" [enumT e_TimeSpec] $ objT c_QDateTime+  , test (qtVersion >= [5, 2]) $ mkConstMethod "toTimeZone" [refT $ constT $ objT c_QTimeZone] $ objT c_QDateTime+  , just $ mkConstMethod "toUTC" np $ objT c_QDateTime+  --, just $ mkMethod OpShl [refT $ objT c_QDataStream, refT $ objT c_QDateTime] $ refT $ objT c_QDataStream+  --, just $ mkMethod OpShr [refT $ objT c_QDataStream, refT $ objT c_QDateTime] $ refT $ objT c_QDataStream+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QDateTime.hs-boot view
@@ -0,0 +1,24 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QDateTime (+  c_QDateTime,+  ) where++import Foreign.Hoppy.Generator.Spec (Class)++c_QDateTime :: Class
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QDebug.hs view
@@ -0,0 +1,144 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QDebug (+  aModule,+  c_QDebug,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Operator (OpShl),+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkCtor,+  mkMethod,+  mkMethod',+  np,+  operatorPreferredExtName',+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (+  boolT,+  constT,+  enumT,+  intT,+  objT,+  ptrT,+  refT,+  uintT,+  shortT,+  ushortT,+  doubleT,+  floatT,+  longT,+  ulongT,+  charT,+  voidT,+  )+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Graphics.UI.Qtah.Generator.Interface.Core.QIODevice (c_QIODevice)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_QtMsgType, qlonglong, qulonglong)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QDebug"] $+  [ qtExport c_QDebug+  ]++c_QDebug =+  addReqIncludes [ includeStd "QDebug", includeStd "QtGlobal" ] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable] $+  classSetEntityPrefix "" $+  makeClass (ident "QDebug") Nothing [] $+  collect+  [+    just $ mkCtor "newWithMsgType" [enumT e_QtMsgType]+  , just $ mkCtor "newWithString" [ptrT $ objT c_QString]+  , just $ mkCtor "newWithIODevice" [ptrT $ objT c_QIODevice]+  , test (qtVersion >= [5, 0]) $ mkConstMethod "autoInsertSpaces" np boolT+  , test (qtVersion >= [5, 4]) $ mkMethod' "maybeQuote" "maybeQuote" np $ refT $ objT c_QDebug+  , test (qtVersion >= [5, 4]) $ mkMethod' "maybeQuote" "maybeQuoteWithChar" [charT] $ refT $ objT c_QDebug+  , just $ mkMethod "maybeSpace" np $ refT $ objT c_QDebug+  , test (qtVersion >= [5, 4]) $ mkMethod "noquote" np $ refT $ objT c_QDebug+  , just $ mkMethod "nospace" np $ refT $ objT c_QDebug+  , test (qtVersion >= [5, 4]) $ mkMethod "quote" np $ refT $ objT c_QDebug+  , test (qtVersion >= [5, 4]) $ mkMethod "resetFormat" np $ refT $ objT c_QDebug+  , test (qtVersion >= [5, 0]) $ mkMethod "setAutoInsertSpaces" [boolT] voidT+  , test (qtVersion >= [5, 6]) $ mkMethod "setVerbosity" [intT] voidT+  , just $ mkMethod "space" np $ refT $ objT c_QDebug+  , just $ mkMethod "swap" [refT $ objT c_QDebug] voidT+  , test (qtVersion >= [5, 13]) $ mkMethod' "verbosity" "verbosityWithLevel" [intT] $ refT $ objT c_QDebug+  , test (qtVersion >= [5, 6]) $ mkConstMethod' "verbosity" "verbosity" np intT++  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "QChar")+    [objT c_QChar] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "Bool")+    [boolT] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "Char")+    [charT] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "Short")+    [shortT] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "Ushort")+    [ushortT] $ refT $ objT c_QDebug+  --, just $ mkMethod OpShl [char16_t t] $ refT $ objT c_QDebug+  --, just $ mkMethod OpShl [char32_t t] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "Int")+    [intT] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "Uint")+    [uintT] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "Long")+    [longT] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "Ulong")+    [ulongT] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "Qlonglong")+    [qlonglong] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "Qulonglong")+    [qulonglong] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "Float")+    [floatT] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "Double")+    [doubleT] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "PtrConstChar")+    [ptrT $ constT charT] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "String")+    [objT c_QString] $ refT $ objT c_QDebug+  --, just $ mkMethod OpShl [refT $ constT $ objT c_QStringRef] $ refT $ objT c_QDebug+  --, test (qtVersion >= [5, 10]) $ mkMethod OpShl [refT $ constT $ objT c_QStringView] $ refT $ objT c_QDebug+  --, just $ mkMethod OpShl [refT $ constT $ objT c_QLatin1String] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "ByteArray")+    [refT $ constT $ objT c_QByteArray] $ refT $ objT c_QDebug+  , just $ mkMethod' OpShl (operatorPreferredExtName' OpShl ++ "PtrVoid")+    [ptrT $ constT voidT] $ refT $ objT c_QDebug+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QDebugStateSaver.hs view
@@ -0,0 +1,51 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QDebugStateSaver (+  aModule,+  c_QDebugStateSaver,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  )+import Foreign.Hoppy.Generator.Types (objT, refT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.QDebug (c_QDebug)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QDebugStateSaver"] [5, 1]+  [qtExport c_QDebugStateSaver]++c_QDebugStateSaver =+  addReqIncludes [ includeStd "QDebugStateSaver" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QDebugStateSaver") Nothing [] $+  collect+  [+     just $ mkCtor "newWithDebug" [refT $ objT c_QDebug]+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QDir.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,14 +19,12 @@   aModule,   c_QDir,   e_Filter,-  bs_Filters,+  fl_Filters,   e_SortFlag,-  bs_SortFlags,+  fl_SortFlags,   ) where -import Data.Bits ((.|.)) import Foreign.Hoppy.Generator.Spec (-  Export (ExportBitspace, ExportEnum, ExportClass),   Operator (OpArray),   addReqIncludes,   classSetConversionToGc,@@ -41,14 +39,16 @@   mkMethod,   mkProp,   mkStaticMethod,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),   classAddFeatures,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, intT, objT, refT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, intT, objT, refT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -59,11 +59,11 @@ aModule =   AQtModule $   makeQtModule ["Core", "QDir"]-  [ QtExport $ ExportClass c_QDir-  , QtExport $ ExportEnum e_Filter-  , QtExport $ ExportBitspace bs_Filters-  , QtExport $ ExportEnum e_SortFlag-  , QtExport $ ExportBitspace bs_SortFlags+  [ qtExport c_QDir+  , qtExport e_Filter+  , qtExport fl_Filters+  , qtExport e_SortFlag+  , qtExport fl_SortFlags   ]  c_QDir =@@ -75,110 +75,93 @@   collect   [ just $ mkCtor "new" [objT c_QString]   , just $ mkConstMethod "absoluteFilePath" [objT c_QString] $ objT c_QString-  , just $ mkConstMethod "absolutePath" [] $ objT c_QString+  , just $ mkConstMethod "absolutePath" np $ objT c_QString   , test (qtVersion >= [4, 3]) $     mkStaticMethod "addSearchPath" [objT c_QString, objT c_QString] voidT-  , just $ mkConstMethod "canonicalPath" [] $ objT c_QString+  , just $ mkConstMethod "canonicalPath" np $ objT c_QString   , just $ mkMethod "cd" [objT c_QString] boolT-  , just $ mkMethod "cdUp" [] boolT+  , just $ mkMethod "cdUp" np boolT   , just $ mkStaticMethod "cleanPath" [objT c_QString] $ objT c_QString-  , just $ mkConstMethod "count" [] intT-  , just $ mkStaticMethod "current" [] $ objT c_QDir-  , just $ mkStaticMethod "currentPath" [] $ objT c_QString-  , just $ mkConstMethod "dirName" [] $ objT c_QString+  , just $ mkConstMethod "count" np intT+  , just $ mkStaticMethod "current" np $ objT c_QDir+  , just $ mkStaticMethod "currentPath" np $ objT c_QString+  , just $ mkConstMethod "dirName" np $ objT c_QString     -- TODO drives     -- TODO entryInfoList     -- TODO entryList-  , just $ mkConstMethod' "exists" "exists" [] boolT+  , just $ mkConstMethod' "exists" "exists" np boolT   , just $ mkConstMethod' "exists" "entryExists" [objT c_QString] boolT   , just $ mkConstMethod "filePath" [objT c_QString] $ objT c_QString-  , just $ mkProp "filter" $ bitspaceT bs_Filters+  , just $ mkProp "filter" $ flagsT fl_Filters   , test (qtVersion >= [4, 2]) $     mkStaticMethod "fromNativeSeparators" [objT c_QString] $ objT c_QString-  , just $ mkStaticMethod "home" [] $ objT c_QDir-  , just $ mkStaticMethod "homePath" [] $ objT c_QString-  , just $ mkConstMethod "isAbsolute" [] boolT+  , just $ mkStaticMethod "home" np $ objT c_QDir+  , just $ mkStaticMethod "homePath" np $ objT c_QString+  , just $ mkConstMethod "isAbsolute" np boolT   , just $ mkStaticMethod "isAbsolutePath" [objT c_QString] boolT-  , just $ mkConstMethod "isReadable" [] boolT-  , just $ mkConstMethod "isRelative" [] boolT+  , just $ mkConstMethod "isReadable" np boolT+  , just $ mkConstMethod "isRelative" np boolT   , just $ mkStaticMethod "isRelativePath" [objT c_QString] boolT-  , just $ mkConstMethod "isRoot" [] boolT-  , just $ mkMethod "makeAbsolute" [] boolT+  , just $ mkConstMethod "isRoot" np boolT+  , just $ mkMethod "makeAbsolute" np boolT   , just $ mkStaticMethod "match" [objT c_QString, objT c_QString] boolT     -- TODO match(QStringList, QString)   , just $ mkConstMethod "mkdir" [objT c_QString] boolT   , just $ mkConstMethod "mkpath" [objT c_QString] boolT     -- TODO nameFilters   , just $ mkProp "path" $ objT c_QString-  , just $ mkMethod "refresh" [] voidT+  , just $ mkMethod "refresh" np voidT   , just $ mkConstMethod "relativeFilePath" [objT c_QString] $ objT c_QString   , just $ mkMethod "remove" [objT c_QString] boolT-  , test (qtVersion >= [5, 0]) $ mkMethod "removeRecursively" [] boolT+  , test (qtVersion >= [5, 0]) $ mkMethod "removeRecursively" np boolT   , just $ mkMethod "rename" [objT c_QString, objT c_QString] boolT   , just $ mkConstMethod "rmdir" [objT c_QString] boolT   , just $ mkConstMethod "rmpath" [objT c_QString] boolT-  , just $ mkStaticMethod "root" [] $ objT c_QDir-  , just $ mkStaticMethod "rootPath" [] $ objT c_QString+  , just $ mkStaticMethod "root" np $ objT c_QDir+  , just $ mkStaticMethod "rootPath" np $ objT c_QString     -- TODO searchPaths (>=4.3)-  , just $ mkStaticMethod "separator" [] $ objT c_QChar+  , just $ mkStaticMethod "separator" np $ objT c_QChar   , just $ mkStaticMethod "setCurrent" [objT c_QString] boolT-  , just $ mkProp "sorting" $ bitspaceT bs_SortFlags+  , just $ mkProp "sorting" $ flagsT fl_SortFlags   , test (qtVersion >= [5, 0]) $ mkMethod "swap" [refT $ objT c_QDir] voidT-  , just $ mkStaticMethod "temp" [] $ objT c_QDir-  , just $ mkStaticMethod "tempPath" [] $ objT c_QString+  , just $ mkStaticMethod "temp" np $ objT c_QDir+  , just $ mkStaticMethod "tempPath" np $ objT c_QString   , test (qtVersion >= [4, 2]) $     mkStaticMethod "toNativeSeparators" [objT c_QString] $ objT c_QString   , just $ mkConstMethod OpArray [intT] $ objT c_QString   ] -(e_Filter, bs_Filters) =-  makeQtEnumBitspace (ident1 "QDir" "Filter") "Filters" [includeStd "QDir"] $-  let dirs = 0x1-      allDirs = 0x400-      files = 0x2-      drives = 0x4-      noSymLinks = 0x8-      noDotAndDotDot = noDot .|. noDotDot-      noDot = 0x2000-      noDotDot = 0x4000-      allEntries = dirs .|. files .|. drives-      readable = 0x10-      writable = 0x20-      executable = 0x40-      modified = 0x80-      hidden = 0x100-      system = 0x200-      caseSensitive = 0x800-  in [ (dirs, ["dirs"])-     , (allDirs, ["all", "dirs"])-     , (files, ["files"])-     , (drives, ["drives"])-     , (noSymLinks, ["no", "sym", "links"])-     , (noDotAndDotDot, ["no", "dot", "and", "dot", "dot"])-     , (noDot, ["no", "dot"])-     , (noDotDot, ["no", "dot", "dot"])-     , (allEntries, ["all", "entries"])-     , (readable, ["readable"])-     , (writable, ["writable"])-     , (executable, ["executable"])-     , (modified, ["modified"])-     , (hidden, ["hidden"])-     , (system, ["system"])-     , (caseSensitive, ["case", "sensitive"])-     ]+(e_Filter, fl_Filters) =+  makeQtEnumAndFlags (ident1 "QDir" "Filter") "Filters" [includeStd "QDir"] $+  [ "Dirs"+  , "AllDirs"+  , "Files"+  , "Drives"+  , "NoSymLinks"+  , "NoDotAndDotDot"+  , "NoDot"+  , "NoDotDot"+  , "AllEntries"+  , "Readable"+  , "Writable"+  , "Executable"+  , "Modified"+  , "Hidden"+  , "System"+  , "CaseSensitive"+  ] -(e_SortFlag, bs_SortFlags) =-  makeQtEnumBitspace (ident1 "QDir" "SortFlag") "SortFlags" [includeStd "QDir"]-  [ (0x00, ["name"])-  , (0x01, ["time"])-  , (0x02, ["size"])-  , (0x80, ["typ"])  -- "type" is a Haskell keyword.-  , (0x03, ["unsorted"])-    -- QDir::NoSort = -1.  Not sure this is needed (it's used for parameter-    -- defaults).  Would need to check if negative values work as expected.-  , (0x04, ["dirs", "first"])-  , (0x20, ["dirs", "last"])-  , (0x08, ["reversed"])-  , (0x10, ["ignore", "case"])-  , (0x40, ["locale", "aware"])+(e_SortFlag, fl_SortFlags) =+  makeQtEnumAndFlags (ident1 "QDir" "SortFlag") "SortFlags" [includeStd "QDir"]+  [ "Name"+  , "Time"+  , "Size"+  , "Type"+  , "Unsorted"+  , "NoSort"+  , "DirsFirst"+  , "DirsLast"+  , "Reversed"+  , "IgnoreCase"+  , "LocaleAware"   ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QDirIterator.hs view
@@ -0,0 +1,85 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QDirIterator (+  aModule,+  c_QDirIterator,+  e_IteratorFlag,+  fl_IteratorFlags,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Types (boolT, constT, objT, refT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+--import Graphics.UI.Qtah.Generator.Interface.Core.QFileInfo (c_QFileInfo)+import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)+import Graphics.UI.Qtah.Generator.Interface.Core.QDir (c_QDir, fl_Filters)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QDirIterator"] [4, 3] $+  collect+  [ just $ qtExport c_QDirIterator+  , just $ qtExport e_IteratorFlag+  , just $ qtExport fl_IteratorFlags+  ]++c_QDirIterator =+  addReqIncludes [ includeStd "QDirIterator" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QDirIterator") Nothing [] $+  collect+  [ just $ mkCtor "new" [refT $ constT $ objT c_QDir]+  , just $ mkCtor "newWithDirAndFlags" [refT $ constT $ objT c_QDir, flagsT fl_IteratorFlags]+  , just $ mkCtor "newWithString" [refT $ constT $ objT c_QString]+  , just $ mkCtor "newWithStringAndFlags" [refT $ constT $ objT c_QString, flagsT fl_IteratorFlags]+  , just $ mkCtor "newWithStringAndFilters" [refT $ constT $ objT c_QString, flagsT fl_Filters]+  , just $ mkCtor "newWithStringAndFiltersAndFlags" [refT $ constT $ objT c_QString, flagsT fl_Filters, flagsT fl_IteratorFlags]+  , just $ mkCtor "newWithStringAndStringList" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QStringList]+  , just $ mkCtor "newWithStringAndStringListAndFilters" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QStringList, flagsT fl_Filters]+  , just $ mkCtor "newWithStringAndStringListAndFiltersAndFlags" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QStringList, flagsT fl_Filters, flagsT fl_IteratorFlags]+  --, just $ mkConstMethod "fileInfo" np $ objT c_QFileInfo+  , just $ mkConstMethod "fileName" np $ objT c_QString+  , just $ mkConstMethod "filePath" np $ objT c_QString+  , just $ mkConstMethod "hasNext" np boolT+  , just $ mkMethod "next" np $ objT c_QString+  , just $ mkConstMethod "path" np $ objT c_QString+  ]++(e_IteratorFlag, fl_IteratorFlags) =+  makeQtEnumAndFlags (ident1 "QDirIterator" "IteratorFlag") "IteratorFlags" [includeStd "QDirIterator"]+  [ "NoIteratorFlags"+  , "Subdirectories"+  , "FollowSymlinks"+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,7 +22,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -35,10 +34,11 @@   mkCtor,   mkMethod,   mkStaticMethod',+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -48,7 +48,7 @@   AQtModule $   makeQtModule ["Core", "QEvent"]   [ QtExportEvent c_QEvent-  , QtExport $ ExportEnum e_Type+  , qtExport e_Type   ]  c_QEvent =@@ -57,164 +57,169 @@   makeClass (ident "QEvent") Nothing [] $   collect   [ just $ mkCtor "new" [enumT e_Type]-  , just $ mkMethod "accept" [] voidT+  , just $ mkMethod "accept" np voidT   , just $ mkBoolIsProp "accepted"-  , just $ mkMethod "ignore" [] voidT+  , just $ mkMethod "ignore" np voidT   , test (qtVersion >= [4, 4]) $-    mkStaticMethod' "registerEventType" "registerEventType" [] intT+    mkStaticMethod' "registerEventType" "registerEventType" np intT   , test (qtVersion >= [4, 4]) $     mkStaticMethod' "registerEventType" "registerEventTypeWithHint" [intT] intT-  , just $ mkConstMethod "spontaneous" [] boolT-  , just $ mkConstMethod' "type" "eventType" [] $ enumT e_Type  -- 'type' is a Haskell keyword.+  , just $ mkConstMethod "spontaneous" np boolT+  , just $ mkConstMethod' "type" "eventType" np $ enumT e_Type  -- 'type' is a Haskell keyword.   ]  e_Type =   makeQtEnum (ident1 "QEvent" "Type") [includeStd "QEvent"]-  [ (0, ["none"])-  , (114, ["action", "added"])-  , (113, ["action", "changed"])-  , (115, ["action", "removed"])-  , (99, ["activation", "change"])-  , (121, ["application", "activate"])-    -- ApplicationActivated is also 121, but is omitted here because Hoppy enums-    -- can't handle duplicate numbers.-  , (122, ["application", "deactivate"])-  , (36, ["application", "font", "change"])-  , (37, ["application", "layout", "direction", "change"])-  , (38, ["application", "palette", "change"])-  , (214, ["application", "state", "change"])-  , (35, ["application", "window", "icon", "change"])-  , (68, ["child", "added"])-  , (69, ["child", "polished"])-  , (71, ["child", "removed"])-  , (40, ["clipboard"])-  , (19, ["close"])-  , (200, ["close", "software", "input", "panel"])-  , (178, ["contents", "rect", "change"])-  , (82, ["context", "menu"])-  , (183, ["cursor", "change"])-  , (52, ["deferred", "delete"])-  , (60, ["drag", "enter"])-  , (62, ["drag", "leave"])-  , (61, ["drag", "move"])-  , (63, ["drop"])-  , (170, ["dynamic", "property", "change"])-  , (98, ["enabled", "change"])-  , (10, ["enter"])-  , (150, ["enter", "edit", "focus"])-  , (124, ["enter", "whats", "this", "mode"])-  , (206, ["expose"])-  , (116, ["file", "open"])-  , (8, ["focus", "in"])-  , (9, ["focus", "out"])-  , (23, ["focus", "about", "to", "change"])-  , (97, ["font", "change"])-  , (198, ["gesture"])-  , (202, ["gesture", "override"])-  , (188, ["grab", "keyboard"])-  , (186, ["grab", "mouse"])-  , (159, ["graphics", "scene", "context", "menu"])-  , (164, ["graphics", "scene", "drag", "enter"])-  , (166, ["graphics", "scene", "drag", "leave"])-  , (165, ["graphics", "scene", "drag", "move"])-  , (167, ["graphics", "scene", "drop"])-  , (163, ["graphics", "scene", "help"])-  , (160, ["graphics", "scene", "hover", "enter"])-  , (162, ["graphics", "scene", "hover", "leave"])-  , (161, ["graphics", "scene", "hover", "move"])-  , (158, ["graphics", "scene", "mouse", "double", "click"])-  , (155, ["graphics", "scene", "mouse", "move"])-  , (156, ["graphics", "scene", "mouse", "press"])-  , (157, ["graphics", "scene", "mouse", "release"])-  , (182, ["graphics", "scene", "move"])-  , (181, ["graphics", "scene", "resize"])-  , (168, ["graphics", "scene", "wheel"])-  , (18, ["hide"])-  , (27, ["hide", "to", "parent"])-  , (127, ["hover", "enter"])-  , (128, ["hover", "leave"])-  , (129, ["hover", "move"])-  , (96, ["icon", "drag"])-  , (101, ["icon", "text", "change"])-  , (83, ["input", "method"])-  , (207, ["input", "method", "query"])-  , (169, ["keyboard", "layout", "change"])-  , (6, ["key", "press"])-  , (7, ["key", "release"])-  , (89, ["language", "change"])-  , (90, ["layout", "direction", "change"])-  , (76, ["layout", "request"])-  , (11, ["leave"])-  , (151, ["leave", "edit", "focus"])-  , (125, ["leave", "whats", "this", "mode"])-  , (88, ["locale", "change"])-  , (176, ["non", "client", "area", "mouse", "button", "dbl", "click"])-  , (174, ["non", "client", "area", "mouse", "button", "press"])-  , (175, ["non", "client", "area", "mouse", "button", "release"])-  , (173, ["non", "client", "area", "mouse", "move"])-  , (177, ["mac", "size", "change"])-  , (43, ["meta", "call"])-  , (102, ["modified", "change"])-  , (4, ["mouse", "button", "dbl", "click"])-  , (2, ["mouse", "button", "press"])-  , (3, ["mouse", "button", "release"])-  , (5, ["mouse", "move"])-  , (109, ["mouse", "tracking", "change"])-  , (13, ["move"])-  , (197, ["native", "gesture"])-  , (208, ["orientation", "change"])-  , (12, ["paint"])-  , (39, ["palette", "change"])-  , (131, ["parent", "about", "to", "change"])-  , (21, ["parent", "change"])-  , (212, ["platform", "panel"])-  , (75, ["polish"])-  , (74, ["polish", "request"])-  , (123, ["query", "whats", "this"])-  , (106, ["read", "only", "change"])-  , (199, ["request", "software", "input", "panel"])-  , (14, ["resize"])-  , (204, ["scroll", "prepare"])-  , (205, ["scroll"])-  , (117, ["shortcut"])-  , (51, ["shortcut", "override"])-  , (17, ["show"])-  , (26, ["show", "to", "parent"])-  , (50, ["sock", "act"])-  , (192, ["state", "machine", "signal"])-  , (193, ["state", "machine", "wrapped"])-  , (112, ["status", "tip"])-  , (100, ["style", "change"])-  , (87, ["tablet", "move"])-  , (92, ["tablet", "press"])-  , (93, ["tablet", "release"])-  , (94, ["ok", "request"])-  , (171, ["tablet", "enter", "proximity"])-  , (172, ["tablet", "leave", "proximity"])-  , (22, ["thread", "change"])-  , (1, ["timer"])-  , (120, ["tool", "bar", "change"])-  , (110, ["tool", "tip"])-  , (184, ["tool", "tip", "change"])-  , (194, ["touch", "begin"])-  , (209, ["touch", "cancel"])-  , (196, ["touch", "end"])-  , (195, ["touch", "update"])-  , (189, ["ungrab", "keyboard"])-  , (187, ["ungrab", "mouse"])-  , (78, ["update", "later"])-  , (77, ["update", "request"])-  , (111, ["whats", "this"])-  , (118, ["whats", "this", "clicked"])-  , (31, ["wheel"])-  , (132, ["win", "event", "act"])-  , (24, ["window", "activate"])-  , (103, ["window", "blocked"])-  , (25, ["window", "deactivate"])-  , (34, ["window", "icon", "change"])-  , (105, ["window", "state", "change"])-  , (33, ["window", "title", "change"])-  , (104, ["window", "unblocked"])-  , (203, ["win", "id", "change"])-  , (126, ["z", "order", "change"])+  [ -- Built-in event types:+    "None"+  , "ActionAdded"+  , "ActionChanged"+  , "ActionRemoved"+  , "ActivationChange"+  , "ApplicationActivate"+  , "ApplicationActivated"+  , "ApplicationDeactivate"+  , "ApplicationFontChange"+  , "ApplicationLayoutDirectionChange"+  , "ApplicationPaletteChange"+  , "ApplicationStateChange"+  , "ApplicationWindowIconChange"+  , "ChildAdded"+  , "ChildPolished"+  , "ChildRemoved"+  , "Clipboard"+  , "Close"+  , "CloseSoftwareInputPanel"+  , "ContentsRectChange"+  , "ContextMenu"+  , "CursorChange"+  , "DeferredDelete"+  , "DragEnter"+  , "DragLeave"+  , "DragMove"+  , "Drop"+  , "DynamicPropertyChange"+  , "EnabledChange"+  , "Enter"+    -- "EnterEditFocus" is omitted -- it depends on keypadNavigation.+  , "EnterWhatsThisMode"+  , "Expose"+  , "FileOpen"+  , "FocusIn"+  , "FocusOut"+  , "FocusAboutToChange"+  , "FontChange"+  , "Gesture"+  , "GestureOverride"+  , "GrabKeyboard"+  , "GrabMouse"+  , "GraphicsSceneContextMenu"+  , "GraphicsSceneDragEnter"+  , "GraphicsSceneDragLeave"+  , "GraphicsSceneDragMove"+  , "GraphicsSceneDrop"+  , "GraphicsSceneHelp"+  , "GraphicsSceneHoverEnter"+  , "GraphicsSceneHoverLeave"+  , "GraphicsSceneHoverMove"+  , "GraphicsSceneMouseDoubleClick"+  , "GraphicsSceneMouseMove"+  , "GraphicsSceneMousePress"+  , "GraphicsSceneMouseRelease"+  , "GraphicsSceneMove"+  , "GraphicsSceneResize"+  , "GraphicsSceneWheel"+  , "Hide"+  , "HideToParent"+  , "HoverEnter"+  , "HoverLeave"+  , "HoverMove"+  , "IconDrag"+  , "IconTextChange"+  , "InputMethod"+  , "InputMethodQuery"+  , "KeyboardLayoutChange"+  , "KeyPress"+  , "KeyRelease"+  , "LanguageChange"+  , "LayoutDirectionChange"+  , "LayoutRequest"+  , "Leave"+    -- "LeaveEditFocus" is omitted -- it depends on keypadNavigation.+  , "LeaveWhatsThisMode"+  , "LocaleChange"+  , "NonClientAreaMouseButtonDblClick"+  , "NonClientAreaMouseButtonPress"+  , "NonClientAreaMouseButtonRelease"+  , "NonClientAreaMouseMove"+  , "MacSizeChange"+  , "MetaCall"+  , "ModifiedChange"+  , "MouseButtonDblClick"+  , "MouseButtonPress"+  , "MouseButtonRelease"+  , "MouseMove"+  , "MouseTrackingChange"+  , "Move"+  , "NativeGesture"+  , "OrientationChange"+  , "Paint"+  , "PaletteChange"+  , "ParentAboutToChange"+  , "ParentChange"+  , "PlatformPanel"+  , "PlatformSurface"+  , "Polish"+  , "PolishRequest"+  , "QueryWhatsThis"+  , "ReadOnlyChange"+  , "RequestSoftwareInputPanel"+  , "Resize"+  , "ScrollPrepare"+  , "Scroll"+  , "Shortcut"+  , "ShortcutOverride"+  , "Show"+  , "ShowToParent"+  , "SockAct"+  , "StateMachineSignal"+  , "StateMachineWrapped"+  , "StatusTip"+  , "StyleChange"+  , "TabletMove"+  , "TabletPress"+  , "TabletRelease"+  , "OkRequest"+  , "TabletEnterProximity"+  , "TabletLeaveProximity"+  , "ThreadChange"+  , "Timer"+  , "ToolBarChange"+  , "ToolTip"+  , "ToolTipChange"+  , "TouchBegin"+  , "TouchCancel"+  , "TouchEnd"+  , "TouchUpdate"+  , "UngrabKeyboard"+  , "UngrabMouse"+  , "UpdateLater"+  , "UpdateRequest"+  , "WhatsThis"+  , "WhatsThisClicked"+  , "Wheel"+  , "WinEventAct"+  , "WindowActivate"+  , "WindowBlocked"+  , "WindowDeactivate"+  , "WindowIconChange"+  , "WindowStateChange"+  , "WindowTitleChange"+  , "WindowUnblocked"+  , "WinIdChange"+  , "ZOrderChange"++    -- Custom event types:+  , "User"+  , "MaxUser"   ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QFile.hs view
@@ -0,0 +1,87 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QFile (+  aModule,+  c_QFile,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod',+  mkStaticMethod,+  mkStaticMethod',+  mkCtor,+  mkMethod',+  mkMethod,+  np,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QFileDevice (c_QFileDevice, fl_FileHandleFlags, fl_Permissions)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Graphics.UI.Qtah.Generator.Interface.Core.QIODevice (fl_OpenMode)+import Foreign.Hoppy.Generator.Types (boolT, intT, voidT, constT, objT, ptrT, refT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qint64)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QFile"] $+  [qtExport c_QFile]++c_QFile =+  addReqIncludes [ includeStd "QFile" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QFile") Nothing [c_QFileDevice] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]+  , just $ mkCtor "newWithName" [refT $ objT c_QString]+  , just $ mkCtor "newWithNameAndParent" [refT $ constT $ objT c_QString, ptrT $ objT c_QObject]+  , just $ mkMethod' "copy" "copy" [refT $ constT $ objT c_QString] boolT+  , just $ mkStaticMethod' "copy" "copyStatic" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] boolT+  , just $ mkStaticMethod "decodeName" [refT $ constT $ objT c_QByteArray] $ objT c_QString+  , just $ mkStaticMethod "encodeName" [refT $ constT $ objT c_QString] $ objT c_QByteArray+  , just $ mkConstMethod' "exists" "exists" np boolT+  , just $ mkStaticMethod' "exists" "existsStatic" [refT $ constT $ objT c_QString] boolT+  , just $ mkMethod' "link" "link" [refT $ constT $ objT c_QString] boolT+  , just $ mkStaticMethod' "link" "linkStatic" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] boolT+  -- TODO bool QFile::open(FILE *fh, QIODevice::OpenMode mode, QFileDevice::FileHandleFlags handleFlags = DontCloseHandle)+  , just $ mkMethod' "open" "openWithFileDesc" [intT, flagsT fl_OpenMode ] boolT+  , just $ mkMethod' "open" "openWithFileDescAndFlags" [intT, flagsT fl_OpenMode, flagsT fl_FileHandleFlags] boolT+  , just $ mkStaticMethod' "permissions" "permissionsStatic" [refT $ constT $ objT c_QString] $ flagsT fl_Permissions+  , just $ mkMethod' "remove" "remove" np boolT+  , just $ mkStaticMethod' "remove" "removeStatic" [refT $ constT $ objT c_QString] boolT+  , just $ mkMethod' "rename" "rename" [refT $ constT $ objT c_QString] boolT+  , just $ mkStaticMethod' "rename" "renameStatic" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] boolT+  , just $ mkStaticMethod' "resize" "resizeStatic" [refT $ constT $ objT c_QString, qint64] boolT+  , just $ mkMethod "setFileName" [refT $ constT $ objT c_QString] voidT+  , just $ mkStaticMethod' "setPermissions" "setPermissionsStatic" [refT $ constT $ objT c_QString, flagsT fl_Permissions] boolT+  , test (qtVersion >= [4, 2]) $ mkStaticMethod' "symLinkTarget" "symLinkTargetStatic" [refT $ constT $ objT c_QString] $ objT c_QString+  , test (qtVersion >= [4, 2]) $ mkConstMethod' "symLinkTarget" "symLinkTarget" np $ objT c_QString+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QFileDevice.hs view
@@ -0,0 +1,144 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QFileDevice (+  aModule,+  c_QFileDevice,+  e_FileError,+  e_FileHandleFlag,+  fl_FileHandleFlags,+  e_FileTime,+  e_MemoryMapFlags,+  e_Permission,+  fl_Permissions,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkMethod,+  mkMethod',+  np,+  )+import Foreign.Hoppy.Generator.Types (ucharT, boolT, intT, objT, voidT, enumT, ptrT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.QDateTime (c_QDateTime)+import Graphics.UI.Qtah.Generator.Interface.Core.QIODevice (c_QIODevice)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qlonglong)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QFileDevice"] [5, 0] $+  collect $+  [ just $ qtExport c_QFileDevice+  , test (qtVersion >= [5, 10]) $ qtExport e_FileTime+  , test (qtVersion >= [4, 4]) $ qtExport e_MemoryMapFlags+  , just $ qtExport e_FileError+  , just $ qtExport e_FileHandleFlag+  , just $ qtExport fl_FileHandleFlags+  , just $ qtExport e_Permission+  , just $ qtExport fl_Permissions+  ]++c_QFileDevice =+  addReqIncludes [includeStd "QFileDevice"] $+  classSetEntityPrefix "" $+  makeClass (ident "QFileDevice") Nothing [c_QIODevice] $+  collect+  [ just $ mkConstMethod "error" np $ enumT e_FileError+  , just $ mkConstMethod "fileName" np $ objT c_QString+  , test (qtVersion >= [5, 10]) $ mkConstMethod "fileTime" [enumT e_FileTime] $ objT c_QDateTime+  , just $ mkMethod "flush" np boolT+  , just $ mkConstMethod "handle" np intT+  , just $ mkMethod' "map" "map" [qlonglong, qlonglong] $ ptrT ucharT+  , just $ mkMethod' "map" "mapWithFlags" [qlonglong, qlonglong, enumT e_MemoryMapFlags] $ ptrT ucharT+  , just $ mkConstMethod "permissions" np $ flagsT fl_Permissions+  , just $ mkMethod "resize" [qlonglong] boolT+  , test (qtVersion >= [5, 10]) $+    mkMethod "setFileTime" [objT c_QDateTime, enumT e_FileTime] boolT+  , just $ mkMethod "setPermissions" [flagsT fl_Permissions] boolT+  , just $ mkMethod "unmap" [ptrT ucharT] boolT+  , just $ mkMethod "unsetError" np voidT+  ]++e_FileError =+  makeQtEnum (ident1 "QFileDevice" "FileError") [includeStd "QFileDevice"]+  [ "NoError"+  , "ReadError"+  , "WriteError"+  , "FatalError"+  , "ResourceError"+  , "OpenError"+  , "AbortError"+  , "TimeOutError"+  , "UnspecifiedError"+  , "RemoveError"+  , "RenameError"+  , "PositionError"+  , "ResizeError"+  , "PermissionsError"+  , "CopyError"+  ]++(e_FileHandleFlag, fl_FileHandleFlags) =+  makeQtEnumAndFlags (ident1 "QFileDevice" "FileHandleFlag") "FileHandleFlags" [includeStd "QFileDevice"]+  [ "DontCloseHandle"+  , "AutoCloseHandle"+  ]++e_FileTime =+  makeQtEnum (ident1 "QFileDevice" "FileTime") [includeStd "QFileDevice"]+  [ "FileAccessTime"+  , "FileBirthTime"+  , "FileMetadataChangeTime"+  , "FileModificationTime"+  ]++e_MemoryMapFlags =+  makeQtEnum (ident1 "QFileDevice" "MemoryMapFlags") [includeStd "QFileDevice"] $+  collect+  [ just "NoOptions"+  , test (qtVersion >= [5, 4]) "MapPrivateOption"+  ]++(e_Permission, fl_Permissions) =+  makeQtEnumAndFlags (ident1 "QFileDevice" "Permission") "Permissions" [includeStd "QFileDevice"]+  [ "ReadOwner"+  , "WriteOwner"+  , "ExeOwner"+  , "ReadUser"+  , "WriteUser"+  , "ExeUser"+  , "ReadGroup"+  , "WriteGroup"+  , "ExeGroup"+  , "ReadOther"+  , "WriteOther"+  , "ExeOther"+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QFileInfo.hs view
@@ -0,0 +1,122 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QFileInfo (+  aModule,+  c_QFileInfo,+  ) where++import Foreign.Hoppy.Generator.Spec (+  classSetConversionToGc,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkStaticMethod',+  mkCtor,+  mkMethod',+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Copyable, Assignable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (boolT, uintT, voidT, enumT, constT, objT, refT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.QDir (c_QDir)+import Graphics.UI.Qtah.Generator.Interface.Core.QFile (c_QFile)+import Graphics.UI.Qtah.Generator.Interface.Core.QFileDevice (e_FileTime, fl_Permissions)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QDateTime (c_QDateTime)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qint64)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QFileInfo"] $+  [qtExport c_QFileInfo]++c_QFileInfo =+  addReqIncludes [ includeStd "QFileInfo" ] $+  classSetConversionToGc $+  classAddFeatures [Copyable, Assignable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QFileInfo") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithString" [refT $ constT $ objT c_QString]+  , just $ mkCtor "newWithFile" [refT $ constT $ objT c_QFile]+  , just $ mkCtor "newWithDirAndString" [refT $ constT $ objT c_QDir, refT $ constT $ objT c_QString]+  , just $ mkConstMethod "absoluteDir" np $ objT c_QDir+  , just $ mkConstMethod "absoluteFilePath" np $ objT c_QString+  , just $ mkConstMethod "absolutePath" np $ objT c_QString+  , just $ mkConstMethod "baseName" np $ objT c_QString+  , test (qtVersion >= [5, 10]) $ mkConstMethod "birthTime" np $ objT c_QDateTime+  , test (qtVersion >= [4, 3]) $ mkConstMethod "bundleName" np $ objT c_QString+  , just $ mkConstMethod "caching" np $ boolT+  , just $ mkConstMethod "canonicalFilePath" np $ objT c_QString+  , just $ mkConstMethod "canonicalPath" np $ objT c_QString+  , just $ mkConstMethod "completeBaseName" np $ objT c_QString+  , just $ mkConstMethod "completeSuffix" np $ objT c_QString+  , just $ mkConstMethod "dir" np $ objT c_QDir+  , just $ mkConstMethod' "exists" "exists" np boolT+  , test (qtVersion >= [5, 2]) $ mkStaticMethod' "exists" "existsStatic" [refT $ constT $ objT c_QString] boolT+  , just $ mkConstMethod "fileName" np $ objT c_QString+  , just $ mkConstMethod "filePath" np $ objT c_QString+  , test (qtVersion >= [5, 10]) $ mkConstMethod "fileTime" [enumT e_FileTime] $ objT c_QDateTime+  , just $ mkConstMethod "group" np $ objT c_QString+  , just $ mkConstMethod "groupId" np uintT+  , just $ mkConstMethod "isAbsolute" np boolT+  , test (qtVersion >= [4, 3]) $ mkConstMethod "isBundle" np boolT+  , just $ mkConstMethod "isDir" np boolT+  , just $ mkConstMethod "isExecutable" np boolT+  , just $ mkConstMethod "isFile" np boolT+  , just $ mkConstMethod "isHidden" np boolT+  , test (qtVersion >= [5, 10]) $ mkConstMethod "isNativePath" np boolT+  , just $ mkConstMethod "isReadable" np boolT+  , just $ mkConstMethod "isRelative" np boolT+  , just $ mkConstMethod "isRoot" np boolT+  , just $ mkConstMethod "isSymLink" np boolT+  , just $ mkConstMethod "isWritable" np boolT+  , just $ mkConstMethod "lastModified" np $ objT c_QDateTime+  , just $ mkConstMethod "lastRead" np $ objT c_QDateTime+  , just $ mkMethod "makeAbsolute" np boolT+  , test (qtVersion >= [5, 10]) $ mkConstMethod "metadataChangeTime" np $ objT c_QDateTime+  , just $ mkConstMethod "owner" np $ objT c_QString+  , just $ mkConstMethod "ownerId" np uintT+  , just $ mkConstMethod "path" np $ objT c_QString+  , just $ mkConstMethod "permission" [flagsT fl_Permissions] boolT+  , just $ mkConstMethod "permissions" np $ flagsT fl_Permissions+  , just $ mkMethod "refresh" np voidT+  , just $ mkMethod "setCaching" [boolT] voidT+  , just $ mkMethod' "setFile" "setFileString" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "setFile" "setFile" [refT $ constT $ objT c_QFile] voidT+  , just $ mkMethod' "setFile" "setFileDirAndString" [refT $ constT $ objT c_QDir, refT $ constT $ objT c_QString] voidT+  , just $ mkConstMethod "size" np $ qint64+  , just $ mkConstMethod "suffix" np $ objT c_QString+  , test (qtVersion >= [5, 10]) $ mkMethod "swap" [refT $ objT c_QFileInfo] voidT+  , test (qtVersion >= [4, 2]) $ mkConstMethod "symLinkTarget" np $ objT c_QString+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QFileSelector.hs view
@@ -0,0 +1,61 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QFileSelector (+  aModule,+  c_QFileSelector,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod,+  np,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Foreign.Hoppy.Generator.Types (voidT, constT, objT, ptrT, refT)+import Foreign.Hoppy.Generator.Version (collect, just)+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.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QFileSelector"] [5, 2] $+  [qtExport c_QFileSelector]++c_QFileSelector =+  addReqIncludes [ includeStd "QFileSelector" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QFileSelector") Nothing [c_QObject] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]+  , just $ mkConstMethod "allSelectors" np $ objT c_QStringList+  , just $ mkConstMethod "extraSelectors" np $ objT c_QStringList+  , just $ mkConstMethod "select" [refT $ constT $ objT c_QString] $ objT c_QString+  -- TODO QUrl QFileSelector::select(const QUrl &filePath) const+  , just $ mkMethod "setExtraSelectors" [refT $ constT $ objT c_QStringList] voidT+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QFileSystemWatcher.hs view
@@ -0,0 +1,73 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QFileSystemWatcher (+  aModule,+  c_QFileSystemWatcher,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod,+  np,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)+import Foreign.Hoppy.Generator.Types (boolT, constT, objT, ptrT, refT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerQString)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QFileSystemWatcher"] [4, 2] $+  (qtExport c_QFileSystemWatcher) :+  map QtExportSignal signals++c_QFileSystemWatcher =+  addReqIncludes [ includeStd "QFileSystemWatcher" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QFileSystemWatcher") Nothing [c_QObject] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]+  , just $ mkCtor "newWithPaths" [refT $ constT $ objT c_QStringList]+  , just $ mkCtor "newWithPathsAndParent" [refT $ constT $ objT c_QStringList, ptrT $ objT c_QObject]+  , just $ mkMethod "addPath" [refT $ constT $ objT c_QString] boolT+  , just $ mkMethod "addPaths" [refT $ constT $ objT c_QStringList] $ objT c_QStringList+  , just $ mkConstMethod "directories" np $ objT c_QStringList+  , just $ mkConstMethod "files" np $ objT c_QStringList+  , just $ mkMethod "removePath" [refT $ constT $ objT c_QString] boolT+  , just $ mkMethod "removePaths" [refT $ constT $ objT c_QStringList] $ objT c_QStringList+  ]++signals :: [Signal]+signals =+  collect+  [ just $ makeSignal c_QFileSystemWatcher "directoryChanged" listenerQString+  , just $ makeSignal c_QFileSystemWatcher "fileChanged" listenerQString+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QIODevice.hs view
@@ -0,0 +1,134 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QIODevice (+  aModule,+  c_QIODevice,+  e_OpenModeFlag,+  fl_OpenMode,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkMethod,+  mkMethod',+  np,+  )+import Foreign.Hoppy.Generator.Types (boolT, constT, intT, objT, ptrT, refT, ptrT, voidT, charT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listener, listenerQlonglong, listenerIntQlonglong, listenerInt)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qlonglong)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QIODevice"] $+  qtExport c_QIODevice :+  map QtExportSignal signals +++  [ qtExport e_OpenModeFlag+  , qtExport fl_OpenMode+  ]++c_QIODevice =+  addReqIncludes [ includeStd "QIODevice" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QIODevice") Nothing [c_QObject] $+  collect+  [ just $ mkConstMethod "atEnd" np boolT+  , just $ mkConstMethod "bytesAvailable" np qlonglong+  , just $ mkConstMethod "bytesToWrite" np qlonglong+  , just $ mkConstMethod "canReadLine" np boolT+  , just $ mkMethod "close" np voidT+  , test (qtVersion >= [5, 7]) $ mkMethod "commitTransaction" np voidT+  , test (qtVersion >= [5, 7]) $ mkConstMethod "currentReadChannel" np intT+  , test (qtVersion >= [5, 7]) $ mkConstMethod "currentWriteChannel" np intT+  , just $ mkConstMethod "errorString" np $ objT c_QString+    -- TODO bool getChar(char*)+  , just $ mkConstMethod "isOpen" np boolT+  , just $ mkConstMethod "isReadable" np boolT+  , just $ mkConstMethod "isSequential" np boolT+  , just $ mkConstMethod "isTextModeEnabled" np boolT+  , test (qtVersion >= [5, 7]) $ mkConstMethod "isTransactionStarted" np boolT+  , just $ mkConstMethod "isWritable" np boolT+  , just $ mkMethod "open" [flagsT fl_OpenMode] boolT+  , just $ mkConstMethod "openMode" np $ flagsT fl_OpenMode+  , test (qtVersion >= [4, 1]) $ mkMethod' "peek" "peekByteArray" [qlonglong] $ objT c_QByteArray+  , test (qtVersion >= [4, 1]) $ mkMethod' "peek" "peekRaw" [ptrT charT, qlonglong] qlonglong+  , just $ mkConstMethod "pos" np qlonglong+  , just $ mkMethod "putChar" [charT] boolT+  , just $ mkMethod' "read" "readByteArray" [qlonglong] $ objT c_QByteArray+  , just $ mkMethod' "read" "readRaw" [ptrT charT, qlonglong] qlonglong+  , just $ mkMethod "readAll" np $ objT c_QByteArray+  , test (qtVersion >= [5, 7]) $ mkConstMethod "readChannelCount" np intT+  , just $ mkMethod' "readLine" "readLineByteArray" np $ objT c_QByteArray+  , just $ mkMethod' "readLine" "readLineByteArrayWithSize" [qlonglong] $ objT c_QByteArray+  , just $ mkMethod' "readLine" "readLineRaw" [ptrT charT, qlonglong] qlonglong+  , just $ mkMethod "reset" np boolT+  , test (qtVersion >= [5, 7]) $ mkMethod "rollbackTransaction" np voidT+  , just $ mkMethod "seek" [qlonglong] boolT+  , test (qtVersion >= [5, 7]) $ mkMethod "setCurrentReadChannel" [intT] voidT+  , test (qtVersion >= [5, 7]) $ mkMethod "setCurrentWriteChannel" [intT] voidT+  , just $ mkMethod "setTextModeEnabled" [boolT] voidT+  , just $ mkConstMethod "size" np qlonglong+  , test (qtVersion >= [5, 10]) $ mkMethod "skip" [qlonglong] qlonglong+  , test (qtVersion >= [5, 7]) $ mkMethod "startTransaction" np voidT+  , just $ mkMethod "ungetChar" [charT] voidT+  , just $ mkMethod "waitForBytesWritten" [intT] boolT+  , just $ mkMethod "waitForReadyRead" [intT] boolT+  , just $ mkMethod' "write" "writeByteArray" [refT $ constT $ objT c_QByteArray] qlonglong+  , just $ mkMethod' "write" "writeRaw" [ptrT $ constT charT] qlonglong+  , just $ mkMethod' "write" "writeRawWithSize" [ptrT $ constT charT, qlonglong] qlonglong+  , test (qtVersion >= [5, 7]) $ mkConstMethod "writeChannelCount" np intT+  ]++(e_OpenModeFlag, fl_OpenMode) =+  makeQtEnumAndFlags (ident1 "QIODevice" "OpenModeFlag") "OpenMode" [includeStd "QIODevice"] $+  [ "NotOpen"+  , "ReadOnly"+  , "WriteOnly"+  , "ReadWrite"+  , "Append"+  , "Truncate"+  , "Text"+  , "Unbuffered"+  , "NewOnly"+  , "ExistingOnly"+  ]++signals =+  collect $+  [ just $ makeSignal c_QIODevice "aboutToClose" listener+  , just $ makeSignal c_QIODevice "bytesWritten" listenerQlonglong+  , test (qtVersion >= [5, 7]) $ makeSignal c_QIODevice "channelBytesWritten" listenerIntQlonglong+  , test (qtVersion >= [5, 7]) $ makeSignal c_QIODevice "channelReadyRead" listenerInt+  , test (qtVersion >= [4, 4]) $ makeSignal c_QIODevice "readChannelFinished" listener+  , just $ makeSignal c_QIODevice "readyRead" listener+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelection.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,6 @@     classHaskellConversionToCppFn,     classHaskellConversionType     ),-  Export (ExportClass),   addAddendumHaskell,   addReqIncludes,   classSetEntityPrefix,@@ -45,10 +44,12 @@   mkCtor,   mkMethod,   mkStaticMethod,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionModel (-  bs_SelectionFlags,+  fl_SelectionFlags,   ) import Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionRange (c_QItemSelectionRange) import Graphics.UI.Qtah.Generator.Interface.Core.QList (@@ -71,7 +72,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QItemSelection"]-  [ QtExport $ ExportClass c_QItemSelection ]+  [ qtExport c_QItemSelection ]  c_QItemSelection =   addReqIncludes [includeStd "QItemSelection"] $@@ -80,7 +81,7 @@     ClassHaskellConversion     { classHaskellConversionType = Just $ do       hsType <- cppTypeToHsTypeAndUse HsHsSide $ objT c_QItemSelectionRange-      return $ HsTyApp (HsTyCon $ Special $ HsListCon) hsType+      return $ HsTyApp (HsTyCon $ Special HsListCon) hsType     , classHaskellConversionToCppFn = Nothing     , classHaskellConversionFromCppFn = Just $ do       addImports importForRuntime@@ -89,12 +90,12 @@   addAddendumHaskell     (inheritHasContents c_QItemSelection c_QListQItemSelectionRange $ objT c_QItemSelectionRange) $   classSetEntityPrefix "" $-  makeClass (ident "QItemSelection") Nothing [c_QListQItemSelectionRange] $-  [ mkCtor "new" []+  makeClass (ident "QItemSelection") Nothing [c_QListQItemSelectionRange]+  [ mkCtor "new" np   , 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+  , mkConstMethod "indexes" np $ objT c_QListQModelIndex+  , mkMethod "merge" [objT c_QItemSelection, flagsT fl_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
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,11 +18,10 @@ module Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionModel (   aModule,   c_QItemSelectionModel,-  bs_SelectionFlags,+  fl_SelectionFlags,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportBitspace, ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -34,9 +33,9 @@   mkCtor,   mkMethod,   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Types (-  bitspaceT,   boolT,   constT,   intT,@@ -45,16 +44,17 @@   voidT,   ) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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 {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listenerPtrQAbstractItemModel,+  listenerRefConstQItemSelectionRefConstQItemSelection,+  listenerQModelIndexQModelIndex,   ) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types@@ -64,10 +64,10 @@ aModule =   AQtModule $   makeQtModule ["Core", "QItemSelectionModel"] $-  [ QtExport $ ExportClass c_QItemSelectionModel ] +++  [ qtExport c_QItemSelectionModel ] ++   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_SelectionFlag-  , QtExport $ ExportBitspace bs_SelectionFlags+  [ qtExport e_SelectionFlag+  , qtExport fl_SelectionFlags   ]  c_QItemSelectionModel =@@ -85,57 +85,58 @@     -- 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" []+    test (qtVersion >= [5, 5]) $ mkCtor "new" np   , 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 $ mkMethod "clear" np voidT+  , test (qtVersion >= [5, 0]) $ mkMethod "clearCurrentIndex" np voidT+  , just $ mkMethod "clearSelection" np voidT   , just $ mkConstMethod "columnIntersectsSelection" [intT, objT c_QModelIndex] boolT-  , just $ mkConstMethod "currentIndex" [] $ objT c_QModelIndex-  , just $ mkConstMethod "hasSelection" [] boolT+  , just $ mkConstMethod "currentIndex" np $ objT c_QModelIndex+  , just $ mkConstMethod "hasSelection" np 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+  , test (qtVersion >= [5, 5]) $ mkMethod' "model" "model" np $ ptrT $ objT c_QAbstractItemModel+  , just $ mkConstMethod' "model" "modelConst" np $ ptrT $ constT $ objT c_QAbstractItemModel+  , just $ mkMethod "reset" np 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]+  , just $ mkMethod' "select" "selectIndex" [objT c_QModelIndex, flagsT fl_SelectionFlags] voidT+  , just $ mkMethod' "select" "selectSelection" [objT c_QItemSelection, flagsT fl_SelectionFlags]     voidT   , just $ mkConstMethod "selectedColumns" [intT] $ objT c_QListQModelIndex-  , test (qtVersion >= [5, 5]) $ mkConstMethod "selectedIndexes" [] $ objT c_QListQModelIndex+  , test (qtVersion >= [5, 5]) $ mkConstMethod "selectedIndexes" np $ 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+  , just $ mkConstMethod "selection" np $ objT c_QItemSelection+  , just $ mkMethod "setCurrentIndex" [objT c_QModelIndex, flagsT fl_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+  [ just $ makeSignal c_QItemSelectionModel "currentChanged" listenerQModelIndexQModelIndex+  , just $ makeSignal c_QItemSelectionModel "currentColumnChanged" listenerQModelIndexQModelIndex+  , just $ makeSignal c_QItemSelectionModel "currentRowChanged" listenerQModelIndexQModelIndex   , test (qtVersion >= [5, 5]) $ makeSignal c_QItemSelectionModel "modelChanged"-    c_ListenerPtrQAbstractItemModel+    listenerPtrQAbstractItemModel   , just $ makeSignal c_QItemSelectionModel "selectionChanged"-    c_ListenerRefConstQItemSelectionRefConstQItemSelection+    listenerRefConstQItemSelectionRefConstQItemSelection   ] -(e_SelectionFlag, bs_SelectionFlags) =-  makeQtEnumBitspace (ident1 "QItemSelectionModel" "SelectionFlag") "SelectionFlags"+(e_SelectionFlag, fl_SelectionFlags) =+  makeQtEnumAndFlagsWithOverrides (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"])+  [ "NoUpdate"+  , "Clear"+  , "Select"+  , "Deselect"+  , "Toggle"+  , "Current"+  , "Rows"+  , "Columns"+  , "SelectCurrent"+  , "ToggleCurrent"+  , "ClearAndSelect"+  ]+  [ ("Clear", "ClearFlag")   ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelectionModel.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -16,9 +16,9 @@ -- along with this program.  If not, see <http://www.gnu.org/licenses/>.  module Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionModel (-  bs_SelectionFlags,+  fl_SelectionFlags,   ) where -import Foreign.Hoppy.Generator.Spec (Bitspace)+import Graphics.UI.Qtah.Generator.Flags (Flags) -bs_SelectionFlags :: Bitspace+fl_SelectionFlags :: Flags
src/Graphics/UI/Qtah/Generator/Interface/Core/QItemSelectionRange.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -32,6 +31,7 @@   mkConstMethod',   mkCtor,   mkMethod,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -39,7 +39,7 @@   ) 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 Graphics.UI.Qtah.Generator.Config (qtVersion) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQModelIndex) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (   c_QAbstractItemModel,@@ -54,7 +54,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QItemSelectionRange"]-  [ QtExport $ ExportClass c_QItemSelectionRange ]+  [ qtExport c_QItemSelectionRange ]  c_QItemSelectionRange =   addReqIncludes [includeStd "QItemSelectionRange"] $@@ -63,31 +63,31 @@   classSetEntityPrefix "" $   makeClass (ident "QItemSelectionRange") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithIndex" [objT c_QModelIndex]   , just $ mkCtor "newWithIndices" [objT c_QModelIndex, objT c_QModelIndex]-  , just $ mkConstMethod "bottom" [] intT-  , just $ mkConstMethod "bottomRight" [] $+  , just $ mkConstMethod "bottom" np intT+  , just $ mkConstMethod "bottomRight" np $     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 "height" np intT+  , just $ mkConstMethod "indexes" np $ 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+  , just $ mkConstMethod "isEmpty" np boolT+  , just $ mkConstMethod "isValid" np boolT+  , just $ mkConstMethod "left" np intT+  , just $ mkConstMethod "model" np $ ptrT $ constT $ objT c_QAbstractItemModel+  , just $ mkConstMethod "parent" np $ objT c_QModelIndex+  , just $ mkConstMethod "right" np intT   , test (qtVersion >= [5, 6]) $ mkMethod "swap" [refT $ objT c_QItemSelectionRange] voidT-  , just $ mkConstMethod "top" [] intT-  , just $ mkConstMethod "topLeft" [] $+  , just $ mkConstMethod "top" np intT+  , just $ mkConstMethod "topLeft" np $     if qtVersion >= [5, 0]     then refT $ constT $ objT c_QPersistentModelIndex     else objT c_QModelIndex-  , just $ mkConstMethod "width" [] intT+  , just $ mkConstMethod "width" np intT   ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QLatin1Char.hs view
@@ -0,0 +1,53 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QLatin1Char (+  aModule,+  c_QLatin1Char,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  np,+  )+import Foreign.Hoppy.Generator.Types (charT, ushortT)+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 ["Core", "QLatin1Char"] $+  [qtExport c_QLatin1Char]++c_QLatin1Char =+  addReqIncludes [ includeStd "QLatin1Char" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QLatin1Char") Nothing [] $+  collect+  [ just $ mkCtor "new" [charT]+  , just $ mkConstMethod "toLatin1" np charT+  , just $ mkConstMethod "unicode" np ushortT+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QLatin1String.hs view
@@ -0,0 +1,138 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QLatin1String (+  aModule,+  c_QLatin1String,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Operator (OpArray, OpNe, OpLt, OpLe, OpEq, OpGt, OpGe),+  classSetConversionToGc,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkCtor,+  mkMethod,+  np,+  operatorPreferredExtName',+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Equatable, Comparable, Copyable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (toGcT, charT, intT, boolT, voidT, enumT, constT, objT, ptrT, refT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Graphics.UI.Qtah.Generator.Interface.Core.QLatin1Char (c_QLatin1Char)+import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar)+--import Graphics.UI.Qtah.Generator.Interface.Core.QStringView (c_QStringView)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_CaseSensitivity)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QLatin1String"] $+  [qtExport c_QLatin1String]++c_QLatin1String =+  addReqIncludes [ includeStd "QLatin1String" ] $+  classSetConversionToGc $+  classAddFeatures [Equatable, Comparable, Copyable] $+  classSetEntityPrefix "" $+  makeClass (ident "QLatin1String") Nothing [] $+  collect+  [ test (qtVersion >= [5, 6]) $ mkCtor "new" np+  , just $ mkCtor "newWithCharPtr" [ptrT $ constT charT]+  , test (qtVersion >= [5, 10]) $ mkCtor "newWithCharPtrRange" [ptrT $ constT charT, ptrT $ constT charT]+  , just $ mkCtor "newWithCharPtrAndSize" [ptrT $ constT charT, intT]+  , just $ mkCtor "newWithByteArray" [refT $ constT $ objT c_QByteArray]+  , test (qtVersion >= [5, 8]) $ mkConstMethod' "at" "at" [intT] $ toGcT $ objT c_QLatin1Char+  , test (qtVersion >= [5, 10]) $ mkConstMethod "back" np $ toGcT $ objT c_QLatin1Char+  , test (qtVersion >= [5, 10]) $ mkMethod "chop" [intT] voidT+  , test (qtVersion >= [5, 10]) $ mkConstMethod "chopped" [intT] $ objT c_QLatin1String+  , just $ mkConstMethod' "data" "dataString" np $ ptrT $ constT charT+  , test (qtVersion >= [5, 10]) $ mkConstMethod "front" np $ toGcT $ objT c_QLatin1Char+  , test (qtVersion >= [5, 10]) $ mkConstMethod "isEmpty" np boolT+  , test (qtVersion >= [5, 10]) $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "latin1" np $ ptrT $ constT charT+  , test (qtVersion >= [5, 8]) $ mkConstMethod "left" [intT] $ objT c_QLatin1String+  , test (qtVersion >= [5, 8]) $ mkConstMethod' "mid" "mid" [intT] $ objT c_QLatin1String+  , test (qtVersion >= [5, 8]) $ mkConstMethod' "mid" "midWithLength" [intT, intT] $ objT c_QLatin1String+  , test (qtVersion >= [5, 8]) $ mkConstMethod "right" [intT] $ objT c_QLatin1String+  , just $ mkConstMethod "size" np intT+  , test (qtVersion >= [5, 10]) $ mkConstMethod "trimmed" np $ objT c_QLatin1String+  , test (qtVersion >= [5, 10]) $ mkMethod "truncate" [intT] voidT+  --, test (qtVersion >= [5, 10]) $ mkConstMethod' "endsWith" "endsWithStringView" [objT c_QStringView] boolT+  --, test (qtVersion >= [5, 10]) $ mkConstMethod' "endsWith" "endsWithStringViewWithCase" [objT c_QStringView, enumT e_CaseSensitivity] boolT+  , test (qtVersion >= [5, 10]) $ mkConstMethod' "endsWith" "endsWithLatin1String" [objT c_QLatin1String] boolT+  , test (qtVersion >= [5, 10]) $ mkConstMethod' "endsWith" "endsWithLatin1StringWithCase" [objT c_QLatin1String, enumT e_CaseSensitivity] boolT+  , test (qtVersion >= [5, 10]) $ mkConstMethod' "endsWith" "endsWithChar" [objT c_QChar] boolT+  , test (qtVersion >= [5, 10]) $ mkConstMethod' "endsWith" "endsWithCharWithCase" [objT c_QChar, enumT e_CaseSensitivity] boolT+  --, test (qtVersion >= [5, 10]) $ mkConstMethod' "startsWith" "startsWithStringView" [objT c_QStringView] boolT+  --, test (qtVersion >= [5, 10]) $ mkConstMethod' "startsWith" "startsWithStringViewWithCase" [objT c_QStringView, enumT e_CaseSensitivity] boolT+  , test (qtVersion >= [5, 10]) $ mkConstMethod' "startsWith" "startsWithLatin1String" [objT c_QLatin1String] boolT+  , test (qtVersion >= [5, 10]) $ mkConstMethod' "startsWith" "startsWithLatin1StringWithCase" [objT c_QLatin1String, enumT e_CaseSensitivity] boolT+  , test (qtVersion >= [5, 10]) $ mkConstMethod' "startsWith" "startsWithCharWith" [objT c_QChar] boolT+  , test (qtVersion >= [5, 10]) $ mkConstMethod' "startsWith" "startsWithCharWithCase" [objT c_QChar, enumT e_CaseSensitivity] boolT+  , just $ mkConstMethod' OpNe (operatorPreferredExtName' OpNe ++ "String")+    [refT $ constT $ objT c_QString] boolT+  , test (qtVersion >= [4, 3]) $ mkConstMethod' OpNe (operatorPreferredExtName' OpNe ++ "PtrConstChar")+    [ptrT $ constT charT] boolT+  , test (qtVersion >= [5, 0]) $ mkConstMethod' OpNe (operatorPreferredExtName' OpNe ++ "ByteArray")+    [refT $ constT $ objT c_QByteArray] boolT+  , just $ mkConstMethod' OpLt (operatorPreferredExtName' OpLt ++ "String")+    [refT $ constT $ objT c_QString] boolT+  , test (qtVersion >= [4, 3]) $ mkConstMethod' OpLt (operatorPreferredExtName' OpLt ++ "PtrConstChar")+    [ptrT $ constT charT] boolT+  , test (qtVersion >= [5, 0]) $ mkConstMethod' OpLt (operatorPreferredExtName' OpLt ++ "ByteArray")+    [refT $ constT $ objT c_QByteArray] boolT+  , just $ mkConstMethod' OpLe (operatorPreferredExtName' OpLe ++ "String")+    [refT $ constT $ objT c_QString] boolT+  , test (qtVersion >= [4, 3]) $ mkConstMethod' OpLe (operatorPreferredExtName' OpLe ++ "PtrConstChar")+    [ptrT $ constT charT] boolT+  , test (qtVersion >= [5, 0]) $ mkConstMethod' OpLe (operatorPreferredExtName' OpLe ++ "ByteArray")+    [refT $ constT $ objT c_QByteArray] boolT+  , just $ mkConstMethod' OpEq (operatorPreferredExtName' OpEq ++ "String")+    [refT $ constT $ objT c_QString] boolT+  , test (qtVersion >= [4, 3]) $ mkConstMethod' OpEq (operatorPreferredExtName' OpEq ++ "PtrConstChar")+    [ptrT $ constT charT] boolT+  , test (qtVersion >= [5, 0]) $ mkConstMethod' OpEq (operatorPreferredExtName' OpEq ++ "ByteArray")+    [refT $ constT $ objT c_QByteArray] boolT+  , just $ mkConstMethod' OpGt (operatorPreferredExtName' OpGt ++ "String")+    [refT $ constT $ objT c_QString] boolT+  , test (qtVersion >= [4, 3]) $ mkConstMethod' OpGt (operatorPreferredExtName' OpGt ++ "PtrConstChar")+    [ptrT $ constT charT] boolT+  , test (qtVersion >= [5, 0]) $ mkConstMethod' OpGt (operatorPreferredExtName' OpGt ++ "ByteArray")+    [refT $ constT $ objT c_QByteArray] boolT+  , just $ mkConstMethod' OpGe (operatorPreferredExtName' OpGe ++ "String")+    [refT $ constT $ objT c_QString] boolT+  , test (qtVersion >= [4, 3]) $ mkConstMethod' OpGe (operatorPreferredExtName' OpGe ++ "PtrConstChar")+    [ptrT $ constT charT] boolT+  , test (qtVersion >= [5, 0]) $ mkConstMethod' OpGe (operatorPreferredExtName' OpGe ++ "ByteArray")+    [refT $ constT $ objT c_QByteArray] boolT+  , test (qtVersion >= [5, 8]) $ mkConstMethod' OpArray "get" [intT] $ toGcT $ objT c_QLatin1Char+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QLibrary.hs view
@@ -0,0 +1,98 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QLibrary (+  aModule,+  c_QLibrary,+  e_LoadHint,+  fl_LoadHints,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkStaticMethod,+  mkStaticMethod',+  mkCtor,+  mkMethod',+  mkMethod,+  mkProp,+  np,+  )+import Foreign.Hoppy.Generator.Types (charT, intT, boolT, voidT, constT, objT, ptrT, refT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qfunctionpointer)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QLibrary"] $+  collect+  [ just $ qtExport c_QLibrary+  , just $ qtExport e_LoadHint+  , just $ qtExport fl_LoadHints+  ]++c_QLibrary =+  addReqIncludes [ includeStd "QLibrary" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QLibrary") Nothing [c_QObject] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]+  , just $ mkCtor "newWithFilename" [refT $ constT $ objT c_QString]+  , just $ mkCtor "newWithFilenameAndParent" [refT $ constT $ objT c_QString, ptrT $ objT c_QObject]+  , just $ mkCtor "newWithFilenameAndMajorVersion" [refT $ constT $ objT c_QString, intT]+  , just $ mkCtor "newWithFilenameAndMajorVersionAndParent" [refT $ constT $ objT c_QString, intT, ptrT $ objT c_QObject]+  , just $ mkCtor "newWithFilenameAndVersion" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString]+  , just $ mkCtor "newWithFilenameAndVersionAndParent" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString, ptrT $ objT c_QObject]+  , test (qtVersion >= [4, 2]) $ mkConstMethod "errorString" np $ objT c_QString+  , just $ mkStaticMethod "isLibrary" [refT $ constT $ objT c_QString] boolT+  , just $ mkConstMethod "isLoaded" np boolT+  , just $ mkMethod "load" np boolT+  , -- TODO Make these functions take QStrings.+    just $ mkMethod' "resolve" "resolve" [ptrT $ constT $ charT] qfunctionpointer+  , just $ mkStaticMethod' "resolve" "resolveStatic" [refT $ constT $ objT c_QString, ptrT $ constT charT] qfunctionpointer+  , just $ mkStaticMethod' "resolve" "resolveStaticWithMajorVersion" [refT $ constT $ objT c_QString, intT, ptrT $ constT charT] qfunctionpointer+  , test (qtVersion >= [4, 4]) $ mkStaticMethod' "resolve" "resolveStaticWithVersion" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString, ptrT $ constT charT] qfunctionpointer+  , just $ mkMethod' "setFileNameAndVersion" "setFileNameAndMajorVersion" [refT $ constT $ objT c_QString, intT] voidT+  , test (qtVersion >= [4, 4]) $ mkMethod' "setFileNameAndVersion" "setFileNameAndVersion" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] voidT+  , just $ mkMethod "unload" np boolT+  , just $ mkProp "fileName" $ objT c_QString+  , just $ mkProp "loadHints" $ flagsT fl_LoadHints+  ]++(e_LoadHint, fl_LoadHints) =+  makeQtEnumAndFlags (ident1 "QLibrary" "LoadHint") "LoadHints" [includeStd "QLibrary"]+  [ "ResolveAllSymbolsHint"+  , "ExportExternalSymbolsHint"+  , "LoadArchiveMemberHint"+  , "PreventUnloadHint"+  , "DeepBindHint"+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QLibraryInfo.hs view
@@ -0,0 +1,79 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QLibraryInfo (+  aModule,+  c_QLibraryInfo,+  e_LibraryLocation,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkStaticMethod,+  np,+  )+import Foreign.Hoppy.Generator.Types (boolT, enumT, objT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QVersionNumber (c_QVersionNumber)+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", "QLibraryInfo"] $+  collect+  [ just $ qtExport c_QLibraryInfo+  , just $ qtExport e_LibraryLocation+  ]++c_QLibraryInfo =+  addReqIncludes [ includeStd "QLibraryInfo" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QLibraryInfo") Nothing [] $+  collect+  [ test (qtVersion >= [5, 0]) $ mkStaticMethod "isDebugBuild" np $ boolT+  , just $ mkStaticMethod "location" [enumT e_LibraryLocation] $ objT c_QString+  , test (qtVersion >= [5, 8]) $ mkStaticMethod "version" np $ objT c_QVersionNumber+  ]++e_LibraryLocation =+  makeQtEnum (ident1 "QLibraryInfo" "LibraryLocation") [includeStd "QLibraryInfo"]+  [ "PrefixPath"+  , "DocumentationPath"+  , "HeadersPath"+  , "LibrariesPath"+  , "LibraryExecutablesPath"+  , "BinariesPath"+  , "PluginsPath"+  , "ImportsPath"+  , "Qml2ImportsPath"+  , "ArchDataPath"+  , "DataPath"+  , "TranslationsPath"+  , "ExamplesPath"+  , "TestsPath"+  , "SettingsPath"+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QList.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,8 +15,6 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- -- | Bindings for @QList@. module Graphics.UI.Qtah.Generator.Interface.Core.QList (   -- * Template@@ -37,12 +35,10 @@   c_QListQString,   c_QListQVariant,   c_QListQWidget,+  c_QListQTreeWidgetItem,   ) where  import Control.Monad (forM_, when)-#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat, mempty)-#endif import Foreign.Hoppy.Generator.Language.Haskell (   Generator,   HsTypeSide (HsHsSide),@@ -53,9 +49,6 @@   prettyPrint,   sayLn,   saysLn,-  toHsCastMethodName,-  toHsClassEntityName',-  toHsDataTypeName,   ) import Foreign.Hoppy.Generator.Spec (   Class,@@ -66,7 +59,6 @@     classHaskellConversionType     ),   Constness (Const, Nonconst),-  Export (ExportClass),   Operator (OpAdd, OpArray),   Reqs,   Type,@@ -84,21 +76,28 @@   mkCtor,   mkMethod,   mkMethod',+  np,   reqInclude,   toExtName,   )+import Foreign.Hoppy.Generator.Spec.Class (+  toHsCastMethodName,+  toHsClassEntityName',+  toHsDataTypeName,+  ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable),   classAddFeatures,   ) 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.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray) import Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionRange (c_QItemSelectionRange) import Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex (c_QModelIndex) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject) import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidgetItem (c_QTreeWidgetItem) 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@@ -156,28 +155,28 @@         classSetMonomorphicSuperclass $         classSetEntityPrefix "" $         makeClass (identT "QList" [t]) (Just $ toExtName listName) [] $ collect-        [ just $ mkCtor "new" []+        [ just $ mkCtor "new" np         , just $ mkMethod' "append" "append" [t] voidT         , test (qtVersion >= [4, 5]) $ mkMethod' "append" "appendList" [objT list] voidT         , just $ mkMethod' OpArray "at" [intT] $ refT t         , just $ mkConstMethod' "at" "atConst" [intT] $ refT $ constT t           -- OMIT back           -- OMIT begin-        , just $ mkMethod "clear" [] voidT+        , just $ mkMethod "clear" np voidT         , just $ mkConstMethod "contains" [t] boolT           -- OMIT count()         , just $ mkConstMethod "count" [t] intT         , test (qtVersion >= [4, 5]) $ mkConstMethod "endsWith" [t] boolT           -- OMIT erase-        , just $ mkMethod' "first" "first" [] $ refT t-        , just $ mkConstMethod' "first" "firstConst" [] $ refT $ constT t+        , just $ mkMethod' "first" "first" np $ refT t+        , just $ mkConstMethod' "first" "firstConst" np $ refT $ constT t         , just $ mkConstMethod' OpArray "get" [intT] t         , just $ mkConstMethod' "indexOf" "indexOf" [t] intT         , just $ mkConstMethod' "indexOf" "indexOfFrom" [t, intT] intT         , just $ mkMethod "insert" [intT, t] voidT-        , just $ mkConstMethod "isEmpty" [] boolT-        , just $ mkMethod' "last" "last" [] $ refT t-        , just $ mkConstMethod' "last" "lastConst" [] $ refT $ constT t+        , just $ mkConstMethod "isEmpty" np boolT+        , just $ mkMethod' "last" "last" np $ refT t+        , just $ mkConstMethod' "last" "lastConst" np $ refT $ constT t         , just $ mkConstMethod' "lastIndexOf" "lastIndexOf" [t] intT         , just $ mkConstMethod' "lastIndexOf" "lastIndexOfFrom" [t, intT] intT           -- OMIT length@@ -187,18 +186,18 @@         , just $ mkMethod "prepend" [t] voidT         , just $ mkMethod "removeAll" [t] intT         , just $ mkMethod "removeAt" [intT] voidT-        , just $ mkMethod "removeFirst" [] voidT-        , just $ mkMethod "removeLast" [] voidT+        , just $ mkMethod "removeFirst" np voidT+        , just $ mkMethod "removeLast" np voidT         , test (qtVersion >= [4, 4]) $ mkMethod "removeOne" [t] boolT         , just $ mkMethod "replace" [intT, t] voidT         , test hasReserve $ mkMethod "reserve" [intT] voidT-        , just $ mkConstMethod "size" [] intT+        , just $ mkConstMethod "size" np intT         , test (qtVersion >= [4, 5]) $ mkConstMethod "startsWith" [t] boolT         , just $ mkMethod "swap" [intT, intT] voidT           -- OMIT swap(QList<T>&)         , just $ mkMethod "takeAt" [intT] t-        , just $ mkMethod "takeFirst" [] t-        , just $ mkMethod "takeLast" [] t+        , just $ mkMethod "takeFirst" np t+        , just $ mkMethod "takeLast" np t           -- TODO toSet           -- TODO toStdList           -- TODO toVector@@ -256,9 +255,8 @@       -- type using HasContents/FromContents.       conversion =         ClassHaskellConversion-        { classHaskellConversionType = Just $ do-          hsType <- cppTypeToHsTypeAndUse HsHsSide t-          return $ HsTyApp (HsTyCon $ Special HsListCon) hsType+        { classHaskellConversionType =+          Just $ HsTyApp (HsTyCon $ Special HsListCon) <$> cppTypeToHsTypeAndUse HsHsSide t         , classHaskellConversionToCppFn = Just $ do           addImports importForRuntime           sayLn "QtahFHR.fromContents"@@ -290,7 +288,7 @@ -- | Converts an instantiation into a list of exports to be included in a -- module. toExports :: Contents -> [QtExport]-toExports m = [QtExport $ ExportClass $ c_QList m]+toExports m = [qtExport $ c_QList m]  createModule :: String -> Contents -> QtModule createModule name contents = makeQtModule ["Core", "QList", name] $ toExports contents@@ -308,6 +306,7 @@   , qmod_QString   , qmod_QVariant   , qmod_QWidget+  , qmod_QTreeWidgetItem   ]  qmod_Int :: QtModule@@ -401,3 +400,12 @@  c_QListQWidget :: Class c_QListQWidget = c_QList contents_QWidget++qmod_QTreeWidgetItem :: QtModule+qmod_QTreeWidgetItem = createModule "QTreeWidgetItem" contents_QTreeWidgetItem++contents_QTreeWidgetItem :: Contents+contents_QTreeWidgetItem = instantiate "QListQTreeWidgetItem" (ptrT $ objT c_QTreeWidgetItem) mempty++c_QListQTreeWidgetItem :: Class+c_QListQTreeWidgetItem = c_QList contents_QTreeWidgetItem
src/Graphics/UI/Qtah/Generator/Interface/Core/QList.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -17,12 +17,16 @@  -- | Bindings for @QList@. module Graphics.UI.Qtah.Generator.Interface.Core.QList (+  c_QListQByteArray,   c_QListQModelIndex,   c_QListQObject,   ) where  import Foreign.Hoppy.Generator.Spec (Class) +c_QListQByteArray :: Class+ c_QListQModelIndex :: Class  c_QListQObject :: Class+
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QLockFile.hs view
@@ -0,0 +1,78 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QLockFile (+  aModule,+  c_QLockFile,+  e_LockError,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod',+  mkMethod,+  np,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Foreign.Hoppy.Generator.Types (boolT, intT, voidT, enumT, constT, objT, ptrT, refT, llongT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QLockFile"] [5, 1] $+  collect+  [ just $ qtExport c_QLockFile+  , just $ qtExport e_LockError+  ]++c_QLockFile =+  addReqIncludes [ includeStd "QLockFile" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QLockFile") Nothing [] $+  collect+  [ just $ mkCtor "new" [refT $ constT $ objT c_QString]+  , just $ mkConstMethod "error" np $ enumT e_LockError+  , -- TODO Return a tuple instead.+    just $ mkConstMethod "getLockInfo" [ptrT $ llongT, ptrT $ objT c_QString, ptrT $ objT c_QString] boolT+  , just $ mkConstMethod "isLocked" np boolT+  , just $ mkMethod "lock" np boolT+  , just $ mkMethod "removeStaleLockFile" np boolT+  , just $ mkMethod "setStaleLockTime" [intT] voidT+  , just $ mkConstMethod "staleLockTime" np intT+  , just $ mkMethod' "tryLock" "tryLock" np boolT+  , just $ mkMethod' "tryLock" "tryLockWithTimeout" [intT] boolT+  , just $ mkMethod "unlock" np voidT+  ]++e_LockError =+  makeQtEnum (ident1 "QLockFile" "LockError") [includeStd "QLockFile"]+  [ "NoError"+  , "LockFailedError"+  , "PermissionError"+  , "UnknownError"+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QLoggingCategory.hs view
@@ -0,0 +1,74 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QLoggingCategory (+  aModule,+  c_QLoggingCategory,+  categoryFilter,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Type,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkStaticMethod,+  mkCtor,+  mkMethod,+  np,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Foreign.Hoppy.Generator.Types (charT, voidT, boolT, enumT, constT, objT, ptrT, refT, fnT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_QtMsgType)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QLoggingCategory"] [5, 2] $+  [qtExport c_QLoggingCategory]++c_QLoggingCategory =+  addReqIncludes [ includeStd "QLoggingCategory" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QLoggingCategory") Nothing [] $+  collect+  [ -- TODO QStrings instead of const char*.+    test (qtVersion >= [5, 4]) $ mkCtor "newWithMsgType" [ptrT $ constT charT, enumT e_QtMsgType]+  , just $ mkCtor "new" [ptrT $ constT charT]+  , just $ mkConstMethod "categoryName" np $ ptrT $ constT charT+  , just $ mkStaticMethod "defaultCategory" np $ ptrT $ objT c_QLoggingCategory+  , just $ mkStaticMethod "installFilter" [categoryFilter] categoryFilter+  , just $ mkConstMethod "isCriticalEnabled" np boolT+  , just $ mkConstMethod "isDebugEnabled" np boolT+  , just $ mkConstMethod "isEnabled" [enumT e_QtMsgType] boolT+  , test (qtVersion >= [5, 5]) $ mkConstMethod "isInfoEnabled" np boolT+  , just $ mkConstMethod "isWarningEnabled" np boolT+  , just $ mkMethod "setEnabled" [enumT e_QtMsgType, boolT] voidT+  , just $ mkStaticMethod "setFilterRules" [refT $ constT $ objT c_QString] voidT+    -- OMIT operator()+  ]++categoryFilter :: Type+categoryFilter = ptrT $ fnT [ptrT $ objT c_QLoggingCategory] voidT
src/Graphics/UI/Qtah/Generator/Interface/Core/QMargins.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,16 +15,11 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- module Graphics.UI.Qtah.Generator.Interface.Core.QMargins (   aModule,   c_QMargins,   ) where -#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat)-#endif import Foreign.Hoppy.Generator.Language.Haskell (   addImports,   sayLn,@@ -37,7 +32,6 @@     classHaskellConversionToCppFn,     classHaskellConversionType   ),-  Export (ExportClass),   Operator (OpAddAssign, OpDivideAssign, OpMultiplyAssign, OpSubtractAssign),   addReqIncludes,   classSetEntityPrefix,@@ -51,6 +45,7 @@   mkCtor,   mkMethod',   mkProp,+  np,   operatorPreferredExtName',   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (@@ -59,7 +54,7 @@   ) import Foreign.Hoppy.Generator.Types (boolT, intT, objT, refT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (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@@ -74,7 +69,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QMargins"]-  [ QtExport $ ExportClass c_QMargins ]+  [ qtExport c_QMargins ]  c_QMargins =   addReqIncludes [includeStd "QMargins"] $@@ -97,10 +92,10 @@   classSetEntityPrefix "" $   makeClass (ident "QMargins") Nothing [] $   collect-  [ just $ mkCtor "newNull" []+  [ just $ mkCtor "newNull" np   , just $ mkCtor "new" [intT, intT, intT, intT]   , just $ mkProp "bottom" intT-  , just $ mkConstMethod "isNull" [] boolT+  , just $ mkConstMethod "isNull" np boolT   , just $ mkProp "left" intT   , just $ mkProp "right" intT   , just $ mkProp "top" intT
src/Graphics/UI/Qtah/Generator/Interface/Core/QMarginsF.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   Operator (OpAddAssign, OpDivideAssign, OpMultiplyAssign, OpSubtractAssign),   addReqIncludes,   classSetEntityPrefix,@@ -32,6 +31,7 @@   mkCtor,   mkMethod',   mkProp,+  np,   operatorPreferredExtName',   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (@@ -51,18 +51,18 @@ aModule =   AQtModule $   makeQtModuleWithMinVersion ["Core", "QMarginsF"] minVersion-  [ QtExport $ ExportClass c_QMarginsF ]+  [ qtExport c_QMarginsF ]  c_QMarginsF =   addReqIncludes [includeStd "QMarginsF"] $   classAddFeatures [Assignable, Copyable, Equatable] $   classSetEntityPrefix "" $   makeClass (ident "QMarginsF") Nothing []-  [ mkCtor "newNull" []+  [ mkCtor "newNull" np   , mkCtor "new" [qreal, qreal, qreal, qreal]   , mkCtor "newWithMargins" [objT c_QMargins]   , mkProp "bottom" qreal-  , mkConstMethod "isNull" [] boolT+  , mkConstMethod "isNull" np boolT   , mkProp "left" qreal   , mkProp "right" qreal   , mkProp "top" qreal
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QMessageAuthenticationCode.hs view
@@ -0,0 +1,65 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QMessageAuthenticationCode (+  aModule,+  c_QMessageAuthenticationCode,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkStaticMethod,+  mkConstMethod,+  mkCtor,+  mkMethod',+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Types (charT, intT, boolT, voidT, enumT, constT, objT, ptrT, refT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.QIODevice (c_QIODevice)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Graphics.UI.Qtah.Generator.Interface.Core.QCryptographicHash (e_Algorithm)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QMessageAuthenticationCode"] [5, 1] $+  [qtExport c_QMessageAuthenticationCode]++c_QMessageAuthenticationCode =+  addReqIncludes [ includeStd "QMessageAuthenticationCode" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QMessageAuthenticationCode") Nothing [] $+  collect+  [ just $ mkCtor "new" [enumT e_Algorithm]+  , just $ mkCtor "newWithKey" [enumT e_Algorithm, refT $ constT $ objT c_QByteArray]+  , just $ mkMethod' "addData" "addDataRaw" [ptrT $ constT charT, intT] voidT+  , just $ mkMethod' "addData" "addDataByteArray" [refT $ constT $ objT c_QByteArray] voidT+  , just $ mkMethod' "addData" "addDataDevice" [ptrT $ objT c_QIODevice] boolT+  , just $ mkStaticMethod "hash" [refT $ constT $ objT c_QByteArray, refT $ constT $ objT c_QByteArray, enumT e_Algorithm] $ objT c_QByteArray+  , just $ mkMethod "reset" np voidT+  , just $ mkConstMethod "result" np $ objT c_QByteArray+  , just $ mkMethod "setKey" [refT $ constT $ objT c_QByteArray] voidT+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QMessageLogContext.hs view
@@ -0,0 +1,48 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QMessageLogContext (+  aModule,+  c_QMessageLogContext,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  )+import Foreign.Hoppy.Generator.Version (collect)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QMessageLogContext"] [5, 0] $+  [qtExport c_QMessageLogContext]++c_QMessageLogContext =+  addReqIncludes [ includeStd "QMessageLogContext" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QMessageLogContext") Nothing [] $+  collect+  [++  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QMessageLogger.hs view
@@ -0,0 +1,64 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QMessageLogger (+  aModule,+  c_QMessageLogger,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod',+  mkCtor,+  np,+  )+import Foreign.Hoppy.Generator.Types (charT, intT, constT, objT, ptrT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QDebug (c_QDebug)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QMessageLogger"] [5, 0] $+  [qtExport c_QMessageLogger]++c_QMessageLogger =+  addReqIncludes [ includeStd "QMessageLogger" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QMessageLogger") Nothing [] $+  collect+  [ -- TODO QStrings instead of const char*.+    just $ mkCtor "new" np+  , just $ mkCtor "newWithContext" [ptrT $ constT $ charT, intT, ptrT $ constT $ charT]+  , just $ mkCtor "newWithContextAndCategory" [ptrT $ constT charT, intT, ptrT $ constT charT, ptrT $ constT charT]++    -- The following methods also have overloads that take format strings with+    -- variadic arguments.  We omit those as Qtah doesn't support varargs.++  , just $ mkConstMethod' "critical" "critical" np $ objT c_QDebug+  , just $ mkConstMethod' "debug" "debug" np $ objT c_QDebug+  , test (qtVersion >= [5, 5]) $ mkConstMethod' "info" "info" np $ objT c_QDebug+  , test (qtVersion >= [5, 3]) $ mkConstMethod' "warning" "warning" np $ objT c_QDebug+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QMetaClassInfo.hs view
@@ -0,0 +1,64 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QMetaClassInfo (+  aModule,+  c_QMetaClassInfo,+  ) where++import Foreign.Hoppy.Generator.Spec (+  MethodApplicability (MConst),+  Purity (Nonpure),+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  ident2,+  includeLocal,+  includeStd,+  makeClass,+  makeFnMethod,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Copyable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (objT)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QMetaClassInfo"]+  [ qtExport c_QMetaClassInfo ]++c_QMetaClassInfo =+  addReqIncludes [ includeStd "QMetaClassInfo"+                 , includeLocal "wrap_qmetaclassinfo.hpp"+                 ] $+  classSetConversionToGc $+  classAddFeatures [Copyable] $+  classSetEntityPrefix "" $+  makeClass (ident "QMetaClassInfo") Nothing []+  [ makeFnMethod (ident2 "qtah" "qmetaclassinfo" "name") "name" MConst Nonpure+    [objT c_QMetaClassInfo] $ objT c_QString+  , makeFnMethod (ident2 "qtah" "qmetaclassinfo" "value") "value" MConst Nonpure+    [objT c_QMetaClassInfo] $ objT c_QString+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QMetaEnum.hs view
@@ -0,0 +1,76 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QMetaEnum (+  aModule,+  c_QMetaEnum,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Copyable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT, constT, charT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+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", "QMetaEnum"]+  [ qtExport c_QMetaEnum ]++c_QMetaEnum =+  addReqIncludes [includeStd "QMetaEnum"] $+  classSetConversionToGc $+  classAddFeatures [Copyable] $+  classSetEntityPrefix "" $+  makeClass (ident "QMetaEnum") Nothing [] $+  collect+  [ -- TODO QStrings instead of const char*.+    test (qtVersion >= [5, 12]) $ mkConstMethod "enumName" np $ ptrT $ constT charT+  , just $ mkConstMethod "isFlag" np boolT+  , test (qtVersion >= [5, 8]) $ mkConstMethod "isScoped" np boolT+  , just $ mkConstMethod "isValid" np boolT+  , just $ mkConstMethod "key" [intT] $ ptrT $ constT charT+  , just $ mkConstMethod "keyCount" np intT+    -- TODO Return Maybes here.+  , just $ mkConstMethod' "keyToValue" "keyToValue" [ptrT $ constT charT] intT+  , just $ mkConstMethod' "keyToValue" "keyToValueWithPtrBool" [ptrT $ constT charT, ptrT boolT] intT+  , just $ mkConstMethod' "keysToValue" "keysToValue" [ptrT $ constT charT] intT+  , just $ mkConstMethod' "keysToValue" "keysToValueWithPtrBool" [ptrT $ constT charT, ptrT boolT] intT+  , just $ mkConstMethod "name" np $ ptrT $ constT charT+  , just $ mkConstMethod "scope" np $ ptrT $ constT charT+  , just $ mkConstMethod "value" [intT] intT+  , just $ mkConstMethod "valueToKey" [intT] $ ptrT $ constT charT+  , just $ mkConstMethod "valueToKeys" [intT] $ objT c_QByteArray+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QMetaMethod.hs view
@@ -0,0 +1,99 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QMetaMethod (+  aModule,+  c_QMetaMethod,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Operator (OpNe, OpEq),+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Copyable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT, refT, enumT, constT, charT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQByteArray)+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", "QMetaMethod"]+  [ qtExport c_QMetaMethod+  , qtExport e_Access+  , qtExport e_MethodType+  ]++c_QMetaMethod =+  addReqIncludes [includeStd "QMetaMethod"] $+  classSetConversionToGc $+  classAddFeatures [Copyable] $+  classSetEntityPrefix "" $+  makeClass (ident "QMetaMethod") Nothing [] $+  collect+  [ just $ mkConstMethod "access" np $ enumT e_Access+  , test (qtVersion >= [5, 0]) $ mkConstMethod "isValid" np boolT+  , test (qtVersion >= [4, 6]) $ mkConstMethod "methodIndex" np intT+  , test (qtVersion >= [5, 0]) $ mkConstMethod "methodSignature" np $ objT c_QByteArray+  , just $ mkConstMethod "methodType" np $ enumT e_MethodType+  , test (qtVersion >= [5, 0]) $ mkConstMethod "name" np $ objT c_QByteArray+  , test (qtVersion >= [5, 0]) $ mkConstMethod "parameterCount" np intT+  , just $ mkConstMethod "parameterNames" np $ objT c_QListQByteArray+  , test (qtVersion >= [5, 0]) $ mkConstMethod "parameterType" [intT] intT+  , just $ mkConstMethod "parameterTypes" np $ objT c_QListQByteArray+  , test (qtVersion >= [5, 0]) $ mkConstMethod "returnType" np intT+  , test (qtVersion >= [5, 1]) $ mkConstMethod "revision" np intT+    -- TODO QStrings instead of const char*.+  , just $ mkConstMethod "tag" np $ ptrT $ constT charT+  , just $ mkConstMethod "typeName" np $ ptrT $ constT charT+  , test (qtVersion >= [5, 0]) $ mkMethod OpNe [refT $ constT $ objT c_QMetaMethod] boolT+  , test (qtVersion >= [5, 0]) $ mkMethod OpEq [refT $ constT $ objT c_QMetaMethod] boolT++  -- TODO invoke methods+  ]++e_Access =+  makeQtEnum (ident1 "QMetaMethod" "Access") [includeStd "QMetaMethod"]+  [ "Private"+  , "Protected"+  , "Public"+  ]++e_MethodType =+  makeQtEnum (ident1 "QMetaMethod" "MethodType") [includeStd "QMetaMethod"]+  [ "Method"+  , "Signal"+  , "Slot"+  , "Constructor"+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QMetaObject.hs view
@@ -0,0 +1,104 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QMetaObject (+  aModule,+  c_QMetaObject,+  ) where++import Foreign.Hoppy.Generator.Spec (+  MethodApplicability (MConst),+  Purity (Nonpure),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident2,+  includeLocal,+  includeStd,+  makeClass,+  makeFnMethod,+  mkConstMethod,+  np,+  )+import Foreign.Hoppy.Generator.Types (boolT, constT, intT, objT, ptrT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QMetaClassInfo (c_QMetaClassInfo)+import Graphics.UI.Qtah.Generator.Interface.Core.QMetaEnum (c_QMetaEnum)+import Graphics.UI.Qtah.Generator.Interface.Core.QMetaMethod (c_QMetaMethod)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QMetaProperty (c_QMetaProperty)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QMetaObject"]+  [ qtExport c_QMetaObject ]++c_QMetaObject =+  addReqIncludes [ includeStd "QMetaObject"+                 , includeLocal "wrap_qmetaobject.hpp"+                 ] $+  classSetEntityPrefix "" $+  makeClass (ident "QMetaObject") Nothing [] $+  collect+  [ just $ mkConstMethod "classInfo" [intT] $ objT c_QMetaClassInfo+  , just $ mkConstMethod "classInfoCount" np intT+  , just $ mkConstMethod "classInfoOffset" np intT+  , just $ mkConstMethod "constructor" [intT] $ objT c_QMetaMethod+  , just $ mkConstMethod "constructorCount" np intT+  , just $ mkConstMethod "enumerator" [intT] $ objT c_QMetaEnum+  , just $ mkConstMethod "enumeratorCount" np intT+  , just $ mkConstMethod "enumeratorOffset" np intT+  , just $+    makeFnMethod (ident2 "qtah" "qmetaobject" "indexOfClassInfo") "indexOfClassInfo"+    MConst Nonpure [objT c_QMetaObject, objT c_QString] intT+  , just $+    makeFnMethod (ident2 "qtah" "qmetaobject" "indexOfConstructor") "indexOfConstructor"+    MConst Nonpure [objT c_QMetaObject, objT c_QString] intT+  , just $+    makeFnMethod (ident2 "qtah" "qmetaobject" "indexOfEnumerator") "indexOfEnumerator"+    MConst Nonpure [objT c_QMetaObject, objT c_QString] intT+  , just $+    makeFnMethod (ident2 "qtah" "qmetaobject" "indexOfMethod") "indexOfMethod"+    MConst Nonpure [objT c_QMetaObject, objT c_QString] intT+  , just $+    makeFnMethod (ident2 "qtah" "qmetaobject" "indexOfProperty") "indexOfProperty"+    MConst Nonpure [objT c_QMetaObject, objT c_QString] intT+  , just $+    makeFnMethod (ident2 "qtah" "qmetaobject" "indexOfSignal") "indexOfSignal"+    MConst Nonpure [objT c_QMetaObject, objT c_QString] intT+  , just $+    makeFnMethod (ident2 "qtah" "qmetaobject" "indexOfSlot") "indexOfSlot"+    MConst Nonpure [objT c_QMetaObject, objT c_QString] intT+  , test (qtVersion >= [5, 7]) $+    mkConstMethod "inherits" [ptrT $ constT $ objT c_QMetaObject] boolT+  , just $ mkConstMethod "method" [intT] $ objT c_QMetaMethod+  , just $ mkConstMethod "methodCount" np intT+  , just $ mkConstMethod "methodOffset" np intT+    -- TODO newInstance+  , just $ mkConstMethod "property" [intT] $ objT c_QMetaProperty+  , just $ mkConstMethod "propertyCount" np intT+  , just $ mkConstMethod "propertyOffset" np intT+  , just $ mkConstMethod "superClass" np $ ptrT $ constT $ objT c_QMetaObject+  , just $ mkConstMethod "userProperty" np $ objT c_QMetaProperty++    -- TODO Static methods+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QMetaObject/Connection.hs view
@@ -0,0 +1,64 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QMetaObject.Connection (+  aModule,+  c_Connection,+  ) where++import Foreign.Hoppy.Generator.Spec (+  MethodApplicability (MConst),+  Purity (Nonpure),+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident1,+  ident3,+  includeLocal,+  includeStd,+  makeClass,+  makeFnMethod,+  mkCtor,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (boolT, objT)+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", "QMetaObject", "Connection"]+  [ qtExport c_Connection ]++c_Connection =+  addReqIncludes [ includeStd "QMetaObject"+                 , includeLocal "wrap_qmetaobject.hpp"+                 ] $+  classSetConversionToGc $+  classSetEntityPrefix "" $+  classAddFeatures [Assignable, Copyable] $+  makeClass (ident1 "QMetaObject" "Connection") Nothing [] $+  [ mkCtor "new" np+  , makeFnMethod (ident3 "qtah" "qmetaobject" "connection" "isValid") "isValid"+    MConst Nonpure [objT c_Connection] boolT+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QMetaProperty.hs view
@@ -0,0 +1,94 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QMetaProperty (+  aModule,+  c_QMetaProperty,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Copyable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (voidT, boolT, intT, objT, ptrT, refT, voidT, enumT, constT, charT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QMetaEnum (c_QMetaEnum)+import Graphics.UI.Qtah.Generator.Interface.Core.QMetaMethod (c_QMetaMethod)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant, e_Type)+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", "QMetaProperty"]+  [ qtExport c_QMetaProperty ]++c_QMetaProperty =+  addReqIncludes [includeStd "QMetaProperty"] $+  classSetConversionToGc $+  classAddFeatures [Copyable] $+  classSetEntityPrefix "" $+  makeClass (ident "QMetaProperty") Nothing [] $+  collect+  [ just $ mkConstMethod "enumerator" np $ objT c_QMetaEnum+  , just $ mkConstMethod "hasNotifySignal" np boolT+  , test (qtVersion >= [4, 6]) $ mkConstMethod "isConstant" np boolT+  , just $ mkConstMethod' "isDesignable" "isDesignable" np boolT+  , just $ mkConstMethod' "isDesignable" "isDesignableWithObject" [ptrT $ constT $ objT c_QObject] boolT+  , just $ mkConstMethod "isEnumType" np boolT+  , test (qtVersion >= [4, 6]) $ mkConstMethod "isFinal" np boolT+  , just $ mkConstMethod "isFlagType" np boolT+  , just $ mkConstMethod "isReadable" np boolT+  , just $ mkConstMethod "isResettable" np boolT+  , just $ mkConstMethod' "isScriptable" "isScriptable" np boolT+  , just $ mkConstMethod' "isScriptable" "isScriptableWithObject" [ptrT $ constT $ objT c_QObject] boolT+  , just $ mkConstMethod' "isStored" "isStored" np boolT+  , just $ mkConstMethod' "isStored" "isStoredWithObject" [ptrT $ constT $ objT c_QObject] boolT+  , just $ mkConstMethod' "isUser" "isUser" np boolT+  , just $ mkConstMethod' "isUser" "isUserWithObject" [ptrT $ constT $ objT c_QObject] boolT+  , just $ mkConstMethod "isValid" np boolT+  , just $ mkConstMethod "isWritable" np boolT+  , just $ mkConstMethod "name" np $ ptrT $ constT charT+  , test (qtVersion >= [4, 5]) $ mkConstMethod "notifySignal" np $ objT c_QMetaMethod+  , test (qtVersion >= [4, 6]) $ mkConstMethod "notifySignalIndex" np intT+  , test (qtVersion >= [4, 6]) $ mkConstMethod "propertyIndex" np intT+  , just $ mkConstMethod "read" [ptrT $ constT $ objT c_QObject] $ objT c_QVariant+  , test (qtVersion >= [5, 5]) $ mkConstMethod "readOnGadget" [ptrT $ constT voidT] $ objT c_QVariant+  , just $ mkConstMethod "reset" [ptrT $ objT c_QObject] boolT+  , test (qtVersion >= [5, 5]) $ mkConstMethod "resetOnGadget" [ptrT voidT] boolT+  , test (qtVersion >= [5, 1]) $ mkConstMethod "revision" np intT+  , just $ mkConstMethod' "type" "getType" np $ enumT e_Type+  , just $ mkConstMethod "typeName" np $ ptrT $ constT charT+  , test (qtVersion >= [4, 2]) $ mkConstMethod "userType" np intT+  , just $ mkConstMethod "write" [ptrT $ objT c_QObject, refT $ constT $ objT c_QVariant] boolT+  , test (qtVersion >= [5, 5]) $ mkConstMethod "writeOnGadget" [ptrT voidT, refT $ constT $ objT c_QVariant] boolT+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QMetaProperty.hs-boot view
@@ -0,0 +1,24 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QMetaProperty (+  c_QMetaProperty,+  ) where++import Foreign.Hoppy.Generator.Spec (Class)++c_QMetaProperty :: Class
src/Graphics/UI/Qtah/Generator/Interface/Core/QModelIndex.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   classSetConversionToGc,@@ -31,13 +30,13 @@   mkConstMethod,   mkConstMethod',   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),   classAddFeatures,   ) import Foreign.Hoppy.Generator.Types (-  bitspaceT,   boolT,   constT,   enumT,@@ -46,12 +45,13 @@   ptrT,   ) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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.Interface.Core.Types (e_ItemDataRole, fl_ItemFlags) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -60,7 +60,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QModelIndex"]-  [ QtExport $ ExportClass c_QModelIndex ]+  [ qtExport c_QModelIndex ]  c_QModelIndex =   addReqIncludes [includeStd "QModelIndex"] $@@ -69,17 +69,17 @@   classSetEntityPrefix "" $   makeClass (ident "QModelIndex") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkConstMethod "child" [intT, intT] $ objT c_QModelIndex-  , just $ mkConstMethod "column" [] intT-  , just $ mkConstMethod' "data" "getData" [] $ objT c_QVariant+  , just $ mkConstMethod "column" np intT+  , just $ mkConstMethod' "data" "getData" np $ objT c_QVariant   , just $ mkConstMethod' "data" "getDataWithRole" [enumT e_ItemDataRole] $ objT c_QVariant-  , test (qtVersion >= [4, 2]) $ mkConstMethod "flags" [] $ bitspaceT bs_ItemFlags+  , test (qtVersion >= [4, 2]) $ mkConstMethod "flags" np $ flagsT fl_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 "isValid" np boolT+  , just $ mkConstMethod "model" np $ ptrT $ constT $ objT c_QAbstractItemModel+  , just $ mkConstMethod "parent" np $ objT c_QModelIndex+  , just $ mkConstMethod "row" np 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-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,74 +21,120 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),+  (~:),+  MethodApplicability (MConst, MNormal, MStatic),+  Purity (Nonpure),   addReqIncludes,   classSetEntityPrefix,   ident,+  ident2,+  includeLocal,   includeStd,   makeClass,+  makeFnMethod,   mkConstMethod,+  mkConstMethod',+  mkStaticMethod',   mkCtor,   mkMethod,   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, constT, intT, objT, ptrT, refT, ptrT, voidT, charT, enumT) 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.Config (qtVersion)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QList (+  c_QListQByteArray,+  c_QListQObject,+  ) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent)+import Graphics.UI.Qtah.Generator.Interface.Core.QMetaObject (c_QMetaObject)+import Graphics.UI.Qtah.Generator.Interface.Core.QMetaObject.Connection (c_Connection)+import Graphics.UI.Qtah.Generator.Interface.Core.QMetaMethod (c_QMetaMethod) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Foreign.Hoppy.Generator.Std.String (c_string)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QThread (c_QThread)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listenerPtrQObject,+  listenerQString,+  ) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_ConnectionType)  {-# ANN module "HLint: ignore Use camelCase" #-}  aModule =   AQtModule $   makeQtModule ["Core", "QObject"] $-  [ QtExport $ ExportClass c_QObject-  ] ++ map QtExportSignal signals+  (qtExport c_QObject) :+  map QtExportSignal signals  c_QObject =-  addReqIncludes [includeStd "QObject"] $+  addReqIncludes [ includeStd "QObject"+                 , includeLocal "wrap_qobject.hpp"+                 ] $   classSetEntityPrefix "" $   makeClass (ident "QObject") Nothing [] $   collect-  [ just $ mkCtor "new" []-  , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]-  , just $ mkMethod "blockSignals" [boolT] boolT-  , just $ mkMethod "children" [] $ objT c_QListQObject-    -- TODO connect-  , just $ mkMethod "deleteLater" [] voidT-    -- TODO disconnect-  , just $ mkMethod "dumpObjectInfo" [] voidT-  , just $ mkMethod "dumpObjectTree" [] voidT-    -- TODO dynamicPropertyNames (>=4.2)-  , just $ mkMethod "event" [ptrT $ objT c_QEvent] boolT-  , just $ mkMethod "eventFilter" [ptrT $ objT c_QObject, ptrT $ objT c_QEvent] boolT+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" ["parent" ~: ptrT $ objT c_QObject]+  , just $ mkMethod "blockSignals" ["block" ~: boolT] boolT+  , just $ mkMethod "children" np $ objT c_QListQObject++    -- TODO QStrings instead of const char*.+  , just $ mkConstMethod' "connect" "connect" [ptrT $ constT $ objT c_QObject, ptrT $ constT charT, ptrT $ constT charT] $ objT c_Connection+  , just $ mkConstMethod' "connect" "connectWithType" [ptrT $ constT $ objT c_QObject, ptrT $ constT charT, ptrT $ constT charT, enumT e_ConnectionType] $ objT c_Connection++  , just $ mkStaticMethod' "connect" "connectWithTypeStatic" [ptrT $ constT $ objT c_QObject, ptrT $ constT charT, ptrT $ constT $ objT c_QObject, ptrT $ constT charT, enumT e_ConnectionType] $ objT c_Connection+  , just $ mkStaticMethod' "connect" "connectWithSenderSignalStatic" [ptrT $ constT $ objT c_QObject, refT $ constT $ objT c_QMetaMethod, ptrT $ constT $ objT c_QObject, refT $ constT $ objT c_QMetaMethod] $ objT c_Connection+  , just $ mkStaticMethod' "connect" "connectWithSenderSignalTypeStatic" [ptrT $ constT $ objT c_QObject, refT $ constT $ objT c_QMetaMethod, ptrT $ constT $ objT c_QObject, refT $ constT $ objT c_QMetaMethod, enumT e_ConnectionType] $ objT c_Connection++  , just $ makeFnMethod (ident2 "qtah" "qobject" "connect") "connectStatic" MStatic Nonpure+    [ptrT $ constT $ objT c_QObject, objT c_string, ptrT $ constT $ objT c_QObject, objT c_string] $ objT c_Connection+  , just $ makeFnMethod (ident2 "qtah" "qobject" "disconnect") "disconnectStatic" MStatic Nonpure+    [ptrT $ constT $ objT c_QObject, objT c_string, ptrT $ constT $ objT c_QObject, objT c_string] boolT++  , just $ mkMethod "deleteLater" np voidT++  , just $ mkConstMethod' "disconnect" "disconnect" np boolT+  , just $ mkConstMethod' "disconnect" "disconnectWithReceiver" [ptrT $ constT $ objT c_QObject] boolT+  , just $ mkConstMethod' "disconnect" "disconnectWithReceiverAndMethod" [ptrT $ constT $ objT c_QObject, ptrT $ constT charT] boolT+  , just $ mkConstMethod' "disconnect" "disconnectWithSignal" [ptrT $ constT charT] boolT+  , just $ mkConstMethod' "disconnect" "disconnectWithSignalAndReceiver" [ptrT $ constT charT, ptrT $ constT $ objT c_QObject] boolT+  , just $ mkConstMethod' "disconnect" "disconnectWithSignalAndReceiverAndMethod" [ptrT $ constT charT, ptrT $ constT $ objT c_QObject, ptrT $ constT charT] boolT+  , just $ mkStaticMethod' "disconnect" "disconnectWithMetaobject" [objT c_Connection] boolT++  , just $ mkMethod "dumpObjectInfo" np voidT+  , just $ mkMethod "dumpObjectTree" np voidT+  , just $ mkConstMethod "dynamicPropertyNames" np $ objT c_QListQByteArray+  , just $ mkMethod "event" ["event" ~: ptrT $ objT c_QEvent] boolT+  , just $ mkMethod "eventFilter" ["watched" ~: ptrT $ objT c_QObject, "event" ~: ptrT $ objT c_QEvent] boolT     -- TODO findChild     -- TODO findChildren-    -- TODO inherits-  , just $ mkMethod "installEventFilter" [ptrT $ objT c_QObject] voidT-  , just $ mkConstMethod "isWidgetType" [] boolT+  , just $ makeFnMethod (ident2 "qtah" "qobject" "inherits") "inherits" MConst Nonpure+    ["" ~: objT c_QObject, "className" ~: objT c_QString] boolT+  , just $ mkMethod "installEventFilter" ["filterObj" ~: ptrT $ objT c_QObject] voidT+  , just $ mkConstMethod "isWidgetType" np boolT   , -- This is a guess on the version bound.-    test (qtVersion >= [5, 0]) $ mkConstMethod "isWindowType" [] boolT-  , just $ mkMethod "killTimer" [intT] voidT-    -- TODO metaObject-    -- TODO moveToThread+    test (qtVersion >= [5, 0]) $ mkConstMethod "isWindowType" np boolT+  , just $ mkMethod "killTimer" ["id" ~: intT] voidT+  , just $ mkConstMethod "metaObject" np $ ptrT $ constT $ objT c_QMetaObject+  , just $ mkMethod "moveToThread" ["targetThread" ~: ptrT $ objT c_QThread] voidT   , just $ mkProp "objectName" $ objT c_QString   , just $ mkProp "parent" $ ptrT $ objT c_QObject-    -- TODO property-  , just $ mkMethod "removeEventFilter" [ptrT $ objT c_QObject] voidT-    -- TODO setProperty-  , just $ mkConstMethod "signalsBlocked" [] boolT-  , just $ mkMethod "startTimer" [intT] intT-    -- TODO thread+  , just $ makeFnMethod (ident2 "qtah" "qobject" "property") "property" MConst Nonpure+    ["" ~: objT c_QObject, "name" ~: objT c_QString] $ objT c_QVariant+  , just $ mkMethod "removeEventFilter" ["obj" ~: ptrT $ objT c_QObject] voidT+  , just $ makeFnMethod (ident2 "qtah" "qobject" "setProperty") "setProperty" MNormal Nonpure+    ["" ~: refT $ objT c_QObject, "name" ~: objT c_QString, "value" ~: objT c_QVariant] voidT+  , just $ mkConstMethod "signalsBlocked" np boolT+  , just $ mkMethod "startTimer" ["interval" ~: intT] intT+  , just $ mkConstMethod "thread" np $ ptrT $ objT c_QThread   ]  signals =-  [ makeSignal c_QObject "destroyed" c_ListenerPtrQObject-  , makeSignal c_QObject "objectNameChanged" c_ListenerQString+  [ makeSignal c_QObject "destroyed" listenerPtrQObject+  , makeSignal c_QObject "objectNameChanged" listenerQString   ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QObject.hs-boot view
@@ -0,0 +1,25 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QObject (+  c_QObject,+  ) where++import Foreign.Hoppy.Generator.Spec (Class)++c_QObject :: Class+
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QOperatingSystemVersion.hs view
@@ -0,0 +1,90 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QOperatingSystemVersion (+  aModule,+  c_QOperatingSystemVersion,+  e_OSType,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkStaticMethod,+  mkCtor,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+    ClassFeature (Copyable),+    classAddFeatures,+    )+import Foreign.Hoppy.Generator.Types (intT, enumT, objT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QOperatingSystemVersion"] [5, 9] $+  collect+  [ just $ qtExport c_QOperatingSystemVersion+  , just $ qtExport e_OSType+  ]++c_QOperatingSystemVersion =+  addReqIncludes [ includeStd "QOperatingSystemVersion" ] $+  classSetConversionToGc $+  classAddFeatures [Copyable] $+  classSetEntityPrefix "" $+  makeClass (ident "QOperatingSystemVersion") Nothing [] $+  collect+  [ just $ mkCtor "new" [enumT e_OSType, intT]+  , just $ mkCtor "newWithMinor" [enumT e_OSType, intT, intT]+  , just $ mkCtor "newWithMinorAndMicro" [enumT e_OSType, intT, intT, intT]+  , just $ mkStaticMethod "current" np $ objT c_QOperatingSystemVersion+  , test (qtVersion >= [5, 10]) $+    mkStaticMethod "currentType" np $ enumT e_OSType+  -- TODO bool QOperatingSystemVersion::isAnyOfType(std::initializer_list<OSType> types) const+  , just $ mkConstMethod "majorVersion" np intT+  , just $ mkConstMethod "microVersion" np intT+  , just $ mkConstMethod "minorVersion" np intT+  , just $ mkConstMethod "name" np $ objT c_QString+  , just $ mkConstMethod "segmentCount" np intT+  , just $ mkConstMethod' "type" "getType" np $ enumT e_OSType+  ]++e_OSType =+  makeQtEnum (ident1 "QOperatingSystemVersion" "OSType") [includeStd "QOperatingSystemVersion"]+  [ "Unknown"+  , "Windows"+  , "MacOS"+  , "IOS"+  , "TvOS"+  , "WatchOS"+  , "Android"+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QPair.hs view
@@ -0,0 +1,140 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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/>.++-- | Bindings for @QVector@.+module Graphics.UI.Qtah.Generator.Interface.Core.QPair (+  -- * Template+  Options (..),+  defaultOptions,+  Contents (..),+  -- * Instantiations+  allModules,+  c_QPairIntInt,+  c_QPairDoubleQColor,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Class,+  Reqs,+  Type,+  addReqs,+  classSetEntityPrefix,+  identT,+  includeStd,+  makeClass,+  mkCtor,+  mkMethod,+  np,+  reqInclude,+  toExtName,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (intT, objT, refT, voidT, constT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal)+import Graphics.UI.Qtah.Generator.Interface.Gui.QColor (c_QColor)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), QtModule, makeQtModule)+import Graphics.UI.Qtah.Generator.Types++-- | Options for instantiating the pair classes.+newtype Options = Options+  { optPairClassFeatures :: [ClassFeature]+    -- ^ Additional features to add to the @QPair@ class.  QPairs are always+    -- 'Assignable', and are 'Copyable' (>= Qt 5.2), but you may want to add+    -- 'Equatable' if your value type supports it.+  }++-- | The default options have no additional 'ClassFeature's.+defaultOptions :: Options+defaultOptions = Options []++-- | A set of instantiated classes.+newtype Contents = Contents+  { c_QPair :: Class  -- ^ @QPair\<T>@+  }++-- | @instantiate className t tReqs@ creates a set of bindings for an+-- instantiation of @QPair@ and associated types (e.g. iterators).  In the+-- result, the 'c_QPair' class has an external name of @className@.+instantiate :: String -> Type -> Type -> Reqs -> Contents+instantiate pairName t1 t2 tReqs = instantiate' pairName t1 t2 tReqs defaultOptions++-- | 'instantiate' with additional options.+instantiate' :: String -> Type -> Type -> Reqs -> Options -> Contents+instantiate' pairName t1 t2 tReqs opts =+  let reqs = mconcat [ tReqs+                     , reqInclude $ includeStd "QPair"+                     ]+      features =+        collect [ just Assignable+                , test (qtVersion >= [5, 2]) Copyable+                ] +++        optPairClassFeatures opts++      pair =+        addReqs reqs $+        classAddFeatures features $+        classSetEntityPrefix "" $+        makeClass (identT "QPair" [t1,t2]) (Just $ toExtName pairName) [] $+        collect+        [ just $ mkCtor "new" np+        , just $ mkCtor "newWithValues" [refT $ constT t1, refT $ constT t2]+        , test (qtVersion >= [5, 5]) $ mkMethod "swap" [refT $ objT pair] voidT+          -- TODO first, second+        ]+++  in Contents+     { c_QPair = pair+     }++-- | Converts an instantiation into a list of exports to be included in a+-- module.+toExports :: Contents -> [QtExport]+toExports m = [qtExport $ c_QPair m]++createModule :: String -> Contents -> QtModule+createModule name contents = makeQtModule ["Core", "QPair", name] $ toExports contents++allModules :: [AModule]+allModules =+  map AQtModule+  [ qmod_IntInt+  , qmod_DoubleQColor+  ]++qmod_IntInt :: QtModule+qmod_IntInt = createModule "IntInt" contents_IntInt++contents_IntInt :: Contents+contents_IntInt = instantiate "QPairIntInt" intT intT mempty++c_QPairIntInt :: Class+c_QPairIntInt = c_QPair contents_IntInt++qmod_DoubleQColor :: QtModule+qmod_DoubleQColor = createModule "DoubleQColor" contents_DoubleQColor++contents_DoubleQColor :: Contents+contents_DoubleQColor = instantiate "QPairDoubleQColor" qreal (objT c_QColor) (reqInclude $ includeStd "QColor")++c_QPairDoubleQColor :: Class+c_QPairDoubleQColor = c_QPair contents_DoubleQColor
src/Graphics/UI/Qtah/Generator/Interface/Core/QPalette.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,13 +18,38 @@ -- | Top-level bindings and bindings in the @Qt::@ namespace. module Graphics.UI.Qtah.Generator.Interface.Core.QPalette (   aModule,-  e_ColorRole+  c_QPalette,+  e_ColorRole,   ) where -import Foreign.Hoppy.Generator.Spec (Export (ExportEnum), Include, ident1, includeStd)-import Foreign.Hoppy.Generator.Version (collect, just)+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+import Graphics.UI.Qtah.Generator.Interface.Gui.QColor (c_QColor)+import Graphics.UI.Qtah.Generator.Interface.Gui.QBrush (c_QBrush)+import Foreign.Hoppy.Generator.Types (int64T, constT, objT, refT, voidT, boolT, enumT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Foreign.Hoppy.Generator.Spec (+  Include,+  includeStd,+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  ident1,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkCtor,+  mkMethod',+  mkMethod,+  np,+  ) import Graphics.UI.Qtah.Generator.Module (AModule(AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_GlobalColor)  {-# ANN module "HLint: ignore Use camelCase" #-} @@ -32,28 +57,86 @@ qPaletteInclude = [includeStd "Qt", includeStd "QPalette"]  aModule :: AModule-aModule = AQtModule $ makeQtModule ["Core", "QPalette"] exports+aModule =+  AQtModule $+  makeQtModule ["Core", "QPalette"]+  [ qtExport c_QPalette+  , qtExport e_ColorRole+  , qtExport e_ColorGroup+  ] -exports :: [QtExport]-exports =-  QtExportSpecials :-  (map QtExport . collect)-  [ just $ ExportEnum e_ColorRole+c_QPalette =+  addReqIncludes [includeStd "QPalette"] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QPalette") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithColor" [refT $ constT $ objT c_QColor]+  , just $ mkCtor "newWithColors" [refT $ constT $ objT c_QColor, refT $ constT $ objT c_QColor]+  , just $ mkCtor "newWithGlobalColor" [enumT e_GlobalColor]+  , just $ mkCtor "newWithBrushes" [refT $ constT $ objT c_QBrush, refT $ constT $ objT c_QBrush, refT $ constT $ objT c_QBrush,+    refT $ constT $ objT c_QBrush, refT $ constT $ objT c_QBrush, refT $ constT $ objT c_QBrush,+    refT $ constT $ objT c_QBrush, refT $ constT $ objT c_QBrush, refT $ constT $ objT c_QBrush]+  , just $ mkConstMethod "alternateBase" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "base" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "brightText" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod' "brush" "brushWithGroup" [enumT e_ColorGroup, enumT e_ColorRole] $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod' "brush" "brush" [enumT e_ColorRole] $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "button" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "buttonText" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "cacheKey" np int64T+  , just $ mkConstMethod' "color" "colorWithGroup" [enumT e_ColorGroup, enumT e_ColorRole] $ refT $ constT $ objT c_QColor+  , just $ mkConstMethod' "color" "color" [enumT e_ColorRole] $ refT $ constT $ objT c_QColor+  , just $ mkConstMethod "currentColorGroup" np $ enumT e_ColorGroup+  , just $ mkConstMethod "dark" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "highlight" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "highlightedText" np $ refT $ constT $ objT c_QBrush+  , test (qtVersion >= [4, 2]) $ mkConstMethod "isBrushSet" [enumT e_ColorGroup, enumT e_ColorRole] boolT+  , just $ mkConstMethod "isCopyOf" [refT $ constT $ objT c_QPalette] boolT+  , just $ mkConstMethod "isEqual" [enumT e_ColorGroup, enumT e_ColorGroup] boolT+  , just $ mkConstMethod "light" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "link" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "linkVisited" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "mid" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "midlight" np $ refT $ constT $ objT c_QBrush+  , test (qtVersion >= [5, 12]) $ mkConstMethod "placeholderText" np $ refT $ constT $ objT c_QBrush+  , just $ mkMethod' "setBrush" "setBrush" [enumT e_ColorRole, refT $ constT $ objT c_QBrush] voidT+  , just $ mkMethod' "setBrush" "setBrushWithGroup" [enumT e_ColorGroup, enumT e_ColorRole, refT $ constT $ objT c_QBrush] voidT+  , just $ mkMethod' "setColor" "setColor" [enumT e_ColorRole, refT $ constT $ objT c_QColor] voidT+  , just $ mkMethod' "setColor" "setColorWithGroup" [enumT e_ColorGroup, enumT e_ColorRole, refT $ constT $ objT c_QColor] voidT+  , just $ mkMethod "setColorGroup" [enumT e_ColorGroup, refT $ constT $ objT c_QBrush, refT $ constT $ objT c_QBrush, refT $ constT $ objT c_QBrush,+    refT $ constT $ objT c_QBrush, refT $ constT $ objT c_QBrush, refT $ constT $ objT c_QBrush,+    refT $ constT $ objT c_QBrush, refT $ constT $ objT c_QBrush, refT $ constT $ objT c_QBrush] voidT+  , just $ mkMethod "setCurrentColorGroup" [enumT e_ColorGroup] voidT+  , just $ mkConstMethod "shadow" np $ refT $ constT $ objT c_QBrush+  , test (qtVersion >= [5, 0]) $ mkMethod "swap" [refT $ objT c_QPalette] voidT+  , just $ mkConstMethod "text" np $ refT $ constT $ objT c_QBrush+  , test (qtVersion >= [4, 4]) $ mkConstMethod "toolTipBase" np $ refT $ constT $ objT c_QBrush+  , test (qtVersion >= [4, 4]) $ mkConstMethod "toolTipText" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "window" np $ refT $ constT $ objT c_QBrush+  , just $ mkConstMethod "windowText" np $ refT $ constT $ objT c_QBrush   ] --- TODO QPalette+e_ColorGroup =+  makeQtEnum (ident1 "QPalette" "ColorGroup") qPaletteInclude+  [ "Disabled"+  , "Active"+  , "Inactive"+  , "Normal"+  ]  e_ColorRole =   makeQtEnum (ident1 "QPalette" "ColorRole") qPaletteInclude-  [ (10, ["window"])-  , (0,  ["window", "text"])-  , (9,  ["base"])-  , (16, ["alternate", "base"])-  , (18, ["tool", "tip", "base"])-  , (19, ["tool", "tip", "text"])-  , (6,  ["text"])-  , (1,  ["button"])-  , (8,  ["button", "text"])-  , (7,  ["bright", "text"])+  [ "Window"+  , "WindowText"+  , "Base"+  , "AlternateBase"+  , "ToolTipBase"+  , "ToolTipText"+  , "Text"+  , "Button"+  , "ButtonText"+  , "BrightText"   ]-
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QParallelAnimationGroup.hs view
@@ -0,0 +1,51 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QParallelAnimationGroup (+  aModule,+  c_QParallelAnimationGroup,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QAnimationGroup (c_QAnimationGroup)+--import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+--import Foreign.Hoppy.Generator.Types (voidT, enumT, flagsT, constT, objT, ptrT, refT)+import Foreign.Hoppy.Generator.Version (collect)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QParallelAnimationGroup"] [4, 6] $+  [qtExport c_QParallelAnimationGroup]++c_QParallelAnimationGroup =+  addReqIncludes [ includeStd "QParallelAnimationGroup" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QParallelAnimationGroup") Nothing [c_QAnimationGroup] $+  collect+  [+  -- TODO Methods+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QPauseAnimation.hs view
@@ -0,0 +1,50 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QPauseAnimation (+  aModule,+  c_QPauseAnimation,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkMethod,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractAnimation (c_QAbstractAnimation)+import Foreign.Hoppy.Generator.Types (intT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QPauseAnimation"] [4, 6] $+  [qtExport c_QPauseAnimation]++c_QPauseAnimation =+  addReqIncludes [ includeStd "QPauseAnimation" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QPauseAnimation") Nothing [c_QAbstractAnimation] $+  collect+  [ just $ mkMethod "setDuration" [intT] voidT+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QPersistentModelIndex.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   classSetConversionToGc,@@ -32,13 +31,13 @@   mkConstMethod',   mkCtor,   mkMethod,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),   classAddFeatures,   ) import Foreign.Hoppy.Generator.Types (-  bitspaceT,   boolT,   constT,   enumT,@@ -49,13 +48,14 @@   voidT,   ) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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.Interface.Core.Types (e_ItemDataRole, fl_ItemFlags) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -64,7 +64,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QPersistentModelIndex"]-  [ QtExport $ ExportClass c_QPersistentModelIndex ]+  [ qtExport c_QPersistentModelIndex ]  c_QPersistentModelIndex =   addReqIncludes [includeStd "QPersistentModelIndex"] $@@ -73,17 +73,17 @@   classSetEntityPrefix "" $   makeClass (ident "QPersistentModelIndex") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , 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 "column" np intT+  , just $ mkConstMethod' "data" "getData" np $ 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+  , test (qtVersion >= [4, 2]) $ mkConstMethod "flags" np $ flagsT fl_ItemFlags+  , just $ mkConstMethod "isValid" np boolT+  , just $ mkConstMethod "model" np $ ptrT $ constT $ objT c_QAbstractItemModel+  , just $ mkConstMethod "parent" np $ objT c_QPersistentModelIndex+  , just $ mkConstMethod "row" np 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/QPluginLoader.hs view
@@ -0,0 +1,77 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QPluginLoader (+  aModule,+  c_QPluginLoader,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkStaticMethod,+  mkCtor,+  mkMethod',+  mkMethod,+  mkProp,+  np,+  )+import Foreign.Hoppy.Generator.Types (boolT, constT, objT, ptrT, refT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.QLibrary (fl_LoadHints)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+--import Graphics.UI.Qtah.Generator.Interface.Core.QJsonObject (c_QJsonObject)+--import Graphics.UI.Qtah.Generator.Interface.Core.QStaticPlugin (c_QStaticPlugin)+--import Graphics.UI.Qtah.Generator.Interface.Core.QVector (c_QVectorQStaticPlugin)+import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQObject)+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", "QPluginLoader"] $+  [qtExport c_QPluginLoader]++c_QPluginLoader =+  addReqIncludes [ includeStd "QPluginLoader" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QPluginLoader") Nothing [c_QObject] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]+  , just $ mkCtor "newWithFilename" [refT $ constT $ objT c_QString]+  , just $ mkCtor "newWithFilenameAndParent" [refT $ constT $ objT c_QString, ptrT $ objT c_QObject]+  , test (qtVersion >= [4, 2]) $ mkConstMethod "errorString" np $ objT c_QString+  , just $ mkMethod' "instance" "getInstance" np $ ptrT $ objT c_QObject+  , just $ mkConstMethod "isLoaded" np $ boolT+  , just $ mkMethod "load" np boolT+  --, just $ mkConstMethod "metaData" np $ objT c_QJsonObject+  , just $ mkStaticMethod "staticInstances" np $ objT c_QListQObject+  --, just $ mkStaticMethod "staticPlugins" np $ objT c_QVectorQStaticPlugin+  , just $ mkMethod "unload" np boolT+  , just $ mkProp "fileName" $ objT c_QString+  , test (qtVersion >= [4, 4]) $ mkProp "loadHints" $ flagsT fl_LoadHints+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QPoint.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,16 +15,11 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- module Graphics.UI.Qtah.Generator.Interface.Core.QPoint (   aModule,   c_QPoint,   ) where -#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat)-#endif import Foreign.Hoppy.Generator.Language.Haskell (   addImports,   sayLn,@@ -36,7 +31,6 @@     classHaskellConversionToCppFn,     classHaskellConversionType   ),-  Export (ExportClass),   Operator (OpAddAssign, OpDivideAssign, OpMultiplyAssign, OpSubtractAssign),   addReqIncludes,   classSetEntityPrefix,@@ -52,6 +46,7 @@   mkMethod',   mkProp,   mkStaticMethod,+  np,   operatorPreferredExtName',   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (@@ -60,7 +55,7 @@   ) import Foreign.Hoppy.Generator.Types (boolT, intT, objT, refT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (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@@ -75,7 +70,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QPoint"]-  [ QtExport $ ExportClass c_QPoint ]+  [ qtExport c_QPoint ]  c_QPoint =   addReqIncludes [includeStd "QPoint"] $@@ -97,11 +92,11 @@   classSetEntityPrefix "" $   makeClass (ident "QPoint") Nothing [] $   collect-  [ just $ mkCtor "newNull" []+  [ just $ mkCtor "newNull" np   , just $ mkCtor "new" [intT, intT]   , test (qtVersion >= [5, 1]) $ mkStaticMethod "dotProduct" [objT c_QPoint, objT c_QPoint] intT-  , just $ mkConstMethod "isNull" [] boolT-  , just $ mkConstMethod "manhattanLength" [] intT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "manhattanLength" np intT   , just $ mkProp "x" intT   , just $ mkProp "y" intT   , just $ mkMethod OpAddAssign [objT c_QPoint] $ refT $ objT c_QPoint
src/Graphics/UI/Qtah/Generator/Interface/Core/QPointF.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,16 +15,11 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- module Graphics.UI.Qtah.Generator.Interface.Core.QPointF (   aModule,   c_QPointF,   ) where -#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat)-#endif import Foreign.Hoppy.Generator.Language.Haskell (   addImports,   sayLn,@@ -36,7 +31,6 @@     classHaskellConversionToCppFn,     classHaskellConversionType   ),-  Export (ExportClass),   Operator (OpAddAssign, OpDivideAssign, OpMultiplyAssign, OpSubtractAssign),   addReqIncludes,   classSetEntityPrefix,@@ -51,6 +45,7 @@   mkMethod,   mkProp,   mkStaticMethod,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -58,7 +53,7 @@   ) import Foreign.Hoppy.Generator.Types (boolT, objT, refT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -74,7 +69,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QPointF"]-  [ QtExport $ ExportClass c_QPointF ]+  [ qtExport c_QPointF ]  c_QPointF =   addReqIncludes [includeStd "QPointF"] $@@ -96,13 +91,13 @@   classSetEntityPrefix "" $   makeClass (ident "QPointF") Nothing [] $   collect-  [ just $ mkCtor "newNull" []+  [ just $ mkCtor "newNull" np   , just $ mkCtor "new" [qreal, qreal]   , just $ mkCtor "newFromPoint" [objT c_QPoint]   , test (qtVersion >= [5, 1]) $ mkStaticMethod "dotProduct" [objT c_QPointF, objT c_QPointF] qreal-  , just $ mkConstMethod "isNull" [] boolT-  , test (qtVersion >= [4, 6]) $ mkConstMethod "manhattanLength" [] qreal-  , just $ mkConstMethod "toPoint" [] $ objT c_QPoint+  , just $ mkConstMethod "isNull" np boolT+  , test (qtVersion >= [4, 6]) $ mkConstMethod "manhattanLength" np qreal+  , just $ mkConstMethod "toPoint" np $ objT c_QPoint   , just $ mkProp "x" qreal   , just $ mkProp "y" qreal   , just $ mkMethod OpAddAssign [objT c_QPointF] $ refT $ objT c_QPointF
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QProcess.hs view
@@ -0,0 +1,208 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QProcess (+  aModule,+  c_QProcess,+  e_ExitStatus,+  e_InputChannelMode,+  e_ProcessChannel,+  e_ProcessChannelMode,+  e_ProcessError,+  e_ProcessState,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod,+  mkMethod',+  mkStaticMethod,+  mkStaticMethod',+  np,+  )+import Foreign.Hoppy.Generator.Types (boolT, intT, objT, refT, voidT, enumT, constT, ptrT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.QIODevice (c_QIODevice, fl_OpenMode)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Graphics.UI.Qtah.Generator.Interface.Core.QProcessEnvironment (c_QProcessEnvironment)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listener,+  listenerProcessError,+  listenerIntExitStatus,+  listenerProcessState+  )+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qlonglong)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QProcess"] $+  qtExport c_QProcess :+  map QtExportSignal signals +++  [ qtExport e_ExitStatus+  , qtExport e_InputChannelMode+  , qtExport e_ProcessChannel+  , qtExport e_ProcessChannelMode+  , qtExport e_ProcessError+  , qtExport e_ProcessState+  ]++c_QProcess =+  addReqIncludes [includeStd "QProcess"] $+  classSetEntityPrefix "" $+  makeClass (ident "QProcess") Nothing [c_QIODevice] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]+  , test (qtVersion >= [5, 0]) $ mkConstMethod "arguments" np $ objT c_QStringList+  , just $ mkConstMethod "atEnd" np boolT+  , just $ mkConstMethod "bytesAvailable" np qlonglong+  , just $ mkConstMethod "bytesToWrite" np qlonglong+  , just $ mkConstMethod "canReadLine" np boolT+  , just $ mkMethod "close" np voidT+  , just $ mkMethod "closeReadChannel" [enumT e_ProcessChannel] voidT+  , just $ mkMethod "closeWriteChannel" np voidT+  -- TODO QProcess::CreateProcessArgumentModifier QProcess::createProcessArgumentsModifier() const+  , just $ mkConstMethod "error" np $ enumT e_ProcessError+  , just $ mkStaticMethod' "execute" "execute" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QStringList] intT+  , just $ mkStaticMethod' "execute" "executeWithCommand" [refT $ constT $ objT c_QString] intT+  , just $ mkConstMethod "exitCode" np intT+  , test (qtVersion >= [4, 1]) $ mkConstMethod "exitStatus" np $ enumT e_ExitStatus+  , test (qtVersion >= [5, 2]) $ mkConstMethod "inputChannelMode" np $ enumT e_InputChannelMode+  , just $ mkConstMethod "isSequential" np boolT+ -- , test (qtVersion >= [4, 7]) $ mkConstMethod "nativeArguments" np $ objT c_QString+  , test (qtVersion >= [5, 2]) $ mkStaticMethod "nullDevice" np $ objT c_QString+  , just $ mkMethod' "open" "open" np boolT+  , just $ mkMethod' "open" "openWithMode" [flagsT fl_OpenMode] boolT+  , test (qtVersion >= [4, 2]) $ mkConstMethod "processChannelMode" np $ enumT e_ProcessChannelMode+  , test (qtVersion >= [4, 2]) $ mkConstMethod "processEnvironment" np $ objT c_QProcessEnvironment+  , test (qtVersion >= [5, 3]) $ mkConstMethod "processId" np qlonglong+  , test (qtVersion >= [5, 0]) $ mkConstMethod "program" np $ objT c_QString+  , just $ mkMethod "readAllStandardError" np $ objT c_QByteArray+  , just $ mkMethod "readAllStandardOutput" np $ objT c_QByteArray+  , just $ mkConstMethod "readChannel" np $ enumT e_ProcessChannel+  , test (qtVersion >= [5, 1]) $ mkMethod "setArguments" [refT $ constT $ objT c_QStringList] voidT+  --TODO void QProcess::setCreateProcessArgumentsModifier(QProcess::CreateProcessArgumentModifier modifier)+  , test (qtVersion >= [5, 2]) $ mkMethod "setInputChannelMode" [enumT e_InputChannelMode] voidT+ -- , test (qtVersion >= [4, 7]) $ mkMethod "setNativeArguments" [refT $ constT $ objT c_QString] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod "setProcessChannelMode" [enumT e_ProcessChannelMode] voidT+  , test (qtVersion >= [4, 6]) $ mkMethod "setProcessEnvironment" [refT $ constT $ objT c_QProcessEnvironment] voidT+  , test (qtVersion >= [5, 1]) $ mkMethod "setProgram" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod "setReadChannel" [enumT e_ProcessChannel] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod' "setStandardErrorFile" "setStandardErrorFile" [refT $ constT $ objT c_QString] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod' "setStandardErrorFile" "setStandardErrorFileWithMode" [refT $ constT $ objT c_QString, flagsT fl_OpenMode] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod "setStandardInputFile" [refT $ constT $ objT c_QString] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod' "setStandardOutputFile" "setStandardOutputFile" [refT $ constT $ objT c_QString] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod' "setStandardOutputFile" "setStandardOutputFileWithMode" [refT $ constT $ objT c_QString, flagsT fl_OpenMode] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod "setStandardOutputProcess" [ptrT $ objT c_QProcess] voidT+  , just $ mkMethod "setWorkingDirectory" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "start" "start" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QStringList] voidT+  , just $ mkMethod' "start" "startWithProgramArgMode" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QStringList, flagsT fl_OpenMode] voidT+  , just $ mkMethod' "start" "startWithCommand" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "start" "startWithCommandMode" [refT $ constT $ objT c_QString, flagsT fl_OpenMode] voidT+  , test (qtVersion >= [5, 1]) $ mkMethod' "start" "startWithMode" [flagsT fl_OpenMode] voidT+  , test (qtVersion >= [5, 10]) $ mkMethod' "startDetached" "startDetached" np boolT+  --, test (qtVersion >= [5, 10]) $ mkMethod' "startDetached" "startDetachedWithPid" [ptrT qlonglong] boolT+  , just $ mkStaticMethod' "startDetached" "startDetachedStatic" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QStringList] boolT+  , just $ mkStaticMethod' "startDetached" "startDetachedStaticDir" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QStringList, refT $ constT $ objT c_QString] boolT+  --, just $ mkStaticMethod' "startDetached" "startDetachedStaticDirPid" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QStringList, refT $ constT $ objT c_QString, ptrT qlonglong] boolT+  , just $ mkStaticMethod' "startDetached" "startDetachedStaticCommand" [refT $ constT $ objT c_QString] boolT+  , just $ mkConstMethod "state" np $ enumT e_ProcessState+  , test (qtVersion >= [4, 1]) $ mkMethod "systemEnvironment" np $ objT c_QStringList+  , just $ mkMethod' "waitForBytesWritten" "waitForBytesWritten" np boolT+  , just $ mkMethod' "waitForBytesWritten" "waitForBytesWrittenMsecs" [intT] boolT+  , just $ mkMethod' "waitForFinished" "waitForFinished" np boolT+  , just $ mkMethod' "waitForFinished" "waitForFinishedMsecs" [intT] boolT+  , just $ mkMethod' "waitForReadyRead" "waitForReadyRead" np boolT+  , just $ mkMethod' "waitForReadyRead" "waitForReadyReadMsecs" [intT] boolT+  , just $ mkMethod' "waitForStarted" "waitForStarted" np boolT+  , just $ mkMethod' "waitForStarted" "waitForStartedMsecs" [intT] boolT+  , just $ mkConstMethod "workingDirectory" np $ objT c_QString++  , just $ mkMethod "kill" np voidT+  , just $ mkMethod "terminate" np voidT+  ]++e_ExitStatus =+  makeQtEnum (ident1 "QProcess" "ExitStatus") [includeStd "QProcess"]+  [ "NormalExit"+  , "CrashExit"+  ]++e_InputChannelMode =+  makeQtEnum (ident1 "QProcess" "InputChannelMode") [includeStd "QProcess"]+  [ "ManagedInputChannel"+  , "ForwardedInputChannel"+  ]++e_ProcessChannel =+  makeQtEnum (ident1 "QProcess" "ProcessChannel") [includeStd "QProcess"]+  [ "StandardOutput"+  , "StandardError"+  ]++e_ProcessChannelMode =+  makeQtEnum (ident1 "QProcess" "ProcessChannelMode") [includeStd "QProcess"] $+  collect $+  [ just "SeparateChannels"+  , just "MergedChannels"+  , just "ForwardedChannels"+  , test (qtVersion >= [5, 2]) "ForwardedErrorChannel"+  , test (qtVersion >= [5, 2]) "ForwardedOutputChannel"+  ]++e_ProcessError =+  makeQtEnum (ident1 "QProcess" "ProcessError") [includeStd "QProcess"]+  [ "FailedToStart"+  , "Crashed"+  , "Timedout"+  , "WriteError"+  , "ReadError"+  , "UnknownError"+  ]++e_ProcessState =+  makeQtEnum (ident1 "QProcess" "ProcessState") [includeStd "QProcess"]+  [ "NotRunning"+  , "Starting"+  , "Running"+  ]++signals =+  collect $+  [ test (qtVersion >= [5, 6]) $ makeSignal c_QProcess "errorOccurred" listenerProcessError+  , just $ makeSignal c_QProcess "finished" listenerIntExitStatus+  , just $ makeSignal c_QProcess "readyReadStandardError" listener+  , just $ makeSignal c_QProcess "readyReadStandardOutput" listener+  , just $ makeSignal c_QProcess "started" listener+  , just $ makeSignal c_QProcess "stateChanged" listenerProcessState+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QProcess.hs-boot view
@@ -0,0 +1,43 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QProcess (+  c_QProcess,+  e_ExitStatus,+  e_InputChannelMode,+  e_ProcessChannel,+  e_ProcessChannelMode,+  e_ProcessError,+  e_ProcessState,+  ) where++import Foreign.Hoppy.Generator.Spec (Class, CppEnum)+++c_QProcess :: Class++e_ExitStatus :: CppEnum++e_InputChannelMode :: CppEnum++e_ProcessChannel :: CppEnum++e_ProcessChannelMode :: CppEnum++e_ProcessError :: CppEnum++e_ProcessState :: CppEnum
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QProcessEnvironment.hs view
@@ -0,0 +1,77 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QProcessEnvironment (+  aModule,+  c_QProcessEnvironment,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  classSetConversionToGc,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkCtor,+  mkMethod,+  mkMethod',+  mkStaticMethod,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (boolT, objT, refT, voidT, constT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QProcessEnvironment"] [4, 6]+  [qtExport c_QProcessEnvironment]++c_QProcessEnvironment =+  addReqIncludes [includeStd "QProcessEnvironment"] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QProcessEnvironment") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkMethod "clear" np voidT+  , just $ mkConstMethod "contains" [refT $ constT $ objT c_QString] boolT+  , just $ mkMethod' "insert" "insertWithName" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] voidT+  , test (qtVersion >= [4, 8]) $ mkMethod' "insert" "insert" [refT $ constT $ objT c_QProcessEnvironment] voidT+  , just $ mkConstMethod "isEmpty" np boolT+  , test (qtVersion >= [4, 8]) $ mkConstMethod "keys" np $ objT c_QStringList+  , just $ mkMethod "remove" [refT $ constT $ objT c_QString] voidT+  , test (qtVersion >= [5, 0]) $ mkMethod "swap" [refT $ objT c_QProcessEnvironment] voidT+  , just $ mkConstMethod "toStringList" np $ objT c_QStringList+  , just $ mkConstMethod' "value" "value" [refT $ constT $ objT c_QString] $ objT c_QString+  , just $ mkConstMethod' "value" "valueWithDefault" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] $ objT c_QString+  , test (qtVersion >= [4, 6]) $ mkStaticMethod "systemEnvironment" np $ objT c_QProcessEnvironment+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QPropertyAnimation.hs view
@@ -0,0 +1,53 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QPropertyAnimation (+  aModule,+  c_QPropertyAnimation,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkProp,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QVariantAnimation (c_QVariantAnimation)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Foreign.Hoppy.Generator.Types (objT, ptrT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QPropertyAnimation"] [4, 6] $+  [qtExport c_QPropertyAnimation]++c_QPropertyAnimation =+  addReqIncludes [ includeStd "QPropertyAnimation" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QPropertyAnimation") Nothing [c_QVariantAnimation] $+  collect+  [ just $ mkProp "propertyName" $ objT c_QByteArray+  , just $ mkProp "targetObject" $ ptrT $ objT c_QObject+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QRandomGenerator.hs view
@@ -0,0 +1,90 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QRandomGenerator (+  aModule,+  c_QRandomGenerator,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Operator (OpCall),+  classSetConversionToGc,+  classSetMonomorphicSuperclass,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkStaticMethod,+  mkCtor,+  mkMethod',+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (doubleT, intT, uintT, ullongT, voidT, constT, objT, ptrT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (quint32, quint64, qsizetype)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QRandomGenerator"] [5, 10] $+  [qtExport c_QRandomGenerator]++c_QRandomGenerator =+  addReqIncludes [ includeStd "QRandomGenerator" ] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetMonomorphicSuperclass $+  classSetEntityPrefix "" $+  makeClass (ident "QRandomGenerator") Nothing [] $+  collect+  [ just $ mkCtor "newWithQuints" [ptrT $ constT quint32, ptrT $ constT quint32]+  -- TODO QRandomGenerator::QRandomGenerator(std::seed_seq &sseq)+  , just $ mkCtor "newWithQuintQsizetype" [ptrT $ constT quint32, qsizetype]+  -- TODO QRandomGenerator::QRandomGenerator(const quint32 (&)[N] seedBuffer = ...)+  , just $ mkCtor "new" np+  , just $ mkCtor "newWithQuint" [quint32]+  , just $ mkMethod' "bounded" "boundedWithDouble" [doubleT] doubleT+  , just $ mkMethod' "bounded" "boundedWithQuint" [quint32] quint32+  , just $ mkMethod' "bounded" "boundedWirhQuints" [quint32, quint32] quint32+  , just $ mkMethod' "bounded" "boundedWithInt" [intT] intT+  , just $ mkMethod' "bounded" "boundedWithInts" [intT, intT] intT+  , just $ mkMethod "discard" [ullongT] $ voidT+  , just $ mkMethod "fillRange" [ptrT uintT, qsizetype] voidT+  -- TODO just $ mkMethod "fillRange" [ptrT $ uintT, qsizetype] $ voidT+  , just $ mkMethod "generate64" np quint64+  , just $ mkMethod "generate" np quint32+  -- TODO void QRandomGenerator::generate(ForwardIterator begin, ForwardIterator end)+  , just $ mkMethod "generateDouble" np doubleT+  , just $ mkStaticMethod "global" np $ ptrT $ objT c_QRandomGenerator+  , just $ mkStaticMethod "max" np quint32+  , just $ mkStaticMethod "min" np quint32+  , just $ mkStaticMethod "securelySeeded" np $ objT c_QRandomGenerator+  , just $ mkMethod' "seed" "seed" np voidT+  , just $ mkMethod' "seed" "seedWithQuint" [quint32] voidT+  -- TODO void QRandomGenerator::seed(std::seed_seq &seed)+  , just $ mkStaticMethod "system" np $ ptrT $ objT c_QRandomGenerator+  , just $ mkMethod OpCall np quint32+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QRandomGenerator64.hs view
@@ -0,0 +1,71 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QRandomGenerator64 (+  aModule,+  c_QRandomGenerator64,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Operator (OpCall),+  classSetConversionToGc,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkStaticMethod,+  mkCtor,+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (constT, ptrT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (quint32, quint64, qsizetype)+import Graphics.UI.Qtah.Generator.Interface.Core.QRandomGenerator (c_QRandomGenerator)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QRandomGenerator64"] [5, 10] $+  [qtExport c_QRandomGenerator64]++c_QRandomGenerator64 =+  addReqIncludes [ includeStd "QRandomGenerator64" ] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QRandomGenerator64") Nothing [c_QRandomGenerator] $+  collect+  [ just $ mkCtor "newWithQuints" [ptrT $ constT quint32, ptrT $ constT quint32]+  -- TODO QRandomGenerator::QRandomGenerator(std::seed_seq &sseq)+  , just $ mkCtor "newWithQuintQsizetype" [ptrT $ constT quint32, qsizetype]+  -- TODO QRandomGenerator::QRandomGenerator(const quint32 (&)[N] seedBuffer = ...)+  , just $ mkCtor "new" np+  , just $ mkCtor "newWithQuint" [quint32]+  , just $ mkMethod "generate" np quint64+  , just $ mkStaticMethod "max" np quint64+  , just $ mkStaticMethod "min" np quint64+  , just $ mkMethod OpCall np quint64+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QRect.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,16 +15,11 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- module Graphics.UI.Qtah.Generator.Interface.Core.QRect (   aModule,   c_QRect,   ) where -#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat)-#endif import Foreign.Hoppy.Generator.Language.Haskell (   addImports,   sayLn,@@ -36,7 +31,6 @@     classHaskellConversionToCppFn,     classHaskellConversionType   ),-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   classSetHaskellConversion,@@ -50,6 +44,7 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -57,7 +52,7 @@   ) import Foreign.Hoppy.Generator.Types (boolT, intT, objT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QMargins (c_QMargins) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize)@@ -74,7 +69,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QRect"]-  [ QtExport $ ExportClass c_QRect ]+  [ qtExport c_QRect ]  c_QRect =   addReqIncludes [includeStd "QRect"] $@@ -96,7 +91,7 @@   classSetEntityPrefix "" $   makeClass (ident "QRect") Nothing [] $   collect-  [ just $ mkCtor "newNull" []+  [ just $ mkCtor "newNull" np   , just $ mkCtor "newWithPoints" [objT c_QPoint, objT c_QPoint]   , just $ mkCtor "newWithPointAndSize" [objT c_QPoint, objT c_QSize]   , just $ mkCtor "newWithRaw" [intT, intT, intT, intT]@@ -105,15 +100,15 @@   , just $ mkProp "bottom" intT   , just $ mkProp "bottomLeft" $ objT c_QPoint   , just $ mkProp "bottomRight" $ objT c_QPoint-  , just $ mkConstMethod "center" [] $ objT c_QPoint+  , just $ mkConstMethod "center" np $ objT c_QPoint   , just $ mkConstMethod' "contains" "containsPoint" [objT c_QPoint, boolT] boolT   , just $ mkConstMethod' "contains" "containsRect" [objT c_QRect, boolT] boolT   , just $ mkProp "height" intT   , test (qtVersion >= [4, 2]) $ mkConstMethod "intersected" [objT c_QRect] $ objT c_QRect   , just $ mkConstMethod "intersects" [objT c_QRect] boolT-  , just $ mkConstMethod "isEmpty" [] boolT-  , just $ mkConstMethod "isNull" [] boolT-  , just $ mkConstMethod "isValid" [] boolT+  , just $ mkConstMethod "isEmpty" np boolT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "isValid" np boolT   , just $ mkProp "left" intT   , test (qtVersion >= [5, 1]) $ mkConstMethod "marginsAdded" [objT c_QMargins] $ objT c_QRect   , test (qtVersion >= [5, 1]) $ mkConstMethod "marginsRemoved" [objT c_QMargins] $ objT c_QRect@@ -127,7 +122,7 @@   , just $ mkMethod "moveTop" [intT] voidT   , just $ mkMethod "moveTopLeft" [objT c_QPoint] voidT   , just $ mkMethod "moveTopRight" [objT c_QPoint] voidT-  , just $ mkConstMethod "normalized" [] $ objT c_QRect+  , just $ mkConstMethod "normalized" np $ objT c_QRect   , just $ mkProp "right" intT   , just $ mkMethod "setCoords" [intT, intT, intT, intT] voidT   , just $ mkMethod "setRect" [intT, intT, intT, intT] voidT
src/Graphics/UI/Qtah/Generator/Interface/Core/QRectF.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   classSetConversionToGc,@@ -33,6 +32,7 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -40,7 +40,7 @@   ) import Foreign.Hoppy.Generator.Types (boolT, objT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QMarginsF (c_QMarginsF) import Graphics.UI.Qtah.Generator.Interface.Core.QPointF (c_QPointF) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)@@ -54,7 +54,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QRectF"]-  [ QtExport $ ExportClass c_QRectF ]+  [ qtExport c_QRectF ]  c_QRectF =   addReqIncludes [includeStd "QRectF"] $@@ -63,7 +63,7 @@   classSetEntityPrefix "" $   makeClass (ident "QRectF") Nothing [] $   collect-  [ just $ mkCtor "newNull" []+  [ just $ mkCtor "newNull" np   , test (qtVersion >= [4, 3]) $ mkCtor "newFromPoints" [objT c_QPointF, objT c_QPointF]   , just $ mkCtor "newWithPointAndSize" [objT c_QPointF, objT c_QSizeF]   , just $ mkCtor "newWithRect" [objT c_QRect]@@ -73,15 +73,15 @@   , just $ mkProp "bottom" qreal   , just $ mkProp "bottomLeft" $ objT c_QPointF   , just $ mkProp "bottomRight" $ objT c_QPointF-  , just $ mkConstMethod "center" [] $ objT c_QPointF+  , just $ mkConstMethod "center" np $ objT c_QPointF   , just $ mkConstMethod' "contains" "containsPoint" [objT c_QPointF] boolT   , just $ mkConstMethod' "contains" "containsRect" [objT c_QRectF] boolT   , just $ mkProp "height" qreal   , test (qtVersion >= [4, 2]) $ mkConstMethod "intersected" [objT c_QRectF] $ objT c_QRectF   , just $ mkConstMethod "intersects" [objT c_QRectF] boolT-  , just $ mkConstMethod "isEmpty" [] boolT-  , just $ mkConstMethod "isNull" [] boolT-  , just $ mkConstMethod "isValid" [] boolT+  , just $ mkConstMethod "isEmpty" np boolT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "isValid" np boolT   , just $ mkProp "left" qreal   , test (qtVersion >= [5, 3]) $ mkConstMethod "marginsAdded" [objT c_QMarginsF] $ objT c_QRectF   , test (qtVersion >= [5, 3]) $ mkConstMethod "marginsRemoved" [objT c_QMarginsF] $ objT c_QRectF@@ -95,12 +95,12 @@   , just $ mkMethod "moveTop" [qreal] voidT   , just $ mkMethod "moveTopLeft" [objT c_QPointF] voidT   , just $ mkMethod "moveTopRight" [objT c_QPointF] voidT-  , just $ mkConstMethod "normalized" [] $ objT c_QRectF+  , just $ mkConstMethod "normalized" np $ objT c_QRectF   , just $ mkProp "right" qreal   , just $ mkMethod "setCoords" [qreal, qreal, qreal, qreal] voidT   , just $ mkMethod "setRect" [qreal, qreal, qreal, qreal] voidT   , just $ mkProp "size" $ objT c_QSizeF-  , just $ mkConstMethod "toAlignedRect" [] $ objT c_QRect+  , just $ mkConstMethod "toAlignedRect" np $ objT c_QRect   , just $ mkProp "top" qreal   , just $ mkProp "topLeft" $ objT c_QPointF   , just $ mkProp "topRight" $ objT c_QPointF
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QResource.hs view
@@ -0,0 +1,92 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QResource (+  aModule,+  c_QResource,+  e_Compression,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkStaticMethod',+  mkCtor,+  mkMethod,+  np,+  )++import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QDateTime (c_QDateTime)+import Foreign.Hoppy.Generator.Types (ucharT, boolT, voidT, enumT, constT, objT, ptrT, refT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qint64)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QResource"] [4, 2] $+  collect+  [ just $ qtExport c_QResource+  , test (qtVersion >= [5, 13]) $ qtExport e_Compression+  ]++c_QResource =+  addReqIncludes [ includeStd "QResource" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QResource") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithFile" [refT $ constT $ objT c_QString]+  --, just $ mkCtor "newWithFileAndLocale" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QLocale]+  , just $ mkConstMethod "absoluteFilePath" np $ objT c_QString+  , test (qtVersion >= [5, 13]) $ mkConstMethod "compressionAlgorithm" np $ enumT e_Compression+  , just $ mkConstMethod' "data" "getData" np $ ptrT $ constT ucharT+  , just $ mkConstMethod "fileName" np $ objT c_QString+  , just $ mkConstMethod "isCompressed" np boolT+  , just $ mkConstMethod "isValid" np boolT+  , test (qtVersion >= [5, 8]) $ mkConstMethod "lastModified" np $ objT c_QDateTime+  --, just $ mkConstMethod "locale" np $ objT c_QLocale+  , just $ mkStaticMethod' "registerResource" "registerResourcePath" [refT $ constT $ objT c_QString ] boolT+  , just $ mkStaticMethod' "registerResource" "registerResourcePathAndTree" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] boolT+  , test (qtVersion >= [4, 3]) $ mkStaticMethod' "registerResource" "registerResourceData" [ptrT $ constT ucharT] boolT+  , test (qtVersion >= [4, 3]) $ mkStaticMethod' "registerResource" "registerResourceDataAndTree" [ptrT $ constT ucharT, refT $ constT $ objT c_QString] boolT+  , just $ mkMethod "setFileName" [refT $ constT $ objT c_QString] voidT+  -- just $ mkMethod "setLocale" [refT $ constT $ objT c_QLocale] $ voidT+  , just $ mkConstMethod "size" np qint64+  , just $ mkStaticMethod' "unregisterResource" "unregisterResourcePath" [refT $ constT $ objT c_QString ] boolT+  , just $ mkStaticMethod' "unregisterResource" "unregisterResourcePathAndTree" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] boolT+  , test (qtVersion >= [4, 3]) $ mkStaticMethod' "unregisterResource" "unregisterResourceData" [ptrT $ constT ucharT] boolT+  , test (qtVersion >= [4, 3]) $ mkStaticMethod' "unregisterResource" "unregisterResourceDataAndTree" [ptrT $ constT ucharT, refT $ constT $ objT c_QString] boolT+  ]++e_Compression =+  makeQtEnum (ident1 "QResource" "Compression") [includeStd "QResource"]+  [ "NoCompression"+  , "ZlibCompression"+  , "ZstdCompression"+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QSaveFile.hs view
@@ -0,0 +1,63 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QSaveFile (+  aModule,+  c_QSaveFile,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Types (ptrT, boolT, objT, voidT, constT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.QFileDevice (c_QFileDevice)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QSaveFile"] [5, 1]+  [qtExport c_QSaveFile]++c_QSaveFile =+  addReqIncludes [includeStd "QSaveFile"] $+  classSetEntityPrefix "" $+  makeClass (ident "QSaveFile") Nothing [c_QFileDevice] $+  collect+  [ just $ mkCtor "newWithNameAndParent" [constT $ objT c_QString, ptrT $ objT c_QObject]+  , just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]+  , just $ mkCtor "newWithName" [constT $ objT c_QString]+  , just $ mkMethod "cancelWriting" np voidT+  , just $ mkMethod "commit" np boolT+  , just $ mkConstMethod "directWriteFallback" np boolT+  , just $ mkMethod "setDirectWriteFallback" [boolT] voidT+  , just $ mkMethod "setFileName" [constT $ objT c_QString] voidT+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QSequentialAnimationGroup.hs view
@@ -0,0 +1,64 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QSequentialAnimationGroup (+  aModule,+  c_QSequentialAnimationGroup,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkMethod,+  np,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QAnimationGroup (c_QAnimationGroup)+import Graphics.UI.Qtah.Generator.Interface.Core.QPauseAnimation (c_QPauseAnimation)+import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractAnimation (c_QAbstractAnimation)+import Foreign.Hoppy.Generator.Types (intT, objT, ptrT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerQAbstractAnimation)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QSequentialAnimationGroup"] [4, 6] $+  (qtExport c_QSequentialAnimationGroup) :+  map QtExportSignal signals++c_QSequentialAnimationGroup =+  addReqIncludes [ includeStd "QSequentialAnimationGroup" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QSequentialAnimationGroup") Nothing [c_QAnimationGroup] $+  collect+  [ just $ mkMethod "addPause" [intT] $ ptrT $ objT c_QPauseAnimation+  , just $ mkMethod "insertPause" [intT, intT] $ ptrT $ objT c_QPauseAnimation+  , just $ mkConstMethod "currentAnimation" np $ ptrT $ objT c_QAbstractAnimation+  ]++signals :: [Signal]+signals =+  collect+  [ just $ makeSignal c_QSequentialAnimationGroup "currentAnimationChanged" listenerQAbstractAnimation+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QSettings.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2018 The Qtah Authors.+-- Copyright 2018-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@  import Foreign.Hoppy.Generator.Spec (   Class,-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -31,6 +30,7 @@   mkConstMethod',   mkCtor,   mkMethod,+  np,   ) import Foreign.Hoppy.Generator.Types (objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)@@ -45,14 +45,14 @@ aModule =   AQtModule $   makeQtModule ["Core", "QSettings"]-  [QtExport $ ExportClass c_QSettings]+  [qtExport c_QSettings]  c_QSettings :: Class c_QSettings =   addReqIncludes [includeStd "QSettings"] $   classSetEntityPrefix "" $   makeClass (ident "QSettings") Nothing [c_QObject]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithOrganization" [objT c_QString]   , mkCtor "newWithOrganizationAndApplication" [objT c_QString, objT c_QString]   , mkCtor "newWithOrganizationAndApplicationAndParent"
src/Graphics/UI/Qtah/Generator/Interface/Core/QSize.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,16 +15,11 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- module Graphics.UI.Qtah.Generator.Interface.Core.QSize (   aModule,   c_QSize,   ) where -#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat)-#endif import Foreign.Hoppy.Generator.Language.Haskell (   addImports,   sayLn,@@ -36,7 +31,6 @@     classHaskellConversionToCppFn,     classHaskellConversionType   ),-  Export (ExportClass),   Operator (OpAddAssign, OpDivideAssign, OpMultiplyAssign, OpSubtractAssign),   addReqIncludes,   classSetEntityPrefix,@@ -50,6 +44,7 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -57,7 +52,7 @@   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, refT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_AspectRatioMode, qreal) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types@@ -72,7 +67,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QSize"]-  [ QtExport $ ExportClass c_QSize ]+  [ qtExport c_QSize ]  c_QSize =   addReqIncludes [includeStd "QSize"] $@@ -94,19 +89,19 @@   classSetEntityPrefix "" $   makeClass (ident "QSize") Nothing [] $   collect-  [ just $ mkCtor "newNull" []+  [ just $ mkCtor "newNull" np   , just $ mkCtor "new" [intT, intT]   , just $ mkConstMethod "boundedTo" [objT c_QSize] $ objT c_QSize   , just $ mkConstMethod "expandedTo" [objT c_QSize] $ objT c_QSize   , just $ mkProp "height" intT-  , just $ mkConstMethod "isEmpty" [] boolT-  , just $ mkConstMethod "isNull" [] boolT-  , just $ mkConstMethod "isValid" [] boolT+  , just $ mkConstMethod "isEmpty" np boolT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "isValid" np boolT   , just $ mkMethod "scale" [objT c_QSize, enumT e_AspectRatioMode] voidT   , test (qtVersion >= [5, 0]) $     mkConstMethod "scaled" [objT c_QSize, enumT e_AspectRatioMode] $ objT c_QSize-  , just $ mkMethod "transpose" [] voidT-  , test (qtVersion >= [5, 0]) $ mkConstMethod "transposed" [] $ objT c_QSize+  , just $ mkMethod "transpose" np voidT+  , test (qtVersion >= [5, 0]) $ mkConstMethod "transposed" np $ objT c_QSize   , just $ mkProp "width" intT   , just $ mkMethod OpAddAssign [objT c_QSize] $ refT $ objT c_QSize   , just $ mkMethod OpSubtractAssign [objT c_QSize] $ refT $ objT c_QSize
src/Graphics/UI/Qtah/Generator/Interface/Core/QSizeF.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   Operator (OpAddAssign, OpDivideAssign, OpMultiplyAssign, OpSubtractAssign),   addReqIncludes,   classSetConversionToGc,@@ -33,6 +32,7 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -40,7 +40,7 @@   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, objT, refT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_AspectRatioMode, qreal) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -51,7 +51,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QSizeF"]-  [ QtExport $ ExportClass c_QSizeF ]+  [ qtExport c_QSizeF ]  c_QSizeF =   addReqIncludes [includeStd "QSizeF"] $@@ -60,21 +60,21 @@   classSetEntityPrefix "" $   makeClass (ident "QSizeF") Nothing [] $   collect-  [ just $ mkCtor "newNull" []+  [ just $ mkCtor "newNull" np   , just $ mkCtor "new" [qreal, qreal]   , just $ mkCtor "newWithSize" [objT c_QSize]   , just $ mkConstMethod "boundedTo" [objT c_QSizeF] $ objT c_QSizeF   , just $ mkConstMethod "expandedTo" [objT c_QSizeF] $ objT c_QSizeF   , just $ mkProp "height" qreal-  , just $ mkConstMethod "isEmpty" [] boolT-  , just $ mkConstMethod "isNull" [] boolT-  , just $ mkConstMethod "isValid" [] boolT+  , just $ mkConstMethod "isEmpty" np boolT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "isValid" np boolT   , just $ mkMethod "scale" [objT c_QSizeF, enumT e_AspectRatioMode] voidT   , test (qtVersion >= [5, 0]) $     mkConstMethod "scaled" [objT c_QSizeF, enumT e_AspectRatioMode] $ objT c_QSizeF-  , just $ mkConstMethod "toSize" [] $ objT c_QSize-  , just $ mkMethod "transpose" [] voidT-  , test (qtVersion >= [5, 0]) $ mkConstMethod "transposed" [] $ objT c_QSizeF+  , just $ mkConstMethod "toSize" np $ objT c_QSize+  , just $ mkMethod "transpose" np voidT+  , test (qtVersion >= [5, 0]) $ mkConstMethod "transposed" np $ objT c_QSizeF   , just $ mkProp "width" qreal   , just $ mkMethod OpAddAssign [objT c_QSizeF] $ refT $ objT c_QSizeF   , just $ mkMethod OpSubtractAssign [objT c_QSizeF] $ objT c_QSizeF
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QStandardPaths.hs view
@@ -0,0 +1,104 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QStandardPaths (+  aModule,+  c_QStandardPaths,+  e_StandardLocation,+  e_LocateOption,+  fl_LocateOptions,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  classSetDtorPrivate,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkStaticMethod,+  mkStaticMethod',+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)+import Foreign.Hoppy.Generator.Types (boolT, voidT, enumT, constT, objT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QStandardPaths"] [5, 0] $+  collect+  [ just $ qtExport c_QStandardPaths+  , just $ qtExport e_StandardLocation+  , just $ qtExport e_LocateOption+  , just $ qtExport fl_LocateOptions+  ]++c_QStandardPaths =+  addReqIncludes [ includeStd "QStandardPaths" ] $+  classSetEntityPrefix "" $+  classSetDtorPrivate $+  makeClass (ident "QStandardPaths") Nothing [] $+  collect+  [just $ mkStaticMethod "displayName" [enumT e_StandardLocation] $ objT c_QString+  , just $ mkStaticMethod' "findExecutable" "findExecutable" [constT $ objT c_QString ] $ objT c_QString+  , just $ mkStaticMethod' "findExecutable" "findExecutableWithPaths" [constT $ objT c_QString, constT $ objT c_QStringList] $ objT c_QString+  , just $ mkStaticMethod' "locate" "locate" [enumT e_StandardLocation, constT $ objT c_QString ] $ objT c_QString+  , just $ mkStaticMethod' "locate" "locateWithOptions" [enumT e_StandardLocation, constT $ objT c_QString, flagsT fl_LocateOptions] $ objT c_QString+  , just $ mkStaticMethod' "locateAll" "locateAll" [enumT e_StandardLocation, constT $ objT c_QString ] $ objT c_QStringList+  , just $ mkStaticMethod' "locateAll" "locateAllWithOptions" [enumT e_StandardLocation, constT $ objT c_QString, flagsT fl_LocateOptions] $ objT c_QStringList+  , just $ mkStaticMethod "setTestModeEnabled" [boolT] voidT+  , just $ mkStaticMethod "standardLocations" [enumT e_StandardLocation] $ objT c_QStringList+  , just $ mkStaticMethod "writableLocation" [enumT e_StandardLocation] $ objT c_QString+  ]++e_StandardLocation =+  makeQtEnum (ident1 "QStandardPaths" "StandardLocation") [includeStd "QStandardPaths"] $+  collect+  [ just "DesktopLocation"+  , just "DocumentsLocation"+  , just "FontsLocation"+  , just "ApplicationsLocation"+  , just "MusicLocation"+  , just "MoviesLocation"+  , just "PicturesLocation"+  , just "TempLocation"+  , just "HomeLocation"+  , just "DataLocation"+  , just "CacheLocation"+  , just "GenericDataLocation"+  , just "RuntimeLocation"+  , just "ConfigLocation"+  , just "DownloadLocation"+  , just "GenericCacheLocation"+  , just "GenericConfigLocation"+  , test (qtVersion >= [5, 4]) $ "AppDataLocation"+  , test (qtVersion >= [5, 5]) $ "AppConfigLocation"+  ]++(e_LocateOption, fl_LocateOptions) =+  makeQtEnumAndFlags (ident1 "QStandardPaths" "LocateOption") "LocateOptions" [includeStd "QStandardPaths"]+  [ "LocateFile"+  , "LocateDirectory"+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QStaticPlugin.hs view
@@ -0,0 +1,55 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QStaticPlugin (+  aModule,+  c_QStaticPlugin,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkMethod',+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Types (charT, constT, objT, ptrT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+--import Graphics.UI.Qtah.Generator.Interface.Core.QJsonObject (c_QJsonObject)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QStaticPlugin"] [5, 2] $+  [qtExport c_QStaticPlugin]++c_QStaticPlugin =+  addReqIncludes [ includeStd "QStaticPlugin" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QStaticPlugin") Nothing [] $+  collect+  [ just $ mkMethod' "instance" "getInstance" np $ ptrT $ objT c_QObject+  --, just $ mkConstMethod "metaData" np $ objT c_QJsonObject+  , just $ mkMethod "rawMetaData" np $ ptrT $ constT charT+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QString.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,16 +15,15 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- module Graphics.UI.Qtah.Generator.Interface.Core.QString (   aModule,   c_QString,+  e_SectionFlag,+  fl_SectionFlags,+  e_NormalizationForm,+  e_SplitBehavior,   ) where -#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat)-#endif import Foreign.Hoppy.Generator.Language.Haskell (   addImports,   sayLn,@@ -36,7 +35,6 @@     classHaskellConversionToCppFn,     classHaskellConversionType   ),-  Export (ExportClass),   MethodApplicability (MNormal),   Operator (OpArray),   Purity (Nonpure),@@ -44,6 +42,7 @@   classSetEntityPrefix,   classSetHaskellConversion,   ident,+  ident1,   ident2,   includeLocal,   includeStd,@@ -52,19 +51,24 @@   mkConstMethod,   mkConstMethod',   mkCtor,+  mkMethod',+  mkMethod,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Comparable, Equatable),   classAddFeatures,   ) import Foreign.Hoppy.Generator.Std.String (c_string)-import Foreign.Hoppy.Generator.Types (charT, constT, intT, objT, ptrT, refT, voidT)+import Foreign.Hoppy.Generator.Types (doubleT, charT, constT, intT, objT, ptrT, refT, voidT, longT, ulongT, uintT, shortT, ushortT, boolT, floatT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray) import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar) import Graphics.UI.Qtah.Generator.Interface.Imports import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qulonglong, qlonglong)+--import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVector (c_QVectorUInt) import Graphics.UI.Qtah.Generator.Types import Language.Haskell.Syntax (   HsName (HsIdent),@@ -77,7 +81,11 @@ aModule =   AQtModule $   makeQtModule ["Core", "QString"]-  [ QtExport $ ExportClass c_QString+  [ qtExport c_QString+  , qtExport e_SectionFlag+  , qtExport fl_SectionFlags+  , qtExport e_NormalizationForm+  , qtExport e_SplitBehavior   ]  c_QString =@@ -97,16 +105,196 @@   classSetEntityPrefix "" $   makeClass (ident "QString") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newFromByteArray" [objT c_QByteArray]   , just $ mkCtor "newFromCString" [ptrT $ constT charT]-  , just $ mkConstMethod' OpArray "at" [intT] $ objT c_QChar+  , just $ mkCtor "newFromSizeQChar" [intT, objT c_QChar]+  , just $ mkCtor "newFromQChar" [ptrT $ objT c_QChar]+  --, just $ mkCtor "newFromQCharSize" [ptrT $ objT c_QChar, intT]+   , just $ makeFnMethod (ident2 "qtah" "qstring" "set") "set" MNormal Nonpure     [refT $ objT c_QString, intT, objT c_QChar] voidT-  , test (qtVersion >= [5, 0]) $ mkConstMethod "toHtmlEscaped" [] $ objT c_QString-  , just $ mkConstMethod "toLatin1" [] $ objT c_QByteArray-  , just $ mkConstMethod "toLocal8Bit" [] $ objT c_QByteArray-  , just $ mkConstMethod "toStdString" [] $ objT c_string-  , just $ mkConstMethod "toUtf8" [] $ objT c_QByteArray++    , just $ mkMethod' "append" "append" [objT c_QString] $ refT $ objT c_QString+--, test (qtVersion >= [5, 0]) $ mkMethod' "append" "appendWithCharInt" [ptrT $ constT charT, intT] $ refT $ objT c_QString+  , just $ mkMethod' "append" "appendQChar" [objT c_QChar] $ refT $ objT c_QString+  -- TODO QString &QString::append(const QStringRef &reference)+  -- TODO QString &QString::append(QLatin1String str)+  , just $ mkMethod' "append" "appendPtrConstChar" [ptrT $ constT charT] $ refT $ objT c_QString+  , just $ mkMethod' "append" "appendByteArray" [objT c_QByteArray] $ refT $ objT c_QString++  , just $ mkConstMethod' "arg" "arg" [objT c_QString] $ objT c_QString+  , just $ mkConstMethod' "arg" "argWithSize" [objT c_QString, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argWithSizeAndFill" [objT c_QString, intT, objT c_QChar] $ objT c_QString++  , just $ mkConstMethod' "arg" "argUlonglong" [qulonglong] $ objT c_QString+  , just $ mkConstMethod' "arg" "argUlonglongWithField" [qulonglong, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argUlonglongWithFieldAndBase" [qulonglong, intT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argUlonglongWithFieldAndBaseAndFill" [qulonglong, intT, intT, objT c_QChar] $ objT c_QString++  , just $ mkConstMethod' "arg" "argLonglong" [qlonglong] $ objT c_QString+  , just $ mkConstMethod' "arg" "argLonglongWithField" [qlonglong, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argLonglongWithFieldAndBase" [qlonglong, intT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argLonglongWithFieldAndBaseAndFill" [qlonglong, intT, intT, objT c_QChar] $ objT c_QString++  , just $ mkConstMethod' "arg" "argLong" [longT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argLongWithField" [longT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argLongWithFieldAndBase" [longT, intT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argLongWithFieldAndBaseAndFill" [longT, intT, intT, objT c_QChar] $ objT c_QString++  , just $ mkConstMethod' "arg" "argUlong" [ulongT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argUlongWithField" [ulongT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argUlongWithFieldAndBase" [ulongT, intT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argUlongWithFieldAndBaseAndFill" [ulongT, intT, intT, objT c_QChar] $ objT c_QString++  , just $ mkConstMethod' "arg" "argInt" [intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argIntWithField" [intT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argIntWithFieldAndBase" [intT, intT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argIntWithFieldAndBaseAndFill" [intT, intT, intT, objT c_QChar] $ objT c_QString++  , just $ mkConstMethod' "arg" "argUintWith" [uintT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argUintWithField" [uintT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argUintWithFieldAndBase" [uintT, intT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argUintWithFieldAndBaseAndFill" [uintT, intT, intT, objT c_QChar] $ objT c_QString++  , just $ mkConstMethod' "arg" "argShortWith" [shortT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argShortWithField" [shortT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argShortWithFieldAndBase" [shortT, intT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argShortWithFieldAndBaseAndFill" [shortT, intT, intT, objT c_QChar] $ objT c_QString++  , just $ mkConstMethod' "arg" "argUshortWith" [ushortT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argUshortWithField" [ushortT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argUshortWithFieldAndBase" [ushortT, intT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argUshortWithFieldAndBaseAndFill" [ushortT, intT, intT, objT c_QChar] $ objT c_QString++  , just $ mkConstMethod' "arg" "argDoubleWith" [doubleT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argDoubleWithField" [doubleT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argDoubleWithFieldFormat" [doubleT, intT, charT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argDoubleWithFieldFormatPrecision" [doubleT, intT, charT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argDoubleWithFieldFormatPrecisionFill" [doubleT, intT, charT, intT, objT c_QChar] $ objT c_QString++  , just $ mkConstMethod' "arg" "argCharWith" [charT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argCharWithField" [charT, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argCharWithFieldFill" [charT, intT, objT c_QChar] $ objT c_QString++  , just $ mkConstMethod' "arg" "argQCharWith" [objT c_QChar] $ objT c_QString+  , just $ mkConstMethod' "arg" "argQCharWithField" [objT c_QChar, intT] $ objT c_QString+  , just $ mkConstMethod' "arg" "argQCharWithFieldFill" [objT c_QChar, intT, objT c_QChar] $ objT c_QString++  -- TODO QString QString::arg(QStringView a, int fieldWidth = 0, QChar fillChar = QLatin1Char(' ')) const+  -- TODO QString QString::arg(QLatin1String a, int fieldWidth = 0, QChar fillChar = QLatin1Char(' ')) const++  , just $ mkConstMethod' "arg" "argTwoQStrings" [objT c_QString, objT c_QString] $ objT c_QString+  , just $ mkConstMethod' "arg" "argThreeQStrings" [objT c_QString, objT c_QString, objT c_QString] $ objT c_QString+  , just $ mkConstMethod' "arg" "argFourQStrings" [objT c_QString, objT c_QString, objT c_QString, objT c_QString] $ objT c_QString+  , just $ mkConstMethod' "arg" "argFiveQStrings" [objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString] $ objT c_QString+  , just $ mkConstMethod' "arg" "argSixQStrings" [objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString] $ objT c_QString+  , just $ mkConstMethod' "arg" "argSevenQStrings" [objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString] $ objT c_QString+  , just $ mkConstMethod' "arg" "argEightQStrings" [objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString] $ objT c_QString+  , just $ mkConstMethod' "arg" "argNineQStrings" [objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString, objT c_QString] $ objT c_QString++  , just $ mkConstMethod' OpArray "at" [intT] $ objT c_QChar+  , test (qtVersion >= [5, 10]) $ mkConstMethod "back" np $ objT c_QChar+  -- TODO QCharRef QString::back()+  -- TODO QString::iterator QString::begin()+  -- TODO QString::const_iterator QString::begin() const++  , just $ mkConstMethod "capacity" np intT++  -- TODO QString::const_iterator QString::cbegin() const+  -- TODO QString::const_iterator QString::cend() const++  , just $ mkMethod "chop" [intT] voidT+  , test (qtVersion >= [5, 10]) $ mkConstMethod "chopped" [intT] $ objT c_QString+  , just $ mkMethod "clear" np voidT++  -- TODO compare methods+  -- TODO QString::const_iterator QString::constBegin() const+  -- TODO const QChar *QString::constData() const+  -- TODO QString::const_iterator QString::constEnd() const++  , test (qtVersion >= [5, 0]) $ mkConstMethod "toHtmlEscaped" np $ objT c_QString+  , just $ mkConstMethod "toLatin1" np $ objT c_QByteArray+  , just $ mkConstMethod "toLocal8Bit" np $ objT c_QByteArray+  , just $ mkConstMethod "toStdString" np $ objT c_string+  , just $ mkConstMethod "toUtf8" np $ objT c_QByteArray+  -- TODO CFStringRef QString::toCFString() const+  , just $ mkConstMethod "toCaseFolded" np $ objT c_QString++  , just $ mkConstMethod' "toDouble" "toDouble" np doubleT+  , just $ mkConstMethod' "toDouble" "toDoubleWithOk" [ptrT boolT] doubleT++  , just $ mkConstMethod' "toFloat" "toFloat" np floatT+  , just $ mkConstMethod' "toFloat" "toFloatWithOk" [ptrT boolT] floatT++  , just $ mkConstMethod' "toInt" "toInt" np intT+  , just $ mkConstMethod' "toInt" "toIntWithOk" [ptrT boolT] intT+  , just $ mkConstMethod' "toInt" "toIntWithOkAndBase" [ptrT boolT, intT] intT++  , just $ mkConstMethod' "toLong" "toLong" np longT+  , just $ mkConstMethod' "toLong" "toLongWithOk" [ptrT boolT] longT+  , just $ mkConstMethod' "toLong" "toLongWithOkAndBase" [ptrT boolT, intT] longT++  , just $ mkConstMethod' "toLongLong" "toLonglong" np qlonglong+  , just $ mkConstMethod' "toLongLong" "toLonglongWithOk" [ptrT boolT] qlonglong+  , just $ mkConstMethod' "toLongLong" "toLonglongWithOkAndBase" [ptrT boolT, intT] qlonglong++  , just $ mkConstMethod "toLower" np $ objT c_QString+  -- TODO NSString *QString::toNSString() const++  , just $ mkConstMethod' "toShort" "toShort" np shortT+  , just $ mkConstMethod' "toShort" "toShortWithOk" [ptrT boolT] shortT+  , just $ mkConstMethod' "toShort" "toShortWithOkAndBase" [ptrT boolT, intT] shortT++  , just $ mkConstMethod' "toUInt" "toUInt" np uintT+  , just $ mkConstMethod' "toUInt" "toUIntWithOk" [ptrT boolT] uintT+  , just $ mkConstMethod' "toUInt" "toUIntWithOkAndBase" [ptrT boolT, intT] uintT++  , just $ mkConstMethod' "toULong" "toULong" np ulongT+  , just $ mkConstMethod' "toULong" "toULongWithOk" [ptrT boolT] ulongT+  , just $ mkConstMethod' "toULong" "toULongWithOkAndBase" [ptrT boolT, intT] ulongT++  , just $ mkConstMethod' "toULongLong" "toUlonglong" np qulonglong+  , just $ mkConstMethod' "toULongLong" "toUlonglongWithOk" [ptrT boolT] qulonglong+  , just $ mkConstMethod' "toULongLong" "toUlonglongWithOkAndBase" [ptrT boolT, intT] qulonglong++  , just $ mkConstMethod' "toUShort" "toUshort" np ushortT+  , just $ mkConstMethod' "toUShort" "toUshortWithOk" [ptrT boolT] ushortT+  , just $ mkConstMethod' "toUShort" "toUshortWithOkAndBase" [ptrT boolT, intT] ushortT++  --, test (qtVersion >= [4, 2]) $ mkConstMethod "toUcs4" np $ toGcT $ objT c_QVectorUInt++  , just $ mkConstMethod "toUpper" np $ objT c_QString++  -- int QString::toWCharArray(wchar_t *array) const++  , just $ mkConstMethod "trimmed" np $ objT c_QString+  , just $ mkMethod "truncate" [intT] voidT++  --, just $ mkConstMethod "unicode" np $ objT c_QChar+  --, just $ mkConstMethod "utf16" np $ ptrT ushortT     -- TODO Lots more method here.   ]++e_NormalizationForm =+    makeQtEnum (ident1 "QString" "NormalizationForm") [includeStd "QString"]+    [ "NormalizationForm_D"+    , "NormalizationForm_C"+    , "NormalizationForm_KD"+    , "NormalizationForm_KC"+    ]++(e_SectionFlag, fl_SectionFlags) =+    makeQtEnumAndFlags (ident1 "QString" "SectionFlag") "SectionFlags" [includeStd "QString"]+    [ "SectionDefault"+    , "SectionSkipEmpty"+    , "SectionIncludeLeadingSep"+    , "SectionIncludeTrailingSep"+    , "SectionCaseInsensitiveSeps"+    ]++e_SplitBehavior =+    makeQtEnum (ident1 "QString" "SplitBehavior") [includeStd "QString"]+    [ "KeepEmptyParts"+    , "SkipEmptyParts"+    ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QString.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,8 +17,21 @@  module Graphics.UI.Qtah.Generator.Interface.Core.QString (   c_QString,+  e_SectionFlag,+  fl_SectionFlags,+  e_NormalizationForm,+  e_SplitBehavior,   ) where -import Foreign.Hoppy.Generator.Spec (Class)+import Foreign.Hoppy.Generator.Spec (Class, CppEnum)+import Graphics.UI.Qtah.Generator.Flags (Flags)  c_QString :: Class++e_SectionFlag :: CppEnum++e_NormalizationForm :: CppEnum++e_SplitBehavior :: CppEnum++fl_SectionFlags :: Flags
src/Graphics/UI/Qtah/Generator/Interface/Core/QStringList.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,26 +15,17 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- module Graphics.UI.Qtah.Generator.Interface.Core.QStringList (   aModule,   c_QStringList,   ) where -#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat)-#endif import Foreign.Hoppy.Generator.Language.Haskell (   addImports,   indent,   ln,   sayLn,   saysLn,-  toHsCastMethodName,-  toHsClassEntityName,-  toHsClassEntityName',-  toHsDataTypeName,   ) import Foreign.Hoppy.Generator.Spec (   ClassHaskellConversion (@@ -44,7 +35,6 @@     classHaskellConversionType   ),   Constness (Const, Nonconst),-  Export (ExportClass),   addAddendumHaskell,   addReqIncludes,   classSetEntityPrefix,@@ -57,14 +47,21 @@   mkCtor,   mkMethod,   mkMethod',+  np,   )+import Foreign.Hoppy.Generator.Spec.Class (+  toHsCastMethodName,+  toHsClassEntityName,+  toHsClassEntityName',+  toHsDataTypeName,+  ) 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.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar) import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQString) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)@@ -84,7 +81,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QStringList"]-  [ QtExport $ ExportClass c_QStringList ]+  [ qtExport c_QStringList ]  c_QStringList =   addReqIncludes [includeStd "QStringList"] $@@ -93,7 +90,7 @@     { classHaskellConversionType = Just $ do       addImports importForPrelude       return $-        HsTyApp (HsTyCon $ Special $ HsListCon) $+        HsTyApp (HsTyCon $ Special HsListCon) $         HsTyCon $ UnQual $ HsIdent "QtahP.String"     , classHaskellConversionToCppFn = Just $ do       addImports importForRuntime@@ -107,7 +104,7 @@   classSetEntityPrefix "" $   makeClass (ident "QStringList") Nothing [c_QListQString] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , -- TODO Regexp methods.     just $ mkConstMethod' "contains" "containsCase" [objT c_QString, enumT e_CaseSensitivity] boolT   , just $ mkConstMethod' "filter" "filter" [objT c_QString] $ objT c_QStringList@@ -115,9 +112,9 @@     objT c_QStringList   , just $ mkConstMethod' "join" "joinString" [objT c_QString] $ objT c_QString   , test (qtVersion >= [5, 0]) $ mkConstMethod' "join" "joinChar" [objT c_QChar] $ objT c_QString-  , test (qtVersion >= [4, 5]) $ mkMethod "removeDuplicates" [] intT+  , test (qtVersion >= [4, 5]) $ mkMethod "removeDuplicates" np intT     -- TODO replaceInStrings.  Ownership?-  , just $ mkMethod' "sort" "sort" [] voidT+  , just $ mkMethod' "sort" "sort" np voidT   , test (qtVersion >= [5, 0]) $ mkMethod' "sort" "sortCase" [enumT e_CaseSensitivity] voidT   ] 
src/Graphics/UI/Qtah/Generator/Interface/Core/QStringListModel.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -29,6 +28,7 @@   makeClass,   mkCtor,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractListModel (c_QAbstractListModel)@@ -41,14 +41,14 @@  aModule =   AQtModule $-  makeQtModule ["Core", "QStringListModel"] $-  [ QtExport $ ExportClass c_QStringListModel ]+  makeQtModule ["Core", "QStringListModel"]+  [ qtExport c_QStringListModel ]  c_QStringListModel =   addReqIncludes [includeStd "QStringListModel"] $   classSetEntityPrefix "" $   makeClass (ident "QStringListModel") Nothing [c_QAbstractListModel]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QObject]   , mkCtor "newWithContents" [objT c_QStringList]   , mkCtor "newWithContentsAndParent" [objT c_QStringList, ptrT $ objT c_QObject]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QSysInfo.hs view
@@ -0,0 +1,82 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QSysInfo (+  aModule,+  c_QSysInfo,+  e_Endian,+  e_Sizes,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkStaticMethod,+  np,+  )+import Foreign.Hoppy.Generator.Types (objT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QSysInfo"] $+  collect+  [ just $ qtExport c_QSysInfo+  , just $ qtExport e_Endian+  , just $ qtExport e_Sizes+  ]++c_QSysInfo =+  addReqIncludes [ includeStd "QSysInfo" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QSysInfo") Nothing [] $+  collect+  [ test (qtVersion >= [5, 11]) $ mkStaticMethod "bootUniqueId" np $ objT c_QByteArray+  , test (qtVersion >= [5, 4]) $ mkStaticMethod "buildAbi" np $ objT c_QString+  , test (qtVersion >= [5, 4]) $ mkStaticMethod "buildCpuArchitecture" np $ objT c_QString+  , test (qtVersion >= [5, 4]) $ mkStaticMethod "currentCpuArchitecture" np $ objT c_QString+  , test (qtVersion >= [5, 4]) $ mkStaticMethod "kernelType" np $ objT c_QString+  , test (qtVersion >= [5, 4]) $ mkStaticMethod "kernelVersion" np $ objT c_QString+  , test (qtVersion >= [5, 6]) $ mkStaticMethod "machineHostName" np $ objT c_QString+  , test (qtVersion >= [5, 11]) $ mkStaticMethod "machineUniqueId" np $ objT c_QByteArray+  , test (qtVersion >= [5, 4]) $ mkStaticMethod "prettyProductName" np $ objT c_QString+  , test (qtVersion >= [5, 4]) $ mkStaticMethod "productType" np $ objT c_QString+  , test (qtVersion >= [5, 4]) $ mkStaticMethod "productVersion" np $ objT c_QString+  ]++e_Sizes =+  makeQtEnum (ident1 "QSysInfo" "Sizes") [includeStd "QSysInfo"]+  [ "WordSize"+  ]++e_Endian =+  makeQtEnum (ident1 "QSysInfo" "Endian") [includeStd "QSysInfo"]+  [ "BigEndian"+  , "LittleEndian"+  , "ByteOrder"+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QTextCodec.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,15 +15,12 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- module Graphics.UI.Qtah.Generator.Interface.Core.QTextCodec (   aModule,   c_QTextCodec,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   classSetDtorPrivate,@@ -34,6 +31,7 @@   mkConstMethod',   mkStaticMethod,   mkStaticMethod',+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT, voidT) import Foreign.Hoppy.Generator.Version (collect, just)@@ -49,7 +47,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QTextCodec"]-  [ QtExport $ ExportClass c_QTextCodec+  [ qtExport c_QTextCodec   ]  c_QTextCodec =@@ -58,26 +56,26 @@   classSetEntityPrefix "" $   makeClass (ident "QTextCodec") Nothing [] $   collect-  [ just $ mkConstMethod "aliases" [] $ objT c_QListQByteArray+  [ just $ mkConstMethod "aliases" np $ objT c_QListQByteArray   , just $ mkConstMethod' "canEncode" "canEncodeChar" [objT c_QChar] boolT   , just $ mkConstMethod' "canEncode" "canEncodeString" [objT c_QString] boolT   , just $ mkConstMethod "fromUnicode" [objT c_QString] $ objT c_QByteArray     -- TODO QByteArray fromUnicode(const QChar*, int, ConverterState* =) const     -- TODO QTextDecoder* makeDecoder(ConversionFlags =) const     -- TODO QTextEncoder* makeEncoder(ConversionFlags =) const-  , just $ mkConstMethod "mibEnum" [] intT-  , just $ mkConstMethod "name" [] $ objT c_QByteArray+  , just $ mkConstMethod "mibEnum" np intT+  , just $ mkConstMethod "name" np $ objT c_QByteArray   , just $ mkConstMethod "toUnicode" [objT c_QByteArray] $ objT c_QString     -- TODO QString toUnicode(const char*) const     -- TODO QString toUnicode(const char*, int, ConverterState* =) const -  , just $ mkStaticMethod "availableCodecs" [] $ objT c_QListQByteArray-  , just $ mkStaticMethod "availableMibs" [] $ objT c_QListInt+  , just $ mkStaticMethod "availableCodecs" np $ objT c_QListQByteArray+  , just $ mkStaticMethod "availableMibs" np $ objT c_QListInt   , just $ mkStaticMethod' "codecForHtml" "codecForHtml"     [objT c_QByteArray] $ ptrT $ objT c_QTextCodec   , just $ mkStaticMethod' "codecForHtml" "codecForHtmlWithDefault"     [objT c_QByteArray, ptrT $ objT c_QTextCodec] $ ptrT $ objT c_QTextCodec-  , just $ mkStaticMethod "codecForLocale" [] $ ptrT $ objT c_QTextCodec+  , just $ mkStaticMethod "codecForLocale" np $ ptrT $ objT c_QTextCodec   , just $ mkStaticMethod "codecForMib" [intT] $ ptrT $ objT c_QTextCodec   , just $ mkStaticMethod "codecForName" [objT c_QByteArray] $ ptrT $ objT c_QTextCodec     -- TODO QTextCodec* codecForName(const char*)  (Omit this?)
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QTextDecoder.hs view
@@ -0,0 +1,57 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QTextDecoder (+  aModule,+  c_QTextDecoder,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  mkMethod',+  )+import Foreign.Hoppy.Generator.Types (intT, charT, voidT, constT, objT, ptrT, refT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.QTextCodec (c_QTextCodec)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+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", "QTextDecoder"] $+  [qtExport c_QTextDecoder]++c_QTextDecoder =+  addReqIncludes [ includeStd "QTextDecoder" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QTextDecoder") Nothing [] $+  collect+  [ just $ mkCtor "new" [ptrT $ constT $ objT c_QTextCodec]+   -- TODO QTextDecoder::QTextDecoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags)+  , just $ mkMethod' "toUnicode" "toUnicodeRaw" [ptrT $ constT $ charT, intT] $ objT c_QString+  , just $ mkMethod' "toUnicode" "toUnicodeByteArray" [refT $ constT $ objT c_QByteArray] $ objT c_QString+  , just $ mkMethod' "toUnicode" "toUnicodeString" [ptrT $ objT c_QString, ptrT $ constT $ charT, intT] voidT+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QTextEncoder.hs view
@@ -0,0 +1,60 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QTextEncoder (+  aModule,+  c_QTextEncoder,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  mkMethod',+  )+import Foreign.Hoppy.Generator.Types (intT, constT, objT, ptrT, refT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.QTextCodec (c_QTextCodec) --fl_ConversionFlags)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+-- TODO import Graphics.UI.Qtah.Generator.Interface.Core.QStringView (c_QStringView)+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", "QTextEncoder"] $+  [qtExport c_QTextEncoder]++c_QTextEncoder =+  addReqIncludes [ includeStd "QTextEncoder" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QTextEncoder") Nothing [] $+  collect+  [+    just $ mkCtor "new" [ptrT $ objT c_QTextCodec]+  --, test (qtVersion >= [4, 7]) $ mkCtor "newWithConverFlags" [ptrT $ objT c_QTextCodec, flagsT fl_ConversionFlags]+  --, test (qtVersion >= [5, 10]) $ mkMethod' "fromUnicode" "fromUnicodeWithStringview" [objT c_QStringView] $ objT c_QByteArray+  , just $ mkMethod' "fromUnicode" "fromUnicodeString" [refT $ constT $ objT c_QString] $ objT c_QByteArray+  , just $ mkMethod' "fromUnicode" "fromUnicodeQChar" [ptrT $ constT $ objT c_QChar, intT] $ objT c_QByteArray+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QThread.hs view
@@ -0,0 +1,105 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QThread (+  aModule,+  c_QThread,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod,+  mkMethod',+  mkProp,+  mkStaticMethod,+  np,+  )+import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, uintT, ulongT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listener)+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", "QThread"] $+  qtExport c_QThread :+  map QtExportSignal signals +++  [ qtExport e_Priority+  ]++c_QThread =+  addReqIncludes [includeStd "QThread"] $+  classSetEntityPrefix "" $+  makeClass (ident "QThread") Nothing [c_QObject] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]+    -- TODO eventDispatcher property+  , just $ mkMethod' "exit" "exit" np voidT+  , just $ mkMethod' "exit" "exitWithCode" [intT] voidT+  , just $ mkConstMethod "isFinished" np boolT+  , test (qtVersion >= [5, 2]) $ mkConstMethod "isInterruptionRequested" np boolT+  , just $ mkConstMethod "isRunning" np boolT+  , test (qtVersion >= [5, 5]) $ mkConstMethod "loopLevel" np intT+  , just $ mkProp "priority" $ enumT e_Priority+  , just $ mkMethod "quit" np voidT+  , test (qtVersion >= [5, 2]) $ mkMethod "requestInterruption" np voidT+  , just $ mkProp "stackSize" uintT+  , just $ mkMethod' "start" "start" np voidT+  , just $ mkMethod' "start" "startWithPriority" [enumT e_Priority] voidT+  , just $ mkMethod "terminate" np voidT+  , just $ mkMethod' "wait" "wait" np voidT+  , just $ mkMethod' "wait" "waitWithMillis" [ulongT] voidT++    -- Static methods.+  , just $ mkStaticMethod "currentThread" np $ ptrT $ objT c_QThread+    -- TODO currentThreadId+  , just $ mkStaticMethod "idealThreadCount" np intT+  , just $ mkStaticMethod "msleep" [ulongT] voidT+  , just $ mkStaticMethod "sleep" [ulongT] voidT+  , just $ mkStaticMethod "usleep" [ulongT] voidT+  , just $ mkStaticMethod "yieldCurrentThread" np voidT+  ]++signals =+  [ makeSignal c_QThread "finished" listener+  , makeSignal c_QThread "started" listener+  ]++e_Priority =+  makeQtEnum (ident1 "QThread" "Priority") [includeStd "QThread"]+  [ "IdlePriority"+  , "LowestPriority"+  , "LowPriority"+  , "NormalPriority"+  , "HighPriority"+  , "HighestPriority"+  , "TimeCriticalPriority"+  , "InheritPriority"+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QThread.hs-boot view
@@ -0,0 +1,26 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QThread (+  c_QThread,+  ) where++import Foreign.Hoppy.Generator.Spec (Class)++{-# ANN module "HLint: ignore Use camelCase" #-}++c_QThread :: Class
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QTime.hs view
@@ -0,0 +1,96 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QTime (+  aModule,+  c_QTime,+  ) where++import Foreign.Hoppy.Generator.Spec (+  classSetConversionToGc,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkStaticMethod,+  mkStaticMethod',+  mkCtor,+  mkMethod',+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Comparable, Equatable, Copyable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (boolT, intT, voidT, enumT, constT, objT, refT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_DateFormat)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QTime"] $+  [qtExport c_QTime]++c_QTime =+  addReqIncludes [ includeStd "QTime" ] $+  classSetConversionToGc $+  classAddFeatures [Comparable, Equatable, Copyable] $+  classSetEntityPrefix "" $+  makeClass (ident "QTime") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithHM" [intT, intT]+  , just $ mkCtor "newWithHMS" [intT, intT, intT]+  , just $ mkCtor "newWithHMSMs" [intT, intT, intT, intT]+  , just $ mkConstMethod "addMSecs" [intT] $ objT c_QTime+  , just $ mkConstMethod "addSecs" [intT] $ objT c_QTime+  , just $ mkStaticMethod "currentTime" np $ objT c_QTime+  , just $ mkConstMethod "elapsed" np intT+  , just $ mkStaticMethod "fromMSecsSinceStartOfDay" [intT] $ objT c_QTime+  , just $ mkStaticMethod' "fromString" "fromString" [refT $ constT $ objT c_QString] $ objT c_QTime+  , just $ mkStaticMethod' "fromString" "fromStringWithDateFormat" [refT $ constT $ objT c_QString, enumT e_DateFormat] $ objT c_QTime+  , just $ mkStaticMethod' "fromString" "fromStringWithStringFormat" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] $ objT c_QTime+  , just $ mkConstMethod "hour" np intT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod' "isValid" "isValid" np boolT+  , just $ mkMethod' "isValid" "isValidStatic" [intT, intT, intT] boolT+  , just $ mkMethod' "isValid" "isValidStaticWithMs" [intT, intT, intT, intT] boolT+  , just $ mkConstMethod "minute" np intT+  , just $ mkConstMethod "msec" np intT+  , just $ mkConstMethod "msecsSinceStartOfDay" np intT+  , just $ mkConstMethod "msecsTo" [refT $ constT $ objT c_QTime] intT+  , just $ mkMethod "restart" np intT+  , just $ mkConstMethod "second" np intT+  , just $ mkConstMethod "secsTo" [refT $ constT $ objT c_QTime] intT+  , just $ mkMethod' "setHMS" "setHMS" [intT, intT, intT ] boolT+  , just $ mkMethod' "setHMS" "setHMSWithMs" [intT, intT, intT, intT] boolT+  , just $ mkMethod "start" np voidT+  , just $ mkConstMethod' "toString" "toString" np $ objT c_QString+  , just $ mkConstMethod' "toString" "toStringWithDateFormat" [enumT e_DateFormat] $ objT c_QString+  , just $ mkConstMethod' "toString" "toStringWithStringFormat" [objT c_QString] $ objT c_QString+  --, just $ mkMethod OpShl [refT $ objT c_QDataStream, refT $ objT c_QTime] $ refT $ objT c_QDataStream+  --, just $ mkMethod OpShr [refT $ objT c_QDataStream, refT $ objT c_QTime] $ refT $ objT c_QDataStream+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QTimeZone.hs view
@@ -0,0 +1,142 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QTimeZone (+  aModule,+  c_QTimeZone,+  e_NameType,+  e_TimeType,+  --e_anonymous,+  ) where++import Foreign.Hoppy.Generator.Spec (+  classSetConversionToGc,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkStaticMethod,+  mkStaticMethod',+  mkCtor,+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (boolT, intT, voidT, enumT, constT, objT, refT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQByteArray)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import {-#SOURCE#-} Graphics.UI.Qtah.Generator.Interface.Core.QDateTime (c_QDateTime)+--import Graphics.UI.Qtah.Generator.Interface.Core.QLocale (c_QLocale, e_Country)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QTimeZone"] [5, 2] $+  collect+  [ just $ qtExport c_QTimeZone+  , just $ qtExport e_NameType+  , just $ qtExport e_TimeType+  --, just $ qtExport e_anonymous+  ]++c_QTimeZone =+  addReqIncludes [ includeStd "QTimeZone" ] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable] $+  classSetEntityPrefix "" $+  makeClass (ident "QTimeZone") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newFull1" [refT $ constT $ objT c_QByteArray, intT, refT $ constT $ objT c_QString, refT $ constT $ objT c_QString]+  --, just $ mkCtor "newFull2" [refT $ constT $ objT c_QByteArray, intT, refT $ constT $ objT c_QString, refT $ constT $ objT c_QString, enumT e_Country]+  --, just $ mkCtor "newFull3" [refT $ constT $ objT c_QByteArray, intT, refT $ constT $ objT c_QString, refT $ constT $ objT c_QString, enumT e_Country, refT $ constT $ objT c_QString]+  , just $ mkCtor "newWithOffset" [intT]+  , just $ mkCtor "newWithByteArray" [refT $ constT $ objT c_QByteArray]+  , just $ mkConstMethod "abbreviation" [refT $ constT $ objT c_QDateTime] $ objT c_QString+  , just $ mkStaticMethod' "availableTimeZoneIds" "availableTimeZoneIds" np $ objT c_QListQByteArray+  -- just $ mkStaticMethod' "availableTimeZoneIds" "availableTimeZoneIdsWithCountry" [enumT e_Country] $ objT c_QListQByteArray+  , just $ mkStaticMethod' "availableTimeZoneIds" "availableTimeZoneIdsWithOffset" [intT] $ objT c_QListQByteArray+  , just $ mkConstMethod "comment" np $ objT c_QString+  --, just $ mkConstMethod "country" np $ enumT e_Country+  , just $ mkConstMethod "daylightTimeOffset" [refT $ constT $ objT c_QDateTime] intT+  , just $ mkConstMethod' "displayName" "displayNameWithDateTime" [refT $ constT $ objT c_QDateTime] $ objT c_QString+  , just $ mkConstMethod' "displayName" "displayNameWithDateTimeAndNameType" [refT $ constT $ objT c_QDateTime, enumT e_NameType] $ objT c_QString+  -- just $ mkConstMethod' "displayName" "displayNameQLocale" [refT $ constT $ objT c_QDateTime, enumT e_NameType, refT $ constT $ objT c_QLocale] $ objT c_QString+  , just $ mkConstMethod' "displayName" "displayNameWithTimeType" [enumT e_TimeType] $ objT c_QString+  , just $ mkConstMethod' "displayName" "displayNameWithTimeTypeAndNameType" [enumT e_TimeType, enumT e_NameType] $ objT c_QString+  -- just $ mkConstMethod' "displayName" "displayNameTimeNameQLocale" [enumT e_TimeType, enumT e_NameType, refT $ constT $ objT c_QLocale] $ objT c_QString+  --, test (qtVersion >= [5, 9]) $ mkStaticMethod "fromCFTimeZone" [objT c_CFTimeZoneRef] $ objT c_QTimeZone+  --, test (qtVersion >= [5, 9]) $ mkStaticMethod "fromNSTimeZone" [ptrT $ constT $ objT c_NSTimeZone] $ objT c_QTimeZone+  , just $ mkConstMethod "hasDaylightTime" np boolT+  , just $ mkConstMethod "hasTransitions" np boolT+  , just $ mkStaticMethod "ianaIdToWindowsId" [refT $ constT $ objT c_QByteArray] $ objT c_QByteArray+  , just $ mkConstMethod "id" np $ objT c_QByteArray+  , just $ mkConstMethod "isDaylightTime" [refT $ constT $ objT c_QDateTime] boolT+  , just $ mkStaticMethod "isTimeZoneIdAvailable" [refT $ constT $ objT c_QByteArray] boolT+  , just $ mkConstMethod "isValid" np boolT+  -- TODO QTimeZone::OffsetData QTimeZone::nextTransition(const QDateTime &afterDateTime) const+  -- TODO QTimeZone::OffsetData QTimeZone::offsetData(const QDateTime &forDateTime) const+  , just $ mkConstMethod "offsetFromUtc" [refT $ constT $ objT c_QDateTime] intT+  -- TODO QTimeZone::OffsetData QTimeZone::previousTransition(const QDateTime &beforeDateTime) const+  , just $ mkConstMethod "standardTimeOffset" [refT $ constT $ objT c_QDateTime] intT+  , just $ mkMethod "swap" [refT $ objT c_QTimeZone] voidT+  , test (qtVersion >= [5, 5]) $ mkStaticMethod "systemTimeZone" np $ objT c_QTimeZone+  , just $ mkStaticMethod "systemTimeZoneId" np $ objT c_QByteArray+  --, test (qtVersion >= [5, 9]) $ mkConstMethod "toCFTimeZone" np $ objT c_CFTimeZoneRef+  --, test (qtVersion >= [5, 9]) $ mkConstMethod "toNSTimeZone" np $ ptrT $ objT c_NSTimeZone+  -- TODO QTimeZone::OffsetDataList QTimeZone::transitions(const QDateTiacvme &fromDateTime, const QDateTime &toDateTime) const+  , test (qtVersion >= [5, 5]) $ mkStaticMethod "utc" np $ objT c_QTimeZone+  , just $ mkStaticMethod "windowsIdToDefaultIanaId" [refT $ constT $ objT c_QByteArray] $ objT c_QByteArray+  --, just $ mkStaticMethod "windowsIdToDefaultIanaId" [refT $ constT $ objT c_QByteArray, enumT e_Country] $ objT c_QByteArray+  , just $ mkStaticMethod' "windowsIdToIanaIds" "windowsIdToIanaIds" [refT $ constT $ objT c_QByteArray] $ objT c_QListQByteArray+  --, just $ mkStaticMethod' "windowsIdToIanaIds" "windowsIdToIanaIdsWithCountry" [refT $ constT $ objT c_QByteArray, enumT e_Country] $ objT c_QListQByteArray+  ]++e_NameType =+  makeQtEnum (ident1 "QTimeZone" "NameType") [includeStd "QTimeZone"]+  [ "DefaultName"+  , "LongName"+  , "ShortName"+  , "OffsetName"+  ]++e_TimeType =+  makeQtEnum (ident1 "QTimeZone" "TimeType") [includeStd "QTimeZone"]+  [ "StandardTime"+  , "DaylightTime"+  , "GenericTime"+  ]++-- TODO Enum autodetection doesn't like this enum.+--e_anonymous =+--  makeQtEnum (ident1 "QTimeZone" "anonymous") [includeStd "QTimeZone"]+--  [ "MinUtcOffsetSecs"+--  , "MaxUtcOffsetSecs"+--  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QTimer.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export(ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -30,11 +29,12 @@   mkMethod,   mkConstMethod,   mkCtor,+  np,   ) 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.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (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@@ -44,7 +44,7 @@ aModule =   AQtModule $   makeQtModule ["Core", "QTimer"]-  [ QtExport $ ExportClass c_QTimer+  [ qtExport c_QTimer   , QtExportSignal s_timeout   ] @@ -53,20 +53,20 @@   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 $ mkCtor "new" np+  , just $ mkConstMethod "interval" np intT+  -- , just $ mkConstMethod "intervalAsDuration" np $ objT c_std::chrono::milliseconds+  , just $ mkConstMethod "isActive" np boolT+  , just $ mkConstMethod "isSingleShot" np boolT+  , test (qtVersion >= [5, 0]) $ mkConstMethod "remainingTime" np intT+  -- , just $ mkConstMethod "remainingTimeAsDuration" np $ 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+  , just $ mkConstMethod "timerId" np intT+  -- , just $ mkConstMethod "timerType" np $ objT c_Qt::TimerType   ] -s_timeout = makeSignal c_QTimer "timeout" c_Listener+s_timeout = makeSignal c_QTimer "timeout" listener
src/Graphics/UI/Qtah/Generator/Interface/Core/QTimerEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,6 +27,7 @@   makeClass,   mkConstMethod,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (intT) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent)@@ -46,5 +47,5 @@   classSetEntityPrefix "" $   makeClass (ident "QTimerEvent") Nothing [c_QEvent]   [ mkCtor "new" [intT]-  , mkConstMethod "timerId" [] intT+  , mkConstMethod "timerId" np intT   ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QTranslator.hs view
@@ -0,0 +1,81 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QTranslator (+  aModule,+  c_QTranslator,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkCtor,+  mkMethod',+  np,+  )+import Foreign.Hoppy.Generator.Types (+  boolT,+  constT,+  intT,+  objT,+  ptrT,+  ucharT,+  charT,+  )+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+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", "QTranslator"]+  [ qtExport c_QTranslator ]++c_QTranslator =+  addReqIncludes [ includeStd "QTranslator" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QTranslator") Nothing [c_QObject] $+  collect+  [+    just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]+  , just $ mkConstMethod "isEmpty" np boolT++  , just $ mkMethod' "load" "loadWith" [objT c_QString] boolT+  , just $ mkMethod' "load" "loadWithDir" [objT c_QString, objT c_QString] boolT+  , just $ mkMethod' "load" "loadWithDirAndDelimiters" [objT c_QString, objT c_QString, objT c_QString] boolT+  , just $ mkMethod' "load" "loadWithDirAndDelimitersAndSuffix" [objT c_QString, objT c_QString, objT c_QString, objT c_QString] boolT++  -- TODO bool QTranslator::load(const QLocale &locale, const QString &filename, const QString &prefix = QString(), const QString &directory = QString(), const QString &suffix = QString())++  , just $ mkMethod' "load" "loadFromPtrConstUchar" [ptrT $ constT ucharT, intT] boolT+  , just $ mkMethod' "load" "loadFromPtrConstUcharAndDir" [ptrT $ constT ucharT, intT, objT c_QString] boolT++    -- TODO QString wrappers here.+  , just $ mkConstMethod' "translate" "translate" [ptrT $ constT charT, ptrT $ constT charT] $ objT c_QString+  , just $ mkConstMethod' "translate" "translateWithDisambiguation" [ptrT $ constT charT, ptrT $ constT charT, ptrT $ constT charT] $ objT c_QString+  , just $ mkConstMethod' "translate" "translateWithDisambiguationAndNum" [ptrT $ constT charT, ptrT $ constT charT, ptrT $ constT charT, intT] $ objT c_QString+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QVariant.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,10 +18,10 @@ module Graphics.UI.Qtah.Generator.Interface.Core.QVariant (   aModule,   c_QVariant,+  e_Type,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   classSetConversionToGc,@@ -34,6 +34,7 @@   mkCtor,   mkMethod,   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Comparable, Copyable, Equatable),@@ -53,7 +54,7 @@   voidT,   ) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray) import Graphics.UI.Qtah.Generator.Interface.Core.QChar (c_QChar) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQVariant)@@ -73,8 +74,8 @@ aModule =   AQtModule $   makeQtModule ["Core", "QVariant"]-  [ QtExport $ ExportClass c_QVariant-  , QtExport $ ExportEnum e_Type+  [ qtExport c_QVariant+  , qtExport e_Type   ]  -- TODO Many more data types needed here.@@ -90,7 +91,7 @@   classSetEntityPrefix "" $   makeClass (ident "QVariant") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithBool" [boolT]   , just $ mkCtor "newWithByteArray" [objT c_QByteArray]   , just $ mkCtor "newWithChar" [objT c_QChar]@@ -114,10 +115,10 @@   , just $ mkCtor "newWithUInt" [uintT]   , just $ mkCtor "newWithULongLong" [ullongT]   , just $ mkConstMethod "canConvert" [enumT e_Type] boolT-  , just $ mkMethod "clear" [] voidT+  , just $ mkMethod "clear" np voidT   , just $ mkMethod "convert" [enumT e_Type] boolT-  , just $ mkConstMethod "isNull" [] boolT-  , just $ mkConstMethod "isValid" [] boolT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "isValid" np boolT   , just $ mkMethod' "setValue" "setToBool" [boolT] voidT   , just $ mkMethod' "setValue" "setToChar" [objT c_QChar] voidT   , just $ mkMethod' "setValue" "setToDouble" [doubleT] voidT@@ -136,84 +137,84 @@   , just $ mkMethod' "setValue" "setToUInt" [uintT] voidT   , just $ mkMethod' "setValue" "setToULongLong" [ullongT] voidT   , test (qtVersion >= [4, 8]) $ mkMethod' "setValue" "swap" [refT $ objT c_QVariant] voidT-  , just $ mkConstMethod "toBool" [] boolT-  , just $ mkConstMethod "toByteArray" [] (objT c_QByteArray)-  , just $ mkConstMethod "toChar" [] $ objT c_QChar-  , just $ mkConstMethod "toDouble" [] doubleT-  , test (qtVersion >= [4, 6]) $ mkConstMethod "toFloat" [] floatT-  , just $ mkConstMethod "toInt" [] intT-  , just $ mkConstMethod "toLongLong" [] llongT-  , just $ mkConstMethod "toPoint" [] $ objT c_QPoint-  , just $ mkConstMethod "toPointF" [] $ objT c_QPointF-  , just $ mkConstMethod "toRect" [] $ objT c_QRect-  , just $ mkConstMethod "toRectF" [] $ objT c_QRectF-  , just $ mkConstMethod "toSize" [] $ objT c_QSize-  , just $ mkConstMethod "toSizeF" [] $ objT c_QSizeF-  , just $ mkConstMethod "toList" [] $ objT c_QListQVariant-  , just $ mkConstMethod "toStringList" [] $ objT c_QStringList-  , just $ mkConstMethod "toString" [] $ objT c_QString-  , just $ mkConstMethod "toUInt" [] uintT-  , just $ mkConstMethod "toULongLong" [] ullongT+  , just $ mkConstMethod "toBool" np boolT+  , just $ mkConstMethod "toByteArray" np (objT c_QByteArray)+  , just $ mkConstMethod "toChar" np $ objT c_QChar+  , just $ mkConstMethod "toDouble" np doubleT+  , test (qtVersion >= [4, 6]) $ mkConstMethod "toFloat" np floatT+  , just $ mkConstMethod "toInt" np intT+  , just $ mkConstMethod "toLongLong" np llongT+  , just $ mkConstMethod "toPoint" np $ objT c_QPoint+  , just $ mkConstMethod "toPointF" np $ objT c_QPointF+  , just $ mkConstMethod "toRect" np $ objT c_QRect+  , just $ mkConstMethod "toRectF" np $ objT c_QRectF+  , just $ mkConstMethod "toSize" np $ objT c_QSize+  , just $ mkConstMethod "toSizeF" np $ objT c_QSizeF+  , just $ mkConstMethod "toList" np $ objT c_QListQVariant+  , just $ mkConstMethod "toStringList" np $ objT c_QStringList+  , just $ mkConstMethod "toString" np $ objT c_QString+  , just $ mkConstMethod "toUInt" np uintT+  , just $ mkConstMethod "toULongLong" np ullongT   , -- Have to rename this, because "type" is reserved in Haskell.-    just $ mkConstMethod' "type" "getType" [] $ enumT e_Type-  , just $ mkConstMethod "userType" [] intT+    just $ mkConstMethod' "type" "getType" np $ enumT e_Type+  , just $ mkConstMethod "userType" np intT   ]  e_Type =   makeQtEnum (ident1 "QVariant" "Type") [includeStd "QVariant"]-  [ (0, ["invalid"])-  , (13, ["bit", "array"])-  , (73, ["bitmap"])-  , (1, ["bool"])-  , (66, ["brush"])-  , (12, ["byte", "array"])-  , (7, ["char"])-  , (67, ["color"])-  , (74, ["cursor"])-  , (14, ["date"])-  , (16, ["date", "time"])-  , (6, ["double"])-  , (29, ["easing", "curve"])-  , (64, ["font"])-  , (28, ["hash"])-  , (69, ["icon"])-  , (70, ["image"])-  , (2, ["int"])-  , (76, ["key", "sequence"])-  , (23, ["line"])-  , (24, ["line", "f"])-  , (9, ["list"])-  , (18, ["locale"])-  , (4, ["long", "long"])-  , (8, ["map"])-  , (80, ["matrix"])-  , (81, ["transform"])-  , (82, ["matrix", "4x4"])-  , (68, ["palette"])-  , (77, ["pen"])-  , (65, ["pixmap"])-  , (25, ["point"])+  [ "Invalid"+  , "BitArray"+  , "Bitmap"+  , "Bool"+  , "Brush"+  , "ByteArray"+  , "Char"+  , "Color"+  , "Cursor"+  , "Date"+  , "DateTime"+  , "Double"+  , "EasingCurve"+  , "Font"+  , "Hash"+  , "Icon"+  , "Image"+  , "Int"+  , "KeySequence"+  , "Line"+  , "LineF"+  , "List"+  , "Locale"+  , "LongLong"+  , "Map"+  , "Matrix"+  , "Transform"+  , "Matrix4x4"+  , "Palette"+  , "Pen"+  , "Pixmap"+  , "Point"     -- PointArray omitted -- same value as Polygon.-  , (26, ["point", "f"])-  , (71, ["polygon"])-  , (86, ["quaternion"])-  , (19, ["rect"])-  , (20, ["rect", "f"])-  , (27, ["reg", "exp"])-  , (72, ["region"])-  , (21, ["size"])-  , (22, ["size", "f"])-  , (75, ["size", "policy"])-  , (10, ["string"])-  , (11, ["string", "list"])-  , (79, ["text", "format"])-  , (78, ["text", "length"])-  , (15, ["time"])-  , (3, ["u", "int"])-  , (5, ["u", "long", "long"])-  , (17, ["url"])-  , (83, ["vector", "2d"])-  , (84, ["vector", "3d"])-  , (85, ["vector", "4d"])-  , (127, ["user", "type"])+  , "PointF"+  , "Polygon"+  , "Quaternion"+  , "Rect"+  , "RectF"+  , "RegExp"+  , "Region"+  , "Size"+  , "SizeF"+  , "SizePolicy"+  , "String"+  , "StringList"+  , "TextFormat"+  , "TextLength"+  , "Time"+  , "UInt"+  , "ULongLong"+  , "Url"+  , "Vector2D"+  , "Vector3D"+  , "Vector4D"+  , "UserType"   ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QVariant.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,8 +17,11 @@  module Graphics.UI.Qtah.Generator.Interface.Core.QVariant (   c_QVariant,+  e_Type,   ) where -import Foreign.Hoppy.Generator.Spec (Class)+import Foreign.Hoppy.Generator.Spec (Class, CppEnum)  c_QVariant :: Class++e_Type :: CppEnum
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QVariantAnimation.hs view
@@ -0,0 +1,68 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QVariantAnimation (+  aModule,+  c_QVariantAnimation,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkMethod,+  mkProp,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractAnimation (c_QAbstractAnimation)+import Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant)+import Foreign.Hoppy.Generator.Types (voidT, constT, objT, refT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerRefConstQVariant)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QVariantAnimation"] [4, 6] $+  (qtExport c_QVariantAnimation) :+  map QtExportSignal signals++c_QVariantAnimation =+  addReqIncludes [ includeStd "QVariantAnimation" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QVariantAnimation") Nothing [c_QAbstractAnimation] $+  collect+  [ just $ mkProp "endValue" $ objT c_QVariant+  , just $ mkProp "startValue" $ objT c_QVariant+  , just $ mkConstMethod "keyValueAt" [qreal] $ objT c_QVariant+  -- TODO QVariantAnimation::KeyValues QVariantAnimation::keyValues() const+  , just $ mkMethod "setKeyValueAt" [qreal, refT $ constT $ objT c_QVariant] voidT+  -- TODO just $ mkMethod "setKeyValueAt" [qreal, refT $ constT $ objT c_QVariant] $ voidT+    -- TODO Other methods.+  ]++signals :: [Signal]+signals =+  collect+  [ just $ makeSignal c_QVariantAnimation "valueChanged" listenerRefConstQVariant+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/QVector.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,8 +15,6 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- -- | Bindings for @QVector@. module Graphics.UI.Qtah.Generator.Interface.Core.QVector (   -- * Template@@ -26,15 +24,19 @@   -- * Instantiations   allModules,   c_QVectorInt,+  c_QVectorQLatin1String,   c_QVectorQPoint,   c_QVectorQPointF,   c_QVectorQRgb,+  c_QVectorQString,+  c_QVectorUInt,+  c_QVectorQXmlStreamAttribute,+  c_QVectorQXmlStreamEntityDeclaration,+  c_QVectorQXmlStreamNamespaceDeclaration,+  c_QVectorQXmlStreamNotationDeclaration,   ) where  import Control.Monad (forM_, when)-#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat, mempty)-#endif import Foreign.Hoppy.Generator.Language.Haskell (   HsTypeSide (HsHsSide),   addImports,@@ -44,13 +46,10 @@   prettyPrint,   sayLn,   saysLn,-  toHsClassEntityName',-  toHsDataTypeName,   ) import Foreign.Hoppy.Generator.Spec (   Class,   Constness (Const, Nonconst),-  Export (ExportClass),   Operator (OpAdd, OpArray),   Reqs,   Type,@@ -68,21 +67,34 @@   mkCtor,   mkMethod,   mkMethod',+  np,   reqInclude,   toExtName,   )+import Foreign.Hoppy.Generator.Spec.Class (+  toHsClassEntityName',+  toHsDataTypeName,+  ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable),   classAddFeatures,   )-import Foreign.Hoppy.Generator.Types (boolT, constT, intT, objT, ptrT, refT, toGcT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, constT, intT, objT, ptrT, refT, toGcT, voidT, uintT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (Version, 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.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QLatin1String (c_QLatin1String)+import Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamAttribute (c_QXmlStreamAttribute)+import Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamEntityDeclaration (c_QXmlStreamEntityDeclaration)+import Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamNamespaceDeclaration (c_QXmlStreamNamespaceDeclaration)+import Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamNotationDeclaration (c_QXmlStreamNotationDeclaration) 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.Module (+  AModule (AQtModule), QtModule, makeQtModule, makeQtModuleWithMinVersion,+  ) import Graphics.UI.Qtah.Generator.Types  -- | Options for instantiating the vector classes.@@ -124,34 +136,34 @@         classSetEntityPrefix "" $         makeClass (identT "QVector" [t]) (Just $ toExtName vectorName) [] $         collect-        [ just $ mkCtor "new" []+        [ just $ mkCtor "new" np         , just $ mkCtor "newWithSize" [intT]         , just $ mkCtor "newWithSizeAndValue" [intT, t]         , just $ mkMethod' "append" "append" [t] voidT         , test (qtVersion >= [5, 5]) $ mkMethod' "append" "appendVector" [objT vector] voidT         , just $ mkMethod' OpArray "at" [intT] $ refT t         , just $ mkConstMethod' "at" "atConst" [intT] $ refT $ constT t-        , just $ mkConstMethod "capacity" [] intT+        , just $ mkConstMethod "capacity" np intT           -- OMIT back           -- OMIT begin           -- OMIT cbegin           -- OMIT cend-        , just $ mkMethod "clear" [] voidT+        , just $ mkMethod "clear" np voidT           -- OMIT constBegin           -- OMIT constData           -- OMIT constEnd         , just $ mkConstMethod "contains" [t] boolT           -- OMIT count()         , just $ mkConstMethod "count" [t] intT-        , just $ mkMethod' "data" "array" [] $ ptrT t-        , just $ mkConstMethod' "data" "arrayConst" [] $ ptrT $ constT t+        , just $ mkMethod' "data" "array" np $ ptrT t+        , just $ mkConstMethod' "data" "arrayConst" np $ ptrT $ constT t           -- OMIT empty         , test (qtVersion >= [4, 5]) $ mkConstMethod "endsWith" [t] boolT           -- OMIT erase         , just $ mkMethod' "fill" "fill" [t] voidT         , just $ mkMethod' "fill" "fillResize" [t, intT] voidT-        , just $ mkMethod' "first" "first" [] $ refT t-        , just $ mkConstMethod' "first" "firstConst" [] $ refT $ constT t+        , just $ mkMethod' "first" "first" np $ refT t+        , just $ mkConstMethod' "first" "firstConst" np $ refT $ constT t           -- TODO fromList           -- TODO fromStdVector           -- OMIT front@@ -160,9 +172,9 @@         , just $ mkConstMethod' "indexOf" "indexOfFrom" [t, intT] intT         , just $ mkMethod' "insert" "insert" [intT, t] voidT         , just $ mkMethod' "insert" "insertMany" [intT, intT, t] voidT-        , just $ mkConstMethod "isEmpty" [] boolT-        , just $ mkMethod' "last" "last" [] $ refT t-        , just $ mkConstMethod' "last" "lastConst" [] $ refT $ constT t+        , just $ mkConstMethod "isEmpty" np boolT+        , just $ mkMethod' "last" "last" np $ refT t+        , just $ mkConstMethod' "last" "lastConst" np $ refT $ constT t         , just $ mkConstMethod' "lastIndexOf" "lastIndexOf" [t] intT         , just $ mkConstMethod' "lastIndexOf" "lastIndexOfFrom" [t, intT] intT           -- OMIT length@@ -177,19 +189,19 @@         , just $ mkMethod' "remove" "removeMany" [intT, intT] voidT         , test (qtVersion >= [5, 4]) $ mkMethod "removeAll" [t] intT           -- OMIT removeAt-        , test (qtVersion >= [5, 1]) $ mkMethod "removeFirst" [] voidT-        , test (qtVersion >= [5, 1]) $ mkMethod "removeLast" [] voidT+        , test (qtVersion >= [5, 1]) $ mkMethod "removeFirst" np voidT+        , test (qtVersion >= [5, 1]) $ mkMethod "removeLast" np voidT         , test (qtVersion >= [5, 4]) $ mkMethod "removeOne" [t] boolT         , just $ mkMethod "replace" [intT, t] voidT         , just $ mkMethod "reserve" [intT] voidT         , just $ mkMethod "resize" [intT] voidT-        , just $ mkConstMethod "size" [] intT-        , just $ mkMethod "squeeze" [] voidT+        , just $ mkConstMethod "size" np intT+        , just $ mkMethod "squeeze" np voidT         , test (qtVersion >= [4, 5]) $ mkConstMethod "startsWith" [t] boolT         , test (qtVersion >= [4, 8]) $ mkMethod "swap" [refT $ objT vector] voidT         , test (qtVersion >= [5, 2]) $ mkMethod "takeAt" [intT] t-        , test (qtVersion >= [5, 1]) $ mkMethod "takeFirst" [] t-        , test (qtVersion >= [5, 1]) $ mkMethod "takeLast" [] t+        , test (qtVersion >= [5, 1]) $ mkMethod "takeFirst" np t+        , test (qtVersion >= [5, 1]) $ mkMethod "takeLast" np t           -- TODO toList           -- TODO toStdVector         , just $ mkConstMethod' "value" "value" [intT] t@@ -246,18 +258,31 @@ -- | Converts an instantiation into a list of exports to be included in a -- module. toExports :: Contents -> [QtExport]-toExports m = [QtExport $ ExportClass $ c_QVector m]+toExports m = [qtExport $ c_QVector m]  createModule :: String -> Contents -> QtModule-createModule name contents = makeQtModule ["Core", "QVector", name] $ toExports contents+createModule name contents =+  makeQtModule ["Core", "QVector", name] $ toExports contents +createModuleWithMinVersion :: String -> Version -> Contents -> QtModule+createModuleWithMinVersion name version contents =+  makeQtModuleWithMinVersion ["Core", "QVector", name] version $+  toExports contents+ allModules :: [AModule] allModules =   map AQtModule   [ qmod_Int+  , qmod_QLatin1String   , qmod_QPoint   , qmod_QPointF   , qmod_QRgb+  , qmod_QString+  , qmod_UInt+  , qmod_QXmlStreamAttribute+  , qmod_QXmlStreamEntityDeclaration+  , qmod_QXmlStreamNamespaceDeclaration+  , qmod_QXmlStreamNotationDeclaration   ]  qmod_Int :: QtModule@@ -269,6 +294,20 @@ c_QVectorInt :: Class c_QVectorInt = c_QVector contents_Int +qmod_QLatin1String :: QtModule+qmod_QLatin1String =+  -- QVector requires value_type to be default-constructible, but QLatin1String+  -- is default-constructible since 5.6 only+  createModuleWithMinVersion "QLatin1String" [5, 6] contents_QLatin1String++contents_QLatin1String :: Contents+contents_QLatin1String = instantiate "QVectorQLatin1String" (objT c_QLatin1String) mempty++-- | QVector requires value_type to be default-constructible, but QLatin1String+-- is default-constructible since 5.6 only+c_QVectorQLatin1String :: Class+c_QVectorQLatin1String = c_QVector contents_QLatin1String+ qmod_QPoint :: QtModule qmod_QPoint = createModule "QPoint" contents_QPoint @@ -295,3 +334,57 @@  c_QVectorQRgb :: Class c_QVectorQRgb = c_QVector contents_QRgb++qmod_QString :: QtModule+qmod_QString = createModule "QString" contents_QString++contents_QString :: Contents+contents_QString = instantiate "QVectorQString" (objT c_QString) mempty++c_QVectorQString :: Class+c_QVectorQString = c_QVector contents_QString++qmod_UInt :: QtModule+qmod_UInt = createModule "UInt" contents_UInt++contents_UInt :: Contents+contents_UInt = instantiate "QVectorUInt" uintT mempty++c_QVectorUInt :: Class+c_QVectorUInt = c_QVector contents_UInt++qmod_QXmlStreamAttribute :: QtModule+qmod_QXmlStreamAttribute = createModule "QXmlStreamAttribute" contents_QXmlStreamAttribute++contents_QXmlStreamAttribute :: Contents+contents_QXmlStreamAttribute = instantiate "QVectorQXmlStreamAttribute" (objT c_QXmlStreamAttribute) mempty++c_QVectorQXmlStreamAttribute :: Class+c_QVectorQXmlStreamAttribute = c_QVector contents_QXmlStreamAttribute++qmod_QXmlStreamEntityDeclaration :: QtModule+qmod_QXmlStreamEntityDeclaration = createModule "QXmlStreamEntityDeclaration" contents_QXmlStreamEntityDeclaration++contents_QXmlStreamEntityDeclaration :: Contents+contents_QXmlStreamEntityDeclaration = instantiate "QVectorQXmlStreamEntityDeclaration" (objT c_QXmlStreamEntityDeclaration) mempty++c_QVectorQXmlStreamEntityDeclaration :: Class+c_QVectorQXmlStreamEntityDeclaration = c_QVector contents_QXmlStreamEntityDeclaration++qmod_QXmlStreamNamespaceDeclaration :: QtModule+qmod_QXmlStreamNamespaceDeclaration = createModule "QXmlStreamNamespaceDeclaration" contents_QXmlStreamNamespaceDeclaration++contents_QXmlStreamNamespaceDeclaration :: Contents+contents_QXmlStreamNamespaceDeclaration = instantiate "QVectorQQXmlStreamNamespaceDeclaration" (objT c_QXmlStreamNamespaceDeclaration) mempty++c_QVectorQXmlStreamNamespaceDeclaration :: Class+c_QVectorQXmlStreamNamespaceDeclaration = c_QVector contents_QXmlStreamNamespaceDeclaration++qmod_QXmlStreamNotationDeclaration :: QtModule+qmod_QXmlStreamNotationDeclaration = createModule "QXmlStreamNotationDeclaration" contents_QXmlStreamNotationDeclaration++contents_QXmlStreamNotationDeclaration :: Contents+contents_QXmlStreamNotationDeclaration = instantiate "QVectorQXmlStreamNotationDeclaration" (objT c_QXmlStreamNotationDeclaration) mempty++c_QVectorQXmlStreamNotationDeclaration :: Class+c_QVectorQXmlStreamNotationDeclaration = c_QVector contents_QXmlStreamNotationDeclaration
src/Graphics/UI/Qtah/Generator/Interface/Core/QVector.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,8 +17,38 @@  module Graphics.UI.Qtah.Generator.Interface.Core.QVector (   c_QVectorInt,+  c_QVectorQLatin1String,+  c_QVectorQPoint,+  c_QVectorQPointF,+  c_QVectorQRgb,+  c_QVectorQString,+  c_QVectorUInt,+  c_QVectorQXmlStreamAttribute,+  c_QVectorQXmlStreamEntityDeclaration,+  c_QVectorQXmlStreamNamespaceDeclaration,+  c_QVectorQXmlStreamNotationDeclaration,   ) where  import Foreign.Hoppy.Generator.Spec (Class)  c_QVectorInt :: Class++c_QVectorQLatin1String :: Class++c_QVectorQPoint :: Class++c_QVectorQPointF :: Class++c_QVectorQRgb :: Class++c_QVectorQString :: Class++c_QVectorUInt :: Class++c_QVectorQXmlStreamAttribute :: Class++c_QVectorQXmlStreamEntityDeclaration :: Class++c_QVectorQXmlStreamNamespaceDeclaration :: Class++c_QVectorQXmlStreamNotationDeclaration :: Class
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QVersionNumber.hs view
@@ -0,0 +1,86 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QVersionNumber (+  aModule,+  c_QVersionNumber,+  ) where++import Foreign.Hoppy.Generator.Spec (+  classSetConversionToGc,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkStaticMethod,+  mkStaticMethod',+  mkCtor,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Comparable, Copyable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (toGcT, boolT, intT, constT, objT, refT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.QVector (c_QVectorInt)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QVersionNumber"] [5, 6] $+  [qtExport c_QVersionNumber]++c_QVersionNumber =+  addReqIncludes [ includeStd "QVersionNumber" ] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Comparable, Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QVersionNumber") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithVector" [refT $ objT c_QVectorInt]+  , just $ mkCtor "newWithMajor" [intT]+  , just $ mkCtor "newWithMajorMinor" [intT, intT]+  , just $ mkCtor "newWithMajorMinorMicro" [intT, intT, intT]+  , just $ mkStaticMethod "commonPrefix" [refT $ constT $ objT c_QVersionNumber, refT $ constT $ objT c_QVersionNumber] $ objT c_QVersionNumber+  , just $ mkStaticMethod "compare" [refT $ constT $ objT c_QVersionNumber, refT $ constT $ objT c_QVersionNumber] intT+  , just $ mkStaticMethod' "fromString" "fromString" [refT $ constT $ objT c_QString] $ objT c_QVersionNumber+    -- TODO Use a pair to return the suffix index:+  --, just $ mkStaticMethod' "fromString" "fromStringWithSuffIndex" [refT $ constT $ objT c_QString, ptrT intT] $ objT c_QVersionNumber+  --, test (qtVersion >= [5, 10]) $ mkStaticMethod' "fromString" "fromStringWithQLatin" [objT c_QLatin1String] $ objT c_QVersionNumber+  --, test (qtVersion >= [5, 10]) $ mkStaticMethod' "fromString" "fromStringWithQLatinSuffIndex" [objT c_QLatin1String, ptrT intT] $ objT c_QVersionNumber+  --, test (qtVersion >= [5, 10]) $ mkStaticMethod' "fromString" "fromStringWithQStringView" [objT c_QStringView] $ objT c_QVersionNumber+  --, test (qtVersion >= [5, 10]) $ mkStaticMethod' "fromString" "fromStringWithQStringViewSuffIndex" [objT c_QStringView, ptrT intT] $ objT c_QVersionNumber+  , just $ mkConstMethod "isNormalized" np boolT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "isPrefixOf" [refT $ constT $ objT c_QVersionNumber] boolT+  , just $ mkConstMethod "majorVersion" np intT+  , just $ mkConstMethod "microVersion" np intT+  , just $ mkConstMethod "minorVersion" np intT+  , just $ mkConstMethod "normalized" np $ objT c_QVersionNumber+  , just $ mkConstMethod "segmentAt" [intT] intT+  , just $ mkConstMethod "segmentCount" np intT+  , just $ mkConstMethod "segments" np $ toGcT $ objT c_QVectorInt+  , just $ mkConstMethod "toString" np $ objT c_QString+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QXmlStreamAttribute.hs view
@@ -0,0 +1,68 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QXmlStreamAttribute (+  aModule,+  c_QXmlStreamAttribute,+  ) where++import Foreign.Hoppy.Generator.Spec (+  classSetConversionToGc,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Copyable, Assignable, Equatable),+  classAddFeatures,+  )+--import Graphics.UI.Qtah.Generator.Interface.Core.QStringRef (c_QStringRef)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Foreign.Hoppy.Generator.Types (boolT, constT, objT, refT)+import Foreign.Hoppy.Generator.Version (just, collect)+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", "QXmlStreamAttribute"] $+  [qtExport c_QXmlStreamAttribute]++c_QXmlStreamAttribute =+  addReqIncludes [ includeStd "QXmlStreamAttribute" ] $+  classSetConversionToGc $+  classAddFeatures [Copyable, Assignable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QXmlStreamAttribute") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithQualifiedNameAndValue" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString]+  , just $ mkCtor "newWithNamespaceUriAndNameAndValue" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString, refT $ constT $ objT c_QString]+  , just $ mkConstMethod "isDefault" np boolT+  --, just $ mkConstMethod "name" np $ objT c_QStringRef+  --, just $ mkConstMethod "namespaceUri" np $ objT c_QStringRef+  --, just $ mkConstMethod "prefix" np $ objT c_QStringRef+  --, just $ mkConstMethod "qualifiedName" np $ objT c_QStringRef+  --, just $ mkConstMethod "value" np $ objT c_QStringRef+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QXmlStreamAttributes.hs view
@@ -0,0 +1,66 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QXmlStreamAttributes (+  aModule,+  c_QXmlStreamAttributes,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod',+  mkCtor,+  mkMethod',+  np,+  )+--import Graphics.UI.Qtah.Generator.Interface.Core.QStringRef (c_QStringRef)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QLatin1String (c_QLatin1String)+import Graphics.UI.Qtah.Generator.Interface.Core.QVector (c_QVectorQXmlStreamAttribute)+import Foreign.Hoppy.Generator.Types (boolT, voidT, constT, objT, refT)+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 ["Core", "QXmlStreamAttributes"]+  [qtExport c_QXmlStreamAttributes]++c_QXmlStreamAttributes =+  addReqIncludes [ includeStd "QXmlStreamAttributes" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QXmlStreamAttributes") Nothing [c_QVectorQXmlStreamAttribute] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkMethod' "append" "appendWithNamespaceUriAndNameAndValue" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "append" "appendWithQualifiedNameAndValue" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] voidT+  , just $ mkConstMethod' "hasAttribute" "hasAttribute" [refT $ constT $ objT c_QString] boolT+  , just $ mkConstMethod' "hasAttribute" "hasAttributeWithLatin1String" [objT c_QLatin1String] boolT+  , just $ mkConstMethod' "hasAttribute" "hasAttributeWithNamespaceUriAndName" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] boolT+  --, just $ mkConstMethod' "value" "valueWithNamespaceUriAndName" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] $ objT c_QStringRef+  --, just $ mkConstMethod' "value" "valueWithNamespaceUriAndLatin1StringName" [refT $ constT $ objT c_QString, objT c_QLatin1String] $ objT c_QStringRef+  --, just $ mkConstMethod' "value" "valueWithLatin1Strings" [objT c_QLatin1String, objT c_QLatin1String] $ objT c_QStringRef+  --, just $ mkConstMethod' "value" "valueWithQualifiedName)" [refT $ constT $ objT c_QString] $ objT c_QStringRef+  --, just $ mkConstMethod' "value" "valueWithLatin1String" [objT c_QLatin1String] $ objT c_QStringRef+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QXmlStreamEntityDeclaration.hs view
@@ -0,0 +1,67 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QXmlStreamEntityDeclaration (+  aModule,+  c_QXmlStreamEntityDeclaration,+  qXmlStreamEntityDeclarations,+  ) where++import Foreign.Hoppy.Generator.Spec (+  classSetConversionToGc,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Copyable, Assignable, Equatable),+  classAddFeatures,+  )+--import Graphics.UI.Qtah.Generator.Interface.Core.QStringRef (c_QStringRef)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVector (c_QVectorQXmlStreamEntityDeclaration)+--import Foreign.Hoppy.Generator.Types (objT)+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 ["Core", "QXmlStreamEntityDeclaration"]+  [qtExport c_QXmlStreamEntityDeclaration]++c_QXmlStreamEntityDeclaration =+  addReqIncludes [ includeStd "QXmlStreamEntityDeclaration" ] $+  classSetConversionToGc $+  classAddFeatures [Copyable, Assignable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QXmlStreamEntityDeclaration") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  --, just $ mkConstMethod "name" np $ objT c_QStringRef+  --, just $ mkConstMethod "notationName" np $ objT c_QStringRef+  --, just $ mkConstMethod "publicId" np $ objT c_QStringRef+  --, just $ mkConstMethod "systemId" np $ objT c_QStringRef+  --, just $ mkConstMethod "value" np $ objT c_QStringRef+  ]++qXmlStreamEntityDeclarations = c_QVectorQXmlStreamEntityDeclaration
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QXmlStreamEntityResolver.hs view
@@ -0,0 +1,50 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QXmlStreamEntityResolver (+  aModule,+  c_QXmlStreamEntityResolver,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkMethod,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Foreign.Hoppy.Generator.Types (constT, objT, refT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModuleWithMinVersion ["Core", "QXmlStreamEntityResolver"] [4, 4] $+  [qtExport c_QXmlStreamEntityResolver]++c_QXmlStreamEntityResolver =+  addReqIncludes [ includeStd "QXmlStreamEntityResolver" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QXmlStreamEntityResolver") Nothing [] $+  collect+  [ just $ mkMethod "resolveUndeclaredEntity" [refT $ constT $ objT c_QString] $ objT c_QString+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QXmlStreamNamespaceDeclaration.hs view
@@ -0,0 +1,66 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QXmlStreamNamespaceDeclaration (+  aModule,+  c_QXmlStreamNamespaceDeclaration,+  qXmlStreamNamespaceDeclarations,+  ) where++import Foreign.Hoppy.Generator.Spec (+  classSetConversionToGc,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Copyable, Assignable, Equatable),+  classAddFeatures,+  )+--import Graphics.UI.Qtah.Generator.Interface.Core.QStringRef (c_QStringRef)+import Foreign.Hoppy.Generator.Types (constT, objT, refT)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVector (c_QVectorQXmlStreamNamespaceDeclaration)+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 ["Core", "QXmlStreamNamespaceDeclaration"]+  [qtExport c_QXmlStreamNamespaceDeclaration]++c_QXmlStreamNamespaceDeclaration =+  addReqIncludes [ includeStd "QXmlStreamNamespaceDeclaration" ] $+  classSetConversionToGc $+  classAddFeatures [Copyable, Assignable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QXmlStreamNamespaceDeclaration") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithPrefixAndNamespaceUri" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString]+  --, just $ mkConstMethod "namespaceUri" np $ objT c_QStringRef+  --, just $ mkConstMethod "prefix" np $ objT c_QStringRef+  ]++qXmlStreamNamespaceDeclarations = c_QVectorQXmlStreamNamespaceDeclaration
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QXmlStreamNotationDeclaration.hs view
@@ -0,0 +1,64 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QXmlStreamNotationDeclaration (+  aModule,+  c_QXmlStreamNotationDeclaration,+  qXmlStreamNotationDeclarations+  ) where++import Foreign.Hoppy.Generator.Spec (+  classSetConversionToGc,+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Copyable, Assignable, Equatable),+  classAddFeatures,+  )+--import Graphics.UI.Qtah.Generator.Interface.Core.QStringRef (c_QStringRef)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVector (c_QVectorQXmlStreamNotationDeclaration)+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 ["Core", "QXmlStreamNotationDeclaration"]+  [qtExport c_QXmlStreamNotationDeclaration]++c_QXmlStreamNotationDeclaration =+  addReqIncludes [ includeStd "QXmlStreamNotationDeclaration" ] $+  classSetConversionToGc $+  classAddFeatures [Copyable, Assignable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QXmlStreamNotationDeclaration") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  --, just $ mkConstMethod "name" np $ objT c_QStringRef+  --, just $ mkConstMethod "publicId" np $ objT c_QStringRef+  --, just $ mkConstMethod "systemId" np $ objT c_QStringRef+  ]++qXmlStreamNotationDeclarations = c_QVectorQXmlStreamNotationDeclaration
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QXmlStreamReader.hs view
@@ -0,0 +1,160 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QXmlStreamReader (+  aModule,+  c_QXmlStreamReader,+  e_Error,+  e_ReadElementTextBehaviour,+  e_TokenType,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod',+  mkMethod,+  mkProp,+  np,+  )+--import Graphics.UI.Qtah.Generator.Interface.Core.QStringRef (c_QStringRef)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Graphics.UI.Qtah.Generator.Interface.Core.QIODevice (c_QIODevice)+import Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamNamespaceDeclaration (c_QXmlStreamNamespaceDeclaration, qXmlStreamNamespaceDeclarations)+import Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamEntityDeclaration (qXmlStreamEntityDeclarations)+import Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamEntityResolver (c_QXmlStreamEntityResolver)+import Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamNotationDeclaration (qXmlStreamNotationDeclarations)+import Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamAttributes (c_QXmlStreamAttributes)+import Foreign.Hoppy.Generator.Types (boolT, charT, voidT, enumT, constT, objT, ptrT, refT, toGcT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qint64)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Core", "QXmlStreamReader"]+  [ qtExport c_QXmlStreamReader+  , qtExport e_Error+  , qtExport e_ReadElementTextBehaviour+  , qtExport e_TokenType+  ]++c_QXmlStreamReader =+  addReqIncludes [ includeStd "QXmlStreamReader" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QXmlStreamReader") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithPtrChar" [ptrT $ constT charT]+  , just $ mkCtor "newWithString" [refT $ constT $ objT c_QString]+  , just $ mkCtor "newWithByteArray" [refT $ constT $ objT c_QByteArray]+  , just $ mkCtor "newWithIODevice" [ptrT $ objT c_QIODevice]+  , just $ mkProp "namespaceProcessing" boolT+  , just $ mkMethod' "addData" "addDataWithByteArray" [refT $ constT $ objT c_QByteArray] voidT+  , just $ mkMethod' "addData" "addDataWithString" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "addData" "addDataWithPtrChar" [ptrT $ constT charT] voidT+  , just $ mkMethod "addExtraNamespaceDeclaration" [refT $ constT $ objT c_QXmlStreamNamespaceDeclaration] voidT+  , just $ mkMethod "addExtraNamespaceDeclarations" [refT $ constT $ objT qXmlStreamNamespaceDeclarations] voidT+  , just $ mkConstMethod "atEnd" np boolT+  , just $ mkConstMethod "attributes" np $ toGcT $ objT c_QXmlStreamAttributes+  , just $ mkConstMethod "characterOffset" np qint64+  , just $ mkMethod "clear" np voidT+  , just $ mkConstMethod "columnNumber" np qint64+  , just $ mkProp "device" $ ptrT $ objT c_QIODevice+  --, just $ mkConstMethod "documentEncoding" np $ objT c_QStringRef+  --, just $ mkConstMethod "documentVersion" np $ objT c_QStringRef+  --, just $ mkConstMethod "dtdName" np $ objT c_QStringRef+  --, just $ mkConstMethod "dtdPublicId" np $ objT c_QStringRef+  --, just $ mkConstMethod "dtdSystemId" np $ objT c_QStringRef+  , just $ mkConstMethod "entityDeclarations" np $ toGcT $ objT qXmlStreamEntityDeclarations+  , just $ mkProp "entityResolver" $ ptrT $ objT c_QXmlStreamEntityResolver+  , just $ mkConstMethod "error" np $ enumT e_Error+  , just $ mkConstMethod "errorString" np $ objT c_QString+  , just $ mkConstMethod "hasError" np boolT+  , just $ mkConstMethod "isCDATA" np boolT+  , just $ mkConstMethod "isCharacters" np boolT+  , just $ mkConstMethod "isComment" np boolT+  , just $ mkConstMethod "isDTD" np boolT+  , just $ mkConstMethod "isEndDocument" np boolT+  , just $ mkConstMethod "isEndElement" np boolT+  , just $ mkConstMethod "isEntityReference" np boolT+  , just $ mkConstMethod "isProcessingInstruction" np boolT+  , just $ mkConstMethod "isStandaloneDocument" np boolT+  , just $ mkConstMethod "isStartDocument" np boolT+  , just $ mkConstMethod "isStartElement" np boolT+  , just $ mkConstMethod "isWhitespace" np boolT+  , just $ mkConstMethod "lineNumber" np qint64+--  , just $ mkConstMethod "name" np $ objT c_QStringRef+  , just $ mkConstMethod "namespaceDeclarations" np $ toGcT $ objT qXmlStreamNamespaceDeclarations+  --, just $ mkConstMethod "namespaceUri" np $ objT c_QStringRef+  , just $ mkConstMethod "notationDeclarations" np $ toGcT $ objT qXmlStreamNotationDeclarations+  --, just $ mkConstMethod "prefix" np $ objT c_QStringRef+  --, just $ mkConstMethod "processingInstructionData" np $ objT c_QStringRef+  --, just $ mkConstMethod "processingInstructionTarget" np $ objT c_QStringRef+  --, just $ mkConstMethod "qualifiedName" np $ objT c_QStringRef+  , just $ mkMethod' "raiseError" "raiseError" np voidT+  , just $ mkMethod' "raiseError" "raiseErrorWithMessage" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "readElementText" "readElementText" np $ objT c_QString+  , just $ mkMethod' "readElementText" "readElementTextWithBehaviour" [enumT e_ReadElementTextBehaviour] $ objT c_QString+  , just $ mkMethod "readNext" np $ enumT e_TokenType+  , just $ mkMethod "readNextStartElement" np boolT+  , just $ mkMethod "skipCurrentElement" np voidT+  --, just $ mkConstMethod "text" np $ objT c_QStringRef+  , just $ mkConstMethod "tokenString" np $ objT c_QString+  , just $ mkConstMethod "tokenType" np $ enumT e_TokenType+  ]++e_Error =+  makeQtEnum (ident1 "QXmlStreamReader" "Error") [includeStd "QXmlStreamReader"]+  [ "NoError"+  , "UnexpectedElementError"+  , "CustomError"+  , "NotWellFormedError"+  , "PrematureEndOfDocumentError"+  ]++e_ReadElementTextBehaviour =+  makeQtEnum (ident1 "QXmlStreamReader" "ReadElementTextBehaviour") [includeStd "QXmlStreamReader"]+  [ "ErrorOnUnexpectedElement"+  , "IncludeChildElements"+  , "SkipChildElements"+  ]++e_TokenType =+  makeQtEnum (ident1 "QXmlStreamReader" "TokenType") [includeStd "QXmlStreamReader"]+  [ "NoToken"+  , "Invalid"+  , "StartDocument"+  , "EndDocument"+  , "StartElement"+  , "EndElement"+  , "Characters"+  , "Comment"+  , "DTD"+  , "EntityReference"+  , "ProcessingInstruction"+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Core/QXmlStreamWriter.hs view
@@ -0,0 +1,97 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QXmlStreamWriter (+  aModule,+  c_QXmlStreamWriter,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod',+  mkMethod,+  mkProp,+  np,+  )+import Graphics.UI.Qtah.Generator.Interface.Core.QTextCodec (c_QTextCodec)+import Graphics.UI.Qtah.Generator.Interface.Core.QIODevice (c_QIODevice)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)+import Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamReader (c_QXmlStreamReader)+import Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamAttributes (c_QXmlStreamAttributes)+import Graphics.UI.Qtah.Generator.Interface.Core.QXmlStreamAttribute (c_QXmlStreamAttribute)+import Foreign.Hoppy.Generator.Types (intT, boolT, charT, voidT, constT, objT, ptrT, refT)+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 ["Core", "QXmlStreamWriter"]+  [qtExport c_QXmlStreamWriter]++c_QXmlStreamWriter =+  addReqIncludes [ includeStd "QXmlStreamWriter" ] $+  classSetEntityPrefix "" $+  makeClass (ident "QXmlStreamWriter") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithString" [ptrT $ objT c_QString]+  , just $ mkCtor "newWithByteArray" [ptrT $ objT c_QByteArray]+  , just $ mkCtor "newWithIODevice" [ptrT $ objT c_QIODevice]+  , just $ mkProp "autoFormatting" boolT+  , just $ mkProp "autoFormattingIndent" intT+  , just $ mkConstMethod "codec" np $ ptrT $ objT c_QTextCodec+  , just $ mkProp "device" $ ptrT $ objT c_QIODevice+  , just $ mkConstMethod "hasError" np boolT+  , just $ mkMethod' "setCodec" "setCodec" [ptrT $ objT c_QTextCodec] voidT+  , just $ mkMethod' "setCodec" "setCodecWithPtrChar" [ptrT $ constT charT] voidT+  , just $ mkMethod' "writeAttribute" "writeAttributeWithNamespaceUriAndNameAndValue" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "writeAttribute" "writeAttributeWithQualifiedNameAndValue" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "writeAttribute" "writeAttribute" [refT $ constT $ objT c_QXmlStreamAttribute] voidT+  , just $ mkMethod "writeAttributes" [refT $ constT $ objT c_QXmlStreamAttributes] voidT+  , just $ mkMethod "writeCDATA" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod "writeCharacters" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod "writeComment" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod "writeCurrentToken" [refT $ constT $ objT c_QXmlStreamReader] voidT+  , just $ mkMethod "writeDTD" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod "writeDefaultNamespace" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "writeEmptyElement" "writeEmptyElementWithNamespaceUriAndName" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "writeEmptyElement" "writeEmptyElement" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod "writeEndDocument" np voidT+  , just $ mkMethod "writeEndElement" np voidT+  , just $ mkMethod "writeEntityReference" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "writeNamespace" "writeNamespace" [refT $ constT $ objT c_QString ] voidT+  , just $ mkMethod' "writeNamespace" "writeNamespaceWithNamespaceUriAndPrefix" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "writeProcessingInstruction" "writeProcessingInstruction" [refT $ constT $ objT c_QString ] voidT+  , just $ mkMethod' "writeProcessingInstruction" "writeProcessingInstructionWithTargetAndData" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "writeStartDocument" "writeStartDocumentWithVersion" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "writeStartDocument" "writeStartDocument" np voidT+  , just $ mkMethod' "writeStartDocument" "writeStartDocumentWithVersionAndStandalone" [refT $ constT $ objT c_QString, boolT] voidT+  , just $ mkMethod' "writeStartElement" "writeStartElementWithNamespaceUriAndName" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "writeStartElement" "writeStartElement" [refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "writeTextElement" "writeTextElementWithNamespaceUriAndNameAndText" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] voidT+  , just $ mkMethod' "writeTextElement" "writeTextElementWithQualifiedNameAndText" [refT $ constT $ objT c_QString, refT $ constT $ objT c_QString] voidT+  ]
src/Graphics/UI/Qtah/Generator/Interface/Core/Types.hs view
@@ -1,829 +1,1645 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.------ This program is free software: you can redistribute it and/or modify--- it under the terms of the GNU Lesser General Public License as published by--- the Free Software Foundation, either version 3 of the License, or--- (at your option) any later version.------ This program is distributed in the hope that it will be useful,--- but WITHOUT ANY WARRANTY; without even the implied warranty of--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the--- GNU Lesser General Public License for more details.------ You should have received a copy of the GNU Lesser General Public License--- along with this program.  If not, see <http://www.gnu.org/licenses/>.---- | Top-level bindings and bindings in the @Qt::@ namespace.-module Graphics.UI.Qtah.Generator.Interface.Core.Types (-  aModule,-  qreal,-  gluint,-  e_AlignmentFlag,-  bs_Alignment,-  e_ArrowType,-  e_AspectRatioMode,-  e_BrushStyle,-  e_CaseSensitivity,-  e_CheckState,-  e_ContextMenuPolicy,-  e_Corner,-  e_CursorMoveStyle,-  e_CursorShape,-  e_DockWidgetArea,-  bs_DockWidgetAreas,-  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_MatchFlag,-  bs_MatchFlags,-  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_ToolBarArea,-  bs_ToolBarAreas,-  e_ToolButtonStyle,-  e_TransformationMode,-  e_WindowModality,-  e_WindowState,-  bs_WindowStates,-  e_WindowType,-  bs_WindowFlags,-  ) where--import Data.Bits ((.|.))-import Foreign.Hoppy.Generator.Spec (-  CppEnum,-  Export (ExportBitspace, ExportEnum, ExportFn),-  Include,-  Purity (Nonpure),-  Type,-  addReqIncludes,-  ident1,-  includeStd,-  makeFn,-  )-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)-import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)-import Graphics.UI.Qtah.Generator.Types--{-# ANN module "HLint: ignore Use camelCase" #-}--aModule :: AModule-aModule = AQtModule $ makeQtModule ["Core", "Types"] exports--exports :: [QtExport]-exports =-  QtExportSpecials :-  (map QtExport . collect)-  [ just $ ExportEnum e_AlignmentFlag-  , just $ ExportBitspace bs_Alignment-  , just $ ExportEnum e_ArrowType-  , just $ ExportEnum e_AspectRatioMode-  , just $ ExportEnum e_BrushStyle-  , just $ ExportEnum e_CaseSensitivity-  , just $ ExportEnum e_CheckState-  , just $ ExportEnum e_ContextMenuPolicy-  , just $ ExportEnum e_Corner-  , just $ ExportEnum e_CursorMoveStyle-  , just $ ExportEnum e_CursorShape-  , just $ ExportEnum e_DockWidgetArea-  , just $ ExportBitspace bs_DockWidgetAreas-  , 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_MatchFlag-  , just $ ExportBitspace bs_MatchFlags-  , just $ ExportEnum e_MouseButton-  , just $ ExportBitspace bs_MouseButtons-  , 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_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_ToolBarArea-  , just $ ExportBitspace bs_ToolBarAreas-  , just $ ExportEnum e_ToolButtonStyle-  , just $ ExportEnum e_TransformationMode-  , just $ ExportEnum e_WindowModality-  , just $ ExportEnum e_WindowState-  , just $ ExportBitspace bs_WindowStates-  , just $ ExportEnum e_WindowType-  , just $ ExportBitspace bs_WindowFlags-  , test (qtVersion < [5, 0]) $ ExportFn f_escape-  ]--qtInclude :: [Include]-qtInclude = [includeStd "Qt"]--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.-    (0x01, ["align", "left"])-  , (0x02, ["align", "right"])-  , (0x04, ["align", "h", "center"])-  , (0x08, ["align", "justify"])-    -- Vertical flags.-  , (0x20, ["align", "top"])-  , (0x40, ["align", "bottom"])-  , (0x80, ["align", "v", "center"])-    -- Useful in right-to-left mode.-  , (0x10, ["align", "absolute"])-  ]--e_ArrowType =-  makeQtEnum (ident1 "Qt" "ArrowType") qtInclude-  [ (0, ["no", "arrow"])-  , (1, ["up", "arrow"])-  , (2, ["down", "arrow"])-  , (3, ["left", "arrow"])-  , (4, ["right", "arrow"])-  ]--e_AspectRatioMode =-  makeQtEnum (ident1 "Qt" "AspectRatioMode") qtInclude-  [ (0, ["ignore", "aspect", "ratio"])-  , (1, ["keep", "aspect", "ratio"])-  , (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"])-  , (1, ["case", "sensitive"])-  ]--e_CheckState =-  makeQtEnum (ident1 "Qt" "CheckState") qtInclude-  [ (0, ["unchecked"])-  , (1, ["partially", "checked"])-  , (2, ["checked"])-  ]--e_ContextMenuPolicy :: CppEnum-e_ContextMenuPolicy =-  makeQtEnum (ident1 "Qt" "ContextMenuPolicy") qtInclude-  [ (0, ["no", "context", "menu"])-  , (4, ["prevent", "context", "menu"])-  , (1, ["default", "context", "menu"])-  , (2, ["actions", "context", "menu"])-  , (3, ["custom", "context", "menu"])-  ]--e_Corner =-  makeQtEnum (ident1 "Qt" "Corner") qtInclude-  [ (0x00000, ["top", "left", "corner"])-  , (0x00001, ["top", "right", "corner"])-  , (0x00002, ["bottom", "left", "corner"])-  , (0x00003, ["bottom", "right", "corner"])-  ]--e_CursorMoveStyle =-  makeQtEnum (ident1 "Qt" "CursorMoveStyle") qtInclude-  [ (0, ["logical", "move", "style"])-  , (1, ["visual", "move", "style"])-  ]--e_CursorShape =-  makeQtEnum (ident1 "Qt" "CursorShape") qtInclude-  [ (0,  ["arrow", "cursor"])-  , (1,  ["up", "arrow", "cursor"])-  , (2,  ["cross", "cursor"])-  , (3,  ["wait", "cursor"])-  , (4,  ["i", "beam", "cursor"])-  , (5,  ["size", "ver", "cursor"])-  , (6,  ["size", "hor", "cursor"])-  , (7,  ["size", "b", "diag", "cursor"])-  , (8,  ["size", "f", "diag", "cursor"])-  , (9,  ["size", "all", "cursor"])-  , (10, ["blank", "cursor"])-  , (11, ["split", "v", "cursor"])-  , (12, ["split", "h", "cursor"])-  , (13, ["pointing", "hand", "cursor"])-  , (14, ["forbidden", "cursor"])-  , (15, ["whats", "this", "cursor"])-  , (16, ["busy", "cursor"])-  , (17, ["open", "hand", "cursor"])-  , (18, ["closed", "hand", "cursor"])-  , (19, ["drag", "copy", "cursor"])-  , (20, ["drag", "move", "cursor"])-  , (21, ["drag", "link", "cursor"])-  , (24, ["bitmap", "cursor"])-  ]--(e_DockWidgetArea, bs_DockWidgetAreas) =-  makeQtEnumBitspace (ident1 "Qt" "DockWidgetArea") "DockWidgetAreas" qtInclude-  [ (0x0, ["no", "dock", "widget", "area"])-  , (0x1, ["left", "dock", "widget", "area"])-  , (0x2, ["right", "dock", "widget", "area"])-  , (0x4, ["top", "dock", "widget", "area"])-  , (0x8, ["bottom", "dock", "widget", "area"])-  , (0xf, ["all", "dock", "widget", "areas"])-  ]--(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"])-  , (0, ["normal", "event", "priority"])-  , (-1, ["low", "event", "priority"])-  ]--e_FillRule =-  makeQtEnum (ident1 "Qt" "FillRule") qtInclude-  [ (0, ["odd", "even", "fill"])-  , (1, ["winding", "fill"])-  ]--e_FocusReason =-  makeQtEnum (ident1 "Qt" "FocusReason") qtInclude-  [ (0, ["mouse", "focus", "reason"])-  , (1, ["tab", "focus", "reason"])-  , (2, ["backtab", "focus", "reason"])-  , (3, ["active", "window", "focus", "reason"])-  , (4, ["popup", "focus", "reason"])-  , (5, ["shortcut", "focus", "reason"])-  , (6, ["menu", "bar", "focus", "reason"])-  , (7, ["other", "focus", "reason"])-  ]--e_GlobalColor =-  makeQtEnum (ident1 "Qt" "GlobalColor") qtInclude-  [ (3, ["white"])-  , (2, ["black"])-  , (7, ["red"])-  , (13, ["dark", "red"])-  , (8, ["green"])-  , (14, ["dark", "green"])-  , (9, ["blue"])-  , (15, ["dark", "blue"])-  , (10, ["cyan"])-  , (16, ["dark", "cyan"])-  , (11, ["magenta"])-  , (17, ["dark", "magenta"])-  , (12, ["yellow"])-  , (18, ["dark", "yellow"])-  , (5, ["gray"])-  , (4, ["dark", "gray"])-  , (6, ["light", "gray"])-  , (19, ["transparent"])-  , (0, ["color0"])-  , (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"])-  , (0x1, ["imh", "hidden", "text"])-  , (0x2, ["imh", "sensitive", "data"])-  , (0x4, ["imh", "no", "auto", "uppercase"])-  , (0x8, ["imh", "prefer", "numbers"])-  , (0x10, ["imh", "prefer", "uppercase"])-  , (0x20, ["imh", "prefer", "lowercase"])-  , (0x40, ["imh", "no", "predictive", "text"])-  , (0x80, ["imh", "date"])-  , (0x100, ["imh", "time"])-  , (0x200, ["imh", "prefer", "latin"])-  , (0x400, ["imh", "multi", "line"])-  , (0x10000, ["imh", "digits", "only"])-  , (0x20000, ["imh", "formatted", "numbers", "only"])-  , (0x40000, ["imh", "uppercase", "only"])-  , (0x80000, ["imh", "lowercase", "only"])-  , (0x100000, ["imh", "dialable", "characters", "only"])-  , (0x200000, ["imh", "email", "characters", "only"])-  , (0x400000, ["imh", "url", "characters", "only"])-  , (0x800000, ["imh", "latin", "only"])-  , (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"])-  , (0x02000000, ["shift", "modifier"])-  , (0x04000000, ["control", "modifier"])-  , (0x08000000, ["alt", "modifier"])-  , (0x10000000, ["meta", "modifier"])-  , (0x20000000, ["keypad", "modifier"])-  , (0x40000000, ["group", "switch", "modifier"])-  ]--e_LayoutDirection =-  makeQtEnum (ident1 "Qt" "LayoutDirection") qtInclude-  [ (0, ["left", "to", "right"])-  , (1, ["right", "to", "left"])-  , (2, ["layout", "direction", "auto"])-  ]--e_MaskMode =-  makeQtEnum (ident1 "Qt" "MaskMode") qtInclude-  [ (0, ["mask", "in", "color"])-  , (1, ["mask", "out", "color"])-  ]--(e_MatchFlag, bs_MatchFlags) =-  makeQtEnumBitspace (ident1 "Qt" "MatchFlag") "MatchFlags" qtInclude-  [ ( 0, ["match", "exactly"])-  , ( 8, ["match", "fixed", "string"])-  , ( 1, ["match", "contains"])-  , ( 2, ["match", "starts", "with"])-  , ( 3, ["match", "ends", "with"])-  , (16, ["match", "case", "sensitive"])-  , ( 4, ["match", "reg", "exp"])-  , ( 5, ["match", "wildcard"])-  , (32, ["match", "wrap"])-  , (64, ["match", "recursive"])-  ]--(e_MouseButton, bs_MouseButtons) =-  makeQtEnumBitspace (ident1 "Qt" "MouseButton") "MouseButtons" qtInclude-  [ (0x00000000, ["no", "button"])-  , (0x07ffffff, ["all", "buttons"])-  , (0x00000001, ["left", "button"])-  , (0x00000002, ["right", "button"])-  , (0x00000004, ["middle", "button"])-    -- TODO Other mouse buttons.  Lots of synonyms here which Hoppy doesn't support.-  ]--(e_MouseEventFlag, bs_MouseEventFlags) =-  makeQtEnumBitspace (ident1 "Qt" "MouseEventFlag") "MouseEventFlags" qtInclude-  [ (0x01, ["mouse", "event", "created", "double", "click"])-  ]--e_MouseEventFlag_minVersion = [5, 3]--e_MouseEventSource =-  makeQtEnum (ident1 "Qt" "MouseEventSource") qtInclude-  [ (0, ["mouse", "event", "not", "synthesized"])-  , (1, ["mouse", "event", "synthesized", "by", "system"])-  , (2, ["mouse", "event", "synthesized", "by", "qt"])-  ]--e_MouseEventSource_minVersion = [5, 3]--e_NavigationMode =-  makeQtEnum (ident1 "Qt" "NavigationMode") qtInclude-  [ (0, ["navigation", "mode", "none"])-  , (1, ["navigation", "mode", "keypad", "tab", "order"])-  , (2, ["navigation", "mode", "keypad", "directional"])-  , (3, ["navigation", "mode", "cursor", "auto"])-  , (4, ["navigation", "mode", "cursor", "force", "visible"])-  ]--(e_Orientation, bs_Orientations) =-  makeQtEnumBitspace (ident1 "Qt" "Orientation") "Orientations" qtInclude-  [ (1, ["horizontal"])-  , (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"])-  , (1, ["scroll", "bar", "always", "off"])-  , (2, ["scroll", "bar", "always", "on"])-  ]--e_ScrollPhase =-  makeQtEnum (ident1 "Qt" "ScrollPhase") qtInclude-  [ (1, ["scroll", "begin"])-  , (2, ["scroll", "update"])-  , (3, ["scroll", "end"])-  ]--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"])-  , (1, ["elide", "right"])-  , (2, ["elide", "middle"])-  , (3, ["elide", "none"])-  ]--e_TextFormat =-  makeQtEnum (ident1 "Qt" "TextFormat") qtInclude-  [ (0, ["plain", "text"])-  , (1, ["rich", "text"])-  , (2, ["auto", "text"])-  , (3, ["log", "text"])-  ]--(e_TextInteractionFlag, bs_TextInteractionFlags) =-  makeQtEnumBitspace (ident1 "Qt" "TextInteractionFlag") "TextInteractionFlags" qtInclude $-  let noTextInteraction = 0-      textSelectableByMouse = 1-      textSelectableByKeyboard = 2-      linksAccessibleByMouse = 4-      linksAccessibleByKeyboard = 8-      textEditable = 16-      textEditorInteraction = textSelectableByMouse .|. textSelectableByKeyboard .|. textEditable-      textBrowserInteraction =-        textSelectableByMouse .|. linksAccessibleByMouse .|. linksAccessibleByKeyboard-  in [ (noTextInteraction, ["no", "text", "interaction"])-     , (textSelectableByMouse, ["text", "selectable", "by", "mouse"])-     , (textSelectableByKeyboard, ["text", "selectable", "by", "keyboard"])-     , (linksAccessibleByMouse, ["links", "accessible", "by", "mouse"])-     , (linksAccessibleByKeyboard, ["links", "accessible", "by", "keyboard"])-     , (textEditable, ["text", "editable"])-     , (textEditorInteraction, ["text", "editor", "interaction"])-     , (textBrowserInteraction, ["text", "browser", "interaction"])-     ]--(e_ToolBarArea, bs_ToolBarAreas) =-  makeQtEnumBitspace (ident1 "Qt" "ToolBarArea") "ToolBarAreas" qtInclude-  [ (0x0, ["no", "tool", "bar", "area"])-  , (0x1, ["left", "tool", "bar", "area"])-  , (0x2, ["right", "tool", "bar", "area"])-  , (0x4, ["top", "tool", "bar", "area"])-  , (0x8, ["bottom", "tool", "bar", "area"])-  , (0xf, ["all", "tool", "bar", "areas"])-  ]--e_ToolButtonStyle =-  makeQtEnum (ident1 "Qt" "ToolButtonStyle") qtInclude-  [ (0, ["tool", "button", "icon", "only"])-  , (1, ["tool", "button", "text", "only"])-  , (2, ["tool", "button", "text", "beside", "icon"])-  , (3, ["tool", "button", "text", "under", "icon"])-  , (4, ["tool", "button", "follow", "style"])-  ]--e_TransformationMode =-  makeQtEnum (ident1 "Qt" "TransformationMode") qtInclude-  [ (0, ["fast", "transformation"])-  , (1, ["smooth", "transformation"])-  ]--e_WindowModality =-  makeQtEnum (ident1 "Qt" "WindowModality") qtInclude-  [ (0, ["non", "modal"])-  , (1, ["window", "modal"])-  , (2, ["application", "modal"])-  ]--(e_WindowState, bs_WindowStates) =-  makeQtEnumBitspace (ident1 "Qt" "WindowState") "WindowStates" qtInclude-  [ (0x00, ["window", "no", "state"])-  , (0x01, ["window", "minimized"])-  , (0x02, ["window", "maximized"])-  , (0x04, ["window", "full", "screen"])-  , (0x08, ["window", "active"])-  ]--(e_WindowType, bs_WindowFlags) =-  makeQtEnumBitspace (ident1 "Qt" "WindowType") "WindowFlags" qtInclude $-  let widget = 0x0-      window = 0x1-      dialog = 0x2 .|. window-      sheet = 0x4 .|. window-      drawer = sheet .|. dialog-      popup = 0x8 .|. window-      tool = popup .|. dialog-      toolTip = popup .|. sheet-      splashScreen = toolTip .|. dialog-      desktop = 0x10 .|. window-      subWindow = 0x12 .|. window-      foreignWindow = 0x20 .|. window-      coverWindow = 0x40 .|. window-  in [ (widget, ["widget"])-     , (window, ["window"])-     , (dialog, ["dialog"])-     , (sheet, ["sheet"])-     , (drawer, ["drawer"])-     , (popup, ["popup"])-     , (tool, ["tool"])-     , (toolTip, ["tool", "tip"])-     , (splashScreen, ["splash", "screen"])-     , (desktop, ["desktop"])-     , (subWindow, ["sub", "window"])-     , (foreignWindow, ["foreign", "window"])-     , (coverWindow, ["cover", "window"])-     ]+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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/>.++-- | Top-level bindings and bindings in the @Qt::@ namespace.+module Graphics.UI.Qtah.Generator.Interface.Core.Types (+  aModule,+  qreal,+  qulonglong,+  qlonglong,+  gluint,+  qfunctionpointer,+  qtmessagehandler,+  qint8,+  qint16,+  qint32,+  qint64,+  qintptr,+  qptrdiff,+  qsizetype,+  quint8,+  quint16,+  quint32,+  quint64,+  quintptr,+  wchar_t,+  e_QtMsgType,+  e_AlignmentFlag, fl_Alignment,+  e_AnchorPoint,+  e_ApplicationState, fl_ApplicationStates,+  e_ArrowType,+  e_AspectRatioMode,+  e_Axis,+  e_BGMode,+  e_BrushStyle,+  e_CaseSensitivity,+  e_ApplicationAttribute,+  e_CheckState,+  e_ChecksumType,+  e_ClipOperation,+  e_ConnectionType,+  e_ContextMenuPolicy,+  e_CoordinateSystem,+  e_Corner,+  e_CursorMoveStyle,+  e_CursorShape,+  e_DateFormat,+  e_DayOfWeek,+  e_DockWidgetArea, fl_DockWidgetAreas,+  e_DropAction, fl_DropActions,+  e_Edge, fl_Edges,+  e_EnterKeyType,+  e_EventPriority,+  e_FillRule,+  e_FindChildOption, fl_FindChildOptions,+  e_FocusPolicy,+  e_FocusReason,+  e_GestureFlag, fl_GestureFlags,+  e_GestureState, fl_GestureStates,+  e_GestureType,+  e_HitTestAccuracy,+  e_ImageConversionFlag, fl_ImageConversionFlags,+  e_GlobalColor,+  e_InputMethodHint, fl_InputMethodHints,+  e_InputMethodQuery, fl_InputMethodQueries,+  e_ItemDataRole,+  e_ItemFlag, fl_ItemFlags,+  e_ItemSelectionMode,+  e_ItemSelectionOperation,+  e_Key,+  e_KeyboardModifier, fl_KeyboardModifiers,+  e_LayoutDirection,+  e_MaskMode,+  e_MatchFlag, fl_MatchFlags,+  e_MouseButton, fl_MouseButtons,+  e_MouseEventFlag,+  e_MouseEventFlag_minVersion, fl_MouseEventFlags,+  e_MouseEventSource,+  e_MouseEventSource_minVersion,+  e_NativeGestureType,+  e_NavigationMode,+  e_Orientation, fl_Orientations,+  e_PenCapStyle,+  e_PenJoinStyle,+  e_PenStyle,+  e_ScreenOrientation,+  e_ScreenOrientation_minVersion, fl_ScreenOrientations,+  e_ScrollBarPolicy,+  e_ScrollPhase,+  e_ScrollPhase_minVersion,+  e_ShortcutContext,+  e_SizeHint,+  e_SizeMode,+  e_SortOrder,+  e_TabFocusBehavior,+  e_TextElideMode,+  e_TextFlag,+  e_TextFormat,+  e_TextInteractionFlag, fl_TextInteractionFlags,+  e_TileRule,+  e_TimeSpec,+  e_TimerType,+  e_ToolBarArea, fl_ToolBarAreas,+  e_ToolButtonStyle,+  e_TouchPointState, fl_TouchPointStates,+  e_TransformationMode,+  e_UIEffect,+  e_WhiteSpaceMode,+  e_WidgetAttribute,+  e_WindowFrameSection,+  e_WindowModality,+  e_WindowState, fl_WindowStates,+  e_WindowType, fl_WindowFlags,+  ) where++import Data.Bits (finiteBitSize)+import Foreign.Hoppy.Generator.Spec (+  ForeignLanguage (Haskell),+  Include,+  Purity (Nonpure),+  Type,+  addReqIncludes,+  ident,+  ident1,+  includeStd,+  makeFn,+  )+import System.Info (os)+import Foreign.Hoppy.Generator.Spec.Enum (CppEnum, enumAddEntryNameOverrides)+import Foreign.Hoppy.Generator.Types (doubleT, floatT, objT, int8T, int16T, int32T, int64T, ssizeT, word8T, word16T, word32T, word64T, ptrT, refT, fnT, voidT, enumT, constT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qrealFloat, qtVersion)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QMessageLogContext (c_QMessageLogContext)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule :: AModule+aModule = AQtModule $ makeQtModule ["Core", "Types"] exports++exports :: [QtExport]+exports =+  QtExportSpecials :+  collect+  [ test (qtVersion >= [5, 5]) $ qtExport e_QtMsgType+  , just $ qtExport e_AlignmentFlag+  , just $ qtExport fl_Alignment+  , just $ qtExport e_AnchorPoint+  , test (qtVersion >= [5, 1]) $ qtExport e_ApplicationState+  , test (qtVersion >= [5, 1]) $ qtExport fl_ApplicationStates+  , just $ qtExport e_ArrowType+  , just $ qtExport e_AspectRatioMode+  , just $ qtExport e_Axis+  , just $ qtExport e_BGMode+  , just $ qtExport e_BrushStyle+  , just $ qtExport e_CaseSensitivity+  , just $ qtExport e_CheckState+  , test (qtVersion >= [5, 9]) $ qtExport e_ChecksumType+  , just $ qtExport e_ClipOperation+  , just $ qtExport e_ConnectionType+  , just $ qtExport e_ContextMenuPolicy+  , test (qtVersion >= [4, 6]) $ qtExport e_CoordinateSystem+  , just $ qtExport e_Corner+  , just $ qtExport e_CursorMoveStyle+  , just $ qtExport e_CursorShape+  , just $ qtExport e_DateFormat+  , just $ qtExport e_DayOfWeek+  , just $ qtExport e_DockWidgetArea+  , just $ qtExport fl_DockWidgetAreas+  , just $ qtExport e_DropAction+  , just $ qtExport fl_DropActions+  , test (qtVersion >= [5, 1]) $ qtExport e_Edge+  , test (qtVersion >= [5, 1]) $ qtExport fl_Edges+  , test (qtVersion >= [5, 6]) $ qtExport e_EnterKeyType+  , just $ qtExport e_EventPriority+  , just $ qtExport e_FillRule+  , just $ qtExport e_FindChildOption+  , just $ qtExport fl_FindChildOptions+  , just $ qtExport e_FocusPolicy+  , just $ qtExport e_FocusReason+  , just $ qtExport e_GestureFlag+  , just $ qtExport fl_GestureFlags+  , test (qtVersion >= [4, 6]) $ qtExport e_GestureState+  , test (qtVersion >= [4, 6]) $ qtExport fl_GestureStates+  , test (qtVersion >= [4, 6]) $ qtExport e_GestureType+  , just $ qtExport e_HitTestAccuracy+  , just $ qtExport e_ImageConversionFlag+  , just $ qtExport fl_ImageConversionFlags+  , just $ qtExport e_GlobalColor+  , just $ qtExport e_InputMethodHint+  , just $ qtExport fl_InputMethodHints+  , just $ qtExport e_InputMethodQuery+  , just $ qtExport fl_InputMethodQueries+  , just $ qtExport e_ItemDataRole+  , just $ qtExport e_ItemFlag+  , just $ qtExport fl_ItemFlags+  , just $ qtExport e_ItemSelectionMode+  , just $ qtExport e_ItemSelectionOperation+  , just $ qtExport e_Key+  , just $ qtExport e_KeyboardModifier+  , just $ qtExport fl_KeyboardModifiers+  , just $ qtExport e_LayoutDirection+  , just $ qtExport e_MaskMode+  , just $ qtExport e_MatchFlag+  , just $ qtExport fl_MatchFlags+  , just $ qtExport e_MouseButton+  , just $ qtExport fl_MouseButtons+  , test (qtVersion >= e_MouseEventFlag_minVersion) $ qtExport e_MouseEventFlag+  , test (qtVersion >= e_MouseEventFlag_minVersion) $ qtExport fl_MouseEventFlags+  , test (qtVersion >= e_MouseEventSource_minVersion) $ qtExport e_MouseEventSource+  , test (qtVersion >= [5,2]) $ qtExport e_NativeGestureType+  , just $ qtExport e_NavigationMode+  , just $ qtExport e_Orientation+  , just $ qtExport fl_Orientations+  , just $ qtExport e_PenCapStyle+  , just $ qtExport e_PenJoinStyle+  , just $ qtExport e_PenStyle+  , test (qtVersion >= e_ScreenOrientation_minVersion) $ qtExport e_ScreenOrientation+  , test (qtVersion >= e_ScreenOrientation_minVersion) $ qtExport fl_ScreenOrientations+  , just $ qtExport e_ScrollBarPolicy+  , test (qtVersion >= e_ScrollPhase_minVersion) $ qtExport e_ScrollPhase+  , just $ qtExport e_ShortcutContext+  , test (qtVersion >= [4, 4]) $ qtExport e_SizeHint+  , test (qtVersion >= [4, 4]) $ qtExport e_SizeMode+  , just $ qtExport e_SortOrder+  , test (qtVersion >= [5, 5]) $ qtExport e_TabFocusBehavior+  , just $ qtExport e_TextElideMode+  , just $ qtExport e_TextFlag+  , just $ qtExport e_TextFormat+  , just $ qtExport e_TextInteractionFlag+  , just $ qtExport fl_TextInteractionFlags+  , test (qtVersion >= [4, 6]) $ qtExport e_TileRule+  , just $ qtExport e_TimeSpec+  , just $ qtExport e_TimerType+  , just $ qtExport e_ToolBarArea+  , just $ qtExport fl_ToolBarAreas+  , just $ qtExport e_ToolButtonStyle+  , test (qtVersion >= [4, 6]) $ qtExport e_TouchPointState+  , test (qtVersion >= [4, 6]) $ qtExport fl_TouchPointStates+  , just $ qtExport e_TransformationMode+  , just $ qtExport e_UIEffect+  , just $ qtExport e_WhiteSpaceMode+  , just $ qtExport e_WidgetAttribute+  , test (qtVersion >= [4, 4]) $ qtExport e_WindowFrameSection+  , just $ qtExport e_WindowModality+  , just $ qtExport e_ApplicationAttribute+  , just $ qtExport e_WindowState+  , just $ qtExport fl_WindowStates+  , just $ qtExport e_WindowType+  , just $ qtExport fl_WindowFlags+  , test (qtVersion < [5, 0]) $ qtExport f_escape+  ]++qtInclude :: [Include]+qtInclude = [includeStd "Qt", includeStd "QtGlobal"]++qreal :: Type+qreal = if qrealFloat then floatT else doubleT++qlonglong :: Type+qlonglong = qint64++qulonglong :: Type+qulonglong = quint64++qfunctionpointer :: Type+qfunctionpointer = ptrT $ fnT [] voidT++qtmessagehandler :: Type+qtmessagehandler = ptrT $ fnT [enumT e_QtMsgType, refT $ constT $ objT c_QMessageLogContext, refT $ constT $ objT c_QString] voidT++qint8 :: Type+qint8 = int8T++qint16 :: Type+qint16 = int16T++qint32 :: Type+qint32 = int32T++qint64 :: Type+qint64 = int64T++qintptr :: Type+qintptr = if finiteBitSize (undefined :: Int) == 64 then qint64 else qint32++qptrdiff :: Type+qptrdiff = if finiteBitSize (undefined :: Int) == 64 then qint64 else qint32++qsizetype :: Type+qsizetype = ssizeT++quint8 :: Type+quint8 = word8T++quint16 :: Type+quint16 = word16T++quint32 :: Type+quint32 = word32T++quint64 :: Type+quint64 = word64T++quintptr :: Type+quintptr = if finiteBitSize (undefined :: Int) == 64 then quint64 else quint32++gluint :: Type+gluint = word32T++wchar_t :: Type+wchar_t = if os == "mingw32" then word16T else word32T++e_QtMsgType :: CppEnum+e_QtMsgType =+  makeQtEnum (ident "QtMsgType") qtInclude+  [ "QtDebugMsg"+  , "QtInfoMsg"+  , "QtWarningMsg"+  , "QtCriticalMsg"+  , "QtFatalMsg"+  , "QtSystemMsg"+  ]++(e_AlignmentFlag, fl_Alignment) =+  makeQtEnumAndFlags (ident1 "Qt" "AlignmentFlag") "Alignment" qtInclude+  [ -- Horizontal flags.+    "AlignLeft"+  , "AlignRight"+  , "AlignHCenter"+  , "AlignJustify"+    -- Vertical flags.+  , "AlignTop"+  , "AlignBottom"+  , "AlignVCenter"+    -- Useful in right-to-left mode.+  , "AlignAbsolute"+  ]++e_AnchorPoint =+  makeQtEnum (ident1 "Qt" "AnchorPoint") qtInclude+  [ "AnchorLeft"+  , "AnchorHorizontalCenter"+  , "AnchorRight"+  , "AnchorTop"+  , "AnchorVerticalCenter"+  , "AnchorBottom"+  ]++(e_ApplicationState, fl_ApplicationStates) =+  makeQtEnumAndFlags (ident1 "Qt" "ApplicationState") "ApplicationStates" qtInclude+  [ "ApplicationSuspended"+  , "ApplicationHidden"+  , "ApplicationInactive"+  , "ApplicationActive"+  ]++e_ApplicationAttribute =+  makeQtEnum (ident1 "Qt" "ApplicationAttribute") qtInclude $+  collect+  [ just "AA_DontShowIconsInMenus"+  , test (qtVersion >= [5,10]) "AA_DontShowShortcutsInContextMenus"+  , just "AA_NativeWindows"+  , just "AA_DontCreateNativeWidgetSiblings"+  , test (qtVersion >= [5,7]) "AA_PluginApplication"+  , just "AA_DontUseNativeMenuBar"+  , just "AA_MacDontSwapCtrlAndMeta"+  , just "AA_Use96Dpi"+  , just "AA_SynthesizeTouchForUnhandledMouseEvents"+  , just "AA_SynthesizeMouseForUnhandledTouchEvents"+  , just "AA_UseHighDpiPixmaps"+  , just "AA_ForceRasterWidgets"+  , test (qtVersion >= [5,3]) "AA_UseDesktopOpenGL"+  , test (qtVersion >= [5,3]) "AA_UseOpenGLES"+  , test (qtVersion >= [5,4]) "AA_UseSoftwareOpenGL"+  , test (qtVersion >= [5,4]) "AA_ShareOpenGLContexts"+  , test (qtVersion >= [5,5]) "AA_SetPalette"+  , test (qtVersion >= [5,6]) "AA_EnableHighDpiScaling"+  , test (qtVersion >= [5,6]) "AA_DisableHighDpiScaling"+  , test (qtVersion >= [5,7]) "AA_UseStyleSheetPropagationInWidgetStyles"+  , test (qtVersion >= [5,7]) "AA_DontUseNativeDialogs"+  , test (qtVersion >= [5,7]) "AA_SynthesizeMouseForUnhandledTabletEvents"+  , test (qtVersion >= [5,7]) "AA_CompressHighFrequencyEvents"+  , test (qtVersion >= [5,10]) "AA_CompressTabletEvents"+  , test (qtVersion >= [5,8]) "AA_DontCheckOpenGLContextThreadAffinity"+  , just "AA_DisableShaderDiskCache"+  , test (qtVersion >= [5,10]) "AA_DisableWindowContextHelpButton"+  ]++e_ArrowType =+  makeQtEnum (ident1 "Qt" "ArrowType") qtInclude+  [ "NoArrow"+  , "UpArrow"+  , "DownArrow"+  , "LeftArrow"+  , "RightArrow"+  ]++e_AspectRatioMode =+  makeQtEnum (ident1 "Qt" "AspectRatioMode") qtInclude+  [ "IgnoreAspectRatio"+  , "KeepAspectRatio"+  , "KeepAspectRatioByExpanding"+  ]++e_Axis =+  makeQtEnum (ident1 "Qt" "Axis") qtInclude+  [ "XAxis"+  , "YAxis"+  , "ZAxis"+  ]++e_BGMode =+  makeQtEnum (ident1 "Qt" "BGMode") qtInclude+  [ "TransparentMode"+  , "OpaqueMode"+  ]++e_BrushStyle =+  makeQtEnum (ident1 "Qt" "BrushStyle") qtInclude+  [ "NoBrush"+  , "SolidPattern"+  , "Dense1Pattern"+  , "Dense2Pattern"+  , "Dense3Pattern"+  , "Dense4Pattern"+  , "Dense5Pattern"+  , "Dense6Pattern"+  , "Dense7Pattern"+  , "HorPattern"+  , "VerPattern"+  , "CrossPattern"+  , "BDiagPattern"+  , "FDiagPattern"+  , "DiagCrossPattern"+  , "LinearGradientPattern"+  , "RadialGradientPattern"+  , "ConicalGradientPattern"+  , "TexturePattern"+  ]++e_CaseSensitivity =+  makeQtEnum (ident1 "Qt" "CaseSensitivity") qtInclude+  [ "CaseInsensitive"+  , "CaseSensitive"+  ]++e_CheckState =+  makeQtEnum (ident1 "Qt" "CheckState") qtInclude+  [ "Unchecked"+  , "PartiallyChecked"+  , "Checked"+  ]++e_ChecksumType =+  makeQtEnum (ident1 "Qt" "ChecksumType") qtInclude+  [ "ChecksumIso3309"+  , "ChecksumItuV41"+  ]++e_ClipOperation =+  makeQtEnum (ident1 "Qt" "ClipOperation") qtInclude+  [ "NoClip"+  , "ReplaceClip"+  , "IntersectClip"+  ]++e_ConnectionType =+  makeQtEnum (ident1 "Qt" "ConnectionType") qtInclude $+  collect+  [ just "AutoConnection"+  , just "DirectConnection"+  , just "QueuedConnection"+  , just "BlockingQueuedConnection"+  , test (qtVersion >= [4, 6]) "UniqueConnection"+  ]++e_ContextMenuPolicy =+  makeQtEnum (ident1 "Qt" "ContextMenuPolicy") qtInclude+  [ "NoContextMenu"+  , "PreventContextMenu"+  , "DefaultContextMenu"+  , "ActionsContextMenu"+  , "CustomContextMenu"+  ]++e_CoordinateSystem =+  makeQtEnum (ident1 "Qt" "CoordinateSystem") qtInclude+  [ "DeviceCoordinates"+  , "LogicalCoordinates"+  ]++e_Corner =+  makeQtEnum (ident1 "Qt" "Corner") qtInclude+  [ "TopLeftCorner"+  , "TopRightCorner"+  , "BottomLeftCorner"+  , "BottomRightCorner"+  ]++e_CursorMoveStyle =+  makeQtEnum (ident1 "Qt" "CursorMoveStyle") qtInclude+  [ "LogicalMoveStyle"+  , "VisualMoveStyle"+  ]++e_CursorShape =+  makeQtEnum (ident1 "Qt" "CursorShape") qtInclude+  [ "ArrowCursor"+  , "UpArrowCursor"+  , "CrossCursor"+  , "WaitCursor"+  , "IBeamCursor"+  , "SizeVerCursor"+  , "SizeHorCursor"+  , "SizeBDiagCursor"+  , "SizeFDiagCursor"+  , "SizeAllCursor"+  , "BlankCursor"+  , "SplitVCursor"+  , "SplitHCursor"+  , "PointingHandCursor"+  , "ForbiddenCursor"+  , "WhatsThisCursor"+  , "BusyCursor"+  , "OpenHandCursor"+  , "ClosedHandCursor"+  , "DragCopyCursor"+  , "DragMoveCursor"+  , "DragLinkCursor"+  , "BitmapCursor"+  ]++e_DateFormat =+  makeQtEnum (ident1 "Qt" "DateFormat") qtInclude+  [ "TextDate"+  , "ISODate"+  , "ISODateWithMs"+  , "SystemLocaleShortDate"+  , "SystemLocaleLongDate"+  , "DefaultLocaleShortDate"+  , "DefaultLocaleLongDate"+  , "SystemLocaleDate"+  , "LocaleDate"+  , "RFC2822Date"+  ]++e_DayOfWeek =+  makeQtEnum (ident1 "Qt" "DayOfWeek") qtInclude+  [ "Monday"+  , "Tuesday"+  , "Wednesday"+  , "Thursday"+  , "Friday"+  , "Saturday"+  , "Sunday"+  ]++(e_DockWidgetArea, fl_DockWidgetAreas) =+  makeQtEnumAndFlags (ident1 "Qt" "DockWidgetArea") "DockWidgetAreas" qtInclude+  [ "NoDockWidgetArea"+  , "LeftDockWidgetArea"+  , "RightDockWidgetArea"+  , "TopDockWidgetArea"+  , "BottomDockWidgetArea"+  , "AllDockWidgetAreas"+  ]++(e_DropAction, fl_DropActions) =+  makeQtEnumAndFlags (ident1 "Qt" "DropAction") "DropActions" qtInclude+  [ "IgnoreAction"+  , "CopyAction"+  , "MoveAction"+  , "LinkAction"+  , "ActionMask"+  , "TargetMoveAction"+  ]++(e_Edge, fl_Edges) =+  makeQtEnumAndFlags (ident1 "Qt" "Edge") "Edges" qtInclude+  [ "TopEdge"+  , "LeftEdge"+  , "RightEdge"+  , "BottomEdge"+  ]++e_EnterKeyType =+  makeQtEnum (ident1 "Qt" "EnterKeyType") qtInclude+  [ "EnterKeyDefault"+  , "EnterKeyReturn"+  , "EnterKeyDone"+  , "EnterKeyGo"+  , "EnterKeySend"+  , "EnterKeySearch"+  , "EnterKeyNext"+  , "EnterKeyPrevious"+  ]++e_EventPriority =+  makeQtEnum (ident1 "Qt" "EventPriority") qtInclude+  [ "HighEventPriority"+  , "NormalEventPriority"+  , "LowEventPriority"+  ]++e_FillRule =+  makeQtEnum (ident1 "Qt" "FillRule") qtInclude+  [ "OddEvenFill"+  , "WindingFill"+  ]++(e_FindChildOption, fl_FindChildOptions) =+  makeQtEnumAndFlags (ident1 "Qt" "FindChildOption") "FindChildOptions" qtInclude+  [ "FindDirectChildrenOnly"+  , "FindChildrenRecursively"+  ]++e_FocusPolicy =+  makeQtEnum (ident1 "Qt" "FocusPolicy") qtInclude+  [ "TabFocus"+  , "ClickFocus"+  , "StrongFocus"+  , "WheelFocus"+  , "NoFocus"+  ]++e_FocusReason =+  makeQtEnum (ident1 "Qt" "FocusReason") qtInclude+  [ "MouseFocusReason"+  , "TabFocusReason"+  , "BacktabFocusReason"+  , "ActiveWindowFocusReason"+  , "PopupFocusReason"+  , "ShortcutFocusReason"+  , "MenuBarFocusReason"+  , "OtherFocusReason"+  ]++(e_GestureFlag, fl_GestureFlags) =+  makeQtEnumAndFlags (ident1 "Qt" "GestureFlag") "GestureFlags" qtInclude $+  collect+  [ just "DontStartGestureOnChildren"+  , just "ReceivePartialGestures"+  , test (qtVersion >= [4,7]) "IgnoredGesturesPropagateToParent"+  ]++(e_GestureState, fl_GestureStates) =+  makeQtEnumAndFlags (ident1 "Qt" "GestureState") "GestureStates" qtInclude+  [ "NoGesture"+  , "GestureStarted"+  , "GestureUpdated"+  , "GestureFinished"+  , "GestureCanceled"+  ]++e_GestureType =+  makeQtEnum (ident1 "Qt" "GestureType") qtInclude+  [ "TapGesture"+  , "TapAndHoldGesture"+  , "PanGesture"+  , "PinchGesture"+  , "SwipeGesture"+  , "CustomGesture"+  ]++e_HitTestAccuracy =+  makeQtEnum (ident1 "Qt" "HitTestAccuracy") qtInclude+  [ "ExactHit"+  , "FuzzyHit"+  ]++e_GlobalColor =+  makeQtEnum (ident1 "Qt" "GlobalColor") qtInclude+  [ "white"+  , "black"+  , "red"+  , "darkRed"+  , "green"+  , "darkGreen"+  , "blue"+  , "darkBlue"+  , "cyan"+  , "darkCyan"+  , "magenta"+  , "darkMagenta"+  , "yellow"+  , "darkYellow"+  , "gray"+  , "darkGray"+  , "lightGray"+  , "transparent"+  , "color0"+  , "color1"+  ]++(e_ImageConversionFlag, fl_ImageConversionFlags) =+  makeQtEnumAndFlags (ident1 "Qt" "ImageConversionFlag") "ImageConversionFlags" qtInclude+  [ -- Color/mono preference:+    "AutoColor"+  , "ColorOnly"+  , "MonoOnly"+    -- Dithering mode preference for RGB channels:+  , "DiffuseDither"+  , "OrderedDither"+  , "ThresholdDither"+    -- Dithering mode preference for alpha channel:+  , "ThresholdAlphaDither"+  , "OrderedAlphaDither"+  , "DiffuseAlphaDither"+    -- Color matching versus dithering preference:+  , "PreferDither"+  , "AvoidDither"+  , "NoOpaqueDetection"+  , "NoFormatConversion"+  ]++(e_InputMethodHint, fl_InputMethodHints) =+  makeQtEnumAndFlags (ident1 "Qt" "InputMethodHint") "InputMethodHints" qtInclude+  [ "ImhNone"+  , "ImhHiddenText"+  , "ImhSensitiveData"+  , "ImhNoAutoUppercase"+  , "ImhPreferNumbers"+  , "ImhPreferUppercase"+  , "ImhPreferLowercase"+  , "ImhNoPredictiveText"+  , "ImhDate"+  , "ImhTime"+  , "ImhPreferLatin"+  , "ImhMultiLine"+  , "ImhDigitsOnly"+  , "ImhFormattedNumbersOnly"+  , "ImhUppercaseOnly"+  , "ImhLowercaseOnly"+  , "ImhDialableCharactersOnly"+  , "ImhEmailCharactersOnly"+  , "ImhUrlCharactersOnly"+  , "ImhLatinOnly"+  , "ImhExclusiveInputMask"+  ]++(e_InputMethodQuery, fl_InputMethodQueries) =+  makeQtEnumAndFlags (ident1 "Qt" "InputMethodQuery") "InputMethodQueries" qtInclude $+  collect+  [ just "ImEnabled"+  , just "ImMicroFocus"+  , just "ImCursorRectangle"+  , just "ImFont"+  , just "ImCursorPosition"+  , just "ImSurroundingText"+  , just "ImCurrentSelection"+  , just "ImMaximumTextLength"+  , just "ImAnchorPosition"+  , just "ImHints"+  , just "ImPreferredLanguage"+  , just "ImPlatformData"+  , just "ImAbsolutePosition"+  , just "ImTextBeforeCursor"+  , just "ImTextAfterCursor"+  , just "ImEnterKeyType"+  , test (qtVersion >= [5,7]) "ImAnchorRectangle"+  , just "ImInputItemClipRectangle"+  ]++-- TODO Support for custom ItemDataRole values.+e_ItemDataRole =+  makeQtEnum (ident1 "Qt" "ItemDataRole") qtInclude $+  collect+  [ -- General-purpose roles:+    just "DisplayRole"+  , just "DecorationRole"+  , just "EditRole"+  , just "ToolTipRole"+  , just "StatusTipRole"+  , just "WhatsThisRole"+  , just "SizeHintRole"++    -- Roles describing appearance and metadata:+  , just "FontRole"+  , just "TextAlignmentRole"+  , just "BackgroundRole"+  , just "ForegroundRole"+  , just "CheckStateRole"+  , test (qtVersion >= [4, 8]) "InitialSortOrderRole"++    -- Accessibility roles:+  , just "AccessibleTextRole"+  , just "AccessibleDescriptionRole"++    -- User roles:+  , just "UserRole"+  ]++(e_ItemFlag, fl_ItemFlags) =+  makeQtEnumAndFlags (ident1 "Qt" "ItemFlag") "ItemFlags" qtInclude $+  collect+  [ just "NoItemFlags"+  , just "ItemIsSelectable"+  , just "ItemIsEditable"+  , just "ItemIsDragEnabled"+  , just "ItemIsDropEnabled"+  , just "ItemIsUserCheckable"+  , just "ItemIsEnabled"+  , just "ItemIsAutoTristate"+  , just "ItemNeverHasChildren"+  , test (qtVersion >= [5, 5]) "ItemIsUserTristate"+  ]++e_ItemSelectionMode =+  makeQtEnum (ident1 "Qt" "ItemSelectionMode") qtInclude+  [ "ContainsItemShape"+  , "IntersectsItemShape"+  , "ContainsItemBoundingRect"+  , "IntersectsItemBoundingRect"+  ]++e_ItemSelectionOperation =+  makeQtEnum (ident1 "Qt" "ItemSelectionOperation") qtInclude+  [ "ReplaceSelection"+  , "AddToSelection"+  ]++e_Key =+  enumAddEntryNameOverrides Haskell+    [ ("Key_Dead_a", "KeyDeadALower")+    , ("Key_Dead_A", "KeyDeadAUpper")+    , ("Key_Dead_e", "KeyDeadELower")+    , ("Key_Dead_E", "KeyDeadEUpper")+    , ("Key_Dead_i", "KeyDeadILower")+    , ("Key_Dead_I", "KeyDeadIUpper")+    , ("Key_Dead_o", "KeyDeadOLower")+    , ("Key_Dead_O", "KeyDeadOUpper")+    , ("Key_Dead_u", "KeyDeadULower")+    , ("Key_Dead_U", "KeyDeadUUpper")+    ] $+  makeQtEnum (ident1 "Qt" "Key") qtInclude+  [ "Key_Escape"+  , "Key_Tab"+  , "Key_Backtab"+  , "Key_Backspace"+  , "Key_Return"+  , "Key_Enter"+  , "Key_Insert"+  , "Key_Delete"+  , "Key_Pause"+  , "Key_Print"+  , "Key_SysReq"+  , "Key_Clear"+  , "Key_Home"+  , "Key_End"+  , "Key_Left"+  , "Key_Up"+  , "Key_Right"+  , "Key_Down"+  , "Key_PageUp"+  , "Key_PageDown"+  , "Key_Shift"+  , "Key_Control"+  , "Key_Meta"+  , "Key_Alt"+  , "Key_AltGr"+  , "Key_CapsLock"+  , "Key_NumLock"+  , "Key_ScrollLock"+  , "Key_F1"+  , "Key_F2"+  , "Key_F3"+  , "Key_F4"+  , "Key_F5"+  , "Key_F6"+  , "Key_F7"+  , "Key_F8"+  , "Key_F9"+  , "Key_F10"+  , "Key_F11"+  , "Key_F12"+  , "Key_F13"+  , "Key_F14"+  , "Key_F15"+  , "Key_F16"+  , "Key_F17"+  , "Key_F18"+  , "Key_F19"+  , "Key_F20"+  , "Key_F21"+  , "Key_F22"+  , "Key_F23"+  , "Key_F24"+  , "Key_F25"+  , "Key_F26"+  , "Key_F27"+  , "Key_F28"+  , "Key_F29"+  , "Key_F30"+  , "Key_F31"+  , "Key_F32"+  , "Key_F33"+  , "Key_F34"+  , "Key_F35"+  , "Key_Super_L"+  , "Key_Super_R"+  , "Key_Menu"+  , "Key_Hyper_L"+  , "Key_Hyper_R"+  , "Key_Help"+  , "Key_Direction_L"+  , "Key_Direction_R"+  , "Key_Space"+  , "Key_Any"  -- Alias for Key_Space.+  , "Key_Exclam"+  , "Key_QuoteDbl"+  , "Key_NumberSign"+  , "Key_Dollar"+  , "Key_Percent"+  , "Key_Ampersand"+  , "Key_Apostrophe"+  , "Key_ParenLeft"+  , "Key_ParenRight"+  , "Key_Asterisk"+  , "Key_Plus"+  , "Key_Comma"+  , "Key_Minus"+  , "Key_Period"+  , "Key_Slash"+  , "Key_0"+  , "Key_1"+  , "Key_2"+  , "Key_3"+  , "Key_4"+  , "Key_5"+  , "Key_6"+  , "Key_7"+  , "Key_8"+  , "Key_9"+  , "Key_Colon"+  , "Key_Semicolon"+  , "Key_Less"+  , "Key_Equal"+  , "Key_Greater"+  , "Key_Question"+  , "Key_At"+  , "Key_A"+  , "Key_B"+  , "Key_C"+  , "Key_D"+  , "Key_E"+  , "Key_F"+  , "Key_G"+  , "Key_H"+  , "Key_I"+  , "Key_J"+  , "Key_K"+  , "Key_L"+  , "Key_M"+  , "Key_N"+  , "Key_O"+  , "Key_P"+  , "Key_Q"+  , "Key_R"+  , "Key_S"+  , "Key_T"+  , "Key_U"+  , "Key_V"+  , "Key_W"+  , "Key_X"+  , "Key_Y"+  , "Key_Z"+  , "Key_BracketLeft"+  , "Key_Backslash"+  , "Key_BracketRight"+  , "Key_AsciiCircum"+  , "Key_Underscore"+  , "Key_QuoteLeft"+  , "Key_BraceLeft"+  , "Key_Bar"+  , "Key_BraceRight"+  , "Key_AsciiTilde"+  , "Key_nobreakspace"+  , "Key_exclamdown"+  , "Key_cent"+  , "Key_sterling"+  , "Key_currency"+  , "Key_yen"+  , "Key_brokenbar"+  , "Key_section"+  , "Key_diaeresis"+  , "Key_copyright"+  , "Key_ordfeminine"+  , "Key_guillemotleft"+  , "Key_notsign"+  , "Key_hyphen"+  , "Key_registered"+  , "Key_macron"+  , "Key_degree"+  , "Key_plusminus"+  , "Key_twosuperior"+  , "Key_threesuperior"+  , "Key_acute"+  , "Key_mu"+  , "Key_paragraph"+  , "Key_periodcentered"+  , "Key_cedilla"+  , "Key_onesuperior"+  , "Key_masculine"+  , "Key_guillemotright"+  , "Key_onequarter"+  , "Key_onehalf"+  , "Key_threequarters"+  , "Key_questiondown"+  , "Key_Agrave"+  , "Key_Aacute"+  , "Key_Acircumflex"+  , "Key_Atilde"+  , "Key_Adiaeresis"+  , "Key_Aring"+  , "Key_AE"+  , "Key_Ccedilla"+  , "Key_Egrave"+  , "Key_Eacute"+  , "Key_Ecircumflex"+  , "Key_Ediaeresis"+  , "Key_Igrave"+  , "Key_Iacute"+  , "Key_Icircumflex"+  , "Key_Idiaeresis"+  , "Key_ETH"+  , "Key_Ntilde"+  , "Key_Ograve"+  , "Key_Oacute"+  , "Key_Ocircumflex"+  , "Key_Otilde"+  , "Key_Odiaeresis"+  , "Key_multiply"+  , "Key_Ooblique"+  , "Key_Ugrave"+  , "Key_Uacute"+  , "Key_Ucircumflex"+  , "Key_Udiaeresis"+  , "Key_Yacute"+  , "Key_THORN"+  , "Key_ssharp"+  , "Key_division"+  , "Key_ydiaeresis"+  , "Key_Multi_key"+  , "Key_Codeinput"+  , "Key_SingleCandidate"+  , "Key_MultipleCandidate"+  , "Key_PreviousCandidate"+  , "Key_Mode_switch"+  , "Key_Kanji"+  , "Key_Muhenkan"+  , "Key_Henkan"+  , "Key_Romaji"+  , "Key_Hiragana"+  , "Key_Katakana"+  , "Key_Hiragana_Katakana"+  , "Key_Zenkaku"+  , "Key_Hankaku"+  --, "Key_Zenkaku_Hankaku"+  , "Key_Touroku"+  , "Key_Massyo"+  , "Key_Kana_Lock"+  , "Key_Kana_Shift"+  , "Key_Eisu_Shift"+  , "Key_Eisu_toggle"+  , "Key_Hangul"+  , "Key_Hangul_Start"+  , "Key_Hangul_End"+  , "Key_Hangul_Hanja"+  , "Key_Hangul_Jamo"+  , "Key_Hangul_Romaja"+  , "Key_Hangul_Jeonja"+  , "Key_Hangul_Banja"+  , "Key_Hangul_PreHanja"+  , "Key_Hangul_PostHanja"+  , "Key_Hangul_Special"+  , "Key_Dead_Grave"+  , "Key_Dead_Acute"+  , "Key_Dead_Circumflex"+  , "Key_Dead_Tilde"+  , "Key_Dead_Macron"+  , "Key_Dead_Breve"+  , "Key_Dead_Abovedot"+  , "Key_Dead_Diaeresis"+  , "Key_Dead_Abovering"+  , "Key_Dead_Doubleacute"+  , "Key_Dead_Caron"+  , "Key_Dead_Cedilla"+  , "Key_Dead_Ogonek"+  , "Key_Dead_Iota"+  , "Key_Dead_Voiced_Sound"+  , "Key_Dead_Semivoiced_Sound"+  , "Key_Dead_Belowdot"+  , "Key_Dead_Hook"+  , "Key_Dead_Horn"+  , "Key_Dead_Stroke"+  , "Key_Dead_Abovecomma"+  , "Key_Dead_Abovereversedcomma"+  , "Key_Dead_Doublegrave"+  , "Key_Dead_Belowring"+  , "Key_Dead_Belowmacron"+  , "Key_Dead_Belowtilde"+  , "Key_Dead_Belowbreve"+  , "Key_Dead_Belowdiaeresis"+  , "Key_Dead_Invertedbreve"+  , "Key_Dead_Belowcomma"+  , "Key_Dead_Currency"+  , "Key_Dead_a"+  , "Key_Dead_A"+  , "Key_Dead_e"+  , "Key_Dead_E"+  , "Key_Dead_i"+  , "Key_Dead_I"+  , "Key_Dead_o"+  , "Key_Dead_O"+  , "Key_Dead_u"+  , "Key_Dead_U"+  , "Key_Dead_Small_Schwa"+  , "Key_Dead_Capital_Schwa"+  , "Key_Dead_Greek"+  , "Key_Dead_Lowline"+  , "Key_Dead_Aboveverticalline"+  , "Key_Dead_Belowverticalline"+  , "Key_Dead_Longsolidusoverlay"+  , "Key_Back"+  , "Key_Forward"+  , "Key_Stop"+  , "Key_Refresh"+  , "Key_VolumeDown"+  , "Key_VolumeMute"+  , "Key_VolumeUp"+  , "Key_BassBoost"+  , "Key_BassUp"+  , "Key_BassDown"+  , "Key_TrebleUp"+  , "Key_TrebleDown"+  , "Key_MediaPlay"+  , "Key_MediaStop"+  , "Key_MediaPrevious"+  , "Key_MediaNext"+  , "Key_MediaRecord"+  , "Key_MediaPause"+  , "Key_MediaTogglePlayPause"+  --, "Key_HomePage"+  , "Key_Favorites"+  , "Key_Search"+  , "Key_Standby"+  , "Key_OpenUrl"+  , "Key_LaunchMail"+  , "Key_LaunchMedia"+  , "Key_Launch0"+  , "Key_Launch1"+  , "Key_Launch2"+  , "Key_Launch3"+  , "Key_Launch4"+  , "Key_Launch5"+  , "Key_Launch6"+  , "Key_Launch7"+  , "Key_Launch8"+  , "Key_Launch9"+  , "Key_LaunchA"+  , "Key_LaunchB"+  , "Key_LaunchC"+  , "Key_LaunchD"+  , "Key_LaunchE"+  , "Key_LaunchF"+  , "Key_LaunchG"+  , "Key_LaunchH"+    -- TODO Additional Qt::Key_* constants.+  ]++(e_KeyboardModifier, fl_KeyboardModifiers) =+  makeQtEnumAndFlags (ident1 "Qt" "KeyboardModifier") "KeyboardModifiers" qtInclude+  [ "NoModifier"+  , "ShiftModifier"+  , "ControlModifier"+  , "AltModifier"+  , "MetaModifier"+  , "KeypadModifier"+  , "GroupSwitchModifier"+  ]++e_LayoutDirection =+  makeQtEnum (ident1 "Qt" "LayoutDirection") qtInclude+  [ "LeftToRight"+  , "RightToLeft"+  , "LayoutDirectionAuto"+  ]++e_MaskMode =+  makeQtEnum (ident1 "Qt" "MaskMode") qtInclude+  [ "MaskInColor"+  , "MaskOutColor"+  ]++(e_MatchFlag, fl_MatchFlags) =+  makeQtEnumAndFlags (ident1 "Qt" "MatchFlag") "MatchFlags" qtInclude+  [ "MatchExactly"+  , "MatchFixedString"+  , "MatchContains"+  , "MatchStartsWith"+  , "MatchEndsWith"+  , "MatchCaseSensitive"+  , "MatchRegExp"+  , "MatchWildcard"+  , "MatchWrap"+  , "MatchRecursive"+  ]++(e_MouseButton, fl_MouseButtons) =+  makeQtEnumAndFlags (ident1 "Qt" "MouseButton") "MouseButtons" qtInclude+  [ "NoButton"+  , "AllButtons"+  , "LeftButton"+  , "RightButton"+  , "MidButton"+  , "MiddleButton"+  , "BackButton"+  , "XButton1"+  , "ExtraButton1"+  , "ForwardButton"+  , "XButton2"+  , "ExtraButton2"+  , "TaskButton"+  , "ExtraButton3"+  , "ExtraButton4"+  , "ExtraButton5"+  , "ExtraButton6"+  , "ExtraButton7"+  , "ExtraButton8"+  , "ExtraButton9"+  , "ExtraButton10"+  , "ExtraButton11"+  , "ExtraButton12"+  , "ExtraButton13"+  , "ExtraButton14"+  , "ExtraButton15"+  , "ExtraButton16"+  , "ExtraButton17"+  , "ExtraButton18"+  , "ExtraButton19"+  , "ExtraButton20"+  , "ExtraButton21"+  , "ExtraButton22"+  , "ExtraButton23"+  , "ExtraButton24"+  ]++(e_MouseEventFlag, fl_MouseEventFlags) =+  makeQtEnumAndFlags (ident1 "Qt" "MouseEventFlag") "MouseEventFlags" qtInclude+  [ "MouseEventCreatedDoubleClick"+  ]++e_MouseEventFlag_minVersion = [5, 3]++e_MouseEventSource =+  makeQtEnum (ident1 "Qt" "MouseEventSource") qtInclude+  [ "MouseEventNotSynthesized"+  , "MouseEventSynthesizedBySystem"+  , "MouseEventSynthesizedByQt"+  ]++e_MouseEventSource_minVersion = [5, 3]++e_NativeGestureType =+  makeQtEnum (ident1 "Qt" "NativeGestureType") qtInclude+  [ "BeginNativeGesture"+  , "EndNativeGesture"+  , "PanNativeGesture"+  , "ZoomNativeGesture"+  , "SmartZoomNativeGesture"+  , "RotateNativeGesture"+  , "SwipeNativeGesture"+  ]++e_NavigationMode =+  makeQtEnum (ident1 "Qt" "NavigationMode") qtInclude+  [ "NavigationModeNone"+  , "NavigationModeKeypadTabOrder"+  , "NavigationModeKeypadDirectional"+  , "NavigationModeCursorAuto"+  , "NavigationModeCursorForceVisible"+  ]++(e_Orientation, fl_Orientations) =+  makeQtEnumAndFlags (ident1 "Qt" "Orientation") "Orientations" qtInclude+  [ "Horizontal"+  , "Vertical"+  ]++e_PenCapStyle =+  makeQtEnum (ident1 "Qt" "PenCapStyle") qtInclude+  [ "FlatCap"+  , "SquareCap"+  , "RoundCap"+  ]++e_PenJoinStyle =+  makeQtEnum (ident1 "Qt" "PenJoinStyle") qtInclude+  [ "MiterJoin"+  , "BevelJoin"+  , "RoundJoin"+  , "SvgMiterJoin"+  ]++e_PenStyle =+  makeQtEnum (ident1 "Qt" "PenStyle") qtInclude+  [ "NoPen"+  , "SolidLine"+  , "DashLine"+  , "DotLine"+  , "DashDotLine"+  , "DashDotDotLine"+  , "CustomDashLine"+  ]++(e_ScreenOrientation, fl_ScreenOrientations) =+  makeQtEnumAndFlags (ident1 "Qt" "ScreenOrientation") "ScreenOrientations" qtInclude+  [ "PrimaryOrientation"+  , "PortraitOrientation"+  , "LandscapeOrientation"+  , "InvertedPortraitOrientation"+  , "InvertedLandscapeOrientation"+  ]++e_ScreenOrientation_minVersion = [5, 0]++e_ScrollBarPolicy =+  makeQtEnum (ident1 "Qt" "ScrollBarPolicy") qtInclude+  [ "ScrollBarAsNeeded"+  , "ScrollBarAlwaysOff"+  , "ScrollBarAlwaysOn"+  ]++e_ScrollPhase =+  makeQtEnum (ident1 "Qt" "ScrollPhase") qtInclude+  [ "ScrollBegin"+  , "ScrollUpdate"+  , "ScrollEnd"+  ]++e_ScrollPhase_minVersion = [5, 2]++e_ShortcutContext =+  makeQtEnum (ident1 "Qt" "ShortcutContext") qtInclude+  [ "WidgetShortcut"+  , "WidgetWithChildrenShortcut"+  , "WindowShortcut"+  , "ApplicationShortcut"+  ]++e_SizeHint =+  makeQtEnum (ident1 "Qt" "SizeHint") qtInclude+  [ "MinimumSize"+  , "PreferredSize"+  , "MaximumSize"+  , "MinimumDescent"+  ]++e_SizeMode =+  makeQtEnum (ident1 "Qt" "SizeMode") qtInclude+  [ "AbsoluteSize"+  , "RelativeSize"+  ]++e_SortOrder =+  makeQtEnum (ident1 "Qt" "SortOrder") qtInclude+  [ "AscendingOrder"+  , "DescendingOrder"+  ]++e_TabFocusBehavior =+  makeQtEnum (ident1 "Qt" "TabFocusBehavior") qtInclude+  [ "NoTabFocus"+  , "TabFocusTextControls"+  , "TabFocusListControls"+  , "TabFocusAllControls"+  ]++e_TextElideMode =+  makeQtEnum (ident1 "Qt" "TextElideMode") qtInclude+  [ "ElideLeft"+  , "ElideRight"+  , "ElideMiddle"+  , "ElideNone"+  ]++e_TextFlag =+  makeQtEnum (ident1 "Qt" "TextFlag") qtInclude+  [ "TextSingleLine"+  , "TextDontClip"+  , "TextExpandTabs"+  , "TextShowMnemonic"+  , "TextWordWrap"+  , "TextWrapAnywhere"+  , "TextHideMnemonic"+  , "TextDontPrint"+  , "TextIncludeTrailingSpaces"+  , "TextJustificationForced"+  ]++e_TextFormat =+  makeQtEnum (ident1 "Qt" "TextFormat") qtInclude $+  collect+  [ just "PlainText"+  , just "RichText"+  , just "AutoText"+  , test (qtVersion < [5, 0]) "LogText"+  ]++(e_TextInteractionFlag, fl_TextInteractionFlags) =+  makeQtEnumAndFlags (ident1 "Qt" "TextInteractionFlag") "TextInteractionFlags" qtInclude+  [ "NoTextInteraction"+  , "TextSelectableByMouse"+  , "TextSelectableByKeyboard"+  , "LinksAccessibleByMouse"+  , "LinksAccessibleByKeyboard"+  , "TextEditable"+  , "TextEditorInteraction"+  , "TextBrowserInteraction"+  ]++e_TileRule =+  makeQtEnum (ident1 "Qt" "TileRule") qtInclude+  [ "StretchTile"+  , "RepeatTile"+  , "RoundTile"+  ]++e_TimeSpec =+  makeQtEnum (ident1 "Qt" "TimeSpec") qtInclude+  [ "LocalTime"+  , "UTC"+  , "OffsetFromUTC"+  , "TimeZone"+  ]++e_TimerType =+  makeQtEnum (ident1 "Qt" "TimerType") qtInclude+  [ "PreciseTimer"+  , "CoarseTimer"+  , "VeryCoarseTimer"+  ]++(e_ToolBarArea, fl_ToolBarAreas) =+  makeQtEnumAndFlags (ident1 "Qt" "ToolBarArea") "ToolBarAreas" qtInclude+  [ "NoToolBarArea"+  , "LeftToolBarArea"+  , "RightToolBarArea"+  , "TopToolBarArea"+  , "BottomToolBarArea"+  , "AllToolBarAreas"+  ]++e_ToolButtonStyle =+  makeQtEnum (ident1 "Qt" "ToolButtonStyle") qtInclude+  [ "ToolButtonIconOnly"+  , "ToolButtonTextOnly"+  , "ToolButtonTextBesideIcon"+  , "ToolButtonTextUnderIcon"+  , "ToolButtonFollowStyle"+  ]++(e_TouchPointState, fl_TouchPointStates) =+  makeQtEnumAndFlags (ident1 "Qt" "TouchPointState") "TouchPointStates" qtInclude+  [ "TouchPointPressed"+  , "TouchPointMoved"+  , "TouchPointStationary"+  , "TouchPointReleased"+  ]++e_TransformationMode =+  makeQtEnum (ident1 "Qt" "TransformationMode") qtInclude+  [ "FastTransformation"+  , "SmoothTransformation"+  ]++e_UIEffect =+  makeQtEnum (ident1 "Qt" "UIEffect") qtInclude+  [ "UI_AnimateMenu"+  , "UI_FadeMenu"+  , "UI_AnimateCombo"+  , "UI_AnimateTooltip"+  , "UI_FadeTooltip"+  , "UI_AnimateToolBox"+  ]++e_WhiteSpaceMode =+  makeQtEnum (ident1 "Qt" "WhiteSpaceMode") qtInclude+  [ "WhiteSpaceNormal"+  , "WhiteSpacePre"+  , "WhiteSpaceNoWrap"+  ]++e_WidgetAttribute =+  makeQtEnum (ident1 "Qt" "WidgetAttribute") qtInclude+  [ "WA_AcceptDrops"+  , "WA_AlwaysShowToolTips"+  , "WA_ContentsPropagated"+  , "WA_CustomWhatsThis"+  , "WA_DeleteOnClose"+  , "WA_Disabled"+  , "WA_DontShowOnScreen"+  , "WA_ForceDisabled"+  , "WA_ForceUpdatesDisabled"+  , "WA_GroupLeader"+  , "WA_Hover"+  , "WA_InputMethodEnabled"+  , "WA_KeyboardFocusChange"+  , "WA_KeyCompression"+  , "WA_LayoutOnEntireRect"+  , "WA_LayoutUsesWidgetRect"+  , "WA_MacNoClickThrough"+  , "WA_MacOpaqueSizeGrip"+  , "WA_MacShowFocusRect"+  , "WA_MacNormalSize"+  , "WA_MacSmallSize"+  , "WA_MacMiniSize"+  , "WA_MacVariableSize"+  , "WA_MacBrushedMetal"+  , "WA_Mapped"+  , "WA_MouseNoMask"+  , "WA_MouseTracking"+  , "WA_Moved"+  , "WA_MSWindowsUseDirect3D"+  , "WA_NoChildEventsForParent"+  , "WA_NoChildEventsFromChildren"+  , "WA_NoMouseReplay"+  , "WA_NoMousePropagation"+  , "WA_TransparentForMouseEvents"+  , "WA_NoSystemBackground"+  , "WA_OpaquePaintEvent"+  , "WA_OutsideWSRange"+  , "WA_PaintOnScreen"+  , "WA_PaintUnclipped"+  , "WA_PendingMoveEvent"+  , "WA_PendingResizeEvent"+  , "WA_QuitOnClose"+  , "WA_Resized"+  , "WA_RightToLeft"+  , "WA_SetCursor"+  , "WA_SetFont"+  , "WA_SetPalette"+  , "WA_SetStyle"+  , "WA_ShowModal"+  , "WA_StaticContents"+  , "WA_StyleSheet"+  , "WA_StyleSheetTarget"+  , "WA_TabletTracking"+  , "WA_TranslucentBackground"+  , "WA_UnderMouse"+  , "WA_UpdatesDisabled"+  , "WA_WindowModified"+  , "WA_WindowPropagation"+  , "WA_MacAlwaysShowToolWindow"+  , "WA_SetLocale"+  , "WA_StyledBackground"+  , "WA_ShowWithoutActivating"+  , "WA_NativeWindow"+  , "WA_DontCreateNativeAncestors"+  , "WA_X11NetWmWindowTypeDesktop"+  , "WA_X11NetWmWindowTypeDock"+  , "WA_X11NetWmWindowTypeToolBar"+  , "WA_X11NetWmWindowTypeMenu"+  , "WA_X11NetWmWindowTypeUtility"+  , "WA_X11NetWmWindowTypeSplash"+  , "WA_X11NetWmWindowTypeDialog"+  , "WA_X11NetWmWindowTypeDropDownMenu"+  , "WA_X11NetWmWindowTypePopupMenu"+  , "WA_X11NetWmWindowTypeToolTip"+  , "WA_X11NetWmWindowTypeNotification"+  , "WA_X11NetWmWindowTypeCombo"+  , "WA_X11NetWmWindowTypeDND"+  , "WA_MacFrameworkScaled"+  , "WA_AcceptTouchEvents"+  , "WA_TouchPadAcceptSingleTouchEvents"+  , "WA_X11DoNotAcceptFocus"+  , "WA_AlwaysStackOnTop"+  , "WA_ContentsMarginsRespectsSafeArea"+  ]++e_WindowFrameSection =+  makeQtEnum (ident1 "Qt" "WindowFrameSection") qtInclude+  [ "NoSection"+  , "LeftSection"+  , "TopLeftSection"+  , "TopSection"+  , "TopRightSection"+  , "RightSection"+  , "BottomRightSection"+  , "BottomSection"+  , "BottomLeftSection"+  , "TitleBarArea"+  ]++e_WindowModality =+  makeQtEnum (ident1 "Qt" "WindowModality") qtInclude+  [ "NonModal"+  , "WindowModal"+  , "ApplicationModal"+  ]++(e_WindowState, fl_WindowStates) =+  makeQtEnumAndFlags (ident1 "Qt" "WindowState") "WindowStates" qtInclude+  [ "WindowNoState"+  , "WindowMinimized"+  , "WindowMaximized"+  , "WindowFullScreen"+  , "WindowActive"+  ]++(e_WindowType, fl_WindowFlags) =+  makeQtEnumAndFlags (ident1 "Qt" "WindowType") "WindowFlags" qtInclude $+  [ "Widget"+  , "Window"+  , "Dialog"+  , "Sheet"+  , "Drawer"+  , "Popup"+  , "Tool"+  , "ToolTip"+  , "SplashScreen"+  , "Desktop"+  , "SubWindow"+  , "ForeignWindow"+  , "CoverWindow"+  ]  f_escape =   addReqIncludes [includeStd "QTextDocument"] $
src/Graphics/UI/Qtah/Generator/Interface/Gui.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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.Gui (modules) where  import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QActionEvent as QActionEvent+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QBackingStore as QBackingStore+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QBitmap as QBitmap 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@@ -28,6 +30,8 @@ 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.QFontDatabase as QFontDatabase+import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QGradient as QGradient import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QHideEvent as QHideEvent import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QHoverEvent as QHoverEvent import qualified Graphics.UI.Qtah.Generator.Interface.Gui.QIcon as QIcon@@ -64,6 +68,8 @@ modules :: [AModule] modules =   [ QActionEvent.aModule+  , QBackingStore.aModule+  , QBitmap.aModule   , QBrush.aModule   , QClipboard.aModule   , QCloseEvent.aModule@@ -74,6 +80,8 @@   , QExposeEvent.aModule   , QFocusEvent.aModule   , QFont.aModule+  , QFontDatabase.aModule+  , QGradient.aModule   , QHideEvent.aModule   , QHoverEvent.aModule   , QIcon.aModule
src/Graphics/UI/Qtah/Generator/Interface/Gui/QActionEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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.QActionEvent (   aModule,+  c_QActionEvent   ) where  import Foreign.Hoppy.Generator.Spec (@@ -27,6 +28,7 @@   makeClass,   mkConstMethod,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (enumT, objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction)@@ -48,6 +50,6 @@   makeClass (ident "QActionEvent") Nothing [c_QEvent]   [ mkCtor "new" [enumT e_Type, ptrT $ objT c_QAction]   , mkCtor "newBefore" [enumT e_Type, ptrT $ objT c_QAction]-  , mkConstMethod "action" [] $ ptrT $ objT c_QAction-  , mkConstMethod "before" [] $ ptrT $ objT c_QAction+  , mkConstMethod "action" np $ ptrT $ objT c_QAction+  , mkConstMethod "before" np $ ptrT $ objT c_QAction   ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QBackingStore.hs view
@@ -0,0 +1,79 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QBackingStore (+  aModule,+  c_QBackingStore,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod,+  mkMethod',+  np,+  )+import Foreign.Hoppy.Generator.Types (+  boolT,+  intT,+  objT,+  ptrT,+  voidT,+  )+import Foreign.Hoppy.Generator.Version (collect, just)+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.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), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Gui", "QBackingStore"]+  [ qtExport c_QBackingStore+  ]++c_QBackingStore =+  addReqIncludes [includeStd "QBackingStore"] $+  classSetEntityPrefix "" $+  makeClass (ident "QBackingStore") Nothing [] $+  collect+  [ just $ mkCtor "new" [ptrT $ objT c_QWindow]+  , just $ mkMethod "beginPaint" [objT c_QRegion] voidT+  , just $ mkMethod "endPaint" np voidT+  , just $ mkMethod' "flush" "flush" [objT c_QRegion] voidT+  , just $ mkMethod' "flush" "flushWithWindow" [objT c_QRegion, ptrT $ objT c_QWindow] voidT+  , just $ mkMethod' "flush" "flushAll" [objT c_QRegion, ptrT $ objT c_QWindow, objT c_QPoint] voidT+  -- TODO QPlatformBackingStore* handle() const+  , just $ mkConstMethod "hasStaticContents" np boolT+  , just $ mkMethod "paintDevice" np $ ptrT $ objT c_QPaintDevice+  , just $ mkMethod "resize" [objT c_QSize] voidT+  , just $ mkMethod "scroll" [objT c_QRegion, intT, intT] boolT+  , just $ mkMethod "setStaticContents" [objT c_QRegion] voidT+  , just $ mkConstMethod "size" np $ objT c_QSize+  , just $ mkConstMethod "staticContents" np $ objT c_QRegion+  , just $ mkConstMethod "window" np $ ptrT $ objT c_QWindow+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QBitmap.hs view
@@ -0,0 +1,90 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QBitmap (+  aModule,+  c_QBitmap,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkConstMethod,+  mkCtor,+  mkMethod,+  mkStaticMethod',+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable, Copyable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (+  enumT,+  intT,+  objT,+  refT,+  voidT,+  constT,+  ptrT,+  charT,+  ucharT+  )+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+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 (fl_ImageConversionFlags)+import Graphics.UI.Qtah.Generator.Interface.Gui.QImage (c_QImage, e_Format)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap)+import Graphics.UI.Qtah.Generator.Interface.Gui.QTransform (c_QTransform)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Gui", "QBitmap"]+  [ qtExport c_QBitmap+  ]++c_QBitmap =+  addReqIncludes [includeStd "QBitmap"] $+  classSetConversionToGc $+  classAddFeatures [Assignable, Copyable] $+  classSetEntityPrefix "" $+  makeClass (ident "QBitmap") Nothing [c_QPixmap] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithSize" [objT c_QSize]+  , just $ mkCtor "newWithSizeRaw" [intT, intT]+  , just $ mkCtor "newWithFile" [objT c_QString]+    -- TODO QString wrapper:+  , just $ mkCtor "newWithFileAndFormat" [objT c_QString, ptrT $ constT charT ]+  , just $ mkMethod "clear" np voidT+  , just $ mkMethod "swap" [refT $ objT c_QBitmap] voidT+  , just $ mkConstMethod "transformed" [objT c_QTransform] $ objT c_QBitmap+  , just $ mkStaticMethod' "fromData" "fromData" [objT c_QSize, ptrT $ constT ucharT] $ objT c_QBitmap+  , just $ mkStaticMethod' "fromData" "fromDataAll" [objT c_QSize, ptrT $ constT ucharT, enumT e_Format] $ objT c_QBitmap+  , just $ mkStaticMethod' "fromImage" "fromImage" [objT c_QImage] $ objT c_QBitmap+  , just $ mkStaticMethod' "fromImage" "fromImageAll" [objT c_QImage, flagsT fl_ImageConversionFlags] $ objT c_QBitmap+  ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QBitmap.hs-boot view
@@ -0,0 +1,25 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QBitmap (+  c_QBitmap,+  ) where++import Foreign.Hoppy.Generator.Spec (Class)++c_QBitmap :: Class+
src/Graphics/UI/Qtah/Generator/Interface/Gui/QBrush.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -33,6 +32,7 @@   mkMethod,   mkMethod',   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -52,19 +52,19 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QBrush"]-  [ QtExport $ ExportClass c_QBrush ]+  [ qtExport c_QBrush ]  c_QBrush =   addReqIncludes [includeStd "QBrush"] $   classSetConversionToGc $   classAddFeatures [Assignable, Copyable, Equatable] $   classSetEntityPrefix "" $-  makeClass (ident "QBrush") Nothing [] $-  [ mkCtor "new" []+  makeClass (ident "QBrush") Nothing []+  [ mkCtor "new" np   , mkCtor "newWithColor" [objT c_QColor]   , mkProp "color" $ objT c_QColor-    -- TODO mkConstMethod "gradient" [] $ ptrT $ constT $ objT c_QGradient-  , mkConstMethod "isOpaque" [] boolT+    -- TODO mkConstMethod "gradient" np $ ptrT $ constT $ objT c_QGradient+  , mkConstMethod "isOpaque" np boolT     -- TODO mkProp "matrix" $ objT c_QMatrix   , mkMethod' "setColor" "setGlobalColor" [enumT e_GlobalColor] voidT   , mkProp "style" $ enumT e_BrushStyle
src/Graphics/UI/Qtah/Generator/Interface/Gui/QClipboard.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,7 +22,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetDtorPrivate,   classSetEntityPrefix,@@ -33,17 +32,18 @@   mkConstMethod,   mkConstMethod',   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, objT, refT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Gui.QImage (c_QImage) import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_Listener,-  c_ListenerQClipboardMode,+  listener,+  listenerQClipboardMode,   ) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types@@ -53,9 +53,9 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QClipboard"] $-  (QtExport $ ExportClass c_QClipboard) :+  (qtExport c_QClipboard) :   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_Mode ]+  [ qtExport e_Mode ]  c_QClipboard =   addReqIncludes [includeStd "QClipboard"] $@@ -63,15 +63,15 @@   classSetEntityPrefix "" $   makeClass (ident "QClipboard") Nothing [c_QObject] $   collect-  [ just $ mkMethod' "clear" "clear" [] voidT+  [ just $ mkMethod' "clear" "clear" np voidT   , just $ mkMethod' "clear" "clearWithMode" [enumT e_Mode] voidT-  , just $ mkConstMethod' "image" "image" [] $ objT c_QImage+  , just $ mkConstMethod' "image" "image" np $ objT c_QImage   , just $ mkConstMethod' "image" "imageAll" [enumT e_Mode] $ objT c_QImage     -- TODO mimeData-  , just $ mkConstMethod "ownsClipboard" [] boolT-  , test (qtVersion >= [4, 2]) $ mkConstMethod "ownsFindBuffer" [] boolT-  , just $ mkConstMethod "ownsSelection" [] boolT-  , just $ mkConstMethod' "pixmap" "pixmap" [] $ objT c_QPixmap+  , just $ mkConstMethod "ownsClipboard" np boolT+  , test (qtVersion >= [4, 2]) $ mkConstMethod "ownsFindBuffer" np boolT+  , just $ mkConstMethod "ownsSelection" np boolT+  , just $ mkConstMethod' "pixmap" "pixmap" np $ objT c_QPixmap   , just $ mkConstMethod' "pixmap" "pixmapAll" [enumT e_Mode] $ objT c_QPixmap   , just $ mkMethod' "setImage" "setImage" [objT c_QImage] voidT   , just $ mkMethod' "setImage" "setImageAll" [objT c_QImage, enumT e_Mode] voidT@@ -80,9 +80,9 @@   , just $ mkMethod' "setPixmap" "setPixmapAll" [objT c_QPixmap, enumT e_Mode] voidT   , just $ mkMethod' "setText" "setText" [objT c_QString] voidT   , just $ mkMethod' "setText" "setTextWithMode" [objT c_QString, enumT e_Mode] voidT-  , just $ mkConstMethod "supportsFindBuffer" [] boolT-  , just $ mkConstMethod "supportsSelection" [] boolT-  , just $ mkConstMethod' "text" "text" [] $ objT c_QString+  , just $ mkConstMethod "supportsFindBuffer" np boolT+  , just $ mkConstMethod "supportsSelection" np boolT+  , just $ mkConstMethod' "text" "text" np $ objT c_QString   , just $ mkConstMethod' "text" "textWithMode" [enumT e_Mode] $ objT c_QString   , just $ mkConstMethod' "text" "textSubtype" [refT $ objT c_QString] $ objT c_QString   , just $ mkConstMethod' "text" "textSubtypeWithMode" [refT $ objT c_QString, enumT e_Mode] $@@ -91,15 +91,15 @@  signals =   collect-  [ test (qtVersion >= [4, 2]) $ makeSignal c_QClipboard "changed" c_ListenerQClipboardMode-  , just $ makeSignal c_QClipboard "dataChanged" c_Listener-  , test (qtVersion >= [4, 2]) $ makeSignal c_QClipboard "findBufferChanged" c_Listener-  , just $ makeSignal c_QClipboard "selectionChanged" c_Listener+  [ test (qtVersion >= [4, 2]) $ makeSignal c_QClipboard "changed" listenerQClipboardMode+  , just $ makeSignal c_QClipboard "dataChanged" listener+  , test (qtVersion >= [4, 2]) $ makeSignal c_QClipboard "findBufferChanged" listener+  , just $ makeSignal c_QClipboard "selectionChanged" listener   ]  e_Mode =   makeQtEnum (ident1 "QClipboard" "Mode") [includeStd "QClipboard"]-  [ (0, ["clipboard"])-  , (1, ["selection"])-  , (2, ["find", "buffer"])+  [ "Clipboard"+  , "Selection"+  , "FindBuffer"   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QClipboard.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by
src/Graphics/UI/Qtah/Generator/Interface/Gui/QCloseEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -26,6 +26,7 @@   includeStd,   makeClass,   mkCtor,+  np,   ) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -42,5 +43,5 @@   addReqIncludes [includeStd "QCloseEvent"] $   classSetEntityPrefix "" $   makeClass (ident "QCloseEvent") Nothing [c_QEvent]-  [ mkCtor "new" []+  [ mkCtor "new" np   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QColor.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,8 +15,6 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- module Graphics.UI.Qtah.Generator.Interface.Gui.QColor (   aModule,   c_QColor,@@ -24,9 +22,6 @@   ) where  import Control.Monad (forM_)-#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat)-#endif import Foreign.Hoppy.Generator.Language.Haskell (   addImports,   indent,@@ -40,7 +35,6 @@     classHaskellConversionToCppFn,     classHaskellConversionType   ),-  Export (ExportEnum, ExportFn, ExportClass),   Purity (Pure),   addReqIncludes,   classSetEntityPrefix,@@ -59,6 +53,7 @@   mkMethod',   mkProp,   mkStaticMethod,+  np,   toExtName,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (@@ -67,7 +62,7 @@   ) 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.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_GlobalColor, qreal)@@ -86,19 +81,19 @@   AQtModule $   makeQtModule ["Gui", "QColor"] $   collect-  [ 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+  [ just $ qtExport c_QColor+  , test (qtVersion >= [5, 2]) $ qtExport e_NameFormat+  , just $ qtExport e_Spec+  , just $ qtExport f_qAlpha+  , just $ qtExport f_qBlue+  , just $ qtExport f_qGray+  , just $ qtExport f_qGrayFromRgb+  , just $ qtExport f_qGreen+  , test (qtVersion >= [5, 3]) $ qtExport f_qPremultiply+  , just $ qtExport f_qRed+  , just $ qtExport f_qRgb+  , just $ qtExport f_qRgba+  , test (qtVersion >= [5, 3]) $ qtExport f_qUnpremultiply   ]  c_QColor =@@ -108,7 +103,7 @@   classSetEntityPrefix "" $   makeClass (ident "QColor") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newQRgb" [qrgb]   , just $ mkCtor "newRgb" [intT, intT, intT]   , just $ mkCtor "newRgba" [intT, intT, intT, intT]@@ -116,45 +111,45 @@   , just $ mkCtor "newGlobalColor" [enumT e_GlobalColor]   , just $ mkProp "alpha" intT   , just $ mkProp "alphaF" qreal-  , just $ mkConstMethod "black" [] intT-  , just $ mkConstMethod "blackF" [] qreal+  , just $ mkConstMethod "black" np intT+  , just $ mkConstMethod "blackF" np qreal   , just $ mkProp "blue" intT   , just $ mkProp "blueF" qreal-  , just $ mkStaticMethod "colorNames" [] $ objT c_QStringList+  , just $ mkStaticMethod "colorNames" np $ objT c_QStringList   , just $ mkConstMethod "convertTo" [enumT e_Spec] $ objT c_QColor-  , just $ mkConstMethod "cyan" [] intT-  , just $ mkConstMethod "cyanF" [] qreal-  , test (qtVersion >= [4, 3]) $ mkConstMethod' "darker" "darker" [] $ objT c_QColor+  , just $ mkConstMethod "cyan" np intT+  , just $ mkConstMethod "cyanF" np qreal+  , test (qtVersion >= [4, 3]) $ mkConstMethod' "darker" "darker" np $ objT c_QColor   , test (qtVersion >= [4, 3]) $ mkConstMethod' "darker" "darkerBy" [intT] $ objT c_QColor   , just $ mkProp "green" intT   , just $ mkProp "greenF" qreal-  , test (qtVersion >= [4, 6]) $ mkConstMethod "hslHue" [] intT-  , test (qtVersion >= [4, 6]) $ mkConstMethod "hslHueF" [] qreal-  , test (qtVersion >= [4, 6]) $ mkConstMethod "hslSaturation" [] intT-  , test (qtVersion >= [4, 6]) $ mkConstMethod "hslSaturationF" [] qreal-  , just $ mkConstMethod "hsvHue" [] intT-  , just $ mkConstMethod "hsvHueF" [] qreal-  , just $ mkConstMethod "hsvSaturation" [] intT-  , just $ mkConstMethod "hsvSaturationF" [] qreal-  , just $ mkConstMethod "hue" [] intT-  , just $ mkConstMethod "hueF" [] qreal-  , just $ mkConstMethod "isValid" [] boolT+  , test (qtVersion >= [4, 6]) $ mkConstMethod "hslHue" np intT+  , test (qtVersion >= [4, 6]) $ mkConstMethod "hslHueF" np qreal+  , test (qtVersion >= [4, 6]) $ mkConstMethod "hslSaturation" np intT+  , test (qtVersion >= [4, 6]) $ mkConstMethod "hslSaturationF" np qreal+  , just $ mkConstMethod "hsvHue" np intT+  , just $ mkConstMethod "hsvHueF" np qreal+  , just $ mkConstMethod "hsvSaturation" np intT+  , just $ mkConstMethod "hsvSaturationF" np qreal+  , just $ mkConstMethod "hue" np intT+  , just $ mkConstMethod "hueF" np qreal+  , just $ mkConstMethod "isValid" np boolT   , test (qtVersion >= [4, 7]) $ mkStaticMethod "isValidColor" [objT c_QString] boolT-  , test (qtVersion >= [4, 3]) $ mkConstMethod' "lighter" "lighter" [] $ objT c_QColor+  , test (qtVersion >= [4, 3]) $ mkConstMethod' "lighter" "lighter" np $ objT c_QColor   , test (qtVersion >= [4, 3]) $ mkConstMethod' "lighter" "lighterBy" [intT] $ objT c_QColor-  , test (qtVersion >= [4, 6]) $ mkConstMethod "lightness" [] intT-  , test (qtVersion >= [4, 6]) $ mkConstMethod "lightnessF" [] qreal-  , just $ mkConstMethod "magenta" [] intT-  , just $ mkConstMethod "magentaF" [] qreal-  , just $ mkConstMethod' "name" "name" [] $ objT c_QString+  , test (qtVersion >= [4, 6]) $ mkConstMethod "lightness" np intT+  , test (qtVersion >= [4, 6]) $ mkConstMethod "lightnessF" np qreal+  , just $ mkConstMethod "magenta" np intT+  , just $ mkConstMethod "magentaF" np qreal+  , just $ mkConstMethod' "name" "name" np $ objT c_QString   , test (qtVersion >= [5, 2]) $     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 $ mkConstMethod "rgb" np qrgb+  , just $ mkConstMethod "rgba" np qrgb+  , just $ mkConstMethod "saturation" np intT+  , just $ mkConstMethod "saturationF" np qreal   , just $ mkMethod' "setCmyk" "setCmyk" [intT, intT, intT, intT] voidT   , just $ mkMethod' "setCmyk" "setCmyka" [intT, intT, intT, intT, intT] voidT   , just $ mkMethod' "setCmykF" "setCmykF" [qreal, qreal, qreal, qreal] voidT@@ -174,15 +169,15 @@   , just $ mkMethod' "setRgb" "setRgba" [intT, intT, intT, intT] voidT   , just $ mkMethod' "setRgbF" "setRgbF" [qreal, qreal, qreal] voidT   , just $ mkMethod' "setRgbF" "setRgbaF" [qreal, qreal, qreal, qreal] voidT-  , just $ mkConstMethod "spec" [] $ enumT e_Spec-  , just $ mkConstMethod "toCmyk" [] $ objT c_QColor-  , just $ mkConstMethod "toHsl" [] $ objT c_QColor-  , just $ mkConstMethod "toHsv" [] $ objT c_QColor-  , just $ mkConstMethod "toRgb" [] $ objT c_QColor-  , just $ mkConstMethod "value" [] intT-  , just $ mkConstMethod "valueF" [] qreal-  , just $ mkConstMethod "yellow" [] intT-  , just $ mkConstMethod "yellowF" [] qreal+  , just $ mkConstMethod "spec" np $ enumT e_Spec+  , just $ mkConstMethod "toCmyk" np $ objT c_QColor+  , just $ mkConstMethod "toHsl" np $ objT c_QColor+  , just $ mkConstMethod "toHsv" np $ objT c_QColor+  , just $ mkConstMethod "toRgb" np $ objT c_QColor+  , just $ mkConstMethod "value" np intT+  , just $ mkConstMethod "valueF" np qreal+  , just $ mkConstMethod "yellow" np intT+  , just $ mkConstMethod "yellowF" np qreal   ]    where@@ -222,33 +217,36 @@           sayLn "QtahP.return this'"        , classHaskellConversionFromCppFn = Just $ do-        addImports $ mconcat [hsImports "Prelude" ["($)", "(>>=)"],+        addImports $ mconcat [hsImports "Prelude" ["($)", "(++)", "(>>=)"],                               importForPrelude,                               importForRuntime,                               hColorImport]         sayLn "\\this' -> spec this' >>= \\spec' -> case spec' of"-        indent $ forM_ components $ \(spec, letters, getters) -> do-          saysLn [spec, " -> do"]-          indent $ do-            forM_ (zip letters getters) $ \(var, get) ->-              saysLn [[var], "' <- QtahP.fmap QtahFHR.coerceIntegral $ ", get, " this'"]-            saysLn $ ["QtahP.return $ HColor.", spec] ++ map (\var -> [' ', var, '\'']) letters+        indent $ do+          forM_ components $ \(spec, letters, getters) -> do+            saysLn [spec, " -> do"]+            indent $ do+              forM_ (zip letters getters) $ \(var, get) ->+                saysLn [[var], "' <- QtahP.fmap QtahFHR.coerceIntegral $ ", get, " this'"]+              saysLn $ ["QtahP.return $ HColor.", spec] ++ map (\var -> [' ', var, '\'']) letters+          saysLn ["_ -> QtahP.error $ \"HColor's Decodable instance doesn't understand ",+                  "QColor::Spec \" ++ QtahP.show spec' ++ \".\""]       }  -- Introduced in Qt 5.2. e_NameFormat =   makeQtEnum (ident1 "QColor" "NameFormat") [includeStd "QColor"]-  [ (0, ["hex", "rgb"])-  , (1, ["hex", "argb"])+  [ "HexRgb"+  , "HexArgb"   ]  e_Spec =   makeQtEnum (ident1 "QColor" "Spec") [includeStd "QColor"]-  [ (0, ["invalid"])-  , (1, ["rgb"])-  , (2, ["hsv"])-  , (3, ["cmyk"])-  , (4, ["hsl"])+  [ "Invalid"+  , "Rgb"+  , "Hsv"+  , "Cmyk"+  , "Hsl"   ]  -- | This is a typedef QRgb that holds a AARRGGBB value and is
src/Graphics/UI/Qtah/Generator/Interface/Gui/QCursor.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -31,14 +30,19 @@   mkCtor,   mkStaticMethod,   mkStaticMethod',+  mkConstMethod,+  mkMethod,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),   classAddFeatures,   )-import Foreign.Hoppy.Generator.Types (enumT, intT, objT, voidT)-import Foreign.Hoppy.Generator.Version (collect, just)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Foreign.Hoppy.Generator.Types (enumT, intT, objT, voidT, refT, constT, ptrT, enumT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Gui.QBitmap (c_QBitmap) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_CursorShape) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -49,23 +53,33 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QCursor"]-  [ QtExport $ ExportClass c_QCursor ]+  [ qtExport c_QCursor ]  c_QCursor =   addReqIncludes [includeStd "QCursor"] $   classSetConversionToGc $-  classAddFeatures (if qtVersion >= [5, 11]+  classAddFeatures (if qtVersion >= [5, 10]                     then [Assignable, Copyable, Equatable]                     else [Assignable, Copyable]) $   classSetEntityPrefix "" $   makeClass (ident "QCursor") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithCursorShape" [enumT e_CursorShape]-    -- TODO Methods.+  , just $ mkCtor "newWithPixmap" [refT $ constT $ objT c_QPixmap]+  , just $ mkCtor "newWithPixmapAndHotSpot" [refT $ constT $ objT c_QPixmap, intT, intT]+  , just $ mkCtor "newWithBitmap" [refT $ constT $ objT c_QBitmap, refT $ constT $ objT c_QBitmap]+  , just $ mkCtor "newWithBitmapAndHotSpot" [refT $ constT $ objT c_QBitmap, refT $ constT $ objT c_QBitmap, intT, intT]+  , just $ mkConstMethod "bitmap" np $ ptrT $ constT $ objT c_QBitmap+  , just $ mkConstMethod "hotSpot" np $ objT c_QPoint+  , just $ mkConstMethod "mask" np $ ptrT $ constT $ objT c_QBitmap+  , just $ mkConstMethod "pixmap" np $ objT c_QPixmap+  , just $ mkMethod "setShape" [enumT e_CursorShape] voidT+  , just $ mkConstMethod "shape" np $ enumT e_CursorShape+  , test (qtVersion >= [5, 7]) $ mkMethod "swap" [refT $ objT c_QCursor] voidT      -- Static methods.-  , just $ mkStaticMethod "pos" [] $ objT c_QPoint+  , just $ mkStaticMethod "pos" np $ objT c_QPoint     -- TODO QPoint pos(const QScreen*)   , just $ mkStaticMethod "setPos" [objT c_QPoint] voidT   , just $ mkStaticMethod' "setPos" "setPosRaw" [intT, intT] voidT
src/Graphics/UI/Qtah/Generator/Interface/Gui/QDoubleValidator.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,7 +22,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -32,10 +31,11 @@   mkCtor,   mkMethod',   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (doubleT, 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.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject) import Graphics.UI.Qtah.Generator.Interface.Gui.QValidator (c_QValidator) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -46,9 +46,9 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QDoubleValidator"] $-  (map QtExport . collect)-  [ just $ ExportClass c_QDoubleValidator-  , test (qtVersion >= [4, 3]) $ ExportEnum e_Notation+  collect+  [ just $ qtExport c_QDoubleValidator+  , test (qtVersion >= [4, 3]) $ qtExport e_Notation   ]  c_QDoubleValidator =@@ -56,7 +56,7 @@   classSetEntityPrefix "" $   makeClass (ident "QDoubleValidator") Nothing [c_QValidator] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]   , just $ mkCtor "newWithOptions" [doubleT, doubleT, intT]   , just $ mkCtor "newWithOptionsAndParent" [doubleT, doubleT, intT, ptrT $ objT c_QObject]@@ -70,6 +70,6 @@  e_Notation =   makeQtEnum (ident1 "QDoubleValidator" "Notation") [includeStd "QDoubleValidator"]-  [ (0, ["standard", "notation"])-  , (1, ["scientific", "notation"])+  [ "StandardNotation"+  , "ScientificNotation"   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QEnterEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,6 +27,7 @@   makeClass,   mkConstMethod,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (intT, objT) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent)@@ -49,13 +50,13 @@   classSetEntityPrefix "" $   makeClass (ident "QEnterEvent") Nothing [c_QEvent]   [ mkCtor "new" [objT c_QPointF, objT c_QPointF, objT c_QPointF]-  , mkConstMethod "globalPos" [] $ objT c_QPoint-  , mkConstMethod "globalX" [] intT-  , mkConstMethod "globalY" [] intT-  , mkConstMethod "localPos" [] $ objT c_QPointF-  , mkConstMethod "pos" [] $ objT c_QPoint-  , mkConstMethod "screenPos" [] $ objT c_QPointF-  , mkConstMethod "windowPos" [] $ objT c_QPointF-  , mkConstMethod "x" [] intT-  , mkConstMethod "y" [] intT+  , mkConstMethod "globalPos" np $ objT c_QPoint+  , mkConstMethod "globalX" np intT+  , mkConstMethod "globalY" np intT+  , mkConstMethod "localPos" np $ objT c_QPointF+  , mkConstMethod "pos" np $ objT c_QPoint+  , mkConstMethod "screenPos" np $ objT c_QPointF+  , mkConstMethod "windowPos" np $ objT c_QPointF+  , mkConstMethod "x" np intT+  , mkConstMethod "y" np intT   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QExposeEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,6 +27,7 @@   makeClass,   mkConstMethod,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (objT) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent)@@ -48,5 +49,5 @@   classSetEntityPrefix "" $   makeClass (ident "QExposeEvent") Nothing [c_QEvent]   [ mkCtor "new" [objT c_QRegion]-  , mkConstMethod "region" [] $ objT c_QRegion+  , mkConstMethod "region" np $ objT c_QRegion   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QFocusEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -28,6 +28,7 @@   makeClass,   mkConstMethod,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, enumT) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent, e_Type)@@ -48,7 +49,7 @@   classSetEntityPrefix "" $   makeClass (ident "QFocusEvent") Nothing [c_QEvent]   [ mkCtor "new" [enumT e_Type, enumT e_FocusReason]-  , mkConstMethod "gotFocus" [] boolT-  , mkConstMethod "lostFocus" [] boolT-  , mkConstMethod "reason" [] $ enumT e_FocusReason+  , mkConstMethod "gotFocus" np boolT+  , mkConstMethod "lostFocus" np boolT+  , mkConstMethod "reason" np $ enumT e_FocusReason   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QFont.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -31,6 +30,7 @@   mkCtor,   mkConstMethod,   mkMethod,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -46,7 +46,7 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QFont"]-  [ QtExport $ ExportClass c_QFont+  [ qtExport c_QFont   ]  c_QFont =@@ -56,13 +56,13 @@   classSetEntityPrefix "" $   makeClass (ident "QFont") Nothing [] $   collect-  [ just $ mkCtor "new" []-  , just $ mkConstMethod "bold" [] boolT+  [ just $ mkCtor "new" np+  , just $ mkConstMethod "bold" np boolT   , just $ mkMethod "setBold" [boolT] voidT   , just $ mkMethod "setPixelSize" [intT] voidT   , just $ mkMethod "setPointSize" [intT] voidT   , just $ mkMethod "setWeight" [intT] voidT-  , just $ mkConstMethod "weight" [] intT+  , just $ mkConstMethod "weight" np intT   ]  -- TODO The rest of QFont.
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QFontDatabase.hs view
@@ -0,0 +1,53 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QFontDatabase (+  aModule,+  c_QFontDatabase,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkStaticMethod,+  )+import Foreign.Hoppy.Generator.Types (intT, objT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule =+  AQtModule $+  makeQtModule ["Gui", "QFontDatabase"]+  [ qtExport c_QFontDatabase+  ]++c_QFontDatabase =+  addReqIncludes [includeStd "QFontDatabase"] $+  classSetEntityPrefix "" $+  makeClass (ident "QFontDatabase") Nothing [] $+  collect+  [ just $ mkStaticMethod "addApplicationFont" [objT c_QString] intT+  ]++-- TODO The rest of QFontDatabase.
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QGradient.hs view
@@ -0,0 +1,292 @@+ -- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QGradient (+  aModule,+  c_QGradient,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetConversionToGc,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod',+  mkCtor,+  mkMethod,+  mkProp,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Copyable, Equatable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (+  enumT,+  constT,+  objT,+  voidT,+  )+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal)+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", "QGradient"] $+  collect+  [ just $ qtExport c_QGradient+  , test (qtVersion >= [4, 4]) $ qtExport e_CoordinateMode+  , test (qtVersion >= [5, 12]) $ qtExport e_Preset+  , just $ qtExport e_Spread+  , just $ qtExport e_Type+  ]++c_QGradient =+  addReqIncludes [includeStd "QGradient"] $+  classSetConversionToGc $+  classAddFeatures [Copyable, Equatable] $+  classSetEntityPrefix "" $+  makeClass (ident "QGradient") Nothing [] $+  collect+  [ test (qtVersion >= [5, 12]) $ mkCtor "new" [enumT e_Preset]+  , test (qtVersion >= [4, 4]) $+    mkProp "coordinateMode" $ enumT e_CoordinateMode+  , just $ mkMethod "setColorAt" [qreal, constT $ objT c_QColor] voidT+  , just $ mkProp "spread" $ enumT e_Spread+  -- TODO void setStops(const QGradientStops &stopPoints)+  -- TODO QGradientStops stops() const+  , just $ mkConstMethod' "type" "getType" np $ enumT e_Type+  ]++e_CoordinateMode =+  makeQtEnum (ident1 "QGradient" "CoordinateMode") [includeStd "QGradient"]+  [ "LogicalMode"+  , "StretchToDeviceMode"+  , "ObjectBoundingMode"+  , "ObjectMode"+  ]++e_Preset =+  makeQtEnum (ident1 "QGradient" "Preset") [includeStd "QGradient"]+  [ "WarmFlame"+    {- TODO Fix off-by-one.  Also it looks like some of these are missing from+     the Qt headers (Arielle's Smile, Above Clouds)?+  , (1, ["night", "fade"])+  , (2, ["spring", "warmth"])+  , (3, ["juicy", "peach"])+  , (4, ["young", "passion"])+  , (5, ["lady", "lips"])+  , (6, ["sunny", "morning"])+  , (7, ["rainy", "ashville"])+  , (8, ["frozen", "dreams"])+  , (9, ["winter", "neva"])+  , (10, ["dusty", "grass"])+  , (11, ["tempting", "azure"])+  , (12, ["heavy", "rain"])+  , (13, ["amy", "crisp"])+  , (14, ["mean", "fruit"])+  , (15, ["deep", "blue"])+  , (16, ["ripe", "malinka"])+  , (17, ["cloudy", "knoxville"])+  , (18, ["malibu", "beach"])+  , (19, ["new", "life"])+  , (20, ["true", "sunset"])+  , (21, ["morpheus", "den"])+  , (22, ["rare", "wind"])+  , (23, ["near", "moon"])+  , (24, ["wild", "apple"])+  , (25, ["saint", "petersburg"])+  , (26, ["arielle's", "smile"])+  , (27, ["plum", "plate"])+  , (28, ["everlasting", "sky"])+  , (29, ["happy", "fisher"])+  , (30, ["blessing"])+  , (31, ["sharpeye", "eagle"])+  , (32, ["ladoga", "bottom"])+  , (33, ["lemon", "gate"])+  , (34, ["itmeo", "branding"])+  , (35, ["zeus", "miracle"])+  , (36, ["old", "hat"])+  , (37, ["star", "wine"])+  , (38, ["deep", "bluee"])+  , (39, ["coup", "de", "grace"])+  , (40, ["happy", "acid"])+  , (41, ["awesome", "pine"])+  , (42, ["new", "york"])+  , (43, ["shy", "rainbow"])+  , (44, ["loon", "crest"])+  , (45, ["mixed", "hopes"])+  , (46, ["fly", "high"])+  , (47, ["strong", "bliss"])+  , (48, ["fresh", "milk"])+  , (49, ["snow", "again"])+  , (50, ["february", "ink"])+  , (51, ["kind", "steel"])+  , (52, ["soft", "grass"])+  , (53, ["grown", "early"])+  , (54, ["sharp", "blues"])+  , (55, ["shady", "water"])+  , (56, ["dirty", "beauty"])+  , (57, ["great", "whale"])+  , (58, ["teen", "notebook"])+  , (59, ["polite", "rumors"])+  , (60, ["sweet", "period"])+  , (61, ["wide", "matrix"])+  , (62, ["soft", "cherish"])+  , (63, ["red", "salvation"])+  , (64, ["burning", "spring"])+  , (65, ["night", "party"])+  , (66, ["sky", "glider"])+  , (67, ["heaven", "peach"])+  , (68, ["purple", "division"])+  , (69, ["aqua", "splash"])+  , (70, ["above", "clouds"])+  , (71, ["spiky", "naga"])+  , (72, ["love", "kiss"])+  , (73, ["sharp", "glass"])+  , (74, ["clean", "mirror"])+  , (75, ["premium", "dark"])+  , (76, ["cold", "evening"])+  , (77, ["cochiti", "lake"])+  , (78, ["summer", "games"])+  , (79, ["passionate", "bed"])+  , (80, ["mountain", "rock"])+  , (81, ["desert", "hump"])+  , (82, ["jungle", "day"])+  , (83, ["phoenix", "start"])+  , (84, ["october", "silence"])+  , (85, ["faraway", "river"])+  , (86, ["alchemist", "lab"])+  , (87, ["over", "sun"])+  , (88, ["premium", "white"])+  , (89, ["mars", "party"])+  , (90, ["eternal", "constance"])+  , (91, ["japan", "blush"])+  , (92, ["smiling", "rain"])+  , (93, ["cloudy", "apple"])+  , (94, ["big", "mango"])+  , (95, ["healthy", "water"])+  , (96, ["amour", "amour"])+  , (97, ["risky", "concrete"])+  , (98, ["strong", "stick"])+  , (99, ["vicious", "stance"])+  , (100, ["palo", "alto"])+  , (101, ["happy", "memories"])+  , (102, ["midnight", "bloom"])+  , (103, ["crystalline"])+  , (104, ["raccoon", "back"])+  , (105, ["party", "bliss"])+  , (106, ["confident", "cloud"])+  , (107, ["le", "cocktail"])+  , (108, ["river", "city"])+  , (109, ["frozen", "berry"])+  , (110, ["elegance"])+  , (111, ["child", "care"])+  , (112, ["flying", "lemon"])+  , (113, ["new", "retrowave"])+  , (114, ["hidden", "jaguar"])+  , (115, ["above", "the", "sky"])+  , (116, ["nega"])+  , (117, ["dense", "water"])+  , (118, ["chemic", "aqua"])+  , (119, ["seashore"])+  , (120, ["marble", "wall"])+  , (121, ["cheerful", "caramel"])+  , (122, ["night", "sky"])+  , (123, ["magic", "lake"])+  , (124, ["young", "grass"])+  , (125, ["colorful", "peach"])+  , (126, ["gentle", "care"])+  , (127, ["plum", "bath"])+  , (128, ["happy", "unicorn"])+  , (129, ["full", "metall"])+  , (130, ["african", "field"])+  , (131, ["solid", "stone"])+  , (132, ["orange", "juice"])+  , (133, ["glass", "water"])+  , (134, ["slick", "carbon"])+  , (135, ["north", "miracle"])+  , (136, ["fruit", "blend"])+  , (137, ["millennium", "pine"])+  , (138, ["high", "flight"])+  , (139, ["mole", "hall"])+  , (140, ["earl", "gray"])+  , (141, ["space", "shift"])+  , (142, ["forest", "inei"])+  , (143, ["royal", "garden"])+  , (144, ["rich", "metal"])+  , (145, ["juicy", "cake"])+  , (146, ["smart", "indigo"])+  , (147, ["sand", "strike"])+  , (148, ["norse", "beauty"])+  , (149, ["aqua", "guidance"])+  , (150, ["sun", "veggie"])+  , (151, ["sea", "lord"])+  , (152, ["black", "sea"])+  , (153, ["grass", "shampoo"])+  , (154, ["landing", "aircraft"])+  , (155, ["witch", "dance"])+  , (156, ["sleepless", "night"])+  , (157, ["angel", "care"])+  , (158, ["crystal", "river"])+  , (159, ["soft", "lipstick"])+  , (160, ["salt", "mountain"])+  , (161, ["perfect", "white"])+  , (162, ["fresh", "oasis"])+  , (163, ["strict", "november"])+  , (164, ["morning", "salad"])+  , (165, ["deep", "relief"])+  , (166, ["sea", "strike"])+  , (167, ["night", "call"])+  , (168, ["supreme", "sky"])+  , (169, ["light", "blue"])+  , (170, ["mind", "crawl"])+  , (171, ["lily", "meadow"])+  , (172, ["sugar", "lollipop"])+  , (173, ["sweet", "dessert"])+  , (174, ["magic", "ray"])+  , (175, ["teen", "party"])+  , (176, ["frozen", "heat"])+  , (177, ["gagarin", "view"])+  , (178, ["fabled", "sunset"])+  , (179, ["perfect", "blue"])+  -}+  ]++e_Spread =+  makeQtEnum (ident1 "QGradient" "Spread") [includeStd "QGradient"]+  [ "PadSpread"+  , "ReflectSpread"+  , "RepeatSpread"+  ]++e_Type =+  makeQtEnum (ident1 "QGradient" "Type") [includeStd "QGradient"]+  [ "LinearGradient"+  , "RadialGradient"+  , "ConicalGradient"+  , "NoGradient"+  ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QHideEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,6 +27,7 @@   includeStd,   makeClass,   mkCtor,+  np,   ) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -44,5 +45,5 @@   addReqIncludes [includeStd "QHideEvent"] $   classSetEntityPrefix "" $   makeClass (ident "QHideEvent") Nothing [c_QEvent]-  [ mkCtor "new" []+  [ mkCtor "new" np   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QHoverEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,14 +27,16 @@   makeClass,   mkConstMethod,   mkCtor,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, enumT, objT)+import Foreign.Hoppy.Generator.Types (enumT, objT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent, e_Type) 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)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_KeyboardModifiers) import Graphics.UI.Qtah.Generator.Interface.Gui.QInputEvent (c_QInputEvent) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types@@ -56,9 +58,9 @@   [ test (qtVersion < [5, 0]) $ mkCtor "new" [enumT e_Type, objT c_QPoint, objT c_QPoint]   , test (qtVersion >= [5, 0]) $ mkCtor "new" [enumT e_Type, objT c_QPointF, objT c_QPointF]   , test (qtVersion >= [5, 0]) $ mkCtor "newWithModifiers"-    [enumT e_Type, objT c_QPointF, objT c_QPointF, bitspaceT bs_KeyboardModifiers]-  , just $ mkConstMethod "oldPos" [] $ objT c_QPoint-  , test (qtVersion >= [5, 0]) $ mkConstMethod "oldPosF" [] $ objT c_QPointF-  , just $ mkConstMethod "pos" [] $ objT c_QPoint-  , test (qtVersion >= [5, 0]) $ mkConstMethod "posF" [] $ objT c_QPointF+    [enumT e_Type, objT c_QPointF, objT c_QPointF, flagsT fl_KeyboardModifiers]+  , just $ mkConstMethod "oldPos" np $ objT c_QPoint+  , test (qtVersion >= [5, 0]) $ mkConstMethod "oldPosF" np $ objT c_QPointF+  , just $ mkConstMethod "pos" np $ objT c_QPoint+  , test (qtVersion >= [5, 0]) $ mkConstMethod "posF" np $ objT c_QPointF   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QIcon.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -36,13 +35,13 @@   mkMethod',   mkStaticMethod,   mkStaticMethod',+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable),   classAddFeatures,   ) import Foreign.Hoppy.Generator.Types (-  bitspaceT,   boolT,   enumT,   intT,@@ -53,13 +52,14 @@   voidT,   ) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQSize) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect) import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment) import Graphics.UI.Qtah.Generator.Interface.Gui.QPainter (c_QPainter) import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Gui.QWindow (c_QWindow)@@ -71,9 +71,9 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QIcon"]-  [ QtExport $ ExportClass c_QIcon-  , QtExport $ ExportEnum e_Mode-  , QtExport $ ExportEnum e_State+  [ qtExport c_QIcon+  , qtExport e_Mode+  , qtExport e_State   ]  c_QIcon =@@ -83,7 +83,7 @@   classSetEntityPrefix "" $   makeClass (ident "QIcon") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np     -- TODO QIcon(QIconEngine*)   , just $ mkCtor "newWithFile" [objT c_QString]   , just $ mkCtor "newWithPixmap" [objT c_QPixmap]@@ -100,26 +100,26 @@     voidT   , just $ mkMethod' "addPixmap" "addPixmap" [objT c_QPixmap] voidT   , just $ mkMethod' "addPixmap" "addPixmapAll" [objT c_QPixmap, enumT e_Mode, enumT e_State] voidT-  , just $ mkConstMethod' "availableSizes" "availableSizes" [] $ objT c_QListQSize+  , just $ mkConstMethod' "availableSizes" "availableSizes" np $ objT c_QListQSize   , just $ mkConstMethod' "availableSizes" "availableSizesAll" [enumT e_Mode, enumT e_State] $     objT c_QListQSize-  , just $ mkConstMethod "cacheKey" [] int64T+  , just $ mkConstMethod "cacheKey" np int64T   , just $ mkStaticMethod' "fromTheme" "fromTheme" [objT c_QString] $ objT c_QIcon   , just $ mkStaticMethod' "fromTheme" "fromThemeWithFallback" [objT c_QString, objT c_QIcon] $     objT c_QIcon   , just $ mkStaticMethod "hasThemeIcon" [objT c_QString] boolT-  , test (qtVersion >= [5, 6]) $ mkConstMethod "isMask" [] boolT-  , just $ mkConstMethod "isNull" [] boolT-  , just $ mkConstMethod "name" [] $ objT c_QString+  , test (qtVersion >= [5, 6]) $ mkConstMethod "isMask" np boolT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "name" np $ objT c_QString   , just $ mkConstMethod' "paint" "paintWithRect"-    [ptrT $ objT c_QPainter, objT c_QRect] $ voidT+    [ptrT $ objT c_QPainter, objT c_QRect] voidT   , just $ mkConstMethod' "paint" "paintWithRectAll"-    [ptrT $ objT c_QPainter, objT c_QRect, bitspaceT bs_Alignment, enumT e_Mode, enumT e_State]+    [ptrT $ objT c_QPainter, objT c_QRect, flagsT fl_Alignment, enumT e_Mode, enumT e_State]     voidT   , just $ mkConstMethod' "paint" "paintWithRaw"-    [ptrT $ objT c_QPainter, intT, intT, intT, intT] $ voidT+    [ptrT $ objT c_QPainter, intT, intT, intT, intT] voidT   , just $ mkConstMethod' "paint" "paintWithRawAll"-    [ptrT $ objT c_QPainter, intT, intT, intT, intT, bitspaceT bs_Alignment, enumT e_Mode,+    [ptrT $ objT c_QPainter, intT, intT, intT, intT, flagsT fl_Alignment, enumT e_Mode,      enumT e_State]     voidT   , test (qtVersion >= [5, 1]) $ mkConstMethod' "pixmap" "pixmapExtent" [intT] $ objT c_QPixmap@@ -135,21 +135,21 @@   , just $ mkStaticMethod "setThemeName" [objT c_QString] voidT   , just $ mkStaticMethod "setThemeSearchPaths" [objT c_QStringList] voidT   , just $ mkMethod "swap" [refT $ objT c_QIcon] voidT-  , just $ mkStaticMethod "themeName" [] $ objT c_QString-  , just $ mkStaticMethod "themeSearchPaths" [] $ objT c_QStringList+  , just $ mkStaticMethod "themeName" np $ objT c_QString+  , just $ mkStaticMethod "themeSearchPaths" np $ objT c_QStringList     -- TODO operator QVariant() const   ]  e_Mode =   makeQtEnum (ident1 "QIcon" "Mode") [includeStd "QIcon"]-  [ (0, ["normal"])-  , (1, ["disabled"])-  , (2, ["active"])-  , (3, ["selected"])+  [ "Normal"+  , "Disabled"+  , "Active"+  , "Selected"   ]  e_State =   makeQtEnum (ident1 "QIcon" "State") [includeStd "QIcon"]-  [ (0, ["on"])-  , (1, ["off"])+  [ "On"+  , "Off"   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QIcon.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,10 +18,10 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QImage (   aModule,   c_QImage,+  e_Format,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   MethodApplicability (MStatic),   Purity (Nonpure),   addReqIncludes,@@ -41,6 +41,7 @@   mkMethod',   mkProp,   mkStaticMethod',+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -62,7 +63,7 @@   voidT,   ) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)@@ -89,9 +90,9 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QImage"]-  [ QtExport $ ExportClass c_QImage-  , QtExport $ ExportEnum e_Format-  , QtExport $ ExportEnum e_InvertMode+  [ qtExport c_QImage+  , qtExport e_Format+  , qtExport e_InvertMode   ]  c_QImage =@@ -104,7 +105,7 @@   makeClass (ident "QImage") Nothing [c_QPaintDevice] $   collect   [ -- Lots of constructors here!-    just $ mkCtor "new" []+    just $ mkCtor "new" np   , just $ mkCtor "newWithSize" [objT c_QSize, enumT e_Format]   , just $ mkCtor "newWithSizeRaw" [intT, intT, enumT e_Format]   , just $ mkCtor "newWithData"@@ -135,37 +136,37 @@     [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+  , just $ mkConstMethod "allGray" np boolT+  , just $ mkConstMethod "bitPlaneCount" np intT+  , just $ mkMethod "bits" np $ ptrT ucharT+  , just $ mkConstMethod' "bits" "bitsConst" np $ ptrT $ constT ucharT+  , just $ mkConstMethod "byteCount" np intT+  , just $ mkConstMethod "bytesPerLine" np intT     -- TODO cacheKey   , just $ mkConstMethod "color" [intT] qrgb   , just $ mkProp "colorCount" intT-  , just $ mkConstMethod "colorTable" [] $ toGcT $ objT c_QVectorQRgb+  , just $ mkConstMethod "colorTable" np $ 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 "createAlphaMask" np $ objT c_QImage  -- TODO Overload.+  , just $ mkConstMethod' "createHeuristicMask" "createHeuristicMask" np $ 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+  , just $ mkConstMethod "depth" np 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 $ mkConstMethod "format" np $ enumT e_Format   , just $ mkStaticMethod' "fromData" "fromDataByteArray" [objT c_QByteArray] $ objToHeapT c_QImage   , just $ makeFnMethod (ident2 "qtah" "qimage" "fromData") "fromDataByteArrayWithFormat"     MStatic Nonpure [objT c_QByteArray, objT c_QString] $ ptrT $ objT c_QImage@@ -173,12 +174,12 @@     objToHeapT c_QImage   , just $ makeFnMethod (ident2 "qtah" "qimage" "fromData") "fromDataRawWithFormat" MStatic Nonpure     [ptrT $ constT ucharT, intT, objT c_QString] $ ptrT $ objT c_QImage-  , just $ mkConstMethod "hasAlphaChannel" [] boolT-  , just $ mkConstMethod "height" [] intT-  , just $ mkMethod' "invertPixels" "invertPixels" [] voidT+  , just $ mkConstMethod "hasAlphaChannel" np boolT+  , just $ mkConstMethod "height" np intT+  , just $ mkMethod' "invertPixels" "invertPixels" np voidT   , just $ mkMethod' "invertPixels" "invertPixelsWithMode" [enumT e_InvertMode] voidT-  , just $ mkConstMethod "isGrayscale" [] boolT-  , just $ mkConstMethod "isNull" [] boolT+  , just $ mkConstMethod "isGrayscale" np boolT+  , just $ mkConstMethod "isNull" np 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@@ -200,8 +201,8 @@     -- 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 $ mkConstMethod "rect" np $ objT c_QRect+  , just $ mkConstMethod "rgbSwapped" np $ 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@@ -229,10 +230,10 @@   , 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 $ mkConstMethod "size" np $ 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+  , just $ mkConstMethod "textKeys" np $ objT c_QStringList     -- TODO toImageFormat     -- TODO toPixelFormat   , just $ mkConstMethod' "transformed" "transformedWithTransform" [objT c_QTransform] $@@ -245,40 +246,37 @@     -- TODO trueMatrix(const QMatrix&, ...)   , just $ mkConstMethod' "valid" "validAtPoint" [objT c_QPoint] boolT   , just $ mkConstMethod' "valid" "validAtRaw" [intT, intT] boolT-  , just $ mkConstMethod "width" [] intT+  , just $ mkConstMethod "width" np 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"])+  makeQtEnum (ident1 "QImage" "Format") [includeStd "QImage"]+  [ "Format_Invalid"+  , "Format_Mono"+  , "Format_MonoLSB"+  , "Format_Indexed8"+  , "Format_RGB32"+  , "Format_ARGB32"+  , "Format_ARGB32_Premultiplied"+  , "Format_RGB16"+  , "Format_ARGB8565_Premultiplied"+  , "Format_RGB666"+  , "Format_ARGB6666_Premultiplied"+  , "Format_RGB555"+  , "Format_ARGB8555_Premultiplied"+  , "Format_RGB888"+  , "Format_RGB444"+  , "Format_ARGB4444_Premultiplied"+  , "Format_RGBX8888"+  , "Format_RGBA8888_Premultiplied"+  , "Format_BGR30"+  , "Format_A2RGB30_Premultiplied"+  , "Format_Alpha8"+  , "Format_Grayscale8"   ]  e_InvertMode =-  makeQtEnum (ident1 "QImage" "InvertMode") [includeStd "QImage"] $-  [ (0, ["invert", "rgb"])-  , (1, ["invert", "rgba"])+  makeQtEnum (ident1 "QImage" "InvertMode") [includeStd "QImage"]+  [ "InvertRgb"+  , "InvertRgba"   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QInputEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,12 +27,14 @@   includeStd,   makeClass,   mkConstMethod,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, ulongT)+import Foreign.Hoppy.Generator.Types (ulongT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_KeyboardModifiers)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_KeyboardModifiers) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -49,6 +51,6 @@   classSetEntityPrefix "" $   makeClass (ident "QInputEvent") Nothing [c_QEvent] $   collect-  [ just $ mkConstMethod "modifiers" [] $ bitspaceT bs_KeyboardModifiers-  , test (qtVersion >= [5, 0]) $ mkConstMethod "timestamp" [] ulongT+  [ just $ mkConstMethod "modifiers" np $ flagsT fl_KeyboardModifiers+  , test (qtVersion >= [5, 0]) $ mkConstMethod "timestamp" np ulongT   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QIntValidator.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -30,6 +29,7 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)@@ -41,14 +41,14 @@  aModule =   AQtModule $-  makeQtModule ["Gui", "QIntValidator"] $-  [ QtExport $ ExportClass c_QIntValidator ]+  makeQtModule ["Gui", "QIntValidator"]+  [ qtExport c_QIntValidator ]  c_QIntValidator =   addReqIncludes [includeStd "QIntValidator"] $   classSetEntityPrefix "" $   makeClass (ident "QIntValidator") Nothing [c_QValidator]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QObject]   , mkCtor "newWithOptions" [intT, intT]   , mkCtor "newWithOptionsAndParent" [intT, intT, ptrT $ objT c_QObject]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QKeyEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,13 +27,15 @@   makeClass,   mkConstMethod,   mkCtor,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ushortT, word32T)+import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ushortT, word32T) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (e_Type) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_KeyboardModifiers)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_KeyboardModifiers) import Graphics.UI.Qtah.Generator.Interface.Gui.QInputEvent (c_QInputEvent) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types@@ -51,21 +53,21 @@   classSetEntityPrefix "" $   makeClass (ident "QKeyEvent") Nothing [c_QInputEvent] $   collect-  [ just $ mkCtor "new" [enumT e_Type, intT, bitspaceT bs_KeyboardModifiers]+  [ just $ mkCtor "new" [enumT e_Type, intT, flagsT fl_KeyboardModifiers]   , just $ mkCtor "newWithText"-    [enumT e_Type, intT, bitspaceT bs_KeyboardModifiers, objT c_QString, boolT, ushortT]+    [enumT e_Type, intT, flagsT fl_KeyboardModifiers, objT c_QString, boolT, ushortT]   , test (qtVersion >= [5, 0]) $ mkCtor "newNative"-    [enumT e_Type, intT, bitspaceT bs_KeyboardModifiers, word32T, word32T, word32T]+    [enumT e_Type, intT, flagsT fl_KeyboardModifiers, word32T, word32T, word32T]   , test (qtVersion >= [5, 0]) $ mkCtor "newNativeWithText"-    [enumT e_Type, intT, bitspaceT bs_KeyboardModifiers, word32T, word32T, word32T,+    [enumT e_Type, intT, flagsT fl_KeyboardModifiers, word32T, word32T, word32T,      objT c_QString, boolT, ushortT]-  , just $ mkConstMethod "count" [] intT-  , just $ mkConstMethod "isAutoRepeat" [] boolT-  , just $ mkConstMethod "key" [] intT+  , just $ mkConstMethod "count" np intT+  , just $ mkConstMethod "isAutoRepeat" np boolT+  , just $ mkConstMethod "key" np intT     -- TODO matches (>=4.2)-  , just $ mkConstMethod "modifiers" [] $ bitspaceT bs_KeyboardModifiers-  , test (qtVersion >= [4, 2]) $ mkConstMethod "nativeModifiers" [] word32T-  , test (qtVersion >= [4, 2]) $ mkConstMethod "nativeScanCode" [] word32T-  , test (qtVersion >= [4, 2]) $ mkConstMethod "nativeVirtualKey" [] word32T-  , just $ mkConstMethod "text" [] $ objT c_QString+  , just $ mkConstMethod "modifiers" np $ flagsT fl_KeyboardModifiers+  , test (qtVersion >= [4, 2]) $ mkConstMethod "nativeModifiers" np word32T+  , test (qtVersion >= [4, 2]) $ mkConstMethod "nativeScanCode" np word32T+  , test (qtVersion >= [4, 2]) $ mkConstMethod "nativeVirtualKey" np word32T+  , just $ mkConstMethod "text" np $ objT c_QString   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QMouseEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,18 +27,20 @@   makeClass,   mkConstMethod,   mkCtor,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, enumT, intT, objT)+import Foreign.Hoppy.Generator.Types (enumT, intT, objT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (e_Type) 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,-  bs_MouseEventFlags,+  fl_KeyboardModifiers,   e_MouseButton,+  fl_MouseButtons,+  fl_MouseEventFlags,   e_MouseEventSource,   ) import Graphics.UI.Qtah.Generator.Interface.Gui.QInputEvent (c_QInputEvent)@@ -59,33 +61,33 @@   makeClass (ident "QMouseEvent") Nothing [c_QInputEvent] $   collect   [ test (qtVersion < [5, 0]) $ mkCtor "new"-    [enumT e_Type, objT c_QPoint, enumT e_MouseButton, bitspaceT bs_MouseButtons,-     bitspaceT bs_KeyboardModifiers]+    [enumT e_Type, objT c_QPoint, enumT e_MouseButton, flagsT fl_MouseButtons,+     flagsT fl_KeyboardModifiers]   , test (qtVersion < [5, 0]) $ mkCtor "newWithGlobalPosition"-    [enumT e_Type, objT c_QPoint, objT c_QPoint, enumT e_MouseButton, bitspaceT bs_MouseButtons,-     bitspaceT bs_KeyboardModifiers]+    [enumT e_Type, objT c_QPoint, objT c_QPoint, enumT e_MouseButton, flagsT fl_MouseButtons,+     flagsT fl_KeyboardModifiers]    , test (qtVersion >= [5, 0]) $ mkCtor "new"-    [enumT e_Type, objT c_QPointF, enumT e_MouseButton, bitspaceT bs_MouseButtons,-     bitspaceT bs_KeyboardModifiers]+    [enumT e_Type, objT c_QPointF, enumT e_MouseButton, flagsT fl_MouseButtons,+     flagsT fl_KeyboardModifiers]   , test (qtVersion >= [5, 0]) $ mkCtor "newWithScreenPosition"-    [enumT e_Type, objT c_QPointF, objT c_QPointF, enumT e_MouseButton, bitspaceT bs_MouseButtons,-     bitspaceT bs_KeyboardModifiers]+    [enumT e_Type, objT c_QPointF, objT c_QPointF, enumT e_MouseButton, flagsT fl_MouseButtons,+     flagsT fl_KeyboardModifiers]   , test (qtVersion >= [5, 0]) $ mkCtor "newWithWindowAndScreenPosition"     [enumT e_Type, objT c_QPointF, objT c_QPointF, objT c_QPointF, enumT e_MouseButton,-     bitspaceT bs_MouseButtons, bitspaceT bs_KeyboardModifiers]-  , just $ mkConstMethod "button" [] $ enumT e_MouseButton-  , just $ mkConstMethod "buttons" [] $ bitspaceT bs_MouseButtons-  , test (qtVersion >= [5, 3]) $ mkConstMethod "flags" [] $ bitspaceT bs_MouseEventFlags-  , just $ mkConstMethod "globalPos" [] $ objT c_QPoint-  , just $ mkConstMethod "globalX" [] intT-  , just $ mkConstMethod "globalY" [] intT-  , test (qtVersion >= [5, 0]) $ mkConstMethod "localPos" [] $ objT c_QPointF-  , just $ mkConstMethod "pos" [] $ objT c_QPoint-  , test (qtVersion < [5, 0]) $ mkConstMethod "posF" [] $ objT c_QPointF-  , test (qtVersion >= [5, 0]) $ mkConstMethod "screenPos" [] $ objT c_QPointF-  , test (qtVersion >= [5, 3]) $ mkConstMethod "source" [] $ enumT e_MouseEventSource-  , test (qtVersion >= [5, 0]) $ mkConstMethod "windowPos" [] $ objT c_QPointF-  , just $ mkConstMethod "x" [] intT-  , just $ mkConstMethod "y" [] intT+     flagsT fl_MouseButtons, flagsT fl_KeyboardModifiers]+  , just $ mkConstMethod "button" np $ enumT e_MouseButton+  , just $ mkConstMethod "buttons" np $ flagsT fl_MouseButtons+  , test (qtVersion >= [5, 3]) $ mkConstMethod "flags" np $ flagsT fl_MouseEventFlags+  , just $ mkConstMethod "globalPos" np $ objT c_QPoint+  , just $ mkConstMethod "globalX" np intT+  , just $ mkConstMethod "globalY" np intT+  , test (qtVersion >= [5, 0]) $ mkConstMethod "localPos" np $ objT c_QPointF+  , just $ mkConstMethod "pos" np $ objT c_QPoint+  , test (qtVersion < [5, 0]) $ mkConstMethod "posF" np $ objT c_QPointF+  , test (qtVersion >= [5, 0]) $ mkConstMethod "screenPos" np $ objT c_QPointF+  , test (qtVersion >= [5, 3]) $ mkConstMethod "source" np $ enumT e_MouseEventSource+  , test (qtVersion >= [5, 0]) $ mkConstMethod "windowPos" np $ objT c_QPointF+  , just $ mkConstMethod "x" np intT+  , just $ mkConstMethod "y" np intT   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QOpenGLWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +23,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -33,13 +32,14 @@   mkConstMethod,   mkCtor,   mkMethod,+  np,   ) 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.Interface.Internal.Listener (listener) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion) import Graphics.UI.Qtah.Generator.Types @@ -50,35 +50,35 @@ aModule =   AQtModule $   makeQtModuleWithMinVersion ["Gui", "QOpenGLWindow"] minVersion $-  [ QtExport $ ExportClass c_QOpenGLWindow ] +++  [ qtExport c_QOpenGLWindow ] ++   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_UpdateBehavior ]+  [ qtExport e_UpdateBehavior ]  c_QOpenGLWindow =   addReqIncludes [includeStd "QOpenGLWindow"] $   classSetEntityPrefix "" $   makeClass (ident "QOpenGLWindow") Nothing [c_QPaintDeviceWindow]-  [ mkCtor "new" []+  [ mkCtor "new" np   , 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+  , mkConstMethod "defaultFramebufferObject" np gluint+  , mkMethod "doneCurrent" np voidT+  , mkMethod "grabFramebuffer" np $ objT c_QImage+  , mkConstMethod "isValid" np boolT+  , mkMethod "makeCurrent" np voidT     -- TODO QOpenGLContext* shareContext() const-  , mkConstMethod "updateBehavior" [] $ enumT e_UpdateBehavior+  , mkConstMethod "updateBehavior" np $ enumT e_UpdateBehavior   ]  signals =-  [ makeSignal c_QOpenGLWindow "frameSwapped" c_Listener+  [ makeSignal c_QOpenGLWindow "frameSwapped" listener   ]  e_UpdateBehavior =   makeQtEnum (ident1 "QOpenGLWindow" "UpdateBehavior") [includeStd "QOpenGLWindow"]-  [ (0, ["no", "partial", "update"])-  , (1, ["partial", "update", "blit"])-  , (2, ["partial", "update", "blend"])+  [ "NoPartialUpdate"+  , "PartialUpdateBlit"+  , "PartialUpdateBlend"   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPaintDevice.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -29,10 +28,11 @@   includeStd,   makeClass,   mkConstMethod,+  np,   ) 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.Config (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@@ -42,8 +42,8 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QPaintDevice"]-  [ QtExport $ ExportClass c_QPaintDevice-  , QtExport $ ExportEnum e_PaintDeviceMetric+  [ qtExport c_QPaintDevice+  , qtExport e_PaintDeviceMetric   ]  c_QPaintDevice =@@ -51,34 +51,34 @@   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+  [ just $ mkConstMethod "colorCount" np intT+  , just $ mkConstMethod "depth" np intT+  , test (qtVersion >= [5, 0]) $ mkConstMethod "devicePixelRatio" np intT+  , test (qtVersion >= [5, 6]) $ mkConstMethod "devicePixelRatioF" np qreal+  , just $ mkConstMethod "height" np intT+  , just $ mkConstMethod "heightMM" np intT+  , just $ mkConstMethod "logicalDpiX" np intT+  , just $ mkConstMethod "logicalDpiY" np intT     -- TODO paintEngine-  , just $ mkConstMethod "paintingActive" [] boolT-  , just $ mkConstMethod "physicalDpiX" [] intT-  , just $ mkConstMethod "physicalDpiY" [] intT-  , just $ mkConstMethod "width" [] intT-  , just $ mkConstMethod "widthMM" [] intT+  , just $ mkConstMethod "paintingActive" np boolT+  , just $ mkConstMethod "physicalDpiX" np intT+  , just $ mkConstMethod "physicalDpiY" np intT+  , just $ mkConstMethod "width" np intT+  , just $ mkConstMethod "widthMM" np 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"])+  makeQtEnum (ident1 "QPaintDevice" "PaintDeviceMetric") [includeStd "QPaintDevice"]+  [ "PdmWidth"+  , "PdmHeight"+  , "PdmWidthMM"+  , "PdmHeightMM"+  , "PdmNumColors"+  , "PdmDepth"+  , "PdmDpiX"+  , "PdmDpiY"+  , "PdmPhysicalDpiX"+  , "PdmPhysicalDpiY"+  , "PdmDevicePixelRatio"+  , "PdmDevicePixelRatioScaled"   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPaintDeviceWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,13 +21,13 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,   includeStd,   makeClass,   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Types (objT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)@@ -44,14 +44,14 @@ aModule =   AQtModule $   makeQtModuleWithMinVersion ["Gui", "QPaintDeviceWindow"] minVersion-  [ QtExport $ ExportClass c_QPaintDeviceWindow+  [ qtExport c_QPaintDeviceWindow   ]  c_QPaintDeviceWindow =   addReqIncludes [includeStd "QPaintDeviceWindow"] $   classSetEntityPrefix "" $   makeClass (ident "QPaintDeviceWindow") Nothing [c_QWindow, c_QPaintDevice]-  [ mkMethod' "update" "update" [] voidT+  [ mkMethod' "update" "update" np 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
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -28,6 +28,7 @@   makeClass,   mkConstMethod,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (constT, objT, refT) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)@@ -50,6 +51,6 @@   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+  , mkConstMethod "rect" np $ refT $ constT $ objT c_QRect+  , mkConstMethod "region" np $ refT $ constT $ objT c_QRegion   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPainter.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,11 +19,10 @@   aModule,   c_QPainter,   e_RenderHint,-  bs_RenderHints,+  fl_RenderHints,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum, ExportBitspace),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -33,12 +32,13 @@   mkCtor,   mkMethod,   mkMethod',+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, enumT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (enumT, intT, objT, ptrT, voidT) import Foreign.Hoppy.Generator.Version (collect, just)--- import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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.Core.Types (e_GlobalColor, fl_ImageConversionFlags) 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)@@ -48,32 +48,32 @@  aModule =   AQtModule $-  makeQtModule ["Gui", "QPainter"] $-  (QtExport $ ExportClass c_QPainter) :-  (QtExport $ ExportEnum e_RenderHint) :-  (QtExport $ ExportBitspace bs_RenderHints) :-  []+  makeQtModule ["Gui", "QPainter"]+  [ qtExport c_QPainter+  , qtExport e_RenderHint+  , qtExport fl_RenderHints+  ]  c_QPainter =   addReqIncludes [includeStd "QPainter"] $   classSetEntityPrefix "" $   makeClass (ident "QPainter") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , 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+    [intT, intT, objT c_QImage, intT, intT, intT, intT, flagsT fl_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"])+(e_RenderHint, fl_RenderHints) =+  makeQtEnumAndFlags (ident1 "QPainter" "RenderHint") "RenderHints" [includeStd "QPainter"]+  [ "Antialiasing"+  , "TextAntialiasing"+  , "SmoothPixmapTransform"+  , "HighQualityAntialiasing"+  , "NonCosmeticDefaultPen"+  , "Qt4CompatiblePainting"   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPainterPath.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -30,6 +29,7 @@   makeClass,   mkCtor,   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -46,7 +46,7 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QPainterPath"]-  [ QtExport $ ExportClass c_QPainterPath ]+  [ qtExport c_QPainterPath ]  c_QPainterPath =   addReqIncludes [includeStd "QPainterPath"] $@@ -55,7 +55,7 @@   classSetEntityPrefix "" $   makeClass (ident "QPainterPath") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkMethod' "addRect" "addRectRaw" [qreal, qreal, qreal, qreal] voidT   ] 
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPen.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -29,6 +28,7 @@   includeStd,   makeClass,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -44,14 +44,14 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QPen"]-  [ QtExport $ ExportClass c_QPen ]+  [ qtExport c_QPen ]  c_QPen =   addReqIncludes [includeStd "QPen"] $   classSetConversionToGc $   classAddFeatures [Assignable, Copyable, Equatable] $   classSetEntityPrefix "" $-  makeClass (ident "QPen") Nothing [] $-  [ mkCtor "new" []+  makeClass (ident "QPen") Nothing []+  [ mkCtor "new" np   , mkCtor "newWithColor" [objT c_QColor]   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPixmap.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -36,13 +35,13 @@   mkProp,   mkStaticMethod,   mkStaticMethod',+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable),   classAddFeatures,   ) import Foreign.Hoppy.Generator.Types (-  bitspaceT,   boolT,   enumT,   intT,@@ -53,13 +52,14 @@   voidT,   ) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect) import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.Types (-  bs_ImageConversionFlags,   e_AspectRatioMode,+  fl_ImageConversionFlags,   e_TransformationMode,   qreal,   )@@ -68,6 +68,7 @@ import Graphics.UI.Qtah.Generator.Interface.Gui.QPaintDevice (c_QPaintDevice) import Graphics.UI.Qtah.Generator.Interface.Gui.QRegion (c_QRegion) import Graphics.UI.Qtah.Generator.Interface.Gui.QTransform (c_QTransform)+--import Graphics.UI.Qtah.Generator.Interface.Gui.QBitmap (c_QBitmap) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -76,9 +77,10 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QPixmap"]-  [ QtExport $ ExportClass c_QPixmap+  [ qtExport c_QPixmap   ] + c_QPixmap =   addReqIncludes [includeStd "QPixmap"] $   classSetConversionToGc $@@ -86,40 +88,44 @@   classSetEntityPrefix "" $   makeClass (ident "QPixmap") Nothing [c_QPaintDevice] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithSize" [objT c_QSize]   , just $ mkCtor "newWithSizeRaw" [intT, intT]   , just $ mkCtor "newWithFile" [objT c_QString]+  --, just $ mkConstMethod' "createHeuristicMask" "createHeuristicMask" np $ objT c_QBitmap+  --, just $ mkConstMethod' "createHeuristicMask" "createHeuristicMaskAll" [boolT] $ objT c_QBitmap+  --, just $ mkConstMethod' "createMaskFromColor" "createMaskFromColor" np $ objT c_QBitmap+  --, just $ mkConstMethod' "createMaskFromColor" "createMaskFromColorAll" [boolT] $ objT c_QBitmap     -- TODO QPixmap(const QString&, const char*, Qt::ImageConversionFlags)-    -- TODO QPixmap(const char* const[] xpm)  (Does this copy the data?)-  , just $ mkConstMethod "cacheKey" [] int64T+    -- TODO QPixmap(const char* constnp xpm)  (Does this copy the data?)+  , just $ mkConstMethod "cacheKey" np int64T   , just $ mkMethod' "convertFromImage" "convertFromImage" [objT c_QImage] boolT   , just $ mkMethod' "convertFromImage" "convertFromImageAll"-    [objT c_QImage, bitspaceT bs_ImageConversionFlags] boolT+    [objT c_QImage, flagsT fl_ImageConversionFlags] boolT   , just $ mkConstMethod' "copy" "copyRect" [objT c_QRect] $ objT c_QPixmap   , just $ mkConstMethod' "copy" "copyRaw" [intT, intT, intT, intT] $ objT c_QPixmap     -- TODO QBitmap createHeuristicMask(bool =) const     -- TODO QBitmap createMaskFromColor(const QColor&, Qt::MaskMode =) const-  , just $ mkStaticMethod "defaultDepth" [] intT-  , just $ mkConstMethod "depth" [] intT-  , just $ mkMethod "detach" [] voidT+  , just $ mkStaticMethod "defaultDepth" np intT+  , just $ mkConstMethod "depth" np intT+  , just $ mkMethod "detach" np voidT   , test (qtVersion >= [5, 0]) $ mkProp "devicePixelRatio" qreal-  , just $ mkMethod' "fill" "fill" [] voidT+  , just $ mkMethod' "fill" "fill" np voidT   , just $ mkMethod' "fill" "fillWithColor" [objT c_QColor] voidT   , just $ mkStaticMethod' "fromImage" "fromImage" [objT c_QImage] $ objT c_QPixmap   , just $ mkStaticMethod' "fromImage" "fromImageAll"-    [objT c_QImage, bitspaceT bs_ImageConversionFlags] $ objT c_QPixmap+    [objT c_QImage, flagsT fl_ImageConversionFlags] $ objT c_QPixmap     -- TODO QPixmap fromImageReader(QImageReader*, ...)-  , just $ mkConstMethod "hasAlpha" [] boolT-  , just $ mkConstMethod "hasAlphaChannel" [] boolT-  , just $ mkConstMethod "height" [] intT-  , just $ mkConstMethod "isNull" [] boolT-  , just $ mkConstMethod "isQBitmap" [] boolT+  , just $ mkConstMethod "hasAlpha" np boolT+  , just $ mkConstMethod "hasAlphaChannel" np boolT+  , just $ mkConstMethod "height" np intT+  , just $ mkConstMethod "isNull" np boolT+  , just $ mkConstMethod "isQBitmap" np boolT   , just $ mkMethod' "load" "load" [objT c_QString] boolT     -- TODO load(const QString&, const char*, Qt::ImageConversionFlags)     -- TODO loadFromData     -- TODO mask-  , just $ mkConstMethod "rect" [] $ objT c_QRect+  , just $ mkConstMethod "rect" np $ objT c_QRect   , just $ mkConstMethod "save" [objT c_QString] boolT     -- TODO bool save(const QString&, const char*, int)     -- TODO save(QIODevice*, ...)@@ -141,9 +147,9 @@   , just $ mkMethod' "scroll" "scrollRect" [intT, intT, objT c_QRect] voidT   , just $ mkMethod' "scroll" "scrollRectAll" [intT, intT, objT c_QRect, ptrT $ objT c_QRegion]     voidT-  , just $ mkConstMethod "size" [] $ objT c_QSize+  , just $ mkConstMethod "size" np $ objT c_QSize   , just $ mkMethod "swap" [refT $ objT c_QPixmap] voidT-  , just $ mkConstMethod "toImage" [] $ objT c_QImage+  , just $ mkConstMethod "toImage" np $ objT c_QImage   , just $ mkConstMethod' "transformed" "transformed" [objT c_QTransform] $ objT c_QPixmap   , just $ mkConstMethod' "transformed" "transformedAll"     [objT c_QTransform, enumT e_TransformationMode] $ objT c_QPixmap@@ -151,6 +157,6 @@   , just $ mkStaticMethod' "trueMatrix" "trueMatrixTransform" [objT c_QTransform, intT, intT] $     objT c_QTransform     -- TODO QPixmap trueMatrix(const QMatrix&, ...)-  , just $ mkConstMethod "width" [] intT+  , just $ mkConstMethod "width" np intT     -- OMIT bool operator!() (It's just isNull).   ]
+ src/Graphics/UI/Qtah/Generator/Interface/Gui/QPixmap.hs-boot view
@@ -0,0 +1,25 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program is free software: you can redistribute it and/or modify+-- it under the terms of the GNU Lesser General Public License as published by+-- the Free Software Foundation, either version 3 of the License, or+-- (at your option) any later version.+--+-- This program is distributed in the hope that it will be useful,+-- but WITHOUT ANY WARRANTY; without even the implied warranty of+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the+-- GNU Lesser General Public License for more details.+--+-- You should have received a copy of the GNU Lesser General Public License+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.++module Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (+  c_QPixmap,+  ) where++import Foreign.Hoppy.Generator.Spec (Class)++c_QPixmap :: Class+
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPolygon.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -33,6 +32,7 @@   mkCtor,   mkMethod,   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -40,7 +40,7 @@   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, refT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (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.QVector (c_QVectorQPoint)@@ -53,7 +53,7 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QPolygon"]-  [ QtExport $ ExportClass c_QPolygon ]+  [ qtExport c_QPolygon ]  c_QPolygon =   addReqIncludes [includeStd "QPolygon"] $@@ -62,11 +62,11 @@   classSetEntityPrefix "" $   makeClass (ident "QPolygon") Nothing [c_QVectorQPoint] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithSize" [intT]   , just $ mkCtor "newWithPoints" [objT c_QVectorQPoint]   , just $ mkCtor "newWithRectangle" [objT c_QRect, boolT]-  , just $ mkConstMethod "boundingRect" [] $ objT c_QRect+  , just $ mkConstMethod "boundingRect" np $ objT c_QRect   , test (qtVersion >= [4, 3]) $ mkConstMethod "containsPoint"     [objT c_QPoint, enumT e_FillRule] boolT   , test (qtVersion >= [4, 3]) $ mkConstMethod "intersected" [objT c_QPolygon] $ objT c_QPolygon
src/Graphics/UI/Qtah/Generator/Interface/Gui/QPolygonF.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -33,6 +32,7 @@   mkCtor,   mkMethod,   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -40,7 +40,7 @@   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, refT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) 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.QVector (c_QVectorQPointF)@@ -54,7 +54,7 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QPolygonF"]-  [ QtExport $ ExportClass c_QPolygonF ]+  [ qtExport c_QPolygonF ]  c_QPolygonF =   addReqIncludes [includeStd "QPolygonF"] $@@ -63,19 +63,19 @@   classSetEntityPrefix "" $   makeClass (ident "QPolygonF") Nothing [c_QVectorQPointF] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithSize" [intT]   , just $ mkCtor "newWithPoints" [objT c_QVectorQPointF]   , just $ mkCtor "newWithPolygon" [objT c_QPolygon]   , just $ mkCtor "newWithRectangle" [objT c_QRectF]-  , just $ mkConstMethod "boundingRect" [] $ objT c_QRectF+  , just $ mkConstMethod "boundingRect" np $ objT c_QRectF   , test (qtVersion >= [4, 3]) $ mkConstMethod "containsPoint"     [objT c_QPointF, enumT e_FillRule] boolT   , test (qtVersion >= [4, 3]) $ mkConstMethod "intersected" [objT c_QPolygonF] $ objT c_QPolygonF-  , just $ mkConstMethod "isClosed" [] boolT+  , just $ mkConstMethod "isClosed" np boolT   , test (qtVersion >= [4, 3]) $ mkConstMethod "subtracted" [objT c_QPolygonF] $ objT c_QPolygonF   , test (qtVersion >= [4, 8]) $ mkMethod "swap" [refT $ objT c_QPolygonF] voidT-  , just $ mkConstMethod "toPolygon" [] $ objT c_QPolygon+  , just $ mkConstMethod "toPolygon" np $ objT c_QPolygon   , just $ mkMethod' "translate" "translateByRaw" [intT, intT] voidT   , just $ mkMethod' "translate" "translateByPoint" [objT c_QPointF] voidT   , test (qtVersion >= [4, 6]) $ mkConstMethod' "translated" "translatedByRaw"
src/Graphics/UI/Qtah/Generator/Interface/Gui/QRasterWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,13 +22,13 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,   includeStd,   makeClass,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Gui.QPaintDeviceWindow (c_QPaintDeviceWindow)@@ -42,13 +42,13 @@  aModule =   AQtModule $-  makeQtModuleWithMinVersion ["Gui", "QRasterWindow"] minVersion $-  [ QtExport $ ExportClass c_QRasterWindow ]+  makeQtModuleWithMinVersion ["Gui", "QRasterWindow"] minVersion+  [ qtExport c_QRasterWindow ]  c_QRasterWindow =   addReqIncludes [includeStd "QRasterWindow"] $   classSetEntityPrefix "" $   makeClass (ident "QRasterWindow") Nothing [c_QPaintDeviceWindow]-  [ mkCtor "new" []+  [ mkCtor "new" np   , 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 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -34,6 +33,7 @@   mkCtor,   mkMethod,   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Assignable, Copyable, Equatable),@@ -41,7 +41,7 @@   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, refT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_FillRule)@@ -54,8 +54,8 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QRegion"]-  [ QtExport $ ExportClass c_QRegion-  , QtExport $ ExportEnum e_RegionType+  [ qtExport c_QRegion+  , qtExport e_RegionType   ]  c_QRegion =@@ -65,13 +65,13 @@   classSetEntityPrefix "" $   makeClass (ident "QRegion") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newFromPoints" [intT, intT, intT, intT, enumT e_RegionType]   , just $ mkCtor "newFromPolygon" [objT c_QPolygon]   , just $ mkCtor "newFromPolygonAll" [objT c_QPolygon, enumT e_FillRule]     -- TODO newFromBitmap (needs QBitmap)   , just $ mkCtor "newFromRect" [objT c_QRect, enumT e_RegionType]-  , just $ mkConstMethod "boundingRect" [] $ objT c_QRect+  , just $ mkConstMethod "boundingRect" np $ objT c_QRect   , just $ mkConstMethod' "contains" "containsPoint" [objT c_QPoint] boolT   , just $ mkConstMethod' "contains" "containsRect" [objT c_QRect] boolT   , test (qtVersion >= [4, 2]) $@@ -80,9 +80,9 @@     mkConstMethod' "intersected" "intersectedWithRect" [objT c_QRect] $ objT c_QRegion   , test (qtVersion >= [4, 2]) $ mkConstMethod' "intersects" "intersects" [objT c_QRegion] boolT   , test (qtVersion >= [4, 2]) $ mkConstMethod' "intersects" "intersectsRect" [objT c_QRect] boolT-  , just $ mkConstMethod "isEmpty" [] boolT-  , test (qtVersion >= [5, 0]) $ mkConstMethod "isNull" [] boolT-  , test (qtVersion >= [4, 6]) $ mkConstMethod "rectCount" [] intT+  , just $ mkConstMethod "isEmpty" np boolT+  , test (qtVersion >= [5, 0]) $ mkConstMethod "isNull" np boolT+  , test (qtVersion >= [4, 6]) $ mkConstMethod "rectCount" np intT     -- TODO rects     -- TODO setRects   , test (qtVersion >= [4, 2]) $@@ -104,6 +104,6 @@  e_RegionType =   makeQtEnum (ident1 "QRegion" "RegionType") [includeStd "QRegion"]-  [ (0, ["rectangle"])-  , (1, ["ellipse"])+  [ "Rectangle"+  , "Ellipse"   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QShowEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,6 +27,7 @@   includeStd,   makeClass,   mkCtor,+  np,   ) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -44,5 +45,5 @@   addReqIncludes [includeStd "QShowEvent"] $   classSetEntityPrefix "" $   makeClass (ident "QShowEvent") Nothing [c_QEvent]-  [ mkCtor "new" []+  [ mkCtor "new" np   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QStandardItemModel.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +24,6 @@  import Foreign.Hoppy.Generator.Spec (   Class,-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -36,12 +35,14 @@   mkMethod,   mkMethod',   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (-  constT, bitspaceT, boolT, enumT, intT, objT, ptrT, voidT,+  constT, 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.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (   c_QAbstractItemModel,   )@@ -56,7 +57,11 @@ import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList) import Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant) import Graphics.UI.Qtah.Generator.Interface.Core.Types (-  bs_Alignment, bs_ItemFlags, bs_MatchFlags, e_CheckState, e_SortOrder,+  fl_Alignment,+  e_CheckState,+  fl_ItemFlags,+  fl_MatchFlags,+  e_SortOrder,   ) import Graphics.UI.Qtah.Generator.Interface.Gui.QBrush (c_QBrush) import Graphics.UI.Qtah.Generator.Interface.Gui.QFont (c_QFont)@@ -72,7 +77,7 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QStandardItemModel"]-  [QtExport $ ExportClass c_QStandardItemModel]+  [qtExport c_QStandardItemModel]  itemModule :: AModule itemModule =@@ -80,7 +85,7 @@   makeQtModuleWithMinVersion     ["Gui", "QStandardItem"]     [4, 2]-    [QtExport $ ExportClass c_QStandardItem]+    [qtExport c_QStandardItem]  itemListModule :: AModule itemListModule =@@ -88,7 +93,7 @@   makeQtModuleWithMinVersion     ["Core", "QList", "QStandardItem"]     [4, 2]-    [QtExport $ ExportClass c_QListQStandardItem]+    [qtExport c_QListQStandardItem]  c_QStandardItemModel :: Class c_QStandardItemModel =@@ -100,7 +105,7 @@   -- Properties     test (qtVersion >= [4, 2]) $ mkProp "sortRole" intT   -- Public Functions-  , just $ mkCtor "new" []+  , just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]   , just $ mkCtor "newWithRowsAndColumns" [intT, intT]   , just $@@ -111,18 +116,18 @@     mkMethod' "appendRow" "appendRowItems" [objT c_QListQStandardItem] voidT   , test (qtVersion >= [4, 2]) $     mkMethod' "appendRow" "appendRowItem" [ptrT $ objT c_QStandardItem] voidT-  , just $ mkMethod "clear" [] voidT+  , just $ mkMethod "clear" np voidT   , test (qtVersion >= [4, 2]) $     mkConstMethod "findItems" [objT c_QString] (objT c_QListQStandardItem)   , test (qtVersion >= [4, 2]) $ mkConstMethod'       "findItems"       "findItemsWithFlags"-      [objT c_QString, bitspaceT bs_MatchFlags]+      [objT c_QString, flagsT fl_MatchFlags]       (objT c_QListQStandardItem)   , test (qtVersion >= [4, 2]) $ mkConstMethod'       "findItems"       "findItemsWithFlagsAndColumn"-      [objT c_QString, bitspaceT bs_MatchFlags, intT]+      [objT c_QString, flagsT fl_MatchFlags, intT]       (objT c_QListQStandardItem)   , test (qtVersion >= [4, 2]) $     mkConstMethod "horizontalHeaderItem" [intT] (ptrT $ objT c_QStandardItem)@@ -146,7 +151,7 @@   , just $     mkMethod' "insertRow" "insertRowWithParent" [intT, objT c_QModelIndex] boolT   , test (qtVersion >= [4, 2]) $-    mkConstMethod "invisibleRootItem" [] (ptrT $ objT c_QStandardItem)+    mkConstMethod "invisibleRootItem" np (ptrT $ objT c_QStandardItem)   , test (qtVersion >= [4, 2]) $     mkConstMethod "item" [intT] (ptrT $ objT c_QStandardItem)   , test (qtVersion >= [4, 2]) $ mkConstMethod'@@ -154,7 +159,7 @@   , test (qtVersion >= [4, 2]) $ mkConstMethod       "itemFromIndex" [objT c_QModelIndex] (ptrT $ objT c_QStandardItem)   , test (qtVersion >= [4, 2]) $-    mkConstMethod "itemPrototype" [] (ptrT . constT $ objT c_QStandardItem)+    mkConstMethod "itemPrototype" np (ptrT . constT $ objT c_QStandardItem)   , test (qtVersion >= [4, 2]) $ mkMethod "setColumnCount" [intT] voidT   , test (qtVersion >= [4, 2]) $     mkMethod "setHorizontalHeaderItem" [intT, ptrT $ objT c_QStandardItem] voidT@@ -196,35 +201,35 @@   classSetEntityPrefix "" $   makeClass (ident "QStandardItem") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithText" [objT c_QString]   , just $ mkCtor "newWithIconAndText" [objT c_QIcon, objT c_QString]   , just $ mkCtor "newWithRows" [intT]   , just $ mkCtor "newWithRowsAndColumns" [intT, intT]-  , just $ mkConstMethod "accessibleDescription" [] (objT c_QString)-  , just $ mkConstMethod "accessibleText" [] (objT c_QString)+  , just $ mkConstMethod "accessibleDescription" np (objT c_QString)+  , just $ mkConstMethod "accessibleText" np (objT c_QString)   , just $ mkMethod "appendColumn" [objT c_QListQStandardItem] voidT   , just $     mkMethod' "appendRow" "appendRowItems" [objT c_QListQStandardItem] voidT   , just $     mkMethod' "appendRow" "appendRowItem" [ptrT $ objT c_QStandardItem] voidT   , just $ mkMethod "appendRows" [objT c_QListQStandardItem] voidT-  , just $ mkConstMethod "background" [] (objT c_QBrush)-  , just $ mkConstMethod "checkState" [] (enumT e_CheckState)+  , just $ mkConstMethod "background" np (objT c_QBrush)+  , just $ mkConstMethod "checkState" np (enumT e_CheckState)   , just $ mkConstMethod "child" [intT] (ptrT $ objT c_QStandardItem)   , just $ mkConstMethod'       "child" "childWithColumn" [intT, intT] (ptrT $ objT c_QStandardItem)-  , just $ mkConstMethod "clone" [] (ptrT $ objT c_QStandardItem)-  , just $ mkConstMethod "column" [] intT-  , just $ mkConstMethod "columnCount" [] intT-  , just $ mkConstMethod' "data" "getData" [] (objT c_QVariant)+  , just $ mkConstMethod "clone" np (ptrT $ objT c_QStandardItem)+  , just $ mkConstMethod "column" np intT+  , just $ mkConstMethod "columnCount" np intT+  , just $ mkConstMethod' "data" "getData" np (objT c_QVariant)   , just $ mkConstMethod' "data" "getDataWithRole" [intT] (objT c_QVariant)-  , just $ mkConstMethod "flags" [] (bitspaceT bs_ItemFlags)-  , just $ mkConstMethod "font" [] (objT c_QFont)-  , just $ mkConstMethod "foreground" [] (objT c_QBrush)-  , just $ mkConstMethod "hasChildren" [] boolT-  , just $ mkConstMethod "icon" [] (objT c_QIcon)-  , just $ mkConstMethod "index" [] (objT c_QModelIndex)+  , just $ mkConstMethod "flags" np (flagsT fl_ItemFlags)+  , just $ mkConstMethod "font" np (objT c_QFont)+  , just $ mkConstMethod "foreground" np (objT c_QBrush)+  , just $ mkConstMethod "hasChildren" np boolT+  , just $ mkConstMethod "icon" np (objT c_QIcon)+  , just $ mkConstMethod "index" np (objT c_QModelIndex)   , just $ mkMethod "insertColumn" [intT, objT c_QListQStandardItem] voidT   , just $ mkMethod "insertColumns" [intT, intT] voidT   , just $ mkMethod'@@ -234,23 +239,23 @@   , just $ mkMethod'       "insertRows" "insertRowsItems" [intT, objT c_QListQStandardItem] voidT   , just $ mkMethod' "insertRows" "insertRowsCount" [intT, intT] voidT-  , test (qtVersion >= [5, 6]) $ mkConstMethod "isAutoTristate" [] boolT-  , just $ mkConstMethod "isCheckable" [] boolT-  , just $ mkConstMethod "isDragEnabled" [] boolT-  , just $ mkConstMethod "isDropEnabled" [] boolT-  , just $ mkConstMethod "isEditable" [] boolT-  , just $ mkConstMethod "isEnabled" [] boolT-  , just $ mkConstMethod "isSelectable" [] boolT-  , test (qtVersion >= [5, 6]) $ mkConstMethod "isUserTristate" [] boolT-  , just $ mkConstMethod "model" [] (ptrT $ objT c_QStandardItemModel)-  , just $ mkConstMethod "parent" [] (ptrT $ objT c_QStandardItem)+  , test (qtVersion >= [5, 6]) $ mkConstMethod "isAutoTristate" np boolT+  , just $ mkConstMethod "isCheckable" np boolT+  , just $ mkConstMethod "isDragEnabled" np boolT+  , just $ mkConstMethod "isDropEnabled" np boolT+  , just $ mkConstMethod "isEditable" np boolT+  , just $ mkConstMethod "isEnabled" np boolT+  , just $ mkConstMethod "isSelectable" np boolT+  , test (qtVersion >= [5, 6]) $ mkConstMethod "isUserTristate" np boolT+  , just $ mkConstMethod "model" np (ptrT $ objT c_QStandardItemModel)+  , just $ mkConstMethod "parent" np (ptrT $ objT c_QStandardItem)   -- TODO mkMethod "read" [objT c_QDataStream] voidT   , just $ mkMethod "removeColumn" [intT] voidT   , just $ mkMethod "removeColumns" [intT, intT] voidT   , just $ mkMethod "removeRow" [intT] voidT   , just $ mkMethod "removeRows" [intT, intT] voidT-  , just $ mkConstMethod "row" [] intT-  , just $ mkConstMethod "rowCount" [] intT+  , just $ mkConstMethod "row" np intT+  , just $ mkConstMethod "rowCount" np intT   , just $ mkMethod "setAccessibleDescription" [objT c_QString] voidT   , just $ mkMethod "setAccessibleText" [objT c_QString] voidT   , test (qtVersion >= [5, 6]) $ mkMethod "setAutoTristate" [boolT] voidT@@ -270,7 +275,7 @@   , just $ mkMethod "setDropEnabled" [boolT] voidT   , just $ mkMethod "setEditable" [boolT] voidT   , just $ mkMethod "setEnabled" [boolT] voidT-  , just $ mkMethod "setFlags" [bitspaceT bs_ItemFlags] voidT+  , just $ mkMethod "setFlags" [flagsT fl_ItemFlags] voidT   , just $ mkMethod "setFont" [objT c_QFont] voidT   , just $ mkMethod "setForeground" [objT c_QBrush] voidT   , just $ mkMethod "setIcon" [objT c_QIcon] voidT@@ -279,15 +284,15 @@   , just $ mkMethod "setSizeHint" [objT c_QSize] voidT   , just $ mkMethod "setStatusTip" [objT c_QString] voidT   , just $ mkMethod "setText" [objT c_QString] voidT-  , just $ mkMethod "setTextAlignment" [bitspaceT bs_Alignment] voidT+  , just $ mkMethod "setTextAlignment" [flagsT fl_Alignment] voidT   , just $ mkMethod "setToolTip" [objT c_QString] voidT   , test (qtVersion >= [5, 6]) $ mkMethod "setUserTristate" [boolT] voidT   , just $ mkMethod "setWhatsThis" [objT c_QString] voidT-  , just $ mkConstMethod "sizeHint" [] (objT c_QSize)+  , just $ mkConstMethod "sizeHint" np (objT c_QSize)   , just $ mkMethod "sortChildren" [intT] voidT   , just $ mkMethod'       "sortChildren" "sortChildrenWithOrder" [intT, enumT e_SortOrder] voidT-  , just $ mkConstMethod "statusTip" [] (objT c_QString)+  , just $ mkConstMethod "statusTip" np (objT c_QString)   , just $ mkMethod "takeChild" [intT] (ptrT $ objT c_QStandardItem)   , just $ mkMethod'       "takeChild"@@ -296,11 +301,11 @@       (ptrT $ objT c_QStandardItem)   , just $ mkMethod "takeColumn" [intT] (objT c_QListQStandardItem)   , just $ mkMethod "takeRow" [intT] (objT c_QListQStandardItem)-  , just $ mkConstMethod "text" [] (objT c_QString)-  , just $ mkConstMethod "textAlignment" [] (bitspaceT bs_Alignment)-  , just $ mkConstMethod "toolTip" [] (objT c_QString)-  , just $ mkConstMethod' "type" "getType" [] intT-  , just $ mkConstMethod "whatsThis" [] (objT c_QString)+  , just $ mkConstMethod "text" np (objT c_QString)+  , just $ mkConstMethod "textAlignment" np (flagsT fl_Alignment)+  , just $ mkConstMethod "toolTip" np (objT c_QString)+  , just $ mkConstMethod' "type" "getType" np intT+  , just $ mkConstMethod "whatsThis" np (objT c_QString)   -- TODO mkConstMethod "write" [objT c_QDataStream] voidT   ] 
src/Graphics/UI/Qtah/Generator/Interface/Gui/QSurface.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,7 +22,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -30,10 +29,11 @@   includeStd,   makeClass,   mkConstMethod,+  np,   ) 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.Config (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@@ -44,10 +44,10 @@  aModule =   AQtModule $-  makeQtModuleWithMinVersion ["Gui", "QSurface"] minVersion $-  [ QtExport $ ExportClass c_QSurface-  , QtExport $ ExportEnum e_SurfaceClass-  , QtExport $ ExportEnum e_SurfaceType+  makeQtModuleWithMinVersion ["Gui", "QSurface"] minVersion+  [ qtExport c_QSurface+  , qtExport e_SurfaceClass+  , qtExport e_SurfaceType   ]  c_QSurface =@@ -56,22 +56,23 @@   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+    just $ mkConstMethod "size" np $ objT c_QSize+  , test (qtVersion >= [5, 3]) $ mkConstMethod "supportsOpenGL" np boolT+  , just $ mkConstMethod "surfaceClass" np $ enumT e_SurfaceClass+    -- TODO mkConstMethod "surfaceHandle" np $ ptrT $ objT c_QPlatformSurface+  , just $ mkConstMethod "surfaceType" np $ enumT e_SurfaceType   ]  e_SurfaceClass =   makeQtEnum (ident1 "QSurface" "SurfaceClass") [includeStd "QSurface"]-  [ (0, ["window"])-  , (1, ["offscreen"])+  [ "Window"+  , "Offscreen"   ]  e_SurfaceType =   makeQtEnum (ident1 "QSurface" "SurfaceType") [includeStd "QSurface"]-  [ (0, ["raster", "surface"])-  , (1, ["open", "g", "l", "surface"])-  , (2, ["raster", "g", "l", "surface"])+  [ "RasterSurface"+  , "OpenGLSurface"+  , "RasterGLSurface"+    -- TODO OpenVGSurface, VulkanSurface.  Since when?   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QTransform.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -43,13 +42,13 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QTransform"]-  [ QtExport $ ExportClass c_QTransform ]+  [ qtExport c_QTransform ]  c_QTransform =   addReqIncludes [includeStd "QTransform"] $   classSetConversionToGc $   classAddFeatures [Assignable, Copyable, Equatable] $   classSetEntityPrefix "" $-  makeClass (ident "QTransform") Nothing [] $+  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 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,7 +22,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -34,7 +33,7 @@ import Foreign.Hoppy.Generator.Types (enumT, intT, objT, refT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listener) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -43,14 +42,14 @@ aModule =   AQtModule $   makeQtModule ["Gui", "QValidator"] $-  (QtExport $ ExportClass c_QValidator) :+  (qtExport c_QValidator) :   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_State ]+  [ qtExport e_State ]  c_QValidator =   addReqIncludes [includeStd "QValidator"] $   classSetEntityPrefix "" $-  makeClass (ident "QValidator") Nothing [c_QObject] $+  makeClass (ident "QValidator") Nothing [c_QObject]   [ mkConstMethod "fixup" [refT $ objT c_QString] voidT     -- TODO locale     -- TODO setLocale@@ -58,12 +57,12 @@   ]  signals =-  [ makeSignal c_QValidator "changed" c_Listener+  [ makeSignal c_QValidator "changed" listener   ]  e_State =   makeQtEnum (ident1 "QValidator" "State") [includeStd "QValidator"]-  [ (0, ["invalid"])-  , (1, ["intermediate"])-  , (2, ["acceptable"])+  [ "Invalid"+  , "Intermediate"+  , "Acceptable"   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QWheelEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,15 +27,17 @@   makeClass,   mkConstMethod,   mkCtor,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, enumT, intT, objT)+import Foreign.Hoppy.Generator.Types (enumT, intT, objT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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,+  fl_KeyboardModifiers,+  fl_MouseButtons,   e_Orientation,   e_ScrollPhase,   )@@ -57,29 +59,29 @@   makeClass (ident "QWheelEvent") Nothing [c_QInputEvent] $   collect   [ test (qtVersion < [5, 0]) $ mkCtor "new"-    [objT c_QPoint, intT, bitspaceT bs_MouseButtons, bitspaceT bs_KeyboardModifiers,+    [objT c_QPoint, intT, flagsT fl_MouseButtons, flagsT fl_KeyboardModifiers,      enumT e_Orientation]   , test (qtVersion < [5, 0]) $ mkCtor "newWithGlobalPosition"-    [objT c_QPoint, objT c_QPoint, intT, bitspaceT bs_MouseButtons, bitspaceT bs_KeyboardModifiers,+    [objT c_QPoint, objT c_QPoint, intT, flagsT fl_MouseButtons, flagsT fl_KeyboardModifiers,      enumT e_Orientation]    , test (qtVersion >= [5, 0]) $ mkCtor "new"     [objT c_QPointF, objT c_QPointF, objT c_QPoint, objT c_QPoint, intT, enumT e_Orientation,-     bitspaceT bs_MouseButtons, bitspaceT bs_KeyboardModifiers]+     flagsT fl_MouseButtons, flagsT fl_KeyboardModifiers]   , test (qtVersion >= [5, 2]) $ mkCtor "newWithPhase"     [objT c_QPointF, objT c_QPointF, objT c_QPoint, objT c_QPoint, intT, enumT e_Orientation,-     bitspaceT bs_MouseButtons, bitspaceT bs_KeyboardModifiers, enumT e_ScrollPhase]-  , test (qtVersion >= [5, 0]) $ mkConstMethod "angleDelta" [] $ objT c_QPoint-  , just $ mkConstMethod "buttons" [] $ bitspaceT bs_MouseButtons-  , test (qtVersion < [5, 0]) $ mkConstMethod "delta" [] intT-  , just $ mkConstMethod "globalPos" [] $ objT c_QPoint-  , test (qtVersion >= [5, 0]) $ mkConstMethod "globalPosF" [] $ objT c_QPointF-  , just $ mkConstMethod "globalX" [] intT-  , just $ mkConstMethod "globalY" [] intT-  , test (qtVersion >= [5, 2]) $ mkConstMethod "phase" [] $ enumT e_ScrollPhase-  , test (qtVersion >= [5, 0]) $ mkConstMethod "pixelDelta" [] $ objT c_QPoint-  , just $ mkConstMethod "pos" [] $ objT c_QPoint-  , test (qtVersion >= [5, 0]) $ mkConstMethod "posF" [] $ objT c_QPointF-  , just $ mkConstMethod "x" [] intT-  , just $ mkConstMethod "y" [] intT+     flagsT fl_MouseButtons, flagsT fl_KeyboardModifiers, enumT e_ScrollPhase]+  , test (qtVersion >= [5, 0]) $ mkConstMethod "angleDelta" np $ objT c_QPoint+  , just $ mkConstMethod "buttons" np $ flagsT fl_MouseButtons+  , test (qtVersion < [5, 0]) $ mkConstMethod "delta" np intT+  , just $ mkConstMethod "globalPos" np $ objT c_QPoint+  , test (qtVersion >= [5, 0]) $ mkConstMethod "globalPosF" np $ objT c_QPointF+  , just $ mkConstMethod "globalX" np intT+  , just $ mkConstMethod "globalY" np intT+  , test (qtVersion >= [5, 2]) $ mkConstMethod "phase" np $ enumT e_ScrollPhase+  , test (qtVersion >= [5, 0]) $ mkConstMethod "pixelDelta" np $ objT c_QPoint+  , just $ mkConstMethod "pos" np $ objT c_QPoint+  , test (qtVersion >= [5, 0]) $ mkConstMethod "posF" np $ objT c_QPointF+  , just $ mkConstMethod "x" np intT+  , just $ mkConstMethod "y" np intT   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +23,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -37,10 +36,12 @@   mkMethod,   mkMethod',   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (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.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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)@@ -48,8 +49,8 @@ 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,+  fl_WindowFlags,   e_WindowModality,   e_WindowState,   e_WindowType,@@ -59,17 +60,17 @@ import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon) import Graphics.UI.Qtah.Generator.Interface.Gui.QRegion (c_QRegion) import Graphics.UI.Qtah.Generator.Interface.Gui.QSurface (c_QSurface, e_SurfaceType)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_Listener,-  c_ListenerBool,-  c_ListenerInt,-  c_ListenerPtrQObject,-  c_ListenerQreal,-  c_ListenerQString,-  c_ListenerQWindowVisibility,-  c_ListenerScreenOrientation,-  c_ListenerWindowModality,-  c_ListenerWindowState,+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listener,+  listenerBool,+  listenerInt,+  listenerPtrQObject,+  listenerQreal,+  listenerQString,+  listenerQWindowVisibility,+  listenerScreenOrientation,+  listenerWindowModality,+  listenerWindowState,   ) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion) import Graphics.UI.Qtah.Generator.Types@@ -81,10 +82,10 @@ aModule =   AQtModule $   makeQtModuleWithMinVersion ["Gui", "QWindow"] minVersion $-  [ QtExport $ ExportClass c_QWindow ] +++  [ qtExport c_QWindow ] ++   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_AncestorMode-  , QtExport $ ExportEnum e_Visibility+  [ qtExport e_AncestorMode+  , qtExport e_Visibility   ]  c_QWindow =@@ -92,33 +93,33 @@   classSetEntityPrefix "" $   makeClass (ident "QWindow") Nothing [c_QObject, c_QSurface] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , 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+  , just $ mkMethod "close" np voidT+  , just $ mkConstMethod "contentOrientation" np $ enumT e_ScreenOrientation+  , just $ mkMethod "create" np voidT   , just $ mkProp "cursor" $ objT c_QCursor-  , just $ mkMethod "destroy" [] voidT-  , just $ mkConstMethod "devicePixelRatio" [] qreal+  , just $ mkMethod "destroy" np voidT+  , just $ mkConstMethod "devicePixelRatio" np 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 "flags" $ flagsT fl_WindowFlags+  , just $ mkConstMethod "focusObject" np $ ptrT $ objT c_QObject+  , just $ mkConstMethod "frameGeometry" np $ objT c_QRect+  , just $ mkConstMethod "frameMargins" np $ objT c_QMargins   , just $ mkProp "framePosition" $ objT c_QPoint   , just $ mkProp "geometry" $ objT c_QRect   , just $ mkProp "height" intT-  , just $ mkMethod "hide" [] voidT+  , just $ mkMethod "hide" np voidT   , just $ mkProp "icon" $ objT c_QIcon-  , test (qtVersion >= [5, 1]) $ mkConstMethod "isActive" [] boolT+  , test (qtVersion >= [5, 1]) $ mkConstMethod "isActive" np 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 "isExposed" np boolT+  , just $ mkConstMethod "isModal" np boolT+  , just $ mkConstMethod "isTopLevel" np boolT+  , just $ mkMethod "lower" np 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@@ -132,11 +133,11 @@   , 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 "raise" np voidT   , just $ mkMethod "reportContentOrientationChange" [enumT e_ScreenOrientation] voidT-  , just $ mkMethod "requestActivate" [] voidT-  , test (qtVersion >= [5, 5]) $ mkMethod "requestUpdate" [] voidT-    -- TODO mkConstMethod "requestedFormat" [] $ objT c_QSurfaceFormat+  , just $ mkMethod "requestActivate" np voidT+  , test (qtVersion >= [5, 5]) $ mkMethod "requestUpdate" np voidT+    -- TODO mkConstMethod "requestedFormat" np $ 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@@ -146,16 +147,16 @@   , 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 $ mkMethod "show" np voidT+  , just $ mkMethod "showFullScreen" np voidT+  , just $ mkMethod "showMaximized" np voidT+  , just $ mkMethod "showMinimized" np voidT+  , just $ mkMethod "showNormal" np 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+  , just $ mkConstMethod' "type" "getType" np $ enumT e_WindowType+  , just $ mkMethod "unsetCursor" np voidT   , test (qtVersion >= [5, 1]) $ mkProp "visibility" $ enumT e_Visibility   , just $ mkBoolIsProp "visible"   , just $ mkProp "width" intT@@ -166,38 +167,38 @@   ]  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+  [ makeSignal c_QWindow "activeChanged" listener+  , makeSignal c_QWindow "contentOrientationChanged" listenerScreenOrientation+  , makeSignal c_QWindow "focusObjectChanged" listenerPtrQObject+  , makeSignal c_QWindow "heightChanged" listenerInt+  , makeSignal c_QWindow "maximumHeightChanged" listenerInt+  , makeSignal c_QWindow "maximumWidthChanged" listenerInt+  , makeSignal c_QWindow "minimumHeightChanged" listenerInt+  , makeSignal c_QWindow "minimumWidthChanged" listenerInt+  , makeSignal c_QWindow "modalityChanged" listenerWindowModality+  , makeSignal c_QWindow "opacityChanged" listenerQreal+    -- TODO makeSignal c_QWindow "screenChanged" listenerPtrQScreen+  , makeSignal c_QWindow "visibilityChanged" listenerQWindowVisibility+  , makeSignal c_QWindow "visibleChanged" listenerBool+  , makeSignal c_QWindow "widthChanged" listenerInt+  , makeSignal c_QWindow "windowStateChanged" listenerWindowState+  , makeSignal c_QWindow "windowTitleChanged" listenerQString+  , makeSignal c_QWindow "xChanged" listenerInt+  , makeSignal c_QWindow "yChanged" listenerInt   ]  e_AncestorMode =   makeQtEnum (ident1 "QWindow" "AncestorMode") [includeStd "QWindow"]-  [ (0, ["exclude", "transients"])-  , (1, ["include", "transients"])+  [ "ExcludeTransients"+  , "IncludeTransients"   ]  e_Visibility =   makeQtEnum (ident1 "QWindow" "Visibility") [includeStd "QWindow"]-  [ (0, ["hidden"])-  , (1, ["automatic", "visibility"])-  , (2, ["windowed"])-  , (3, ["minimized"])-  , (4, ["maximized"])-  , (5, ["full", "screen"])+  [ "Hidden"+  , "AutomaticVisibility"+  , "Windowed"+  , "Minimized"+  , "Maximized"+  , "FullScreen"   ]
src/Graphics/UI/Qtah/Generator/Interface/Gui/QWindow.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,7 +22,7 @@   ) where  import Foreign.Hoppy.Generator.Spec (Class, CppEnum)-import Graphics.UI.Qtah.Generator.Flags (Version)+import Graphics.UI.Qtah.Generator.Config (Version)  minVersion :: Version 
src/Graphics/UI/Qtah/Generator/Interface/Gui/QtahOpenGLWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident2,@@ -29,6 +28,7 @@   makeClass,   mkCtor,   mkMethod,+  np,   ) import Foreign.Hoppy.Generator.Types (callbackT, enumT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Gui.QOpenGLWindow (@@ -45,14 +45,14 @@  aModule =   AQtModule $-  makeQtModuleWithMinVersion ["Gui", "QtahOpenGLWindow"] minVersion $-  [ QtExport $ ExportClass c_QtahOpenGLWindow ]+  makeQtModuleWithMinVersion ["Gui", "QtahOpenGLWindow"] minVersion+  [ qtExport c_QtahOpenGLWindow ]  c_QtahOpenGLWindow =   addReqIncludes [includeLocal "qtahopenglwindow.hpp"] $   classSetEntityPrefix "" $   makeClass (ident2 "qtah" "qtahopenglwindow" "QtahOpenGLWindow") Nothing [c_QOpenGLWindow]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithUpdateBehavior" [enumT e_UpdateBehavior]   , mkCtor "newWithUpdateBehaviorAndParent" [enumT e_UpdateBehavior, ptrT $ objT c_QWindow]     -- TODO QtahOpenGLWindow(QOpenGLContext*, ...)
src/Graphics/UI/Qtah/Generator/Interface/Gui/QtahRasterWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident2,@@ -29,6 +28,7 @@   makeClass,   mkCtor,   mkMethod,+  np,   ) import Foreign.Hoppy.Generator.Types (callbackT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Gui.QRasterWindow (c_QRasterWindow, minVersion)@@ -41,14 +41,14 @@  aModule =   AQtModule $-  makeQtModuleWithMinVersion ["Gui", "QtahRasterWindow"] minVersion $-  [ QtExport $ ExportClass c_QtahRasterWindow ]+  makeQtModuleWithMinVersion ["Gui", "QtahRasterWindow"] minVersion+  [ qtExport c_QtahRasterWindow ]  c_QtahRasterWindow =   addReqIncludes [includeLocal "qtahrasterwindow.hpp"] $   classSetEntityPrefix "" $   makeClass (ident2 "qtah" "qtahrasterwindow" "QtahRasterWindow") Nothing [c_QRasterWindow]-  [ mkCtor "new" []+  [ mkCtor "new" np   , 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-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,8 +21,10 @@ module Graphics.UI.Qtah.Generator.Interface.Imports (   importForByteString,   importForByteStringUnsafe,+  importForBits,   importForChar,   importForEvent,+  importForFlags,   importForForeign,   importForForeignC,   importForPrelude,@@ -39,11 +41,17 @@ importForByteStringUnsafe :: HsImportSet importForByteStringUnsafe = hsQualifiedImport "Data.ByteString.Unsafe" "QtahDBSU" +importForBits :: HsImportSet+importForBits = hsQualifiedImport "Data.Bits" "QtahDB"+ importForChar :: HsImportSet importForChar = hsQualifiedImport "Data.Char" "QtahDC"  importForEvent :: HsImportSet importForEvent = hsQualifiedImport "Graphics.UI.Qtah.Event" "QtahEvent"++importForFlags :: HsImportSet+importForFlags = hsQualifiedImport "Graphics.UI.Qtah.Flags" "QtahFlags"  importForForeign :: HsImportSet importForForeign = hsQualifiedImport "Foreign" "QtahF"
src/Graphics/UI/Qtah/Generator/Interface/Internal.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by
src/Graphics/UI/Qtah/Generator/Interface/Internal/Callback.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +19,7 @@  import Foreign.Hoppy.Generator.Spec (   Callback,-  Export (ExportCallback),+  Export (Export),   addReqIncludes,   includeStd,   makeCallback,@@ -27,10 +27,10 @@   moduleAddExports,   moduleAddHaskellName,   moduleModify',+  np,   toExtName,   ) import Foreign.Hoppy.Generator.Types (-  bitspaceT,   boolT,   constT,   doubleT,@@ -43,28 +43,35 @@   voidT,   ) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (c_QAbstractItemModel) import Graphics.UI.Qtah.Generator.Interface.Core.QDate (c_QDate) 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.QList (c_QListQModelIndex) 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.QVariant (c_QVariant)+import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractAnimation (c_QAbstractAnimation) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractAnimation (e_Direction, e_State)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QProcess (e_ProcessError, e_ExitStatus, e_ProcessState) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QVector (c_QVectorInt) import Graphics.UI.Qtah.Generator.Interface.Core.Types (   e_DockWidgetArea,-  bs_DockWidgetAreas,-  bs_ToolBarAreas,+  fl_DockWidgetAreas,   e_Orientation,   e_ScreenOrientation,   e_ScreenOrientation_minVersion,+  fl_ToolBarAreas,   e_ToolButtonStyle,   e_WindowModality,   e_WindowState,   qreal,+  qlonglong,   ) import {-# SOURCE #-} qualified Graphics.UI.Qtah.Generator.Interface.Gui.QClipboard as QClipboard import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)@@ -75,13 +82,13 @@ import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractSlider (e_SliderAction) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QDockWidget (-  bs_DockWidgetFeatures,+  fl_DockWidgetFeatures,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsItem (c_QGraphicsItem) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QSystemTrayIcon (   e_ActivationReason,   )-import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidget (c_QTreeWidgetItem)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidgetItem (c_QTreeWidgetItem) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AHoppyModule)) @@ -92,49 +99,61 @@   moduleModify' (makeModule "callback" "b_callback.hpp" "b_callback.cpp") $ do     moduleAddHaskellName ["Internal", "Callback"]     moduleAddExports $ collect-      [ just $ ExportCallback cb_BoolVoid-      , just $ ExportCallback cb_DockWidgetAreaVoid-      , just $ ExportCallback cb_DockWidgetAreasVoid-      , just $ ExportCallback cb_DoubleVoid-      , just $ ExportCallback cb_IntVoid-      , just $ ExportCallback cb_IntBoolVoid-      , just $ ExportCallback cb_IntIntVoid-      , just $ ExportCallback cb_OrientationVoid-      , just $ ExportCallback cb_PtrQAbstractButtonVoid-      , just $ ExportCallback cb_PtrQAbstractButtonBoolVoid-      , just $ ExportCallback cb_PtrQAbstractItemModelVoid-      , just $ ExportCallback cb_PtrQActionVoid-      , just $ ExportCallback cb_PtrQGraphicsItemPtrQEventBool-      , just $ ExportCallback cb_PtrQObjectPtrQEventBool-      , just $ ExportCallback cb_PtrQObjectVoid-      , just $ ExportCallback cb_PtrQPaintEventVoid-      , just $ ExportCallback cb_PtrQTreeWidgetItemVoid-      , just $ ExportCallback cb_PtrQTreeWidgetItemIntVoid-      , just $ ExportCallback cb_PtrQTreeWidgetItemPtrQTreeWidgetItemVoid-      , just $ ExportCallback cb_PtrQWidgetPtrQWidgetVoid-      , just $ ExportCallback cb_QAbstractSliderActionVoid-      , just $ ExportCallback cb_QClipboardModeVoid-      , just $ ExportCallback cb_QDateVoid-      , just $ ExportCallback cb_QDockWidgetFeaturesVoid-      , 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_QSystemTrayIconActivationReasonVoid-      , just $ ExportCallback cb_RefConstQIconVoid-      , just $ ExportCallback cb_RefConstQItemSelectionRefConstQItemSelectionVoid-      , test (qtVersion >= e_ScreenOrientation_minVersion) $ ExportCallback cb_ScreenOrientationVoid-      , just $ ExportCallback cb_ToolBarAreasVoid-      , just $ ExportCallback cb_ToolButtonStyleVoid-      , just $ ExportCallback cb_WindowModalityVoid-      , just $ ExportCallback cb_WindowStateVoid-      , just $ ExportCallback cb_Void+      [ just $ Export cb_BoolVoid+      , just $ Export cb_DockWidgetAreaVoid+      , just $ Export cb_DockWidgetAreasVoid+      , just $ Export cb_DoubleVoid+      , just $ Export cb_IntVoid+      , just $ Export cb_IntBoolVoid+      , just $ Export cb_IntIntVoid+      , just $ Export cb_OrientationVoid+      , just $ Export cb_OrientationIntIntVoid+      , just $ Export cb_PtrQAbstractButtonVoid+      , just $ Export cb_PtrQAbstractButtonBoolVoid+      , just $ Export cb_PtrQAbstractItemModelVoid+      , just $ Export cb_PtrQActionVoid+      , just $ Export cb_PtrQGraphicsItemPtrQEventBool+      , just $ Export cb_PtrQObjectPtrQEventBool+      , just $ Export cb_PtrQObjectVoid+      , just $ Export cb_PtrQPaintEventVoid+      , just $ Export cb_RefConstQModelIndexVoid+      , just $ Export cb_RefConstQListQModelIndexVoid+      , just $ Export cb_PtrQTreeWidgetItemVoid+      , just $ Export cb_PtrQTreeWidgetItemIntVoid+      , just $ Export cb_PtrQTreeWidgetItemPtrQTreeWidgetItemVoid+      , just $ Export cb_PtrQWidgetPtrQWidgetVoid+      , just $ Export cb_QAbstractSliderActionVoid+      , just $ Export cb_QClipboardModeVoid+      , just $ Export cb_QDateVoid+      , just $ Export cb_QDockWidgetFeaturesVoid+      , just $ Export cb_QModelIndexVoid+      , just $ Export cb_QModelIndexIntIntVoid+      , just $ Export cb_QModelIndexIntIntQModelIndexIntVoid+      , just $ Export cb_QModelIndexQModelIndexVoid+      , just $ Export cb_QModelIndexQModelIndexQVectorIntVoid+      , test (qtVersion >= QWindow.minVersion) $ Export cb_QWindowVisibilityVoid+      , just $ Export cb_QPointVoid+      , just $ Export cb_QrealVoid+      , just $ Export cb_QSizeVoid+      , just $ Export cb_QStringVoid+      , just $ Export cb_QSystemTrayIconActivationReasonVoid+      , just $ Export cb_RefConstQIconVoid+      , just $ Export cb_RefConstQItemSelectionRefConstQItemSelectionVoid+      , test (qtVersion >= e_ScreenOrientation_minVersion) $ Export cb_ScreenOrientationVoid+      , just $ Export cb_ToolBarAreasVoid+      , just $ Export cb_ToolButtonStyleVoid+      , just $ Export cb_WindowModalityVoid+      , just $ Export cb_WindowStateVoid+      , just $ Export cb_QlonglongVoid+      , just $ Export cb_IntQlonglongVoid+      , just $ Export cb_ProcessErrorVoid+      , just $ Export cb_IntExitStatusVoid+      , just $ Export cb_ProcessStateVoid+      , just $ Export cb_StateStateVoid+      , just $ Export cb_DirectionVoid+      , just $ Export cb_RefConstQVariantVoid+      , just $ Export cb_QAbstractAnimationVoid+      , just $ Export cb_Void       ]  cb_BoolVoid =@@ -147,7 +166,7 @@  cb_DockWidgetAreasVoid =   makeCallback (toExtName "CallbackDockWidgetAreasVoid")-  [bitspaceT bs_DockWidgetAreas] voidT+  [flagsT fl_DockWidgetAreas] voidT  cb_DoubleVoid =   makeCallback (toExtName "CallbackDoubleVoid")@@ -169,6 +188,10 @@   makeCallback (toExtName "CallbackOrientationVoid")   [enumT e_Orientation] voidT +cb_OrientationIntIntVoid =+  makeCallback (toExtName "CallbackOrientationIntIntVoid")+  [enumT e_Orientation, intT, intT] voidT+ cb_PtrQAbstractButtonVoid =   makeCallback (toExtName "CallbackPtrQAbstractButtonVoid")   [ptrT $ objT c_QAbstractButton] voidT@@ -201,6 +224,16 @@   makeCallback (toExtName "CallbackPtrQPaintEventVoid")   [ptrT $ objT c_QPaintEvent] voidT +cb_RefConstQModelIndexVoid :: Callback+cb_RefConstQModelIndexVoid =+  makeCallback (toExtName "CallbackRefConstQModelIndexVoid")+  [refT $ constT $ objT c_QModelIndex] voidT++cb_RefConstQListQModelIndexVoid :: Callback+cb_RefConstQListQModelIndexVoid =+  makeCallback (toExtName "CallbackRefConstQListQModelIndexVoid")+  [refT $ constT $ objT c_QListQModelIndex] voidT+ cb_PtrQTreeWidgetItemVoid :: Callback cb_PtrQTreeWidgetItemVoid =   makeCallback (toExtName "CallbackPtrQTreeWidgetItemVoid")@@ -235,7 +268,7 @@ cb_QDockWidgetFeaturesVoid =   addReqIncludes [includeStd "QDockWidget"] $   makeCallback (toExtName "CallbackQDockWidgetFeaturesVoid")-  [bitspaceT bs_DockWidgetFeatures] voidT+  [flagsT fl_DockWidgetFeatures] voidT  cb_QModelIndexVoid =   makeCallback (toExtName "CallbackQModelIndexVoid")@@ -295,7 +328,7 @@  cb_ToolBarAreasVoid =   makeCallback (toExtName "CallbackToolBarAreasVoid")-  [bitspaceT bs_ToolBarAreas] voidT+  [flagsT fl_ToolBarAreas] voidT  cb_ToolButtonStyleVoid =   makeCallback (toExtName "CallbackToolButtonStyleVoid")@@ -309,6 +342,50 @@   makeCallback (toExtName "CallbackWindowStateVoid")   [enumT e_WindowState] voidT +cb_QlonglongVoid =+  makeCallback (toExtName "CallbackQlonglongVoid")+  [qlonglong] voidT++cb_IntQlonglongVoid =+  makeCallback (toExtName "CallbackIntQlonglongVoid")+  [intT, qlonglong] voidT+++cb_ProcessErrorVoid =+  makeCallback (toExtName "CallbackProcessErrorVoid")+  [enumT e_ProcessError] voidT+++cb_IntExitStatusVoid =+  makeCallback (toExtName "CallbackIntExitStatusVoid")+  [intT, enumT e_ExitStatus] voidT+++cb_ProcessStateVoid =+  makeCallback (toExtName "CallbackProcessStateVoid")+  [enumT e_ProcessState] voidT+++cb_DirectionVoid =+  makeCallback (toExtName "CallbackDirectionVoid")+  [enumT e_Direction] voidT+++cb_StateStateVoid =+  makeCallback (toExtName "CallbackStateStateVoid")+  [enumT e_State, enumT e_State] voidT+++cb_RefConstQVariantVoid =+  makeCallback (toExtName "CallbackRefConstQVariantVoid")+  [refT $ constT $ objT c_QVariant] voidT+++cb_QAbstractAnimationVoid =+  makeCallback (toExtName "CallbackQAbstractAnimationVoid")+  [ptrT $ objT c_QAbstractAnimation] voidT++ cb_Void =   makeCallback (toExtName "CallbackVoid")-  [] voidT+  np voidT
src/Graphics/UI/Qtah/Generator/Interface/Internal/EventListener.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident2,@@ -28,6 +27,7 @@   makeClass,   mkCtor,   mkMethod,+  np,   ) import Foreign.Hoppy.Generator.Types (callbackT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)@@ -40,12 +40,12 @@ aModule =   AQtModule $   makeQtModule ["Internal", "EventListener"]-  [ QtExport $ ExportClass c_EventListener ]+  [ qtExport c_EventListener ]  c_EventListener =   addReqIncludes [includeLocal "event.hpp"] $   classSetEntityPrefix "" $   makeClass (ident2 "qtah" "event" "EventListener") Nothing [c_QObject]   [ mkCtor "new" [ptrT $ objT c_QObject, callbackT cb_PtrQObjectPtrQEventBool, callbackT cb_Void]-  , mkMethod "doNotNotifyOnDelete" [] voidT+  , mkMethod "doNotNotifyOnDelete" np voidT   ]
src/Graphics/UI/Qtah/Generator/Interface/Internal/Listener.hs view
@@ -1,423 +0,0 @@----------- GENERATED FILE, EDITS WILL BE LOST ------------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-import qualified Graphics.UI.Qtah.Generator.Module as M-import qualified Graphics.UI.Qtah.Generator.Interface.Core.QObject as QObject-import qualified Graphics.UI.Qtah.Generator.Interface.Internal.Callback as C--{-# ANN module "HLint: ignore Use camelCase" #-}--c_ListenerBool =-  S.makeClass (S.ident "ListenerBool") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_BoolVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_BoolVoid, 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_ListenerDockWidgetArea =-  S.makeClass (S.ident "ListenerDockWidgetArea") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_DockWidgetAreaVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_DockWidgetAreaVoid, 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_ListenerDockWidgetAreas =-  S.makeClass (S.ident "ListenerDockWidgetAreas") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_DockWidgetAreasVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_DockWidgetAreasVoid, 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_ListenerDouble =-  S.makeClass (S.ident "ListenerDouble") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_DoubleVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_DoubleVoid, 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_ListenerInt =-  S.makeClass (S.ident "ListenerInt") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_IntVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_IntVoid, 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_ListenerIntBool =-  S.makeClass (S.ident "ListenerIntBool") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_IntBoolVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_IntBoolVoid, 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_ListenerIntInt =-  S.makeClass (S.ident "ListenerIntInt") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_IntIntVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_IntIntVoid, 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_ListenerOrientation =-  S.makeClass (S.ident "ListenerOrientation") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_OrientationVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_OrientationVoid, S.ptrT $ S.objT QObject.c_QObject]-  , S.mkMethod "connectListener"-    [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT-  ]--c_ListenerPtrQAbstractButton =-  S.makeClass (S.ident "ListenerPtrQAbstractButton") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_PtrQAbstractButtonVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_PtrQAbstractButtonVoid, 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_ListenerPtrQAbstractButtonBool =-  S.makeClass (S.ident "ListenerPtrQAbstractButtonBool") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_PtrQAbstractButtonBoolVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_PtrQAbstractButtonBoolVoid, 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_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]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_PtrQActionVoid, 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_ListenerPtrQObject =-  S.makeClass (S.ident "ListenerPtrQObject") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_PtrQObjectVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_PtrQObjectVoid, 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_ListenerPtrQTreeWidgetItem =-  S.makeClass (S.ident "ListenerPtrQTreeWidgetItem") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_PtrQTreeWidgetItemVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_PtrQTreeWidgetItemVoid, S.ptrT $ S.objT QObject.c_QObject]-  , S.mkMethod "connectListener"-    [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT-  ]--c_ListenerPtrQTreeWidgetItemInt =-  S.makeClass (S.ident "ListenerPtrQTreeWidgetItemInt") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_PtrQTreeWidgetItemIntVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_PtrQTreeWidgetItemIntVoid, S.ptrT $ S.objT QObject.c_QObject]-  , S.mkMethod "connectListener"-    [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT-  ]--c_ListenerPtrQTreeWidgetItemPtrQTreeWidgetItem =-  S.makeClass (S.ident "ListenerPtrQTreeWidgetItemPtrQTreeWidgetItem") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_PtrQTreeWidgetItemPtrQTreeWidgetItemVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_PtrQTreeWidgetItemPtrQTreeWidgetItemVoid, S.ptrT $ S.objT QObject.c_QObject]-  , S.mkMethod "connectListener"-    [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT-  ]--c_ListenerPtrQWidgetPtrQWidget =-  S.makeClass (S.ident "ListenerPtrQWidgetPtrQWidget") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_PtrQWidgetPtrQWidgetVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_PtrQWidgetPtrQWidgetVoid, S.ptrT $ S.objT QObject.c_QObject]-  , S.mkMethod "connectListener"-    [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT-  ]--c_ListenerQAbstractSliderAction =-  S.makeClass (S.ident "ListenerQAbstractSliderAction") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_QAbstractSliderActionVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_QAbstractSliderActionVoid, 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_ListenerQClipboardMode =-  S.makeClass (S.ident "ListenerQClipboardMode") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_QClipboardModeVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_QClipboardModeVoid, 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_ListenerQDate =-  S.makeClass (S.ident "ListenerQDate") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_QDateVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_QDateVoid, 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_ListenerQDockWidgetFeatures =-  S.makeClass (S.ident "ListenerQDockWidgetFeatures") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_QDockWidgetFeaturesVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_QDockWidgetFeaturesVoid, 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_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]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_QPointVoid, 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_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]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_QSizeVoid, 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_ListenerQString =-  S.makeClass (S.ident "ListenerQString") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_QStringVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_QStringVoid, 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_ListenerQSystemTrayIconActivationReason =-  S.makeClass (S.ident "ListenerQSystemTrayIconActivationReason") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_QSystemTrayIconActivationReasonVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_QSystemTrayIconActivationReasonVoid, S.ptrT $ S.objT QObject.c_QObject]-  , S.mkMethod "connectListener"-    [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT-  ]--c_ListenerQWindowVisibility =-  S.makeClass (S.ident "ListenerQWindowVisibility") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_QWindowVisibilityVoid]-  , 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_ListenerRefConstQIcon =-  S.makeClass (S.ident "ListenerRefConstQIcon") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_RefConstQIconVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_RefConstQIconVoid, S.ptrT $ S.objT QObject.c_QObject]-  , S.mkMethod "connectListener"-    [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT-  ]--c_ListenerRefConstQItemSelectionRefConstQItemSelection =-  S.makeClass (S.ident "ListenerRefConstQItemSelectionRefConstQItemSelection") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_RefConstQItemSelectionRefConstQItemSelectionVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_RefConstQItemSelectionRefConstQItemSelectionVoid, S.ptrT $ S.objT QObject.c_QObject]-  , S.mkMethod "connectListener"-    [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT-  ]--c_ListenerScreenOrientation =-  S.makeClass (S.ident "ListenerScreenOrientation") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_ScreenOrientationVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_ScreenOrientationVoid, S.ptrT $ S.objT QObject.c_QObject]-  , S.mkMethod "connectListener"-    [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT-  ]--c_ListenerToolBarAreas =-  S.makeClass (S.ident "ListenerToolBarAreas") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_ToolBarAreasVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_ToolBarAreasVoid, S.ptrT $ S.objT QObject.c_QObject]-  , S.mkMethod "connectListener"-    [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT-  ]--c_ListenerToolButtonStyle =-  S.makeClass (S.ident "ListenerToolButtonStyle") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_ToolButtonStyleVoid]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_ToolButtonStyleVoid, S.ptrT $ S.objT QObject.c_QObject]-  , S.mkMethod "connectListener"-    [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT-  ]--c_ListenerWindowModality =-  S.makeClass (S.ident "ListenerWindowModality") Nothing [QObject.c_QObject]-  [ S.mkCtor "new" [S.callbackT C.cb_WindowModalityVoid]-  , 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]-  , S.mkCtor "newWithParent"-    [S.callbackT C.cb_Void, S.ptrT $ S.objT QObject.c_QObject]-  , S.mkMethod "connectListener"-    [S.ptrT $ S.objT QObject.c_QObject, S.objT String.c_string] S.boolT-  ]--aModule :: M.AModule-aModule =-  M.AHoppyModule $-  S.addReqIncludes [S.includeLocal "listener.hpp"] $-  S.moduleModify' (S.makeModule "listener" "b_listener.hpp" "b_listener.cpp") $ do-    S.moduleAddHaskellName ["Internal", "Listener"]-    S.moduleAddExports $ V.collect-      [ V.just $ S.ExportClass c_ListenerBool-      , V.just $ S.ExportClass c_ListenerDockWidgetArea-      , V.just $ S.ExportClass c_ListenerDockWidgetAreas-      , 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_ListenerOrientation-      , V.just $ S.ExportClass c_ListenerPtrQAbstractButton-      , V.just $ S.ExportClass c_ListenerPtrQAbstractButtonBool-      , V.just $ S.ExportClass c_ListenerPtrQAbstractItemModel-      , V.just $ S.ExportClass c_ListenerPtrQAction-      , V.just $ S.ExportClass c_ListenerPtrQObject-      , V.just $ S.ExportClass c_ListenerPtrQTreeWidgetItem-      , V.just $ S.ExportClass c_ListenerPtrQTreeWidgetItemInt-      , V.just $ S.ExportClass c_ListenerPtrQTreeWidgetItemPtrQTreeWidgetItem-      , V.just $ S.ExportClass c_ListenerPtrQWidgetPtrQWidget-      , V.just $ S.ExportClass c_ListenerQAbstractSliderAction-      , V.just $ S.ExportClass c_ListenerQClipboardMode-      , V.just $ S.ExportClass c_ListenerQDate-      , V.just $ S.ExportClass c_ListenerQDockWidgetFeatures-      , 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.just $ S.ExportClass c_ListenerQSystemTrayIconActivationReason-      , V.test (F.qtVersion >= [5, 0]) $ S.ExportClass c_ListenerQWindowVisibility-      , V.just $ S.ExportClass c_ListenerRefConstQIcon-      , V.just $ S.ExportClass c_ListenerRefConstQItemSelectionRefConstQItemSelection-      , V.test (F.qtVersion >= [5, 0]) $ S.ExportClass c_ListenerScreenOrientation-      , V.just $ S.ExportClass c_ListenerToolBarAreas-      , V.just $ S.ExportClass c_ListenerToolButtonStyle-      , V.just $ S.ExportClass c_ListenerWindowModality-      , V.just $ S.ExportClass c_ListenerWindowState-      , V.just $ S.ExportClass c_Listener-      ]
− src/Graphics/UI/Qtah/Generator/Interface/Internal/Listener.hs-boot
@@ -1,46 +0,0 @@----------- GENERATED FILE, EDITS WILL BE LOST ------------module Graphics.UI.Qtah.Generator.Interface.Internal.Listener where--import Foreign.Hoppy.Generator.Spec (Class)--c_ListenerBool :: Class-c_ListenerDockWidgetArea :: Class-c_ListenerDockWidgetAreas :: Class-c_ListenerDouble :: Class-c_ListenerInt :: Class-c_ListenerIntBool :: Class-c_ListenerIntInt :: Class-c_ListenerOrientation :: Class-c_ListenerPtrQAbstractButton :: Class-c_ListenerPtrQAbstractButtonBool :: Class-c_ListenerPtrQAbstractItemModel :: Class-c_ListenerPtrQAction :: Class-c_ListenerPtrQObject :: Class-c_ListenerPtrQTreeWidgetItem :: Class-c_ListenerPtrQTreeWidgetItemInt :: Class-c_ListenerPtrQTreeWidgetItemPtrQTreeWidgetItem :: Class-c_ListenerPtrQWidgetPtrQWidget :: Class-c_ListenerQAbstractSliderAction :: Class-c_ListenerQClipboardMode :: Class-c_ListenerQDate :: Class-c_ListenerQDockWidgetFeatures :: 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_ListenerQSystemTrayIconActivationReason :: Class-c_ListenerQWindowVisibility :: Class-c_ListenerRefConstQIcon :: Class-c_ListenerRefConstQItemSelectionRefConstQItemSelection :: Class-c_ListenerScreenOrientation :: Class-c_ListenerToolBarAreas :: Class-c_ListenerToolButtonStyle :: Class-c_ListenerWindowModality :: Class-c_ListenerWindowState :: Class-c_Listener :: Class
src/Graphics/UI/Qtah/Generator/Interface/Internal/SceneEventListener.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident2,@@ -28,6 +27,7 @@   makeClass,   mkCtor,   mkMethod,+  np,   ) import Foreign.Hoppy.Generator.Types (callbackT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Internal.Callback@@ -41,7 +41,7 @@ aModule =   AQtModule $   makeQtModule ["Internal", "SceneEventListener"]-  [ QtExport $ ExportClass c_SceneEventListener ]+  [ qtExport c_SceneEventListener ]  c_SceneEventListener =   addReqIncludes [includeLocal "event.hpp"] $@@ -49,5 +49,5 @@   makeClass (ident2 "qtah" "event" "SceneEventListener") Nothing [c_QGraphicsItem]   [ mkCtor "new"       [ptrT $ objT c_QGraphicsItem, callbackT cb_PtrQGraphicsItemPtrQEventBool, callbackT cb_Void]-  , mkMethod "doNotNotifyOnDelete" [] voidT+  , mkMethod "doNotNotifyOnDelete" np voidT   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,6 +30,7 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QBoxLayout as QBoxLayout import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QButtonGroup as QButtonGroup import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QCheckBox as QCheckBox+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QComboBox as QComboBox import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QDateEdit as QDateEdit import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QDateTimeEdit as QDateTimeEdit import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QDial as QDial@@ -42,6 +43,7 @@ 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.QGraphicsPixmapItem as QGraphicsPixmapItem 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@@ -86,6 +88,7 @@ import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QToolButton as QToolButton import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeView as QTreeView import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidget as QTreeWidget+import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidgetItem as QTreeWidgetItem import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QVBoxLayout as QVBoxLayout import qualified Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget as QWidget import Graphics.UI.Qtah.Generator.Module (AModule)@@ -107,6 +110,7 @@   , QBoxLayout.aModule   , QButtonGroup.aModule   , QCheckBox.aModule+  , QComboBox.aModule   , QDateEdit.aModule   , QDateTimeEdit.aModule   , QDial.aModule@@ -119,6 +123,7 @@   , QFrame.aModule   , QGraphicsEllipseItem.aModule   , QGraphicsItem.aModule+  , QGraphicsPixmapItem.aModule   , QGraphicsPolygonItem.aModule   , QGraphicsRectItem.aModule   , QGraphicsScene.aModule@@ -163,7 +168,7 @@   , QToolButton.aModule   , QTreeView.aModule   , QTreeWidget.aModule-  , QTreeWidget.itemModule+  , QTreeWidgetItem.aModule   , QVBoxLayout.aModule   , QWidget.aModule   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractButton.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -31,12 +30,13 @@   mkConstMethod,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener, c_ListenerBool)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listener, listenerBool) import Graphics.UI.Qtah.Generator.Interface.Widgets.QButtonGroup (c_QButtonGroup) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -47,14 +47,13 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QAbstractButton"] $-  QtExport (ExportClass c_QAbstractButton) :+  qtExport c_QAbstractButton :   map QtExportSignal signals  c_QAbstractButton =   addReqIncludes [includeStd "QAbstractButton"] $   classSetEntityPrefix "" $-  makeClass (ident "QAbstractButton") Nothing-  [ c_QWidget ] $+  makeClass (ident "QAbstractButton") Nothing [c_QWidget]   -- Abstact.   [ mkMethod "animateClick" [intT] voidT   , mkProp "autoExclusive" boolT@@ -63,19 +62,19 @@   , mkProp "autoRepeatInterval" intT   , mkBoolIsProp "checkable"   , mkBoolIsProp "checked"-  , mkMethod "click" [] voidT+  , mkMethod "click" np voidT   , mkBoolIsProp "down"-  , mkConstMethod "group" [] $ ptrT $ objT c_QButtonGroup+  , mkConstMethod "group" np $ ptrT $ objT c_QButtonGroup   , mkProp "icon" $ objT c_QIcon   , mkProp "iconSize" $ objT c_QSize     -- TODO shortcut   , mkProp "text" $ objT c_QString-  , mkMethod "toggle" [] voidT+  , mkMethod "toggle" np voidT   ]  signals =-  [ makeSignal c_QAbstractButton "clicked" c_ListenerBool-  , makeSignal c_QAbstractButton "pressed" c_Listener-  , makeSignal c_QAbstractButton "released" c_Listener-  , makeSignal c_QAbstractButton "toggled" c_ListenerBool+  [ makeSignal c_QAbstractButton "clicked" listenerBool+  , makeSignal c_QAbstractButton "pressed" listener+  , makeSignal c_QAbstractButton "released" listener+  , makeSignal c_QAbstractButton "toggled" listenerBool   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractButton.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractGraphicsShapeItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,14 +21,14 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,   includeStd,   makeClass,   mkConstMethod,-  mkMethod+  mkMethod,+  np,   ) import Foreign.Hoppy.Generator.Types (objT, voidT) import Graphics.UI.Qtah.Generator.Interface.Gui.QBrush (c_QBrush)@@ -42,15 +42,15 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QAbstractGraphicsShapeItem"]-  [ QtExport $ ExportClass c_QAbstractGraphicsShapeItem+  [ qtExport c_QAbstractGraphicsShapeItem   ]  c_QAbstractGraphicsShapeItem =   addReqIncludes [includeStd "QAbstractGraphicsShapeItem"] $   classSetEntityPrefix "" $   makeClass (ident "QAbstractGraphicsShapeItem") Nothing [c_QGraphicsItem]-  [ mkConstMethod "brush" [] $ objT c_QBrush-  , mkConstMethod "pen" [] $ objT c_QPen+  [ mkConstMethod "brush" np $ objT c_QBrush+  , mkConstMethod "pen" np $ objT c_QPen   , mkMethod "setBrush" [objT c_QBrush] voidT   , mkMethod "setPen" [objT c_QPen] voidT   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractItemDelegate.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2018 The Qtah Authors.+-- Copyright 2018-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -37,13 +36,13 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QAbstractItemDelegate"] $-  QtExport (ExportClass c_QAbstractItemDelegate) :+  qtExport c_QAbstractItemDelegate :   map QtExportSignal signals  c_QAbstractItemDelegate =   addReqIncludes [includeStd "QAbstractItemDelegate"] $   classSetEntityPrefix "" $-  makeClass (ident "QAbstractItemDelegate") Nothing [c_QObject] $+  makeClass (ident "QAbstractItemDelegate") Nothing [c_QObject]   [ -- TODO Methods.   ] 
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractItemView.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,10 +18,16 @@ module Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractItemView (   aModule,   c_QAbstractItemView,+  e_ScrollHint,+  e_SelectionMode,+  e_ScrollMode,+  e_DragDropMode,+  e_EditTrigger,+  fl_EditTriggers,+  e_SelectionBehavior,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportBitspace, ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -34,9 +40,9 @@   mkMethod,   mkMethod',   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (-  bitspaceT,   boolT,   enumT,   intT,@@ -44,6 +50,7 @@   ptrT,   voidT,   )+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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)@@ -55,14 +62,14 @@   e_DropAction,   e_TextElideMode,   )-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_Listener,-  c_ListenerQModelIndex,-  c_ListenerQSize,+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listener,+  listenerQModelIndex,+  listenerQSize,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractItemDelegate (c_QAbstractItemDelegate) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractScrollArea (c_QAbstractScrollArea)-import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -71,25 +78,25 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QAbstractItemView"] $-  QtExport (ExportClass c_QAbstractItemView) :+  qtExport 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+  [ qtExport e_DragDropMode+  , qtExport e_EditTrigger+  , qtExport fl_EditTriggers+  , qtExport e_ScrollHint+  , qtExport e_ScrollMode+  , qtExport e_SelectionBehavior+  , qtExport e_SelectionMode   ]  c_QAbstractItemView =   addReqIncludes [includeStd "QAbstractItemView"] $   classSetEntityPrefix "" $-  makeClass (ident "QAbstractItemView") Nothing [c_QAbstractScrollArea] $+  makeClass (ident "QAbstractItemView") Nothing [c_QAbstractScrollArea]   [ mkProp "alternatingRowColors" boolT   , mkBoolHasProp "autoScroll"   , mkProp "autoScrollMargin" intT-  , mkMethod "clearSelection" [] voidT+  , mkMethod "clearSelection" np voidT   , mkMethod "closePersistentEditor" [objT c_QModelIndex] voidT   , mkProp "currentIndex" $ objT c_QModelIndex   , mkProp "defaultDropAction" $ enumT e_DropAction@@ -97,12 +104,12 @@   , mkProp "dragDropOverwriteMode" boolT   , mkProp "dragEnabled" boolT   , mkMethod "edit" [objT c_QModelIndex] voidT-  , mkProp "editTriggers" $ bitspaceT bs_EditTriggers+  , mkProp "editTriggers" $ flagsT fl_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-  , mkConstMethod' "itemDelegate" "itemDelegate" [] $+  , mkConstMethod' "itemDelegate" "itemDelegate" np $     ptrT $ objT c_QAbstractItemDelegate   , mkConstMethod' "itemDelegate" "itemDelegateAt" [objT c_QModelIndex] $     ptrT $ objT c_QAbstractItemDelegate@@ -113,13 +120,13 @@   , mkMethod "keyboardSearch" [objT c_QString] voidT   , mkProp "model" $ ptrT $ objT c_QAbstractItemModel   , mkMethod "openPersistentEditor" [objT c_QModelIndex] voidT-  , mkMethod "reset" [] voidT+  , mkMethod "reset" np 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+  , mkMethod "scrollToBottom" np voidT+  , mkMethod "scrollToTop" np voidT+  , mkMethod "selectAll" np voidT   , mkProp "selectionBehavior" $ enumT e_SelectionBehavior   , mkProp "selectionMode" $ enumT e_SelectionMode   , mkProp "selectionModel" $ ptrT $ objT c_QItemSelectionModel@@ -128,7 +135,7 @@   , mkMethod "setItemDelegate" [ptrT $ objT c_QAbstractItemDelegate] voidT   , mkMethod "setItemDelegateForColumn" [intT, ptrT $ objT c_QAbstractItemDelegate] voidT   , mkMethod "setItemDelegateForRow" [intT, ptrT $ objT c_QAbstractItemDelegate] voidT-  , mkConstMethod "showDropIndicator" [] boolT+  , mkConstMethod "showDropIndicator" np boolT   , mkConstMethod "sizeHintForColumn" [intT] intT   , mkConstMethod "sizeHintForIndex" [objT c_QModelIndex] $ objT c_QSize   , mkConstMethod "sizeHintForRow" [intT] intT@@ -140,62 +147,62 @@   ]  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+  [ makeSignal c_QAbstractItemView "activated" listenerQModelIndex+  , makeSignal c_QAbstractItemView "clicked" listenerQModelIndex+  , makeSignal c_QAbstractItemView "doubleClicked" listenerQModelIndex+  , makeSignal c_QAbstractItemView "entered" listenerQModelIndex+  , makeSignal c_QAbstractItemView "iconSizeChanged" listenerQSize+  , makeSignal c_QAbstractItemView "pressed" listenerQModelIndex+  , makeSignal c_QAbstractItemView "viewportEntered" 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"])+  [ "NoDragDrop"+  , "DragOnly"+  , "DropOnly"+  , "DragDrop"+  , "InternalMove"   ] -(e_EditTrigger, bs_EditTriggers) =-  makeQtEnumBitspace (ident1 "QAbstractItemView" "EditTrigger") "EditTriggers"+(e_EditTrigger, fl_EditTriggers) =+  makeQtEnumAndFlags (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"])+  [ "NoEditTriggers"+  , "CurrentChanged"+  , "DoubleClicked"+  , "SelectedClicked"+  , "EditKeyPressed"+  , "AnyKeyPressed"+  , "AllEditTriggers"   ]  e_ScrollHint =   makeQtEnum (ident1 "QAbstractItemView" "ScrollHint") [includeStd "QAbstractItemView"]-  [ (0, ["ensure", "visible"])-  , (1, ["position", "at", "top"])-  , (2, ["position", "at", "bottom"])-  , (3, ["position", "at", "center"])+  [ "EnsureVisible"+  , "PositionAtTop"+  , "PositionAtBottom"+  , "PositionAtCenter"   ]  e_ScrollMode =   makeQtEnum (ident1 "QAbstractItemView" "ScrollMode") [includeStd "QAbstractItemView"]-  [ (0, ["scroll", "per", "item"])-  , (1, ["scroll", "per", "pixel"])+  [ "ScrollPerItem"+  , "ScrollPerPixel"   ]  e_SelectionBehavior =   makeQtEnum (ident1 "QAbstractItemView" "SelectionBehavior") [includeStd "QAbstractItemView"]-  [ (0, ["select", "items"])-  , (1, ["select", "rows"])-  , (2, ["select", "columns"])+  [ "SelectItems"+  , "SelectRows"+  , "SelectColumns"   ]  e_SelectionMode =   makeQtEnum (ident1 "QAbstractItemView" "SelectionMode") [includeStd "QAbstractItemView"]-  [ (0, ["no", "selection"])-  , (1, ["single", "selection"])-  , (2, ["multi", "selection"])-  , (3, ["extended", "selection"])-  , (4, ["contiguous", "selection"])+  [ "NoSelection"+  , "SingleSelection"+  , "MultiSelection"+  , "ExtendedSelection"+  , "ContiguousSelection"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractScrollArea.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -30,11 +29,14 @@   mkConstMethod,   mkCtor,   mkMethod,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, enumT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (enumT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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.Core.Types (fl_Alignment, e_ScrollBarPolicy)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QFrame (c_QFrame)+import {-# SOURCE #-} 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@@ -44,27 +46,27 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QAbstractScrollArea"]-  [ QtExport $ ExportClass c_QAbstractScrollArea ]+  [ qtExport c_QAbstractScrollArea ]  c_QAbstractScrollArea =   addReqIncludes [includeStd "QAbstractScrollArea"] $   classSetEntityPrefix "" $-  makeClass (ident "QAbstractScrollArea") Nothing [c_QWidget]-  [ mkCtor "new" []+  makeClass (ident "QAbstractScrollArea") Nothing [c_QFrame]+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]-  , mkMethod "addScrollBarWidget" [ptrT $ objT c_QWidget, bitspaceT bs_Alignment] voidT-  , mkConstMethod "cornerWidget" [] $ ptrT $ objT c_QWidget-  , mkConstMethod "horizontalScrollBar" [] $ ptrT $ objT c_QScrollBar-  , mkConstMethod "horizontalScrollBarPolicy" [] $ enumT e_ScrollBarPolicy-  , mkConstMethod "maximumViewportSize" [] $ objT c_QSize-  -- TODO mkMethod "scrollBarWidgets" [enumT e_Alignment] $ objT c_QWidgetList+  , mkMethod "addScrollBarWidget" [ptrT $ objT c_QWidget, flagsT fl_Alignment] voidT+  , mkConstMethod "cornerWidget" np $ ptrT $ objT c_QWidget+  , mkConstMethod "horizontalScrollBar" np $ ptrT $ objT c_QScrollBar+  , mkConstMethod "horizontalScrollBarPolicy" np $ enumT e_ScrollBarPolicy+  , mkConstMethod "maximumViewportSize" np $ objT c_QSize+  -- TODO mkMethod "scrollBarWidgets" [flagsT fl_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+  , mkConstMethod "verticalScrollBar" np $ ptrT $ objT c_QScrollBar+  , mkConstMethod "verticalScrollBarPolicy" np $ enumT e_ScrollBarPolicy+  , mkConstMethod "viewport" np $ 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-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,7 +22,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   enumSetValuePrefix,@@ -36,17 +35,18 @@   mkCtor,   mkMethod,   mkProp,+  np,   toExtName,   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_Orientation)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_Listener,-  c_ListenerInt,-  c_ListenerIntInt,-  c_ListenerQAbstractSliderAction,+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listener,+  listenerInt,+  listenerIntInt,+  listenerQAbstractSliderAction,   )-import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -55,15 +55,15 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QAbstractSlider"] $-  QtExport (ExportClass c_QAbstractSlider) :+  qtExport c_QAbstractSlider :   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_SliderAction ]+  [ qtExport e_SliderAction ]  c_QAbstractSlider =   addReqIncludes [includeStd "QAbstractSlider"] $   classSetEntityPrefix "" $   makeClass (ident "QAbstractSlider") Nothing [c_QWidget]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkProp "invertedAppearance" boolT   , mkProp "invertedControls" boolT@@ -80,12 +80,12 @@   ]  signals =-  [ makeSignal c_QAbstractSlider "actionTriggered" c_ListenerQAbstractSliderAction-  , makeSignal c_QAbstractSlider "rangeChanged" c_ListenerIntInt-  , makeSignal c_QAbstractSlider "sliderMoved" c_ListenerInt-  , makeSignal c_QAbstractSlider "sliderPressed" c_Listener-  , makeSignal c_QAbstractSlider "sliderReleased" c_Listener-  , makeSignal c_QAbstractSlider "valueChanged" c_ListenerInt+  [ makeSignal c_QAbstractSlider "actionTriggered" listenerQAbstractSliderAction+  , makeSignal c_QAbstractSlider "rangeChanged" listenerIntInt+  , makeSignal c_QAbstractSlider "sliderMoved" listenerInt+  , makeSignal c_QAbstractSlider "sliderPressed" listener+  , makeSignal c_QAbstractSlider "sliderReleased" listener+  , makeSignal c_QAbstractSlider "valueChanged" listenerInt   ]  -- This uses 'makeEnum' rather than 'makeQtEnum' in order to use the external
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractSlider.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAbstractSpinBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,11 +21,10 @@   e_ButtonSymbols,   e_CorrectionMode,   e_StepEnabledFlag,-  bs_StepEnabled,+  fl_StepEnabled,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportBitspace, ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -38,13 +37,15 @@   mkCtor,   mkMethod,   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, refT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, refT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listener) 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@@ -54,13 +55,13 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QAbstractSpinBox"] $-  QtExport (ExportClass c_QAbstractSpinBox) :+  qtExport c_QAbstractSpinBox :   map QtExportSignal signals ++-  (map QtExport . collect)-  [ test (qtVersion >= [4, 2]) $ ExportEnum e_ButtonSymbols-  , just $ ExportEnum e_CorrectionMode-  , just $ ExportEnum e_StepEnabledFlag-  , just $ ExportBitspace bs_StepEnabled+  collect+  [ test (qtVersion >= [4, 2]) $ qtExport e_ButtonSymbols+  , just $ qtExport e_CorrectionMode+  , just $ qtExport e_StepEnabledFlag+  , just $ qtExport fl_StepEnabled   ]  c_QAbstractSpinBox =@@ -68,52 +69,52 @@   classSetEntityPrefix "" $   makeClass (ident "QAbstractSpinBox") Nothing [c_QWidget] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , test (qtVersion >= [4, 2]) $ mkBoolIsProp "accelerated"-  , just $ mkProp "alignment" $ bitspaceT bs_Alignment+  , just $ mkProp "alignment" $ flagsT fl_Alignment   , test (qtVersion >= [4, 2]) $ mkProp "buttonSymbols" $ enumT e_ButtonSymbols-  , just $ mkMethod "clear" [] voidT+  , just $ mkMethod "clear" np voidT   , just $ mkProp "correctionMode" $ enumT e_CorrectionMode-  , test (qtVersion >= [4, 2]) $ mkConstMethod "hasAcceptableInput" [] boolT+  , test (qtVersion >= [4, 2]) $ mkConstMethod "hasAcceptableInput" np boolT   , just $ mkConstMethod "fixup" [refT $ objT c_QString] voidT   , test (qtVersion >= [4, 3]) $ mkBoolHasProp "frame"   , test (qtVersion >= [5, 3]) $ mkBoolIsProp "groupSeparatorShown"-  , just $ mkMethod "interpretText" [] voidT+  , just $ mkMethod "interpretText" np voidT   , just $ mkProp "keyboardTracking" boolT   , just $ mkBoolIsProp "readOnly"-  , just $ mkMethod "selectAll" [] voidT+  , just $ mkMethod "selectAll" np voidT   , just $ mkProp "specialValueText" $ objT c_QString   , just $ mkMethod "stepBy" [intT] voidT-  , just $ mkMethod "stepDown" [] voidT-  , just $ mkMethod "stepUp" [] voidT-  , just $ mkConstMethod "text" [] $ objT c_QString+  , just $ mkMethod "stepDown" np voidT+  , just $ mkMethod "stepUp" np voidT+  , just $ mkConstMethod "text" np $ objT c_QString     -- TODO validate   , just $ mkProp "wrapping" boolT   ]  signals =-  [ makeSignal c_QAbstractSpinBox "editingFinished" c_Listener+  [ makeSignal c_QAbstractSpinBox "editingFinished" listener   ]  e_ButtonSymbols =   addReqIncludes [includeStd "QAbstractSpinBox"] $   makeQtEnum (ident1 "QAbstractSpinBox" "ButtonSymbols") [includeStd "QAbstractSpinBox"]-  [ (0, ["up", "down", "arrows"])-  , (1, ["plus", "minus"])-  , (2, ["no", "buttons"])+  [ "UpDownArrows"+  , "PlusMinus"+  , "NoButtons"   ]  e_CorrectionMode =   makeQtEnum (ident1 "QAbstractSpinBox" "CorrectionMode") [includeStd "QAbstractSpinBox"]-  [ (0, ["correct", "to", "previous", "value"])-  , (1, ["correct", "to", "nearest", "value"])+  [ "CorrectToPreviousValue"+  , "CorrectToNearestValue"   ] -(e_StepEnabledFlag, bs_StepEnabled) =-  makeQtEnumBitspace (ident1 "QAbstractSpinBox" "StepEnabledFlag") "StepEnabled"+(e_StepEnabledFlag, fl_StepEnabled) =+  makeQtEnumAndFlags (ident1 "QAbstractSpinBox" "StepEnabledFlag") "StepEnabled"   [includeStd "QAbstractSpinBox"]-  [ (0x0, ["step", "none"])-  , (0x1, ["step", "up", "enabled"])-  , (0x2, ["step", "down", "enabled"])+  [ "StepNone"+  , "StepUpEnabled"+  , "StepDownEnabled"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAction.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -33,15 +32,16 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (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.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Gui.QFont (c_QFont) import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener, c_ListenerBool)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listener, listenerBool) import Graphics.UI.Qtah.Generator.Interface.Widgets.QActionGroup (c_QActionGroup) import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu (c_QMenu) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)@@ -53,13 +53,13 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QAction"] $-  QtExport (ExportClass c_QAction) :+  qtExport c_QAction :   map QtExportSignal signals ++-  (map (QtExport . ExportEnum) . collect)-  [ just $ e_ActionEvent-  , just $ e_MenuRole-  , just $ e_Priority-  , test (qtVersion < [5]) $ e_SoftKeyRole+  collect+  [ just $ qtExport e_ActionEvent+  , just $ qtExport e_MenuRole+  , just $ qtExport e_Priority+  , test (qtVersion < [5]) $ qtExport e_SoftKeyRole   ]  c_QAction =@@ -67,7 +67,7 @@   classSetEntityPrefix "" $   makeClass (ident "QAction") Nothing [c_QObject] $   collect-  [ test (qtVersion >= [5, 7]) $ mkCtor "new" []+  [ test (qtVersion >= [5, 7]) $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]   , test (qtVersion >= [5, 7]) $ mkCtor "newWithText" [objT c_QString]   , just $ mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QObject]@@ -84,14 +84,14 @@     -- TODO data   , just $ mkBoolIsProp "enabled"   , just $ mkProp "font" $ objT c_QFont-  , just $ mkMethod "hover" [] voidT+  , just $ mkMethod "hover" np voidT   , just $ mkProp "icon" $ objT c_QIcon   , just $ mkProp "iconText" $ objT c_QString   , just $ mkBoolIsProp "iconVisibleInMenu"   , just $ mkProp "menu" $ ptrT $ objT c_QMenu   , just $ mkProp "menuRole" $ enumT e_MenuRole-  , just $ mkConstMethod "parentWidget" [] $ ptrT $ objT c_QWidget-  , just $ mkConstMethod "priority" [] $ enumT e_Priority+  , just $ mkConstMethod "parentWidget" np $ ptrT $ objT c_QWidget+  , just $ mkConstMethod "priority" np $ enumT e_Priority   , just $ mkBoolIsProp "separator"   , just $ mkMethod "setDisabled" [boolT] voidT   , just $ mkMethod "setPriority" [enumT e_Priority] voidT@@ -103,49 +103,49 @@   , test (qtVersion < [5]) $ mkProp "softKeyRole" $ enumT e_SoftKeyRole   , just $ mkProp "statusTip" $ objT c_QString   , just $ mkProp "text" $ objT c_QString-  , just $ mkMethod "toggle" [] voidT+  , just $ mkMethod "toggle" np voidT   , just $ mkProp "toolTip" $ objT c_QString-  , just $ mkMethod "trigger" [] voidT+  , just $ mkMethod "trigger" np voidT   , just $ mkBoolIsProp "visible"   , just $ mkProp "whatsThis" $ objT c_QString   ]  signals =-  [ makeSignal c_QAction "changed" c_Listener-  , makeSignal c_QAction "hovered" c_Listener-  , makeSignal c_QAction "toggled" c_ListenerBool-  , makeSignal c_QAction "triggered" c_ListenerBool+  [ makeSignal c_QAction "changed" listener+  , makeSignal c_QAction "hovered" listener+  , makeSignal c_QAction "toggled" listenerBool+  , makeSignal c_QAction "triggered" listenerBool   ]  e_ActionEvent =   makeQtEnum (ident1 "QAction" "ActionEvent") [includeStd "QAction"]-  [ (0, ["trigger"])-  , (1, ["hover"])+  [ "Trigger"+  , "Hover"   ]  e_MenuRole =   makeQtEnum (ident1 "QAction" "MenuRole") [includeStd "QAction"]-  [ (0, ["no", "role"])-  , (1, ["text", "heuristic", "role"])-  , (2, ["application", "specific", "role"])-  , (3, ["about", "qt", "role"])-  , (4, ["about", "role"])-  , (5, ["preferences", "role"])-  , (6, ["quit", "role"])+  [ "NoRole"+  , "TextHeuristicRole"+  , "ApplicationSpecificRole"+  , "AboutQtRole"+  , "AboutRole"+  , "PreferencesRole"+  , "QuitRole"   ]  e_Priority =   makeQtEnum (ident1 "QAction" "Priority") [includeStd "QAction"]-  [ (0, ["low", "priority"])-  , (128, ["normal", "priority"])-  , (256, ["high", "priority"])+  [ "LowPriority"+  , "NormalPriority"+  , "HighPriority"   ]  -- | Removed in Qt 5. e_SoftKeyRole =   makeQtEnum (ident1 "QAction" "SoftKeyRole") [includeStd "QAction"]-  [ (0, ["no", "soft", "key"])-  , (1, ["positive", "soft", "key"])-  , (2, ["negative", "soft", "key"])-  , (3, ["select", "soft", "key"])+  [ "NoSoftKey"+  , "PositiveSoftKey"+  , "NegativeSoftKey"+  , "SelectSoftKey"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QAction.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -32,12 +31,13 @@   mkCtor,   mkMethod,   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerPtrQAction)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerPtrQAction) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types@@ -47,7 +47,7 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QActionGroup"] $-  QtExport (ExportClass c_QActionGroup) :+  qtExport c_QActionGroup :   map QtExportSignal signals  c_QActionGroup =@@ -61,7 +61,7 @@   , mkMethod' "addAction" "addNewAction" [objT c_QString] $ ptrT $ objT c_QAction   , mkMethod' "addAction" "addNewActionWithIcon" [objT c_QIcon, objT c_QString] $     ptrT $ objT c_QAction-  , mkConstMethod "checkedAction" [] $ ptrT $ objT c_QAction+  , mkConstMethod "checkedAction" np $ ptrT $ objT c_QAction   , mkBoolIsProp "enabled"   , mkBoolIsProp "exclusive"   , mkMethod "removeAction" [ptrT $ objT c_QAction] voidT@@ -70,6 +70,6 @@   ]  signals =-  [ makeSignal c_QActionGroup "hovered" c_ListenerPtrQAction-  , makeSignal c_QActionGroup "triggered" c_ListenerPtrQAction+  [ makeSignal c_QActionGroup "hovered" listenerPtrQAction+  , makeSignal c_QActionGroup "triggered" listenerPtrQAction   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QApplication.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   MethodApplicability (MStatic),   Purity (Nonpure),   addReqIncludes,@@ -37,10 +36,11 @@   mkStaticMethod,   mkStaticMethod',   mkStaticProp,+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (keypadNavigation, qtVersion)+import Graphics.UI.Qtah.Generator.Config (keypadNavigation, qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QCoreApplication (c_QCoreApplication) import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQWidget) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint)@@ -52,8 +52,8 @@ import Graphics.UI.Qtah.Generator.Interface.Gui.QFont (c_QFont) import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_Listener,-  c_ListenerPtrQWidgetPtrQWidget,+  listener,+  listenerPtrQWidgetPtrQWidget,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -64,10 +64,10 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QApplication"] $-  [ QtExport $ ExportClass c_QApplication+  [ qtExport c_QApplication   ] ++ map QtExportSignal signals ++   collect-  [ test (qtVersion < [5]) $ QtExport $ ExportEnum e_Type+  [ test (qtVersion < [5]) $ qtExport e_Type   ]  c_QApplication =@@ -79,25 +79,25 @@   collect   [ just $ makeFnMethod (ident2 "qtah" "qapplication" "create") "new" MStatic Nonpure     [objT c_QStringList] $ ptrT $ objT c_QApplication-  , just $ mkStaticMethod "aboutQt" [] voidT-  , just $ mkStaticMethod "activeModalWidget" [] $ ptrT $ objT c_QWidget-  , just $ mkStaticMethod "activePopupWidget" [] $ ptrT $ objT c_QWidget+  , just $ mkStaticMethod "aboutQt" np voidT+  , just $ mkStaticMethod "activeModalWidget" np $ ptrT $ objT c_QWidget+  , just $ mkStaticMethod "activePopupWidget" np $ ptrT $ objT c_QWidget   , just $ mkStaticProp "activeWindow" $ ptrT $ objT c_QWidget   , just $ mkStaticMethod "alert" [ptrT $ objT c_QWidget, intT] voidT-  , just $ mkStaticMethod "allWidgets" [] $ objT c_QListQWidget+  , just $ mkStaticMethod "allWidgets" np $ objT c_QListQWidget   , just $ mkProp "autoSipEnabled" boolT-  , just $ mkStaticMethod "beep" [] voidT+  , just $ mkStaticMethod "beep" np voidT     -- TODO changeOverrideCursor-  , just $ mkStaticMethod "clipboard" [] $ ptrT $ objT c_QClipboard-  , just $ mkStaticMethod "closeAllWindows" [] voidT+  , just $ mkStaticMethod "clipboard" np $ ptrT $ objT c_QClipboard+  , just $ mkStaticMethod "closeAllWindows" np voidT   , just $ mkStaticProp "colorSpec" intT     -- TODO commitData   , just $ mkStaticProp "cursorFlashTime" intT     -- TODO desktop   , just $ mkStaticProp "desktopSettingsAware" boolT   , just $ mkStaticProp "doubleClickInterval" intT-  , just $ mkStaticMethod "focusWidget" [] $ ptrT $ objT c_QWidget-  , just $ mkStaticMethod' "font" "font" [] $ objT c_QFont+  , just $ mkStaticMethod "focusWidget" np $ ptrT $ objT c_QWidget+  , just $ mkStaticMethod' "font" "font" np $ objT c_QFont   , just $ mkStaticMethod' "font" "fontWithWidget" [ptrT $ objT c_QWidget] $ objT c_QFont   , just $ makeFnMethod (ident2 "qtah" "qapplication" "fontWithClass") "fontWithClass"     MStatic Nonpure [objT c_QString] $ objT c_QFont@@ -105,29 +105,29 @@   , just $ mkStaticProp "globalStrut" $ objT c_QSize     -- TODO inputContext     -- TODO isEffectEnabled-  , just $ mkStaticMethod "isLeftToRight" [] boolT-  , just $ mkStaticMethod "isRightToLeft" [] boolT-  , just $ mkConstMethod "isSessionRestored" [] boolT-  , test (qtVersion < [5]) $ mkStaticMethod "keyboardInputDirection" [] $ enumT e_LayoutDirection-  , just $ mkStaticMethod "keyboardInputInterval" [] intT+  , just $ mkStaticMethod "isLeftToRight" np boolT+  , just $ mkStaticMethod "isRightToLeft" np boolT+  , just $ mkConstMethod "isSessionRestored" np boolT+  , test (qtVersion < [5]) $ mkStaticMethod "keyboardInputDirection" np $ enumT e_LayoutDirection+  , just $ mkStaticMethod "keyboardInputInterval" np intT     -- TODO keyboardInputLocale (<5)     -- TODO keyboardModifiers-  , just $ mkStaticMethod "layoutDirection" [] $ enumT e_LayoutDirection+  , just $ mkStaticMethod "layoutDirection" np $ enumT e_LayoutDirection     -- TODO macEventFilter     -- TODO mouseButtons-  , test keypadNavigation $ mkStaticMethod "navigationMode" [] $ enumT e_NavigationMode+  , test keypadNavigation $ mkStaticMethod "navigationMode" np $ enumT e_NavigationMode     -- TODO overrideCursor     -- TODO palette     -- TODO queryKeyboardModifiers-  , just $ mkStaticMethod "quitOnLastWindowClosed" [] boolT+  , just $ mkStaticMethod "quitOnLastWindowClosed" np boolT     -- TODO qwsDecoration     -- TODO qwsEventFilter     -- TODO qwsSetCustomColors     -- TODO qwsSetDecoration-  , just $ mkStaticMethod "restoreOverrideCursor" [] voidT+  , just $ mkStaticMethod "restoreOverrideCursor" np voidT     -- TODO saveState-  , just $ mkConstMethod "sessionId" [] $ objT c_QString-  , just $ mkConstMethod "sessionKey" [] $ objT c_QString+  , just $ mkConstMethod "sessionId" np $ objT c_QString+  , just $ mkConstMethod "sessionKey" np $ objT c_QString     -- TODO setEffectEnabled   , just $ mkStaticMethod' "setFont" "setFont" [objT c_QFont] voidT   , just $ makeFnMethod (ident2 "qtah" "qapplication" "setFontWithClass") "setFontWithClass"@@ -146,14 +146,14 @@   , just $ mkProp "startDragTime" intT     -- TODO style   , just $ mkProp "styleSheet" $ objT c_QString-  , test (qtVersion < [5]) $ mkStaticMethod "syncX" [] voidT+  , test (qtVersion < [5]) $ mkStaticMethod "syncX" np voidT     -- TODO symbianEventFilter     -- TODO symbianProcessEvent   , just $ mkStaticMethod' "topLevelAt" "topLevelAtPoint" [objT c_QPoint] $ ptrT $ objT c_QWidget   , just $ mkStaticMethod' "topLevelAt" "topLevelAtRaw" [intT, intT] $ ptrT $ objT c_QWidget     -- TODO topLevelWidgets     -- We rename type() since @type@ is a Haskell keyword.-  , test (qtVersion < [5]) $ mkStaticMethod' "type" "applicationType" [] $ enumT e_Type+  , test (qtVersion < [5]) $ mkStaticMethod' "type" "applicationType" np $ enumT e_Type   , just $ mkStaticProp "wheelScrollLines" intT   , just $ mkStaticMethod' "widgetAt" "widgetAtPoint" [objT c_QPoint] $ ptrT $ objT c_QWidget   , just $ mkStaticMethod' "widgetAt" "widgetAtRaw" [intT, intT] $ ptrT $ objT c_QWidget@@ -163,12 +163,12 @@   ]  signals =-  [ makeSignal c_QApplication "aboutToReleaseGpuResources" c_Listener-  , makeSignal c_QApplication "aboutToUseGpuResources" c_Listener+  [ makeSignal c_QApplication "aboutToReleaseGpuResources" listener+  , makeSignal c_QApplication "aboutToUseGpuResources" listener     -- TODO commitDataRequest-  , makeSignal c_QApplication "focusChanged" c_ListenerPtrQWidgetPtrQWidget-  , makeSignal c_QApplication "fontDatabaseChanged" c_Listener-  , makeSignal c_QApplication "lastWindowClosed" c_Listener+  , makeSignal c_QApplication "focusChanged" listenerPtrQWidgetPtrQWidget+  , makeSignal c_QApplication "fontDatabaseChanged" listener+  , makeSignal c_QApplication "lastWindowClosed" listener     -- TODO quit (static!)     -- TODO saveStateRequest   ]@@ -176,7 +176,7 @@ -- | Removed in Qt 5. e_Type =   makeQtEnum (ident1 "QApplication" "Type") [includeStd "QApplication"]-  [ (0, ["tty"])-  , (1, ["gui", "client"])-  , (2, ["gui", "server"])+  [ "Tty"+  , "GuiClient"+  , "GuiServer"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QBoxLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -32,9 +31,11 @@   mkMethod,   mkMethod',   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, voidT)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment)+import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayout (c_QLayout) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -45,8 +46,8 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QBoxLayout"]-  [ QtExport $ ExportClass c_QBoxLayout-  , QtExport $ ExportEnum e_Direction+  [ qtExport c_QBoxLayout+  , qtExport e_Direction   ]  c_QBoxLayout =@@ -58,13 +59,13 @@   , mkMethod' "addLayout" "addLayout" [ptrT $ objT c_QLayout] voidT   , mkMethod' "addLayout" "addLayoutWithStretch" [ptrT $ objT c_QLayout, intT] voidT   , mkMethod "addSpacing" [intT] voidT-  , mkMethod' "addStretch" "addStretch" [] voidT+  , mkMethod' "addStretch" "addStretch" np voidT   , mkMethod' "addStretch" "addStretchOf" [intT] voidT   , mkMethod "addStrut" [intT] voidT   , mkMethod' "addWidget" "addWidget" [ptrT $ objT c_QWidget] voidT   , mkMethod' "addWidget" "addWidgetWithStretch" [ptrT $ objT c_QWidget, intT] voidT   , mkMethod' "addWidget" "addWidgetWithStretchAndAlignment"-    [ptrT $ objT c_QWidget, intT, bitspaceT bs_Alignment] voidT+    [ptrT $ objT c_QWidget, intT, flagsT fl_Alignment] voidT   , mkProp "direction" $ enumT e_Direction   , mkMethod' "insertLayout" "insertLayout" [intT, ptrT $ objT c_QLayout] voidT   , mkMethod' "insertLayout" "insertLayoutWithStretch" [intT, ptrT $ objT c_QLayout, intT] voidT@@ -75,7 +76,7 @@   , mkMethod' "insertWidget" "insertWidget" [intT, ptrT $ objT c_QWidget] voidT   , mkMethod' "insertWidget" "insertWidgetWithStretch" [intT, ptrT $ objT c_QWidget, intT] voidT   , mkMethod' "insertWidget" "insertWidgetWithStretchAndAlignment"-    [intT, ptrT $ objT c_QWidget, intT, bitspaceT bs_Alignment] voidT+    [intT, ptrT $ objT c_QWidget, intT, flagsT fl_Alignment] voidT   , mkMethod "setStretch" [intT, intT] voidT   , mkMethod' "setStretchFactor" "setWidgetStretchFactor" [ptrT $ objT c_QWidget, intT] boolT   , mkMethod' "setStretchFactor" "setLayoutStretchFactor" [ptrT $ objT c_QLayout, intT] boolT@@ -84,8 +85,8 @@  e_Direction =   makeQtEnum (ident1 "QBoxLayout" "Direction") [includeStd "QBoxLayout"]-  [ (0, ["left", "to", "right"])-  , (1, ["right", "to", "left"])-  , (2, ["top", "to", "bottom"])-  , (3, ["bottom", "to", "top"])+  [ "LeftToRight"+  , "RightToLeft"+  , "TopToBottom"+  , "BottomToTop"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QButtonGroup.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -32,17 +31,18 @@   mkMethod,   mkMethod',   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQAbstractButton) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_ListenerInt,-  c_ListenerIntBool,-  c_ListenerPtrQAbstractButton,-  c_ListenerPtrQAbstractButtonBool,+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listenerInt,+  listenerIntBool,+  listenerPtrQAbstractButton,+  listenerPtrQAbstractButtonBool,   ) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton (   c_QAbstractButton,@@ -55,7 +55,7 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QButtonGroup"] $-  (QtExport $ ExportClass c_QButtonGroup) :+  (qtExport c_QButtonGroup) :   map QtExportSignal signals  c_QButtonGroup =@@ -63,14 +63,14 @@   classSetEntityPrefix "" $   makeClass (ident "QButtonGroup") Nothing [c_QObject] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QObject]   , just $ mkMethod' "addButton" "addButton" [ptrT $ objT c_QAbstractButton] voidT   , just $ mkMethod' "addButton" "addButtonWithId" [ptrT $ objT c_QAbstractButton, intT] voidT   , test (qtVersion >= [4, 1]) $ mkConstMethod "button" [intT] $ ptrT $ objT c_QAbstractButton-  , just $ mkConstMethod "buttons" [] $ objT c_QListQAbstractButton-  , just $ mkConstMethod "checkedButton" [] $ ptrT $ objT c_QAbstractButton-  , test (qtVersion >= [4, 1]) $ mkConstMethod "checkedId" [] intT+  , just $ mkConstMethod "buttons" np $ objT c_QListQAbstractButton+  , just $ mkConstMethod "checkedButton" np $ ptrT $ objT c_QAbstractButton+  , test (qtVersion >= [4, 1]) $ mkConstMethod "checkedId" np intT   , just $ mkProp "exclusive" boolT   , test (qtVersion >= [4, 1]) $ mkConstMethod "id" [ptrT $ objT c_QAbstractButton] intT   , just $ mkMethod "removeButton" [ptrT $ objT c_QAbstractButton] voidT@@ -79,16 +79,16 @@  signals =   collect-  [ just $ makeSignal c_QButtonGroup "buttonClicked" c_ListenerPtrQAbstractButton-  , just $ makeSignal c_QButtonGroup "buttonClickedId" c_ListenerInt+  [ just $ makeSignal c_QButtonGroup "buttonClicked" listenerPtrQAbstractButton+  , just $ makeSignal c_QButtonGroup "buttonClickedId" listenerInt   , test (qtVersion >= [4, 2]) $-    makeSignal c_QButtonGroup "buttonPressed" c_ListenerPtrQAbstractButton-  , test (qtVersion >= [4, 2]) $ makeSignal c_QButtonGroup "buttonPressedId" c_ListenerInt+    makeSignal c_QButtonGroup "buttonPressed" listenerPtrQAbstractButton+  , test (qtVersion >= [4, 2]) $ makeSignal c_QButtonGroup "buttonPressedId" listenerInt   , test (qtVersion >= [4, 2]) $-    makeSignal c_QButtonGroup "buttonReleased" c_ListenerPtrQAbstractButton-  , test (qtVersion >= [4, 2]) $ makeSignal c_QButtonGroup "buttonReleasedId" c_ListenerInt+    makeSignal c_QButtonGroup "buttonReleased" listenerPtrQAbstractButton+  , test (qtVersion >= [4, 2]) $ makeSignal c_QButtonGroup "buttonReleasedId" listenerInt   , test (qtVersion >= [5, 2]) $-    makeSignal c_QButtonGroup "buttonToggled" c_ListenerPtrQAbstractButtonBool+    makeSignal c_QButtonGroup "buttonToggled" listenerPtrQAbstractButtonBool   , test (qtVersion >= [5, 2]) $-    makeSignal c_QButtonGroup "buttonToggledId" c_ListenerIntBool+    makeSignal c_QButtonGroup "buttonToggledId" listenerIntBool   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QCheckBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -30,6 +29,7 @@   mkBoolIsProp,   mkCtor,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (enumT, objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)@@ -44,13 +44,13 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QCheckBox"]-  [ QtExport $ ExportClass c_QCheckBox ]+  [ qtExport c_QCheckBox ]  c_QCheckBox =   addReqIncludes [includeStd "QCheckBox"] $   classSetEntityPrefix "" $   makeClass (ident "QCheckBox") Nothing [c_QAbstractButton]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkCtor "newWithText" [objT c_QString]   , mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QWidget]
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QComboBox.hs view
@@ -0,0 +1,78 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QComboBox (+  aModule,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  includeStd,+  makeClass,+  mkCtor,+  mkMethod,+  mkMethod',+  mkProp,+  np,+  )+import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Version (collect, just)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant)+import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listenerInt,+  listenerQString,+  )+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", "QComboBox"] $+  qtExport c_QComboBox :+  map QtExportSignal signals++c_QComboBox =+  addReqIncludes [includeStd "QComboBox"] $+  classSetEntityPrefix "" $+  makeClass (ident "QComboBox") Nothing [c_QWidget] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]+  , just $ mkMethod "addItem" [objT c_QString] voidT+  , just $ mkMethod' "addItem" "addItemWithData" [objT c_QString, objT c_QVariant] voidT+  , just $ mkMethod' "addItem" "addItemWithIcon" [objT c_QIcon, objT c_QString] voidT+  , just $ mkMethod' "addItem" "addItemWithIconAndData"+    [objT c_QIcon, objT c_QString, objT c_QVariant] voidT+  , just $ mkProp "currentIndex" intT+  , just $ mkProp "currentText" $ objT c_QString+  ]++signals =+  [ makeSignal c_QComboBox "activated" listenerInt+  , makeSignal' c_QComboBox "activated" "activatedString" listenerQString+  , makeSignal c_QComboBox "currentIndexChanged" listenerInt+  , makeSignal' c_QComboBox "currentIndexChanged" "currentIndexChangedString" listenerQString+  ]++-- TODO The rest of QComboBox.
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDateEdit.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2018 The Qtah Authors.+-- Copyright 2018-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,13 +21,13 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,   includeStd,   makeClass,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (objT, ptrT) import Foreign.Hoppy.Generator.Version (collect, just)@@ -44,14 +44,14 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QDateEdit"]-  [ QtExport $ ExportClass c_QDateEdit ]+  [ qtExport c_QDateEdit ]  c_QDateEdit =   addReqIncludes [includeStd "QDateEdit"] $   classSetEntityPrefix "" $   makeClass (ident "QDateEdit") Nothing [c_QDateTimeEdit] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , just $ mkCtor "newWithDate" [objT c_QDate]   , just $ mkCtor "newWithDateAndParent" [objT c_QDate, ptrT $ objT c_QWidget]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDateTimeEdit.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2018 The Qtah Authors.+-- Copyright 2018-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportBitspace, ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -31,13 +30,15 @@   mkConstMethod,   mkCtor,   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT)+import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QDate (c_QDate) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerQDate)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerQDate) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractSpinBox (   c_QAbstractSpinBox,   )@@ -49,11 +50,10 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QDateTimeEdit"] $-  QtExport (ExportClass c_QDateTimeEdit) :+  qtExport c_QDateTimeEdit :   map QtExportSignal signals ++-  (map QtExport . collect)-  [ just $ ExportEnum e_Section-  , just $ ExportBitspace bs_Sections+  [ qtExport e_Section+  , qtExport fl_Sections   ]  c_QDateTimeEdit =@@ -69,7 +69,7 @@   , just $ mkProp "date" (objT c_QDate)   -- TODO just $ mkProp "dateTime" (objT c_QDateTime)   , just $ mkProp "displayFormat" (objT c_QString)-  , just $ mkConstMethod "displayedSections" [] (bitspaceT bs_Sections)+  , just $ mkConstMethod "displayedSections" np $ flagsT fl_Sections   , just $ mkProp "maximumDate" (objT c_QDate)   -- TODO test (qtVersion >= [4, 4]) $   --      mkProp "maximumDateTime" (objT c_QDateTime)@@ -78,31 +78,29 @@   -- TODO test (qtVersion >= [4, 4]) $   --      mkProp "minimumDateTime" (objT c_QDateTime)   -- TODO just $ mkProp "minimumTime" c_QTime-  , test (qtVersion >= [4, 3]) $ mkConstMethod "sectionCount" [] intT+  , test (qtVersion >= [4, 3]) $ mkConstMethod "sectionCount" np intT   -- TODO just $ mkProp "time" c_QTime   -- TODO test (qtVersion >= [4, 4]) $ mkProp "timeSpec" Qt.TimeSpec   -- Public Functions-  , just $ mkCtor "new" []+  , just $ mkCtor "new" np   -- TODO Other methods.   ]  signals =-  [ makeSignal c_QDateTimeEdit "dateChanged" c_ListenerQDate+  [ makeSignal c_QDateTimeEdit "dateChanged" listenerQDate   -- TODO void dateTimeChanged(const QDateTime &datetime)   -- TODO void timeChanged(const QTime &time)   ] -(e_Section, bs_Sections) = makeQtEnumBitspace-  (ident1 "QDateTimeEdit" "Section")-  "Sections"-  [includeStd "QDateTimeEdit"]-  [ (0x0000, ["no", "section"])-  , (0x0001, ["am", "pm", "section"])-  , (0x0002, ["m", "sec", "section"])-  , (0x0004, ["second", "section"])-  , (0x0008, ["minute", "section"])-  , (0x0010, ["hour", "section"])-  , (0x0100, ["day", "section"])-  , (0x0200, ["month", "section"])-  , (0x0400, ["year", "section"])+(e_Section, fl_Sections) =+  makeQtEnumAndFlags (ident1 "QDateTimeEdit" "Section") "Sections" [includeStd "QDateTimeEdit"]+  [ "NoSection"+  , "AmPmSection"+  , "MSecSection"+  , "SecondSection"+  , "MinuteSection"+  , "HourSection"+  , "DaySection"+  , "MonthSection"+  , "YearSection"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDial.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -29,6 +28,7 @@   mkConstMethod,   mkCtor,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal)@@ -42,15 +42,15 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QDial"]-  [ QtExport $ ExportClass c_QDial ]+  [ qtExport c_QDial ]  c_QDial =   addReqIncludes [includeStd "QDial"] $   classSetEntityPrefix "" $   makeClass (ident "QDial") Nothing [c_QAbstractSlider]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]-  , mkConstMethod "notchSize" [] intT+  , mkConstMethod "notchSize" np intT   , mkProp "notchTarget" qreal   , mkProp "notchesVisible" boolT   , mkProp "wrapping" boolT
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDialog.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -32,10 +31,12 @@   mkCtor,   mkMethod,   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, intT, objT, ptrT, voidT)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_WindowFlags)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener, c_ListenerInt)+import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_WindowFlags)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listener, listenerInt) 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@@ -45,35 +46,35 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QDialog"] $-  QtExport (ExportClass c_QDialog) :+  qtExport c_QDialog :   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_DialogCode ]+  [ qtExport e_DialogCode ]  c_QDialog =   addReqIncludes [includeStd "QDialog"] $   classSetEntityPrefix "" $   makeClass (ident "QDialog") Nothing [c_QWidget]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]-  , mkCtor "newWithParentAndFlags" [ptrT $ objT c_QWidget, bitspaceT bs_WindowFlags]-  , mkMethod "accept" [] voidT+  , mkCtor "newWithParentAndFlags" [ptrT $ objT c_QWidget, flagsT fl_WindowFlags]+  , mkMethod "accept" np voidT   , mkMethod "done" [intT] voidT-  , mkMethod "exec" [] intT+  , mkMethod "exec" np intT   , mkBoolIsProp "modal"-  , mkMethod "open" [] voidT-  , mkMethod "reject" [] voidT+  , mkMethod "open" np voidT+  , mkMethod "reject" np voidT   , mkProp "result" intT   , mkBoolIsProp "sizeGripEnabled"   ]  signals =-  [ makeSignal c_QDialog "accepted" c_Listener-  , makeSignal c_QDialog "finished" c_ListenerInt-  , makeSignal c_QDialog "rejected" c_Listener+  [ makeSignal c_QDialog "accepted" listener+  , makeSignal c_QDialog "finished" listenerInt+  , makeSignal c_QDialog "rejected" listener   ]  e_DialogCode =   makeQtEnum (ident1 "QDialog" "DialogCode") [includeStd "QDialog"]-  [ (0, ["rejected"])-  , (1, ["accepted"])+  [ "Rejected"+  , "Accepted"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDialogButtonBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,10 +17,14 @@  module Graphics.UI.Qtah.Generator.Interface.Widgets.QDialogButtonBox (   aModule,+  c_QDialogButtonBox,+  e_ButtonLayout,+  e_ButtonRole,+  e_StandardButton,+  fl_StandardButtons,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportBitspace, ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -32,14 +36,16 @@   mkMethod,   mkMethod',   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, enumT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQAbstractButton) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_Orientation) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_Listener,-  c_ListenerPtrQAbstractButton,+  listener,+  listenerPtrQAbstractButton,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton (c_QAbstractButton) import Graphics.UI.Qtah.Generator.Interface.Widgets.QPushButton (c_QPushButton)@@ -54,27 +60,26 @@ aModule =   AQtModule $   makeQtModuleWithMinVersion ["Widgets", "QDialogButtonBox"] minVersion $-  (QtExport $ ExportClass c_QDialogButtonBox) :+  (qtExport c_QDialogButtonBox) :   map QtExportSignal signals ++-  map QtExport-  [ ExportEnum e_ButtonLayout-  , ExportEnum e_ButtonRole-  , ExportEnum e_StandardButton-  , ExportBitspace bs_StandardButtons+  [ qtExport e_ButtonLayout+  , qtExport e_ButtonRole+  , qtExport e_StandardButton+  , qtExport fl_StandardButtons   ]  c_QDialogButtonBox =   addReqIncludes [includeStd "QDialogButtonBox"] $   classSetEntityPrefix "" $   makeClass (ident "QDialogButtonBox") Nothing [c_QWidget]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]     -- TODO Other ctors? v v   --, mkCtor "newWithOrientation" [enumT e_Orientation]   --, mkCtor "newWithOrientationAndParent" [enumT e_Orientation, ptrT $ objT c_QWidget]-  --, mkCtor "newWithButtons" []+  --, mkCtor "newWithButtons" np   --, mkCtor "newWithParent" [ptrT $ objT c_QWidget]-  --, mkCtor "new" []+  --, mkCtor "new" np   --, mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkMethod' "addButton" "addButton" [ptrT $ objT c_QAbstractButton, enumT e_ButtonRole] voidT   , mkMethod' "addButton" "addButtonWithText"@@ -82,64 +87,64 @@   , mkMethod' "addButton" "addStandardButton" [enumT e_StandardButton] $ ptrT $ objT c_QPushButton   , mkConstMethod "button" [enumT e_StandardButton] $ ptrT $ objT c_QPushButton   , mkConstMethod "buttonRole" [ptrT $ objT c_QAbstractButton] $ enumT e_ButtonRole-  , mkConstMethod "buttons" [] $ objT c_QListQAbstractButton+  , mkConstMethod "buttons" np $ objT c_QListQAbstractButton   , mkProp "centerButtons" boolT-  , mkMethod "clear" [] voidT+  , mkMethod "clear" np voidT   , mkProp "orientation" $ enumT e_Orientation   , mkMethod "removeButton" [ptrT $ objT c_QAbstractButton] voidT   , mkConstMethod "standardButton" [ptrT $ objT c_QAbstractButton] $ enumT e_StandardButton-  , mkProp "standardButtons" $ bitspaceT bs_StandardButtons+  , mkProp "standardButtons" $ flagsT fl_StandardButtons   ]  signals =-  [ makeSignal c_QDialogButtonBox "accepted" c_Listener-  , makeSignal c_QDialogButtonBox "clicked" c_ListenerPtrQAbstractButton-  , makeSignal c_QDialogButtonBox "helpRequested" c_Listener-  , makeSignal c_QDialogButtonBox "rejected" c_Listener+  [ makeSignal c_QDialogButtonBox "accepted" listener+  , makeSignal c_QDialogButtonBox "clicked" listenerPtrQAbstractButton+  , makeSignal c_QDialogButtonBox "helpRequested" listener+  , makeSignal c_QDialogButtonBox "rejected" listener   ]  e_ButtonLayout =   makeQtEnum (ident1 "QDialogButtonBox" "ButtonLayout") [includeStd "QDialogButtonBox"]-  [ (0, ["win", "layout"])-  , (1, ["mac", "layout"])-  , (2, ["kde", "layout"])-  , (3, ["gnome", "layout"])+  [ "WinLayout"+  , "MacLayout"+  , "KdeLayout"+  , "GnomeLayout"   ]  e_ButtonRole =   makeQtEnum (ident1 "QDialogButtonBox" "ButtonRole") [includeStd "QDialogButtonBox"]-  [ (-1, ["invalid", "role"])-  , (0, ["accept", "role"])-  , (1, ["reject", "role"])-  , (2, ["destructive", "role"])-  , (3, ["action", "role"])-  , (4, ["help", "role"])-  , (5, ["yes", "role"])-  , (6, ["no", "role"])-  , (7, ["reset", "role"])-  , (8, ["apply", "role"])+  [ "InvalidRole"+  , "AcceptRole"+  , "RejectRole"+  , "DestructiveRole"+  , "ActionRole"+  , "HelpRole"+  , "YesRole"+  , "NoRole"+  , "ResetRole"+  , "ApplyRole"   ] -(e_StandardButton, bs_StandardButtons) =-  makeQtEnumBitspace (ident1 "QDialogButtonBox" "StandardButton") "StandardButtons"+(e_StandardButton, fl_StandardButtons) =+  makeQtEnumAndFlags (ident1 "QDialogButtonBox" "StandardButton") "StandardButtons"   [includeStd "QDialogButtonBox"]-  [ (0x00000400, ["ok"])-  , (0x00002000, ["open"])-  , (0x00000800, ["save"])-  , (0x00400000, ["cancel"])-  , (0x00200000, ["close"])-  , (0x00800000, ["discard"])-  , (0x02000000, ["apply"])-  , (0x04000000, ["reset"])-  , (0x08000000, ["restore", "defaults"])-  , (0x01000000, ["help"])-  , (0x00001000, ["save", "all"])-  , (0x00004000, ["yes"])-  , (0x00008000, ["yes", "to", "all"])-  , (0x00010000, ["no"])-  , (0x00020000, ["no", "to", "all"])-  , (0x00040000, ["abort"])-  , (0x00080000, ["retry"])-  , (0x00100000, ["ignore"])-  , (0x00000000, ["no", "button"])+  [ "Ok"+  , "Open"+  , "Save"+  , "Cancel"+  , "Close"+  , "Discard"+  , "Apply"+  , "Reset"+  , "RestoreDefaults"+  , "Help"+  , "SaveAll"+  , "Yes"+  , "YesToAll"+  , "No"+  , "NoToAll"+  , "Abort"+  , "Retry"+  , "Ignore"+  , "NoButton"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDockWidget.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,11 +19,10 @@   aModule,   c_QDockWidget,   e_DockWidgetFeature,-  bs_DockWidgetFeatures,+  fl_DockWidgetFeatures,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportBitspace, ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -34,20 +33,22 @@   mkConstMethod,   mkCtor,   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, objT, ptrT)+import Foreign.Hoppy.Generator.Types (boolT, enumT, objT, ptrT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.Types (   e_DockWidgetArea,-  bs_DockWidgetAreas,+  fl_DockWidgetAreas,   ) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_ListenerBool,-  c_ListenerDockWidgetArea,-  c_ListenerDockWidgetAreas,-  c_ListenerQDockWidgetFeatures,+  listenerBool,+  listenerDockWidgetArea,+  listenerDockWidgetAreas,+  listenerQDockWidgetFeatures,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)@@ -59,49 +60,48 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QDockWidget"] $-  map QtExport-  [ ExportClass c_QDockWidget-  , ExportEnum e_DockWidgetFeature-  , ExportBitspace bs_DockWidgetFeatures-  ] ++-  map QtExportSignal signals+  qtExport c_QDockWidget :+  map QtExportSignal signals +++  [ qtExport e_DockWidgetFeature+  , qtExport fl_DockWidgetFeatures+  ]  c_QDockWidget =   addReqIncludes [includeStd "QDockWidget"] $   classSetEntityPrefix "" $   makeClass (ident "QDockWidget") Nothing [c_QWidget] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , just $ mkCtor "newWithText" [objT c_QString]   , just $ mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QWidget]     -- TODO Ctor with Qt::WindowFlags.-  , just $ mkProp "allowedAreas" $ bitspaceT bs_DockWidgetAreas-  , just $ mkConstMethod "isAreaAllowed" [enumT e_DockWidgetArea] $ boolT-  , just $ mkProp "features" $ bitspaceT bs_DockWidgetFeatures+  , just $ mkProp "allowedAreas" $ flagsT fl_DockWidgetAreas+  , just $ mkConstMethod "isAreaAllowed" [enumT e_DockWidgetArea] boolT+  , just $ mkProp "features" $ flagsT fl_DockWidgetFeatures   , just $ mkBoolIsProp "floating"   , test (qtVersion >= [4, 3]) $ mkProp "titleBarWidget" $ ptrT $ objT c_QWidget-  , just $ mkConstMethod "toggleViewAction" [] $ ptrT $ objT c_QAction+  , just $ mkConstMethod "toggleViewAction" np $ ptrT $ objT c_QAction   , just $ mkProp "widget" $ ptrT $ objT c_QWidget   ]  signals =   collect-  [ just $ makeSignal c_QDockWidget "allowedAreasChanged" c_ListenerDockWidgetAreas+  [ just $ makeSignal c_QDockWidget "allowedAreasChanged" listenerDockWidgetAreas   , test (qtVersion >= [4, 3]) $-    makeSignal c_QDockWidget "dockLocationChanged" c_ListenerDockWidgetArea-  , just $ makeSignal c_QDockWidget "featuresChanged" c_ListenerQDockWidgetFeatures-  , just $ makeSignal c_QDockWidget "topLevelChanged" c_ListenerBool-  , just $ makeSignal c_QDockWidget "visibilityChanged" c_ListenerBool+    makeSignal c_QDockWidget "dockLocationChanged" listenerDockWidgetArea+  , just $ makeSignal c_QDockWidget "featuresChanged" listenerQDockWidgetFeatures+  , just $ makeSignal c_QDockWidget "topLevelChanged" listenerBool+  , just $ makeSignal c_QDockWidget "visibilityChanged" listenerBool   ] -(e_DockWidgetFeature, bs_DockWidgetFeatures) =-  makeQtEnumBitspace (ident1 "QDockWidget" "DockWidgetFeature") "DockWidgetFeatures"-  [includeStd "QDockWidget"] $-  [ (0x0, ["no", "dock", "widget", "features"])-  , (0x1, ["dock", "widget", "closable"])-  , (0x2, ["dock", "widget", "movable"])-  , (0x4, ["dock", "widget", "floatable"])-  , (0x7, ["all", "dock", "widget", "features"])  -- Deprecated-  , (0x8, ["dock", "widget", "vertical", "title", "bar"])+(e_DockWidgetFeature, fl_DockWidgetFeatures) =+  makeQtEnumAndFlags (ident1 "QDockWidget" "DockWidgetFeature") "DockWidgetFeatures"+  [includeStd "QDockWidget"]+  [ "NoDockWidgetFeatures"+  , "DockWidgetClosable"+  , "DockWidgetMovable"+  , "DockWidgetFloatable"+  , "AllDockWidgetFeatures"  -- Deprecated+  , "DockWidgetVerticalTitleBar"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDockWidget.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -16,9 +16,9 @@ -- along with this program.  If not, see <http://www.gnu.org/licenses/>.  module Graphics.UI.Qtah.Generator.Interface.Widgets.QDockWidget (-  bs_DockWidgetFeatures,+  fl_DockWidgetFeatures,   ) where -import Foreign.Hoppy.Generator.Spec (Bitspace)+import Graphics.UI.Qtah.Generator.Flags (Flags) -bs_DockWidgetFeatures :: Bitspace+fl_DockWidgetFeatures :: Flags
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QDoubleSpinBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -31,12 +30,13 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (doubleT, intT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_ListenerDouble,-  c_ListenerQString,+  listenerDouble,+  listenerQString,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractSpinBox (c_QAbstractSpinBox) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)@@ -48,16 +48,16 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QDoubleSpinBox"] $-  QtExport (ExportClass c_QDoubleSpinBox) :+  qtExport c_QDoubleSpinBox :   map QtExportSignal signals  c_QDoubleSpinBox =   addReqIncludes [includeStd "QDoubleSpinBox"] $   classSetEntityPrefix "" $   makeClass (ident "QDoubleSpinBox") Nothing [c_QAbstractSpinBox]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]-  , mkConstMethod "cleanText" [] $ objT c_QString+  , mkConstMethod "cleanText" np $ objT c_QString   , mkProp "decimals" intT   , mkProp "maximum" doubleT   , mkProp "minimum" doubleT@@ -71,6 +71,6 @@   ]  signals =-  [ makeSignal' c_QDoubleSpinBox "valueChanged" "valueChangedDouble" c_ListenerDouble-  , makeSignal' c_QDoubleSpinBox "valueChanged" "valueChangedString" c_ListenerQString+  [ makeSignal' c_QDoubleSpinBox "valueChanged" "valueChangedDouble" listenerDouble+  , makeSignal' c_QDoubleSpinBox "valueChanged" "valueChangedString" listenerQString   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QFileDialog.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportBitspace, ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -33,15 +32,17 @@   mkMethod',   mkProp,   mkStaticMethod',+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (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.QDir (bs_Filters, c_QDir)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.QDir (c_QDir, fl_Filters) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_WindowFlags)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerQString)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_WindowFlags)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerQString) import Graphics.UI.Qtah.Generator.Interface.Widgets.QDialog (c_QDialog) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -52,13 +53,13 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QFileDialog"] $-  [ QtExport $ ExportClass c_QFileDialog-  , QtExport $ ExportEnum e_AcceptMode-  , QtExport $ ExportEnum e_DialogLabel-  , QtExport $ ExportEnum e_FileMode-  , QtExport $ ExportEnum e_Option-  , QtExport $ ExportBitspace bs_Options-  , QtExport $ ExportEnum e_ViewMode+  [ qtExport c_QFileDialog+  , qtExport e_AcceptMode+  , qtExport e_DialogLabel+  , qtExport e_FileMode+  , qtExport e_Option+  , qtExport fl_Options+  , qtExport e_ViewMode   ] ++ map QtExportSignal signals  c_QFileDialog =@@ -66,9 +67,9 @@   classSetEntityPrefix "" $   makeClass (ident "QFileDialog") Nothing [c_QDialog] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]-  , just $ mkCtor "newWithParentAndFlags" [ptrT $ objT c_QWidget, bitspaceT bs_WindowFlags]+  , just $ mkCtor "newWithParentAndFlags" [ptrT $ objT c_QWidget, flagsT fl_WindowFlags]   , just $ mkCtor "newWithParentAndCaption" [ptrT $ objT c_QWidget, objT c_QString]   , just $ mkCtor "newWithParentAndCaptionAndDirectory"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString]@@ -76,26 +77,26 @@     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString, objT c_QString]   , just $ mkProp "acceptMode" $ enumT e_AcceptMode   , just $ mkProp "defaultSuffix" $ objT c_QString-  , just $ mkConstMethod "directory" [] $ objT c_QDir+  , just $ mkConstMethod "directory" np $ objT c_QDir     -- TODO directoryUrl (>=5.2)   , just $ mkProp "fileMode" $ enumT e_FileMode-  , test (qtVersion >= [4, 4]) $ mkProp "filter" $ bitspaceT bs_Filters+  , test (qtVersion >= [4, 4]) $ mkProp "filter" $ flagsT fl_Filters   , just $ mkStaticMethod' "getExistingDirectory" "getExistingDirectory"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString] $ objT c_QString   , just $ mkStaticMethod' "getExistingDirectory" "getExistingDirectoryWithOptions"-    [ptrT $ objT c_QWidget, objT c_QString, objT c_QString, bitspaceT bs_Options] $ objT c_QString+    [ptrT $ objT c_QWidget, objT c_QString, objT c_QString, flagsT fl_Options] $ objT c_QString     -- TODO getExistingDirectoryUrl (>=5.2)   , just $ mkStaticMethod' "getOpenFileName" "getOpenFileName"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString, objT c_QString] $ objT c_QString   , just $ mkStaticMethod' "getOpenFileName" "getOpenFileNameWithOptions"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString,-     objT c_QString, ptrT $ objT c_QString, bitspaceT bs_Options] $+     objT c_QString, ptrT $ objT c_QString, flagsT fl_Options] $     objT c_QString   , just $ mkStaticMethod' "getOpenFileNames" "getOpenFileNames"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString, objT c_QString] $ objT c_QStringList   , just $ mkStaticMethod' "getOpenFileNames" "getOpenFileNamesWithOptions"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString,-     objT c_QString, ptrT $ objT c_QString, bitspaceT bs_Options] $+     objT c_QString, ptrT $ objT c_QString, flagsT fl_Options] $     objT c_QStringList     -- TODO getOpenFileUrl (>=5.2)     -- TODO getOpenFileUrls (>=5.2)@@ -103,7 +104,7 @@     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString, objT c_QString] $ objT c_QString   , just $ mkStaticMethod' "getSaveFileName" "getSaveFileNameWithOptions"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString,-     objT c_QString, ptrT $ objT c_QString, bitspaceT bs_Options] $+     objT c_QString, ptrT $ objT c_QString, flagsT fl_Options] $     objT c_QString     -- TODO getSaveFileUrl (>=5.2)   , just $ mkProp "history" $ objT c_QStringList@@ -113,7 +114,7 @@   , test (qtVersion >= [5, 2]) $ mkProp "mimeTypeFilters" $ objT c_QStringList   , test (qtVersion >= [4, 4]) $ mkProp "nameFilters" $ objT c_QStringList     -- TODO open (>=4.5)-  , test (qtVersion >= [4, 5]) $ mkProp "options" $ bitspaceT bs_Options+  , test (qtVersion >= [4, 5]) $ mkProp "options" $ flagsT fl_Options     -- TODO proxyModel     -- TODO restoreState (>=4.3)     -- TODO saveState (>=4.3)@@ -121,8 +122,8 @@     -- TODO selectMimeTypeFilter (>=5.2)   , just $ mkMethod "selectNameFilter" [objT c_QString] voidT     -- TODO selectUrl (>=5.2)-  , just $ mkConstMethod "selectedFiles" [] $ objT c_QStringList-  , test (qtVersion >= [4, 4]) $ mkConstMethod "selectedNameFilter" [] $ objT c_QString+  , just $ mkConstMethod "selectedFiles" np $ objT c_QStringList+  , test (qtVersion >= [4, 4]) $ mkConstMethod "selectedNameFilter" np $ objT c_QString     -- TODO selectedUrls (>=5.2)   , just $ mkMethod' "setDirectory" "setDirectory" [objT c_QDir] voidT   , just $ mkMethod' "setDirectory" "setDirectoryPath" [objT c_QString] voidT@@ -141,56 +142,56 @@  signals =   collect-  [ just $ makeSignal c_QFileDialog "currentChanged" c_ListenerQString+  [ just $ makeSignal c_QFileDialog "currentChanged" listenerQString     -- TODO currentUrlChanged (>=5.2)-  , just $ makeSignal c_QFileDialog "directoryEntered" c_ListenerQString+  , just $ makeSignal c_QFileDialog "directoryEntered" listenerQString     -- TODO directoryUrlEntered (>=5.2)-  , just $ makeSignal c_QFileDialog "fileSelected" c_ListenerQString+  , just $ makeSignal c_QFileDialog "fileSelected" listenerQString     -- TODO filesSelected-  , test (qtVersion >= [4, 3]) $ makeSignal c_QFileDialog "filterSelected" c_ListenerQString+  , test (qtVersion >= [4, 3]) $ makeSignal c_QFileDialog "filterSelected" listenerQString     -- TODO urlSelected (>=5.2)     -- TODO urlsSelected (>=5.2)   ]  e_AcceptMode =   makeQtEnum (ident1 "QFileDialog" "AcceptMode") [includeStd "QFileDialog"]-  [ (0, ["accept", "open"])-  , (1, ["accept", "save"])+  [ "AcceptOpen"+  , "AcceptSave"   ]  e_DialogLabel =   makeQtEnum (ident1 "QFileDialog" "DialogLabel") [includeStd "QFileDialog"]-  [ (0, ["look", "in"])-  , (1, ["file", "name"])-  , (2, ["file", "type"])-  , (3, ["accept"])-  , (4, ["reject"])+  [ "LookIn"+  , "FileName"+  , "FileType"+  , "Accept"+  , "Reject"   ]  e_FileMode =   makeQtEnum (ident1 "QFileDialog" "FileMode") [includeStd "QFileDialog"] $   collect-  [ just (0, ["any", "file"])-  , just (1, ["existing", "file"])-  , just (2, ["directory"])-  , just (3, ["existing", "files"])-  , test (qtVersion < [4, 5]) $ (4, ["directory", "only"])+  [ just "AnyFile"+  , just "ExistingFile"+  , just "Directory"+  , just "ExistingFiles"+  , test (qtVersion < [4, 5]) "DirectoryOnly"   ] -(e_Option, bs_Options) =-  makeQtEnumBitspace (ident1 "QFileDialog" "Option") "Options" [includeStd "QFileDialog"]-  [ (0x1, ["show", "dirs", "only"])-  , (0x2, ["dont", "resolve", "symlinks"])-  , (0x4, ["dont", "confirm", "overwrite"])-  , (0x8, ["dont", "use", "sheet"])-  , (0x10, ["dont", "use", "native", "dialog"])-  , (0x20, ["read", "only"])-  , (0x40, ["hide", "name", "filter", "details"])-  , (0x80, ["dont", "use", "custom", "directory", "icons"])+(e_Option, fl_Options) =+  makeQtEnumAndFlags (ident1 "QFileDialog" "Option") "Options" [includeStd "QFileDialog"]+  [ "ShowDirsOnly"+  , "DontResolveSymlinks"+  , "DontConfirmOverwrite"+  , "DontUseSheet"+  , "DontUseNativeDialog"+  , "ReadOnly"+  , "HideNameFilterDetails"+  , "DontUseCustomDirectoryIcons"   ]  e_ViewMode =   makeQtEnum (ident1 "QFileDialog" "ViewMode") [includeStd "QFileDialog"]-  [ (0, ["detail"])-  , (1, ["list"])+  [ "Detail"+  , "List"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QFormLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   MethodApplicability (MConst),   Purity (Nonpure),   addReqIncludes,@@ -38,10 +37,12 @@   mkMethod,   mkMethod',   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, constT, enumT, intT, objT, ptrT, refT, voidT)+import Foreign.Hoppy.Generator.Types (constT, enumT, intT, objT, ptrT, refT, voidT)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayout (c_QLayout) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayoutItem (c_QLayoutItem) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)@@ -55,10 +56,10 @@ aModule =   AQtModule $   makeQtModuleWithMinVersion ["Widgets", "QFormLayout"] minVersion-  [ QtExport $ ExportClass c_QFormLayout-  , QtExport $ ExportEnum e_FieldGrowthPolicy-  , QtExport $ ExportEnum e_ItemRole-  , QtExport $ ExportEnum e_RowWrapPolicy+  [ qtExport c_QFormLayout+  , qtExport e_FieldGrowthPolicy+  , qtExport e_ItemRole+  , qtExport e_RowWrapPolicy   ]  c_QFormLayout =@@ -66,7 +67,7 @@                   includeLocal "wrap_qformlayout.hpp"] $   classSetEntityPrefix "" $   makeClass (ident "QFormLayout") Nothing [c_QLayout]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkMethod' "addRow" "addRowWidgetWidget" [ptrT $ objT c_QWidget, ptrT $ objT c_QWidget] voidT   , mkMethod' "addRow" "addRowWidgetLayout" [ptrT $ objT c_QWidget, ptrT $ objT c_QLayout] voidT@@ -75,7 +76,7 @@   , mkMethod' "addRow" "addRowWidget" [ptrT $ objT c_QWidget] voidT   , mkMethod' "addRow" "addRowLayout" [ptrT $ objT c_QLayout] voidT   , mkProp "fieldGrowthPolicy" $ enumT e_FieldGrowthPolicy-  , mkProp "formAlignment" $ bitspaceT bs_Alignment+  , mkProp "formAlignment" $ flagsT fl_Alignment   , makeFnMethod (ident2 "qtah" "qformlayout" "getItemRow") "getItemRow" MConst Nonpure     [refT $ constT $ objT c_QFormLayout, intT] intT   , makeFnMethod (ident2 "qtah" "qformlayout" "getItemRole") "getItemRole" MConst Nonpure@@ -100,12 +101,12 @@   , mkMethod' "insertRow" "insertRowWidget" [intT, ptrT $ objT c_QWidget] voidT   , mkMethod' "insertRow" "insertRowLayout" [intT, ptrT $ objT c_QLayout] voidT   , mkConstMethod "itemAt" [intT, enumT e_ItemRole] $ ptrT $ objT c_QLayoutItem-  , mkProp "labelAlignment" $ bitspaceT bs_Alignment+  , mkProp "labelAlignment" $ flagsT fl_Alignment   , mkConstMethod' "labelForField" "labelForFieldWidget"     [ptrT $ objT c_QWidget] $ ptrT $ objT c_QWidget   , mkConstMethod' "labelForField" "labelForFieldLayout"     [ptrT $ objT c_QLayout] $ ptrT $ objT c_QWidget-  , mkConstMethod "rowCount" [] intT+  , mkConstMethod "rowCount" np intT   , mkProp "rowWrapPolicy" $ enumT e_RowWrapPolicy   , mkMethod "setItem" [intT, enumT e_ItemRole, ptrT $ objT c_QLayoutItem] voidT   , mkMethod "setLayout" [intT, enumT e_ItemRole, ptrT $ objT c_QLayout] voidT@@ -116,21 +117,21 @@  e_FieldGrowthPolicy =   makeQtEnum (ident1 "QFormLayout" "FieldGrowthPolicy") [includeStd "QFormLayout"]-  [ (0, ["fields", "stay", "at", "size", "hint"])-  , (1, ["expanding", "fields", "grow"])-  , (2, ["all", "non", "fixed", "fields", "grow"])+  [ "FieldsStayAtSizeHint"+  , "ExpandingFieldsGrow"+  , "AllNonFixedFieldsGrow"   ]  e_ItemRole =   makeQtEnum (ident1 "QFormLayout" "ItemRole") [includeStd "QFormLayout"]-  [ (0, ["label", "role"])-  , (1, ["field", "role"])-  , (2, ["spanning", "role"])+  [ "LabelRole"+  , "FieldRole"+  , "SpanningRole"   ]  e_RowWrapPolicy =   makeQtEnum (ident1 "QFormLayout" "RowWrapPolicy") [includeStd "QFormLayout"]-  [ (0, ["dont", "wrap", "rows"])-  , (1, ["wrap", "long", "rows"])-  , (2, ["wrap", "all", "rows"])+  [ "DontWrapRows"+  , "WrapLongRows"+  , "WrapAllRows"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QFrame.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -31,6 +30,7 @@   mkConstMethod,   mkCtor,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (enumT, intT, objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)@@ -43,48 +43,48 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QFrame"]-  [ QtExport $ ExportClass c_QFrame-  , QtExport $ ExportEnum e_Shadow-  , QtExport $ ExportEnum e_Shape-  , QtExport $ ExportEnum e_StyleMask+  [ qtExport c_QFrame+  , qtExport e_Shadow+  , qtExport e_Shape+  , qtExport e_StyleMask   ]  c_QFrame =   addReqIncludes [includeStd "QFrame"] $   classSetEntityPrefix "" $   makeClass (ident "QFrame") Nothing [c_QWidget]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]     -- TODO QFrame(QWidget*, Qt::WindowFlags)   , mkProp "frameRect" $ objT c_QRect   , mkProp "frameShadow" $ enumT e_Shadow   , mkProp "frameShape" $ enumT e_Shape   , mkProp "frameStyle" intT-  , mkConstMethod "frameWidth" [] intT+  , mkConstMethod "frameWidth" np intT   , mkProp "lineWidth" intT   , mkProp "midLineWidth" intT   ]  e_Shadow =   makeQtEnum (ident1 "QFrame" "Shadow") [includeStd "QFrame"]-  [ (0x0010, ["plain"])-  , (0x0020, ["raised"])-  , (0x0030, ["sunken"])+  [ "Plain"+  , "Raised"+  , "Sunken"   ]  e_Shape =   makeQtEnum (ident1 "QFrame" "Shape") [includeStd "QFrame"]-  [ (0x0000, ["no", "frame"])-  , (0x0001, ["box"])-  , (0x0002, ["panel"])-  , (0x0003, ["win", "panel"])-  , (0x0004, ["h", "line"])-  , (0x0005, ["v", "line"])-  , (0x0006, ["styled", "panel"])+  [ "NoFrame"+  , "Box"+  , "Panel"+  , "WinPanel"+  , "HLine"+  , "VLine"+  , "StyledPanel"   ]  e_StyleMask =   makeQtEnum (ident1 "QFrame" "StyleMask") [includeStd "QFrame"]-  [ (0x000f, ["shape", "mask"])-  , (0x00f0, ["shadow", "mask"])+  [ "Shape_Mask"+  , "Shadow_Mask"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsEllipseItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,13 +21,13 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,   includeStd,   makeClass,   mkCtor,+  np,   ) import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -40,13 +40,13 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QGraphicsEllipseItem"]-  [ QtExport $ ExportClass c_QGraphicsEllipseItem+  [ qtExport c_QGraphicsEllipseItem   ]  c_QGraphicsEllipseItem =   addReqIncludes [includeStd "QGraphicsEllipseItem"] $   classSetEntityPrefix "" $   makeClass (ident "QGraphicsEllipseItem") Nothing [c_QAbstractGraphicsShapeItem]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithRaw" [qreal, qreal, qreal, qreal]   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,11 +21,10 @@   e_CacheMode,   e_GraphicsItemChange,   e_PanelModality,-  bs_GraphicsItemFlags+  fl_GraphicsItemFlags,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum, ExportBitspace),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -37,10 +36,11 @@   mkMethod,   mkMethod',   mkProp,+  np,   ) 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.Config (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)@@ -57,41 +57,39 @@  aModule =   AQtModule $-  makeQtModule ["Widgets", "QGraphicsItem"] $-  map QtExport $-    ExportClass c_QGraphicsItem :-    map ExportEnum-      [ e_CacheMode-      , e_GraphicsItemChange-      , e_GraphicsItemFlag-      , e_PanelModality-      ] ++-    map ExportBitspace [bs_GraphicsItemFlags]+  makeQtModule ["Widgets", "QGraphicsItem"]+  [ qtExport c_QGraphicsItem+  , qtExport e_CacheMode+  , qtExport e_GraphicsItemChange+  , qtExport e_GraphicsItemFlag+  , qtExport fl_GraphicsItemFlags+  , qtExport e_PanelModality+  ]  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+  [ mkConstMethod "acceptDrops" np boolT+  , mkConstMethod "acceptHoverEvents" np boolT+  , mkConstMethod "acceptTouchEvents" np boolT+  -- TODO mkConstMethod "acceptedMouseButtons" np $ objT c_Qt::MouseButtons   , mkMethod "advance" [intT] voidT-  , mkConstMethod "boundingRect" [] $ objT c_QRectF+  , mkConstMethod "boundingRect" np $ 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 "boundingRegionGranularity" np qreal+  -- TODO mkConstMethod "cacheMode" np $ enumT e_CacheMode+  -- TODO mkConstMethod "childItems" np $ objT c_QList<QGraphicsItem $ objT c_*>+  , mkConstMethod "childrenBoundingRect" np $ objT c_QRectF+  , mkMethod "clearFocus" np voidT+  , mkConstMethod "clipPath" np $ 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" np $ 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] $@@ -100,44 +98,44 @@   , mkProp "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+  , mkConstMethod "effectiveOpacity" np qreal+  , mkMethod "ensureVisible" np 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+  , mkConstMethod "filtersChildEvents" np boolT+  -- TODO mkConstMethod "flags" np $ objT c_GraphicsItemFlags+  , mkConstMethod "focusItem" np $ ptrT $ objT c_QGraphicsItem+  , mkConstMethod "focusProxy" np $ ptrT $ objT c_QGraphicsItem+  , mkMethod "grabKeyboard" np voidT+  , mkMethod "grabMouse" np voidT+  -- TODO mkConstMethod "graphicsEffect" np $ ptrT $ objT c_QGraphicsEffect+  -- TODO mkConstMethod "group" np $ ptrT $ objT c_QGraphicsItemGroup+  , mkConstMethod "hasCursor" np boolT+  , mkConstMethod "hasFocus" np boolT+  , mkMethod "hide" np voidT+  -- TODO mkConstMethod "inputMethodHints" np $ objT c_Qt::InputMethodHints   , mkMethod "installSceneEventFilter" [ptrT $ objT c_QGraphicsItem] voidT-  , mkConstMethod "isActive" [] boolT+  , mkConstMethod "isActive" np boolT   , mkConstMethod "isAncestorOf" [ptrT $ constT $ objT c_QGraphicsItem] boolT-  , mkConstMethod "isBlockedByModalPanel" [] boolT+  , mkConstMethod "isBlockedByModalPanel" np boolT   , mkConstMethod' "isBlockedByModalPanel" "isBlockedByModalPanelAll"       [ptrT $ ptrT $ objT c_QGraphicsItem] boolT-  , mkConstMethod "isClipped" [] boolT-  , mkConstMethod "isEnabled" [] boolT-  , mkConstMethod "isObscured" [] boolT+  , mkConstMethod "isClipped" np boolT+  , mkConstMethod "isEnabled" np boolT+  , mkConstMethod "isObscured" np 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 "isPanel" np boolT+  , mkConstMethod "isSelected" np boolT+  , mkConstMethod "isUnderMouse" np boolT+  , mkConstMethod "isVisible" np boolT   , mkConstMethod "isVisibleTo" [ptrT $ constT $ objT c_QGraphicsItem] boolT-  , mkConstMethod "isWidget" [] boolT-  , mkConstMethod "isWindow" [] boolT+  , mkConstMethod "isWidget" np boolT+  , mkConstMethod "isWindow" np boolT   -- TODO mkConstMethod "itemTransform" [ptrT $ constT $ objT c_QGraphicsItem] $   --   objT c_QTransform   -- TODO mkConstMethod' "itemTransform" "itemTransformAll"@@ -239,8 +237,8 @@   -- TODO mkConstMethod' "mapToScene" "mapToScene"   --   [qreal, qreal] $ objT c_QPointF   , mkMethod "moveBy" [qreal, qreal] voidT-  , mkConstMethod "opacity" [] qreal-  , mkConstMethod "opaqueArea" [] $ objT c_QPainterPath+  , mkConstMethod "opacity" np qreal+  , mkConstMethod "opaqueArea" np $ objT c_QPainterPath   -- TODO mkMethod "paint"   --   [ptrT $ objT c_QPainter, ptrT $ constT $ objT c_QStyleOptionGraphicsItem] voidT   -- TODO mkMethod' "paint" "paintAll"@@ -248,20 +246,20 @@   --   , 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+  , mkConstMethod "panel" np $ ptrT $ objT c_QGraphicsItem+  -- TODO mkConstMethod "panelModality" np $ objT c_PanelModality+  , mkConstMethod "parentItem" np $ ptrT $ objT c_QGraphicsItem+  -- TODO mkConstMethod "parentObject" np $ ptrT $ objT c_QGraphicsObject+  -- TODO mkConstMethod "parentWidget" np $ ptrT $ objT c_QGraphicsWidget+  , mkConstMethod "pos" np $ 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 "resetTransform" np voidT+  , mkConstMethod "rotation" np qreal+  , mkConstMethod "scale" np qreal+  , mkConstMethod "scene" np $ ptrT $ objT c_QGraphicsScene+  , mkConstMethod "sceneBoundingRect" np $ objT c_QRectF+  , mkConstMethod "scenePos" np $ objT c_QPointF+  -- TODO mkConstMethod "sceneTransform" np $ objT c_QTransform   , mkMethod "scroll" [qreal, qreal] voidT   , mkMethod' "scroll" "scrollAll" [qreal, qreal, objT c_QRectF] voidT   , mkMethod "setAcceptDrops" [boolT] voidT@@ -278,7 +276,7 @@   -- 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" np voidT  --  , mkMethod' "setFocus" "setFocusAll" [objT c_Qt::FocusReason] voidT   , mkMethod "setFocusProxy" [ptrT $ objT c_QGraphicsItem] voidT   -- TODO mkMethod "setGraphicsEffect" [ptrT $ objT c_QGraphicsEffect] voidT@@ -302,103 +300,103 @@   , mkMethod "setX" [qreal] voidT   , mkMethod "setY" [qreal] voidT   , mkMethod "setZValue" [qreal] voidT-  , mkConstMethod "shape" [] $ objT c_QPainterPath-  , mkMethod "show" [] voidT+  , mkConstMethod "shape" np $ objT c_QPainterPath+  , mkMethod "show" np voidT   , mkMethod "stackBefore" [ptrT $ constT $ objT c_QGraphicsItem] voidT-  -- TODO mkMethod' "toGraphicsObject" "toGraphicsObject" [] $+  -- TODO mkMethod' "toGraphicsObject" "toGraphicsObject" np $   --   ptrT $ objT c_QGraphicsObject-  -- TODO mkConstMethod' "toGraphicsObject" "toGraphicsObject" [] $+  -- TODO mkConstMethod' "toGraphicsObject" "toGraphicsObject" np $   --   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+  , mkConstMethod "toolTip" np $ objT c_QString+  , mkConstMethod "topLevelItem" np $ ptrT $ objT c_QGraphicsItem+  -- TODO mkConstMethod "topLevelWidget" np $ ptrT $ objT c_QGraphicsWidget+  -- TODO mkConstMethod "transform" np $ objT c_QTransform+  , mkConstMethod "transformOriginPoint" np $ objT c_QPointF+  -- TODO mkConstMethod "transformations" np $ objT c_QList<QGraphicsTransform $ objT c_*>+  , mkConstMethod' "type" "itemType" np intT+  , mkMethod "ungrabKeyboard" np voidT+  , mkMethod "ungrabMouse" np voidT+  , mkMethod "unsetCursor" np voidT+  , mkMethod "update" np 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+  -- TODO mkConstMethod "window" np $ ptrT $ objT c_QGraphicsWidget+  , mkConstMethod "x" np qreal+  , mkConstMethod "y" np qreal+  , mkConstMethod "zValue" np qreal   ]  e_CacheMode =   makeQtEnum (ident1 "QGraphicsItem" "CacheMode") [includeStd "QGraphicsItem"]-  [ (0, ["no","cache"])-  , (1, ["item","coordinate","cache"])-  , (2, ["device","coordinate","cache"])+  [ "NoCache"+  , "ItemCoordinateCache"+  , "DeviceCoordinateCache"   ]  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"])+  [ "ItemEnabledChange"+  , "ItemEnabledHasChanged"+  , "ItemMatrixChange"+  , "ItemPositionChange"+  , "ItemPositionHasChanged"+  , "ItemTransformChange"+  , "ItemTransformHasChanged"+  , "ItemRotationChange"+  , "ItemRotationHasChanged"+  , "ItemScaleChange"+  , "ItemScaleHasChanged"+  , "ItemTransformOriginPointChange"+  , "ItemTransformOriginPointHasChanged"+  , "ItemSelectedChange"+  , "ItemSelectedHasChanged"+  , "ItemVisibleChange"+  , "ItemVisibleHasChanged"+  , "ItemParentChange"+  , "ItemParentHasChanged"+  , "ItemChildAddedChange"+  , "ItemChildRemovedChange"+  , "ItemSceneChange"+  , "ItemSceneHasChanged"+  , "ItemCursorChange"+  , "ItemCursorHasChanged"+  , "ItemToolTipChange"+  , "ItemToolTipHasChanged"+  , "ItemFlagsChange"+  , "ItemFlagsHaveChanged"+  , "ItemZValueChange"+  , "ItemZValueHasChanged"+  , "ItemOpacityChange"+  , "ItemOpacityHasChanged"+  , "ItemScenePositionHasChanged"   ] -(e_GraphicsItemFlag, bs_GraphicsItemFlags) =-  makeQtEnumBitspace (ident1 "QGraphicsItem" "GraphicsItemFlag") "GraphicsItemFlags"+(e_GraphicsItemFlag, fl_GraphicsItemFlags) =+  makeQtEnumAndFlags (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"])+  [ just "ItemIsMovable"+  , just "ItemIsSelectable"+  , just "ItemIsFocusable"+  , just "ItemClipsToShape"+  , just "ItemClipsChildrenToShape"+  , just "ItemIgnoresTransformations"+  , just "ItemIgnoresParentOpacity"+  , just "ItemDoesntPropagateOpacityToChildren"+  , just "ItemStacksBehindParent"+  , just "ItemUsesExtendedStyleOption"+  , just "ItemHasNoContents"+  , just "ItemSendsGeometryChanges"+  , just "ItemAcceptsInputMethod"+  , just "ItemNegativeZStacksBehindParent"+  , just "ItemIsPanel"+  , just "ItemSendsScenePositionChanges"+  , test (qtVersion >= [5, 4]) "ItemContainsChildrenInShape"   ]  e_PanelModality =   makeQtEnum (ident1 "QGraphicsItem" "PanelModality") [includeStd "QGraphicsItem"]-  [ (0, ["non","modal"])-  , (1, ["panel","modal"])-  , (2, ["scene","modal"])+  [ "NonModal"+  , "PanelModal"+  , "SceneModal"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsItem.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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/QGraphicsPixmapItem.hs view
@@ -0,0 +1,72 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QGraphicsPixmapItem (+  aModule,+  c_QGraphicsPixmapItem,+  ) where++import Foreign.Hoppy.Generator.Spec (+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkCtor,+  mkMethod',+  mkProp,+  np,+  )+import Foreign.Hoppy.Generator.Types (enumT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Interface.Core.QPointF (c_QPointF)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_TransformationMode, qreal)+import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap)+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", "QGraphicsPixmapItem"]+  [ qtExport c_QGraphicsPixmapItem+  , qtExport e_ShapeMode+  ]++c_QGraphicsPixmapItem =+  addReqIncludes [includeStd "QGraphicsPixmapItem"] $+  classSetEntityPrefix "" $+  makeClass (ident "QGraphicsPixmapItem") Nothing [c_QGraphicsItem]+  [ mkCtor "new" np+  , mkCtor "newWithParent" [ptrT $ objT c_QGraphicsItem]+  , mkCtor "newWithPixmap" [objT c_QPixmap]+  , mkCtor "newWithPixmapAndParent" [objT c_QPixmap, ptrT $ objT c_QGraphicsItem]+  , mkProp "offset" $ objT c_QPointF+  , mkProp "pixmap" $ objT c_QPixmap+  , mkMethod' "setOffset" "setOffsetRaw" [qreal, qreal] voidT+  , mkProp "shapeMode" $ enumT e_ShapeMode+  , mkProp "transformationMode" $ enumT e_TransformationMode+  ]++e_ShapeMode =+  makeQtEnum (ident1 "QGraphicsPixmapItem" "ShapeMode") [includeStd "QGraphicsPixmapItem"]+  [ "MaskShape"+  , "BoundingRectShape"+  , "HeuristicMaskShape"+  ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsPolygonItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,13 +21,13 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,   includeStd,   makeClass,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types () import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -40,12 +40,12 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QGraphicsPolygonItem"]-  [ QtExport $ ExportClass c_QGraphicsPolygonItem+  [ qtExport c_QGraphicsPolygonItem   ]  c_QGraphicsPolygonItem =   addReqIncludes [includeStd "QGraphicsPolygonItem"] $   classSetEntityPrefix "" $   makeClass (ident "QGraphicsPolygonItem") Nothing [c_QAbstractGraphicsShapeItem]-  [ mkCtor "new" []+  [ mkCtor "new" np   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsRectItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -30,6 +29,7 @@   mkMethod',   mkConstMethod,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (voidT, objT) import Graphics.UI.Qtah.Generator.Interface.Core.Types (qreal)@@ -44,15 +44,15 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QGraphicsRectItem"]-  [ QtExport $ ExportClass c_QGraphicsRectItem+  [ qtExport c_QGraphicsRectItem   ]  c_QGraphicsRectItem =   addReqIncludes [includeStd "QGraphicsRectItem"] $   classSetEntityPrefix "" $   makeClass (ident "QGraphicsRectItem") Nothing [c_QAbstractGraphicsShapeItem]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithRaw" [qreal, qreal, qreal, qreal]-  , mkConstMethod "rect" [] $ objT c_QRectF+  , mkConstMethod "rect" np $ objT c_QRectF   , mkMethod' "setRect" "setRectRaw" [qreal, qreal, qreal, qreal] voidT   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsScene.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,11 +20,10 @@   c_QGraphicsScene,   e_ItemIndexMethod,   e_SceneLayer,-  bs_SceneLayers,+  fl_SceneLayers,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum, ExportBitspace),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -37,10 +36,11 @@   mkConstMethod,   mkConstMethod',   mkProp,+  np,   ) 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.Config (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)@@ -68,14 +68,11 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QGraphicsScene"] $-  (QtExport $ ExportClass c_QGraphicsScene) :-  map (QtExport . ExportEnum)-    [ e_ItemIndexMethod-    , e_SceneLayer-    ] ++-  map (QtExport . ExportBitspace)-    [ bs_SceneLayers-    ]+  [ qtExport c_QGraphicsScene+  , qtExport e_ItemIndexMethod+  , qtExport e_SceneLayer+  , qtExport fl_SceneLayers+  ]  -- Due to a parsing bug types of the form `T<S*>` were generated incorrectly. c_QGraphicsScene =@@ -83,12 +80,12 @@   classSetEntityPrefix "" $   makeClass (ident "QGraphicsScene") Nothing [c_QObject] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , 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 $ mkConstMethod "activePanel" np $ ptrT $ objT c_QGraphicsItem+  -- TODO mkConstMethod "activeWindow" np $ ptrT $ objT c_QGraphicsWidget   , just $ mkMethod' "addEllipse" "addEllipseRectF"       [objT c_QRectF] $ ptrT $ objT c_QGraphicsEllipseItem   , just $ mkMethod' "addEllipse" "addEllipseRectFAll"@@ -129,11 +126,11 @@   -- 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] $+  -- TODO mkMethod' "addWidget" "addWidgetAll" [ptrT $ objT c_QWidget, enumT e_WindowFlags] $   --   ptrT $ objT c_QGraphicsProxyWidget-  , just $ mkConstMethod "backgroundBrush" [] $ objT c_QBrush-  , just $ mkConstMethod "bspTreeDepth" [] intT-  , just $ mkMethod "clearFocus" [] voidT+  , just $ mkConstMethod "backgroundBrush" np $ objT c_QBrush+  , just $ mkConstMethod "bspTreeDepth" np intT+  , just $ mkMethod "clearFocus" np voidT   -- TODO mkConstMethod "collidingItems" [ptrT $ objT c_QGraphicsItem] $   --   objT c_QList<QGraphicsItem $ objT c_*>   -- TODO mkConstMethod' "collidingItems" "collidingItemsAll"@@ -141,22 +138,22 @@   --     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+  , just $ mkConstMethod "focusItem" np $ ptrT $ objT c_QGraphicsItem   , just $ mkProp "font" $ objT c_QFont-  , just $ mkConstMethod "foregroundBrush" [] $ objT c_QBrush-  , just $ mkConstMethod "hasFocus" [] boolT-  , just $ mkConstMethod "height" [] qreal+  , just $ mkConstMethod "foregroundBrush" np $ objT c_QBrush+  , just $ mkConstMethod "hasFocus" np boolT+  , just $ mkConstMethod "height" np 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 "isActive" np 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 "itemIndexMethod" np $ objT c_ItemIndexMethod+  -- TODO mkConstMethod' "items" "items" np $ 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] $@@ -187,23 +184,23 @@   --   [ 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 $ mkConstMethod "itemsBoundingRect" np $ objT c_QRectF+  , test (qtVersion >= [5, 4]) $ mkConstMethod "minimumRenderSize" np qreal+  , just $ mkConstMethod "mouseGrabberItem" np $ ptrT $ objT c_QGraphicsItem+  -- TODO mkConstMethod "palette" np $ 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 $ mkConstMethod "sceneRect" np $ objT c_QRectF+  -- TODO mkConstMethod "selectedItems" np $ objT c_QList<QGraphicsItem $ objT c_*>+  , just $ mkConstMethod "selectionArea" np $ 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" np voidT   , just $ mkMethod' "setFocus" "setFocusAll" [enumT e_FocusReason] voidT   , just $ mkMethod "setFocusItem" [ptrT $ objT c_QGraphicsItem] voidT   , just $ mkMethod' "setFocusItem" "setFocusItemAll"@@ -227,25 +224,25 @@   --   ] 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 $ mkConstMethod "stickyFocus" np boolT+  -- TODO mkConstMethod "style" np $ 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+  -- TODO mkConstMethod "views" np $ objT c_QList<QGraphicsView $ objT c_*>+  , just $ mkConstMethod "width" np qreal   ]  e_ItemIndexMethod =   makeQtEnum (ident1 "QGraphicsScene" "ItemIndexMethod")-    [includeStd "QGraphicsScene"]-  [ (0, ["bsp","tree","index"])-  , (-1, ["no","index"])+  [includeStd "QGraphicsScene"]+  [ "BspTreeIndex"+  , "NoIndex"   ] -(e_SceneLayer, bs_SceneLayers) =-  makeQtEnumBitspace (ident1 "QGraphicsView" "SceneLayer") "SceneLayers"-    [includeStd "QGraphicsView"]-  [ (0x1, ["item","layer"])-  , (0x2, ["background","layer"])-  , (0x4, ["foreground","layer"])-  , (0xffff, ["all","layers"])+(e_SceneLayer, fl_SceneLayers) =+  makeQtEnumAndFlags (ident1 "QGraphicsScene" "SceneLayer") "SceneLayers"+  [includeStd "QGraphicsScene"]+  [ "ItemLayer"+  , "BackgroundLayer"+  , "ForegroundLayer"+  , "AllLayers"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsScene.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsSceneEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,6 +27,7 @@   includeStd,   makeClass,   mkConstMethod,+  np,   ) import Foreign.Hoppy.Generator.Types (objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Core.QEvent (c_QEvent)@@ -45,6 +46,6 @@ c_QGraphicsSceneEvent =   addReqIncludes [includeStd "QGraphicsSceneEvent"] $   classSetEntityPrefix "" $-  makeClass (ident "QGraphicsSceneEvent") Nothing [c_QEvent] $-  [ mkConstMethod "widget" [] $ ptrT $ objT c_QWidget+  makeClass (ident "QGraphicsSceneEvent") Nothing [c_QEvent]+  [ mkConstMethod "widget" np $ ptrT $ objT c_QWidget   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsSceneMouseEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,20 +27,21 @@   includeStd,   makeClass,   mkConstMethod,+  np,   ) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Foreign.Hoppy.Generator.Types (bitspaceT, enumT, objT)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Foreign.Hoppy.Generator.Types (enumT, objT)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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,+  fl_KeyboardModifiers,   e_MouseButton,-  bs_MouseButtons,-  bs_MouseEventFlags,-  bs_KeyboardModifiers,-  e_MouseEventSource,+  fl_MouseButtons,   e_MouseEventFlag_minVersion,+  fl_MouseEventFlags,+  e_MouseEventSource,   e_MouseEventSource_minVersion,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsSceneEvent (c_QGraphicsSceneEvent)@@ -60,20 +61,20 @@   classSetEntityPrefix "" $   makeClass (ident "QGraphicsSceneMouseEvent") Nothing [c_QGraphicsSceneEvent] $   collect-  [ just $ mkConstMethod "button" [] $ enumT e_MouseButton+  [ just $ mkConstMethod "button" np $ 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" [] $+  , just $ mkConstMethod "buttons" np $ flagsT fl_MouseButtons+  , test (qtVersion >= e_MouseEventFlag_minVersion) $ mkConstMethod "flags" np $+      flagsT fl_MouseEventFlags+  , just $ mkConstMethod "lastPos" np $ objT c_QPointF+  , just $ mkConstMethod "lastScenePos" np $ objT c_QPointF+  , just $ mkConstMethod "lastScreenPos" np $ objT c_QPoint+  , just $ mkConstMethod "modifiers" np $ flagsT fl_KeyboardModifiers+  , just $ mkConstMethod "pos" np $ objT c_QPointF+  , just $ mkConstMethod "scenePos" np $ objT c_QPointF+  , just $ mkConstMethod "screenPos" np $ objT c_QPoint+  , test (qtVersion >= e_MouseEventSource_minVersion) $ mkConstMethod "source" np $       enumT e_MouseEventSource   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsSceneWheelEvent.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,13 +27,15 @@   includeStd,   makeClass,   mkConstMethod,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, enumT, intT, objT)+import Foreign.Hoppy.Generator.Types (enumT, intT, objT)+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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,+  fl_KeyboardModifiers,+  fl_MouseButtons,   e_Orientation,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QGraphicsSceneEvent (c_QGraphicsSceneEvent)@@ -52,11 +54,11 @@   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+  [ mkConstMethod "buttons" np $ flagsT fl_MouseButtons+  , mkConstMethod "delta" np intT+  , mkConstMethod "modifiers" np $ flagsT fl_KeyboardModifiers+  , mkConstMethod "orientation" np $ enumT e_Orientation+  , mkConstMethod "pos" np $ objT c_QPointF+  , mkConstMethod "scenePos" np $ objT c_QPointF+  , mkConstMethod "screenPos" np $ objT c_QPoint   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsView.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,13 +22,12 @@   e_ViewportAnchor,   e_ViewportUpdateMode,   e_OptimizationFlag,+  fl_OptimizationFlags,   e_CacheModeFlag,-  bs_CacheMode,-  bs_OptimizationFlags+  fl_CacheMode   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum, ExportBitspace),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -39,25 +38,26 @@   mkMethod',   mkConstMethod,   mkConstMethod',-  mkCtor+  mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (-  objT,+  boolT,   constT,-  ptrT,+  enumT,   intT,+  objT,+  ptrT,   voidT,-  enumT,-  boolT,-  bitspaceT,   )-import Graphics.UI.Qtah.Generator.Interface.Core.Types hiding (aModule)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_AspectRatioMode, fl_Alignment, qreal) 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.QPainter (c_QPainter, e_RenderHint, fl_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)@@ -75,34 +75,31 @@ 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-    ]+  [ qtExport c_QGraphicsView+  , qtExport e_CacheModeFlag+  , qtExport fl_CacheMode+  , qtExport e_DragMode+  , qtExport e_OptimizationFlag+  , qtExport fl_OptimizationFlags+  , qtExport e_ViewportAnchor+  , qtExport e_ViewportUpdateMode+  ]  c_QGraphicsView =   addReqIncludes [includeStd "QGraphicsView"] $   classSetEntityPrefix "" $   makeClass (ident "QGraphicsView") Nothing [c_QAbstractScrollArea]-  [ mkCtor "new" []+  [ mkCtor "new" np   , 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+  , mkConstMethod "alignment" np $ flagsT fl_Alignment+  , mkConstMethod "backgroundBrush" np $ objT c_QBrush+  , mkConstMethod "cacheMode" np $ flagsT fl_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+  , mkConstMethod "dragMode" np $ enumT e_DragMode   , mkMethod' "ensureVisible" "ensureVisibleRectF" [objT c_QRectF] voidT   , mkMethod' "ensureVisible" "ensureVisibleRaw"       [qreal, qreal, qreal, qreal] voidT@@ -122,12 +119,12 @@       [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 "foregroundBrush" np $ objT c_QBrush+  , mkConstMethod "isInteractive" np boolT+  , mkConstMethod "isTransformed" np 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" np $ 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] $@@ -162,24 +159,24 @@       [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+  -- TODO mkConstMethod "matrix" np $ objT c_QMatrix+  , mkConstMethod "optimizationFlags" np $ flagsT fl_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+  , mkConstMethod "renderHints" np $ flagsT fl_RenderHints+  , mkMethod "resetCachedContent" np voidT+  , mkMethod "resetMatrix" np voidT+  , mkMethod "resetTransform" np voidT+  , mkConstMethod "resizeAnchor" np $ enumT e_ViewportAnchor   , mkMethod "rotate" [qreal] voidT-  -- TODO mkConstMethod "rubberBandSelectionMode" [] $ objT c_Qt::ItemSelectionMode+  -- TODO mkConstMethod "rubberBandSelectionMode" np $ 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+  , mkConstMethod "scene" np $ ptrT $ objT c_QGraphicsScene+  , mkConstMethod "sceneRect" np $ objT c_QRectF+  , mkMethod "setAlignment" [flagsT fl_Alignment] voidT   , mkMethod "setBackgroundBrush" [objT c_QBrush] voidT-  , mkMethod "setCacheMode" [bitspaceT bs_CacheMode] voidT+  , mkMethod "setCacheMode" [flagsT fl_CacheMode] voidT   , mkMethod "setDragMode" [enumT e_DragMode] voidT   , mkMethod "setForegroundBrush" [objT c_QBrush] voidT   , mkMethod "setInteractive" [boolT] voidT@@ -187,10 +184,10 @@   -- 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 "setOptimizationFlags" [flagsT fl_OptimizationFlags] voidT   , mkMethod "setRenderHint" [enumT e_RenderHint] voidT   , mkMethod' "setRenderHint" "setRenderHintAll" [enumT e_RenderHint, boolT] voidT-  , mkMethod "setRenderHints" [bitspaceT bs_RenderHints] voidT+  , mkMethod "setRenderHints" [flagsT fl_RenderHints] voidT   , mkMethod "setResizeAnchor" [enumT e_ViewportAnchor] voidT   -- TODO mkMethod "setRubberBandSelectionMode" [objT c_Qt::ItemSelectionMode] voidT   , mkMethod "setScene" [ptrT $ objT c_QGraphicsScene] voidT@@ -201,51 +198,51 @@   , 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+  , mkConstMethod "transform" np $ objT c_QTransform+  , mkConstMethod "transformationAnchor" np $ enumT e_ViewportAnchor   , mkMethod "translate" [qreal, qreal] voidT-  , mkConstMethod "viewportTransform" [] $ objT c_QTransform+  , mkConstMethod "viewportTransform" np $ objT c_QTransform   ] -(e_CacheModeFlag, bs_CacheMode) =-  makeQtEnumBitspace (ident1 "QGraphicsView" "CacheModeFlag") "CacheMode"-    [includeStd "QGraphicsView"]-  [ (0x0, ["cache","none"])-  , (0x1, ["cache","background"])+(e_CacheModeFlag, fl_CacheMode) =+  makeQtEnumAndFlags (ident1 "QGraphicsView" "CacheModeFlag") "CacheMode"+  [includeStd "QGraphicsView"]+  [ "CacheNone"+  , "CacheBackground"   ]  e_DragMode =   makeQtEnum (ident1 "QGraphicsView" "DragMode") [includeStd "QGraphicsView"]-  [ (0, ["no", "drag"])-  , (1, ["scroll", "hand", "drag"])-  , (2, ["rubber", "band", "drag"])+  [ "NoDrag"+  , "ScrollHandDrag"+  , "RubberBandDrag"   ] -(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_OptimizationFlag, fl_OptimizationFlags) =+  makeQtEnumAndFlags (ident1 "QGraphicsView" "OptimizationFlag") "OptimizationFlags"+  [includeStd "QGraphicsView"]+  [ "DontClipPainter"+  , "DontSavePainterState"+  , "DontAdjustForAntialiasing"+  , "IndirectPainting"   ]  e_ViewportAnchor =   makeQtEnum (ident1 "QGraphicsView" "ViewportAnchor")-    [includeStd "QGraphicsView"]-  [ (0, ["no", "anchor"])-  , (1, ["anchor", "view", "center"])-  , (2, ["anchor", "under", "mouse"])+  [includeStd "QGraphicsView"]+  [ "NoAnchor"+  , "AnchorViewCenter"+  , "AnchorUnderMouse"   ]  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"])+  [includeStd "QGraphicsView"]+  [ "FullViewportUpdate"+  , "MinimalViewportUpdate"+  , "SmartViewportUpdate"+  , "BoundingRectViewportUpdate"+  , "NoViewportUpdate"   ]  -- Methods with optional arguments that weren't handled properly in the bindings above
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGridLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   MethodApplicability (MConst, MNormal),   Purity (Nonpure),   addReqIncludes,@@ -36,12 +35,14 @@   mkMethod,   mkMethod',   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, constT, enumT, intT, objT, ptrT, refT, voidT)+import Foreign.Hoppy.Generator.Types (constT, enumT, intT, objT, ptrT, refT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment, e_Corner)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment, e_Corner) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayout (c_QLayout) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayoutItem (c_QLayoutItem) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)@@ -53,7 +54,7 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QGridLayout"]-  [ QtExport $ ExportClass c_QGridLayout ]+  [ qtExport c_QGridLayout ]  c_QGridLayout =   addReqIncludes [includeStd "QGridLayout",@@ -61,25 +62,25 @@   classSetEntityPrefix "" $   makeClass (ident "QGridLayout") Nothing [c_QLayout] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , just $ mkMethod' "addItem" "addItem" [ptrT $ objT c_QLayoutItem, intT, intT] voidT   , just $ mkMethod' "addItem" "addItemWithSpan"     [ptrT $ objT c_QLayoutItem, intT, intT, intT, intT] voidT   , just $ mkMethod' "addItem" "addItemWithSpanAndAlignment"-    [ptrT $ objT c_QLayoutItem, intT, intT, intT, intT, bitspaceT bs_Alignment] voidT+    [ptrT $ objT c_QLayoutItem, intT, intT, intT, intT, flagsT fl_Alignment] voidT   , just $ mkMethod' "addLayout" "addLayout" [ptrT $ objT c_QLayout, intT, intT] voidT   , just $ mkMethod' "addLayout" "addLayoutWithSpan"     [ptrT $ objT c_QLayout, intT, intT, intT, intT] voidT   , just $ mkMethod' "addLayout" "addLayoutWithSpanAndAlignment"-    [ptrT $ objT c_QLayout, intT, intT, intT, intT, bitspaceT bs_Alignment] voidT+    [ptrT $ objT c_QLayout, intT, intT, intT, intT, flagsT fl_Alignment] voidT   , just $ mkMethod' "addWidget" "addWidget" [ptrT $ objT c_QWidget, intT, intT] voidT   , just $ mkMethod' "addWidget" "addWidgetWithSpan"     [ptrT $ objT c_QWidget, intT, intT, intT, intT] voidT   , just $ mkMethod' "addWidget" "addWidgetWithSpanAndAlignment"-    [ptrT $ objT c_QWidget, intT, intT, intT, intT, bitspaceT bs_Alignment] voidT+    [ptrT $ objT c_QWidget, intT, intT, intT, intT, flagsT fl_Alignment] voidT   , just $ mkConstMethod "cellRect" [intT, intT] $ objT c_QRect-  , just $ mkConstMethod "columnCount" [] intT+  , just $ mkConstMethod "columnCount" np intT   , just $ mkConstMethod "columnMinimumWidth" [intT] intT   , just $ mkConstMethod "columnStretch" [intT] intT   , just $ makeFnMethod (ident2 "qtah" "qgridlayout" "getItemRow") "getItemRow"@@ -94,14 +95,14 @@   , test (qtVersion >= [4, 4]) $     mkConstMethod "itemAtPosition" [intT, intT] $ ptrT $ objT c_QLayoutItem   , just $ mkProp "originCorner" $ enumT e_Corner-  , just $ mkConstMethod "rowCount" [] intT+  , just $ mkConstMethod "rowCount" np intT   , just $ mkConstMethod "rowMinimumHeight" [intT] intT   , just $ mkConstMethod "rowStretch" [intT] intT   , just $ mkMethod "setColumnMinimumWidth" [intT, intT] voidT   , just $ mkMethod "setColumnStretch" [intT, intT] voidT   , just $ mkMethod "setRowMinimumHeight" [intT, intT] voidT   , just $ mkMethod "setRowStretch" [intT, intT] voidT-  , just $ mkConstMethod "spacing" [] intT+  , just $ mkConstMethod "spacing" np intT   , test (qtVersion >= [4, 3]) $ mkProp "verticalSpacing" intT   ] 
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGroupBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,10 +17,10 @@  module Graphics.UI.Qtah.Generator.Interface.Widgets.QGroupBox (   aModule,+  c_QGroupBox,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -29,14 +29,16 @@   mkBoolIsProp,   mkCtor,   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, objT, ptrT)+import Foreign.Hoppy.Generator.Types (objT, ptrT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_ListenerBool,+  listenerBool,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -47,18 +49,18 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QGroupBox"] $-  (QtExport $ ExportClass c_QGroupBox) :+  (qtExport c_QGroupBox) :   map QtExportSignal signals  c_QGroupBox =   addReqIncludes [includeStd "QGroupBox"] $   classSetEntityPrefix "" $   makeClass (ident "QGroupBox") Nothing [c_QWidget]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkCtor "newWithTitle" [objT c_QString]   , mkCtor "newWithTitleAndParent" [objT c_QString, ptrT $ objT c_QWidget]-  , mkProp "alignment" $ bitspaceT bs_Alignment+  , mkProp "alignment" $ flagsT fl_Alignment   , mkBoolIsProp "checkable"   , mkBoolIsProp "checked"   , mkBoolIsProp "flat"@@ -67,6 +69,6 @@  signals =   collect-  [ test (qtVersion >= [4, 2]) $ makeSignal c_QGroupBox "clicked" c_ListenerBool-  , just $ makeSignal c_QGroupBox "toggled" c_ListenerBool+  [ test (qtVersion >= [4, 2]) $ makeSignal c_QGroupBox "clicked" listenerBool+  , just $ makeSignal c_QGroupBox "toggled" listenerBool   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QHBoxLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,13 +20,13 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,   includeStd,   makeClass,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Widgets.QBoxLayout (c_QBoxLayout)@@ -39,12 +39,12 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QHBoxLayout"]-  [ QtExport $ ExportClass c_QHBoxLayout ]+  [ qtExport c_QHBoxLayout ]  c_QHBoxLayout =   addReqIncludes [includeStd "QHBoxLayout"] $   classSetEntityPrefix "" $   makeClass (ident "QHBoxLayout") Nothing [c_QBoxLayout]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QInputDialog.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,10 +17,10 @@  module Graphics.UI.Qtah.Generator.Interface.Widgets.QInputDialog (   aModule,+  c_QInputDialog,   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportBitspace, ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -33,17 +33,19 @@   mkMethod,   mkProp,   mkStaticMethod',+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, doubleT, enumT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, doubleT, 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.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_InputMethodHints, bs_WindowFlags)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_InputMethodHints, fl_WindowFlags) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_ListenerDouble,-  c_ListenerInt,-  c_ListenerQString,+  listenerDouble,+  listenerInt,+  listenerQString,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QDialog (c_QDialog) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLineEdit (e_EchoMode)@@ -58,11 +60,11 @@ aModule =   AQtModule $   makeQtModuleWithMinVersion ["Widgets", "QInputDialog"] minVersion $-  QtExport (ExportClass c_QInputDialog) :+  qtExport c_QInputDialog :   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_InputDialogOption-  , QtExport $ ExportBitspace bs_InputDialogOptions-  , QtExport $ ExportEnum e_InputMode+  [ qtExport e_InputDialogOption+  , qtExport fl_InputDialogOptions+  , qtExport e_InputMode   ]  c_QInputDialog =@@ -70,9 +72,9 @@   classSetEntityPrefix "" $   makeClass (ident "QInputDialog") Nothing [c_QDialog] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]-  , just $ mkCtor "newWithParentAndFlags" [ptrT $ objT c_QWidget, bitspaceT bs_WindowFlags]+  , just $ mkCtor "newWithParentAndFlags" [ptrT $ objT c_QWidget, flagsT fl_WindowFlags]   , just $ mkProp "cancelButtonText" $ objT c_QString   , just $ mkBoolIsProp "comboBoxEditable"   , just $ mkProp "comboBoxItems" $ objT c_QStringList@@ -84,31 +86,31 @@     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString] doubleT   , just $ mkStaticMethod' "getDouble" "getDoubleWithOptions"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString, doubleT, doubleT, doubleT,-     intT, ptrT boolT, bitspaceT bs_WindowFlags]+     intT, ptrT boolT, flagsT fl_WindowFlags]     doubleT   , just $ mkStaticMethod' "getInt" "getInt"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString] intT   , just $ mkStaticMethod' "getInt" "getIntWithOptions"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString, intT, intT, intT,-     intT, ptrT boolT, bitspaceT bs_WindowFlags]+     intT, ptrT boolT, flagsT fl_WindowFlags]     intT   , just $ mkStaticMethod' "getItem" "getItem"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString, objT c_QStringList] $ objT c_QString   , just $ mkStaticMethod' "getItem" "getItemWithOptions"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString, objT c_QStringList,-     intT, boolT, ptrT boolT, bitspaceT bs_WindowFlags, bitspaceT bs_InputMethodHints] $+     intT, boolT, ptrT boolT, flagsT fl_WindowFlags, flagsT fl_InputMethodHints] $     objT c_QString   , test (qtVersion >= [5, 2]) $ mkStaticMethod' "getMultiLineText" "getMultiLineText"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString] $ objT c_QString   , test (qtVersion >= [5, 2]) $ mkStaticMethod' "getMultiLineText" "getMultiLineTextWithOptions"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString, objT c_QString, ptrT boolT,-     bitspaceT bs_WindowFlags, bitspaceT bs_InputMethodHints] $+     flagsT fl_WindowFlags, flagsT fl_InputMethodHints] $     objT c_QString   , just $ mkStaticMethod' "getText" "getText"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString] $ objT c_QString   , just $ mkStaticMethod' "getText" "getTextWithOptions"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString, enumT e_EchoMode,-     objT c_QString, ptrT boolT, bitspaceT bs_WindowFlags, bitspaceT bs_InputMethodHints] $+     objT c_QString, ptrT boolT, flagsT fl_WindowFlags, flagsT fl_InputMethodHints] $     objT c_QString   , just $ mkProp "inputMode" $ enumT e_InputMode   , just $ mkProp "intMaximum" intT@@ -118,7 +120,7 @@   , just $ mkProp "labelText" $ objT c_QString   , just $ mkProp "okButtonText" $ objT c_QString     -- TODO open (if it can fit into the type system nicely)-  , just $ mkProp "options" $ bitspaceT bs_InputDialogOptions+  , just $ mkProp "options" $ flagsT fl_InputDialogOptions   , just $ mkMethod "setDoubleRange" [doubleT, doubleT] voidT   , just $ mkMethod "setIntRange" [intT, intT] voidT   , just $ mkMethod "setOption" [enumT e_InputDialogOption, boolT] voidT@@ -128,25 +130,25 @@   ]  signals =-  [ makeSignal c_QInputDialog "doubleValueChanged" c_ListenerDouble-  , makeSignal c_QInputDialog "doubleValueSelected" c_ListenerDouble-  , makeSignal c_QInputDialog "intValueChanged" c_ListenerInt-  , makeSignal c_QInputDialog "intValueSelected" c_ListenerInt-  , makeSignal c_QInputDialog "textValueChanged" c_ListenerQString-  , makeSignal c_QInputDialog "textValueSelected" c_ListenerQString+  [ makeSignal c_QInputDialog "doubleValueChanged" listenerDouble+  , makeSignal c_QInputDialog "doubleValueSelected" listenerDouble+  , makeSignal c_QInputDialog "intValueChanged" listenerInt+  , makeSignal c_QInputDialog "intValueSelected" listenerInt+  , makeSignal c_QInputDialog "textValueChanged" listenerQString+  , makeSignal c_QInputDialog "textValueSelected" listenerQString   ] -(e_InputDialogOption, bs_InputDialogOptions) =-  makeQtEnumBitspace (ident1 "QInputDialog" "InputDialogOption") "InputDialogOptions"+(e_InputDialogOption, fl_InputDialogOptions) =+  makeQtEnumAndFlags (ident1 "QInputDialog" "InputDialogOption") "InputDialogOptions"   [includeStd "QInputDialog"]-  [ (0x1, ["no", "buttons"])-  , (0x2, ["use", "list", "view", "for", "combo", "box", "items"])-  , (0x4, ["use", "plain", "text", "edit", "for", "text", "input"])+  [ "NoButtons"+  , "UseListViewForComboBoxItems"+  , "UsePlainTextEditForTextInput"   ]  e_InputMode =   makeQtEnum (ident1 "QInputDialog" "InputMode") [includeStd "QInputDialog"]-  [ (0, ["text", "input"])-  , (1, ["int", "input"])-  , (2, ["double", "input"])+  [ "TextInput"+  , "IntInput"+  , "DoubleInput"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLabel.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -32,9 +31,9 @@   mkMethod',   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (-  bitspaceT,   boolT,   constT,   doubleT,@@ -44,14 +43,15 @@   ptrT,   voidT,   )+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.Types (-  bs_Alignment,-  bs_TextInteractionFlags,+  fl_Alignment,   e_TextFormat,+  fl_TextInteractionFlags,   ) import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerQString)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerQString) import Graphics.UI.Qtah.Generator.Interface.Widgets.QFrame (c_QFrame) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -62,31 +62,31 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QLabel"] $-  QtExport (ExportClass c_QLabel) :+  qtExport c_QLabel :   map QtExportSignal signals  c_QLabel =   addReqIncludes [includeStd "QLabel"] $   classSetEntityPrefix "" $   makeClass (ident "QLabel") Nothing [c_QFrame]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkCtor "newWithText" [objT c_QString]   , mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QWidget]     -- TODO Ctors taking Qt::WindowFlags.-  , mkProp "alignment" $ bitspaceT bs_Alignment+  , mkProp "alignment" $ flagsT fl_Alignment   , mkProp "buddy" $ ptrT $ objT c_QWidget-  , mkMethod "clear" [] voidT-  , mkConstMethod "hasSelectedText" [] boolT+  , mkMethod "clear" np voidT+  , mkConstMethod "hasSelectedText" np boolT   , mkProp "indent" intT   , mkProp "margin" intT     -- TODO movie   , mkProp "openExternalLinks" boolT     -- TODO picture-  , mkConstMethod "pixmap" [] $ ptrT $ constT $ objT c_QPixmap+  , mkConstMethod "pixmap" np $ ptrT $ constT $ objT c_QPixmap   , mkBoolHasProp "scaledContents"-  , mkConstMethod "selectedText" [] $ objT c_QString-  , mkConstMethod "selectionStart" [] intT+  , mkConstMethod "selectedText" np $ objT c_QString+  , mkConstMethod "selectionStart" np intT     -- TODO mkProp "movie" $ ptrT $ objT c_QMovie   , mkMethod' "setNum" "setInt" [intT] voidT   , mkMethod' "setNum" "setDouble" [doubleT] voidT@@ -94,11 +94,11 @@   , mkMethod "setSelection" [intT, intT] voidT   , mkProp "text" $ objT c_QString   , mkProp "textFormat" $ enumT e_TextFormat-  , mkProp "textInteractionFlags" $ bitspaceT bs_TextInteractionFlags+  , mkProp "textInteractionFlags" $ flagsT fl_TextInteractionFlags   , mkProp "wordWrap" boolT   ]  signals =-  [ makeSignal c_QLabel "linkActivated" c_ListenerQString-  , makeSignal c_QLabel "linkHovered" c_ListenerQString+  [ makeSignal c_QLabel "linkActivated" listenerQString+  , makeSignal c_QLabel "linkHovered" listenerQString   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -34,15 +33,17 @@   mkMethod',   mkStaticMethod,   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (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.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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.QRect (c_QRect) import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayoutItem (c_QLayoutItem) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -53,8 +54,8 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QLayout"]-  [ QtExport $ ExportClass c_QLayout-  , QtExport $ ExportEnum e_SizeConstraint+  [ qtExport c_QLayout+  , qtExport e_SizeConstraint   ]  c_QLayout =@@ -63,26 +64,26 @@   makeClass (ident "QLayout") Nothing [c_QObject, c_QLayoutItem] $   collect   -- Abstract.-  [ just $ mkMethod "activate" [] boolT+  [ just $ mkMethod "activate" np boolT   , just $ mkMethod "addItem" [ptrT $ objT c_QLayoutItem] voidT   , just $ mkMethod "addWidget" [ptrT $ objT c_QWidget] voidT   , just $ mkStaticMethod "closestAcceptableSize"     [ptrT $ objT c_QWidget, objT c_QSize] $ objT c_QSize-  , test (qtVersion >= [4, 6]) $ mkConstMethod "contentsMargins" [] $ objT c_QMargins-  , test (qtVersion >= [4, 3]) $ mkConstMethod "contentsRect" [] $ objT c_QRect-  , just $ mkConstMethod "count" [] intT+  , test (qtVersion >= [4, 6]) $ mkConstMethod "contentsMargins" np $ objT c_QMargins+  , test (qtVersion >= [4, 3]) $ mkConstMethod "contentsRect" np $ objT c_QRect+  , just $ mkConstMethod "count" np intT   , just $ mkBoolIsProp "enabled"   , just $ mkConstMethod "indexOf" [ptrT $ objT c_QWidget] intT   , just $ mkConstMethod "itemAt" [intT] $ ptrT $ objT c_QLayoutItem   , just $ mkProp "menuBar" $ ptrT $ objT c_QWidget-  , just $ mkConstMethod "parentWidget" [] $ ptrT $ objT c_QWidget+  , just $ mkConstMethod "parentWidget" np $ ptrT $ objT c_QWidget   , just $ mkMethod "removeItem" [ptrT $ objT c_QLayoutItem] voidT   , just $ mkMethod "removeWidget" [ptrT $ objT c_QWidget] voidT-  , just $ mkMethod' "setAlignment" "setAlignment" [bitspaceT bs_Alignment] voidT+  , just $ mkMethod' "setAlignment" "setAlignment" [flagsT fl_Alignment] voidT   , just $ mkMethod' "setAlignment" "setLayoutAlignment"-    [ptrT $ objT c_QLayout, bitspaceT bs_Alignment] boolT+    [ptrT $ objT c_QLayout, flagsT fl_Alignment] boolT   , just $ mkMethod' "setAlignment" "setWidgetAlignment"-    [ptrT $ objT c_QWidget, bitspaceT bs_Alignment] boolT+    [ptrT $ objT c_QWidget, flagsT fl_Alignment] boolT   , test (qtVersion >= [4, 6]) $ mkMethod' "setContentsMargins" "setContentsMargins"     [objT c_QMargins] voidT   , test (qtVersion >= [4, 3]) $ mkMethod' "setContentsMargins" "setContentsMarginsRaw"@@ -90,15 +91,15 @@   , just $ mkProp "sizeConstraint" $ enumT e_SizeConstraint   , just $ mkProp "spacing" intT   , just $ mkMethod "takeAt" [intT] $ ptrT $ objT c_QLayoutItem-  , just $ mkMethod "update" [] voidT+  , just $ mkMethod "update" np voidT   ]  e_SizeConstraint =   makeQtEnum (ident1 "QLayout" "SizeConstraint") [includeStd "QLayout"]-  [ (0, ["set", "default", "size", "constraint"])-  , (1, ["set", "no", "constraint"])-  , (2, ["set", "minimum", "size"])-  , (3, ["set", "fixed", "size"])-  , (4, ["set", "maximum", "size"])-  , (5, ["set", "min", "and", "max", "size"])+  [ "SetDefaultConstraint"+  , "SetNoConstraint"+  , "SetMinimumSize"+  , "SetFixedSize"+  , "SetMaximumSize"+  , "SetMinAndMaxSize"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLayout.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -30,11 +29,13 @@   mkConstMethod,   mkMethod,   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Flags (flagsT) 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.Types (bs_Alignment, bs_Orientations)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment, fl_Orientations) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QLayout (c_QLayout) import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -45,26 +46,26 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QLayoutItem"]-  [ QtExport $ ExportClass c_QLayoutItem ]+  [ qtExport c_QLayoutItem ]  c_QLayoutItem =   addReqIncludes [includeStd "QLayoutItem"] $   classSetEntityPrefix "" $   makeClass (ident "QLayoutItem") Nothing []   -- Abstract.-  [ mkProp "alignment" $ bitspaceT bs_Alignment+  [ mkProp "alignment" $ flagsT fl_Alignment     -- TODO controlTypes-  , mkConstMethod "expandingDirections" [] $ bitspaceT bs_Orientations+  , mkConstMethod "expandingDirections" np $ flagsT fl_Orientations   , mkProp "geometry" $ objT c_QRect-  , mkConstMethod "hasHeightForWidth" [] boolT+  , mkConstMethod "hasHeightForWidth" np boolT   , mkConstMethod "heightForWidth" [intT] intT-  , mkMethod "invalidate" [] voidT-  , mkConstMethod "isEmpty" [] boolT-  , mkMethod "layout" [] $ ptrT $ objT c_QLayout-  , mkConstMethod "maximumSize" [] $ objT c_QSize+  , mkMethod "invalidate" np voidT+  , mkConstMethod "isEmpty" np boolT+  , mkMethod "layout" np $ ptrT $ objT c_QLayout+  , mkConstMethod "maximumSize" np $ objT c_QSize   , mkConstMethod "minimumHeightForWidth" [intT] intT-  , mkConstMethod "minimumSize" [] $ objT c_QSize-  , mkConstMethod "sizeHint" [] $ objT c_QSize+  , mkConstMethod "minimumSize" np $ objT c_QSize+  , mkConstMethod "sizeHint" np $ objT c_QSize     -- TODO spacerItem-  , mkMethod "widget" [] $ ptrT $ objT c_QWidget+  , mkMethod "widget" np $ ptrT $ objT c_QWidget   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QLineEdit.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -35,19 +34,21 @@   mkMethod,   mkMethod',   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, constT, enumT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, constT, enumT, intT, objT, ptrT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QMargins (c_QMargins) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment, e_CursorMoveStyle)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment, e_CursorMoveStyle) import Graphics.UI.Qtah.Generator.Interface.Gui.QValidator (c_QValidator) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_Listener,-  c_ListenerIntInt,-  c_ListenerQString,+  listener,+  listenerIntInt,+  listenerQString,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu (c_QMenu) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)@@ -59,26 +60,26 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QLineEdit"] $-  QtExport (ExportClass c_QLineEdit) :+  qtExport c_QLineEdit :   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_EchoMode ]+  [ qtExport e_EchoMode ]  c_QLineEdit =   addReqIncludes [includeStd "QLineEdit"] $   classSetEntityPrefix "" $   makeClass (ident "QLineEdit") Nothing [c_QWidget] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , just $ mkCtor "newWithText" [objT c_QString]   , just $ mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QWidget]-  , just $ mkProp "alignment" $ bitspaceT bs_Alignment-  , just $ mkMethod "backspace" [] voidT-  , just $ mkMethod "clear" [] voidT+  , just $ mkProp "alignment" $ flagsT fl_Alignment+  , just $ mkMethod "backspace" np voidT+  , just $ mkMethod "clear" np voidT   , test (qtVersion >= [5, 2]) $ mkBoolIsProp "clearButtonEnabled"     -- TODO completer-  , just $ mkConstMethod "copy" [] voidT-  , just $ mkMethod "createStandardContextMenu" [] $ ptrT $ objT c_QMenu+  , just $ mkConstMethod "copy" np voidT+  , just $ mkMethod "createStandardContextMenu" np $ ptrT $ objT c_QMenu   , just $ mkMethod "cursorBackward" [boolT, intT] voidT   , just $ mkMethod "cursorForward" [boolT, intT] voidT   , just $ mkProp "cursorMoveStyle" $ enumT e_CursorMoveStyle@@ -86,52 +87,52 @@   , just $ mkMethod "cursorPositionAt" [objT c_QPoint] intT   , just $ mkMethod "cursorWordBackward" [boolT] voidT   , just $ mkMethod "cursorWordForward" [boolT] voidT-  , just $ mkMethod "cut" [] voidT-  , just $ mkMethod "del" [] voidT-  , just $ mkMethod "deselect" [] voidT-  , just $ mkConstMethod "displayText" [] $ objT c_QString+  , just $ mkMethod "cut" np voidT+  , just $ mkMethod "del" np voidT+  , just $ mkMethod "deselect" np voidT+  , just $ mkConstMethod "displayText" np $ objT c_QString   , just $ mkProp "dragEnabled" boolT   , just $ mkProp "echoMode" $ enumT e_EchoMode   , just $ mkMethod "end" [boolT] voidT   , just $ mkBoolHasProp "frame"-  , just $ mkConstMethod "hasAcceptableInput" [] boolT-  , just $ mkConstMethod "hasSelectedText" [] boolT+  , just $ mkConstMethod "hasAcceptableInput" np boolT+  , just $ mkConstMethod "hasSelectedText" np boolT   , just $ mkMethod "home" [boolT] voidT   , just $ mkProp "inputMask" $ objT c_QString   , just $ mkMethod "insert" [objT c_QString] voidT-  , just $ mkConstMethod "isRedoAvailable" [] boolT-  , just $ mkConstMethod "isUndoAvailable" [] boolT+  , just $ mkConstMethod "isRedoAvailable" np boolT+  , just $ mkConstMethod "isUndoAvailable" np boolT   , just $ mkProp "maxLength" intT   , just $ mkBoolIsProp "modified"-  , just $ mkMethod "paste" [] voidT+  , just $ mkMethod "paste" np voidT   , just $ mkProp "placeholderText" $ objT c_QString   , just $ mkBoolIsProp "readOnly"-  , just $ mkMethod "redo" [] voidT-  , just $ mkMethod "selectAll" [] voidT-  , just $ mkConstMethod "selectedText" [] $ objT c_QString-  , just $ mkConstMethod "selectionStart" [] intT+  , just $ mkMethod "redo" np voidT+  , just $ mkMethod "selectAll" np voidT+  , just $ mkConstMethod "selectedText" np $ objT c_QString+  , just $ mkConstMethod "selectionStart" np intT   , just $ mkMethod "setSelection" [intT, intT] voidT   , just $ mkMethod' "setTextMargins" "setTextMargins" [objT c_QMargins] voidT   , just $ mkMethod' "setTextMargins" "setTextMarginsRaw" [intT, intT, intT, intT] voidT   , just $ mkProp "text" $ objT c_QString-  , just $ mkConstMethod "textMargins" [] $ objT c_QMargins-  , just $ mkMethod "undo" [] voidT+  , just $ mkConstMethod "textMargins" np $ objT c_QMargins+  , just $ mkMethod "undo" np voidT   , just $ mkProp "validator" $ ptrT $ constT $ objT c_QValidator   ]  signals =-  [ makeSignal c_QLineEdit "cursorPositionChanged" c_ListenerIntInt-  , makeSignal c_QLineEdit "editingFinished" c_Listener-  , makeSignal c_QLineEdit "returnPressed" c_Listener-  , makeSignal c_QLineEdit "selectionChanged" c_Listener-  , makeSignal c_QLineEdit "textEdited" c_ListenerQString-  , makeSignal c_QLineEdit "textChanged" c_ListenerQString+  [ makeSignal c_QLineEdit "cursorPositionChanged" listenerIntInt+  , makeSignal c_QLineEdit "editingFinished" listener+  , makeSignal c_QLineEdit "returnPressed" listener+  , makeSignal c_QLineEdit "selectionChanged" listener+  , makeSignal c_QLineEdit "textEdited" listenerQString+  , makeSignal c_QLineEdit "textChanged" listenerQString   ]  e_EchoMode =   makeQtEnum (ident1 "QLineEdit" "EchoMode") [includeStd "QLineEdit"]-  [ (0, ["normal"])-  , (1, ["no", "echo"])-  , (2, ["password"])-  , (3, ["password", "echo", "on", "edit"])+  [ "Normal"+  , "NoEcho"+  , "Password"+  , "PasswordEchoOnEdit"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QListView.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,29 +20,114 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,+  ident1,   includeStd,   makeClass,+  mkBoolIsProp,   mkCtor,+  mkProp,+  mkConstMethod,+  mkMethod,+  mkMethod',+  np,   )-import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractItemView (c_QAbstractItemView)+import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT, refT, voidT, enumT, constT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)+import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize)+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.QModelIndex (c_QModelIndex)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractItemView (c_QAbstractItemView, e_ScrollHint) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerRefConstQListQModelIndex) import Graphics.UI.Qtah.Generator.Types+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment)  {-# ANN module "HLint: ignore Use camelCase" #-}  aModule =   AQtModule $-  makeQtModule ["Widgets", "QListView"]-  [ QtExport $ ExportClass c_QListView ]+  makeQtModule ["Widgets", "QListView"] $+  qtExport c_QListView :+  map QtExportSignal signals +++  [ qtExport e_Flow+  , qtExport e_LayoutMode+  , qtExport e_Movement+  , qtExport e_ResizeMode+  , qtExport e_ViewMode+  ]  c_QListView =   addReqIncludes [includeStd "QListView"] $   classSetEntityPrefix "" $-  makeClass (ident "QListView") Nothing [c_QAbstractItemView]-  [ mkCtor "new" []-    -- TODO+  makeClass (ident "QListView") Nothing [c_QAbstractItemView] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]+  , test (qtVersion >= [4, 2]) $ mkProp "batchSize" intT+  , just $ mkMethod "clearPropertyFlags" np voidT+  , just $ mkProp "flow" $ enumT e_Flow+  , just $ mkProp "gridSize" $ objT c_QSize+  , just $ mkBoolIsProp "wrapping"+  , test (qtVersion >= [5, 12]) $ mkProp "itemAlignment" $ flagsT fl_Alignment+  , just $ mkProp "layoutMode" $ enumT e_LayoutMode+  , just $ mkProp "modelColumn" intT+  , just $ mkProp "movement" $ enumT e_Movement+  , just $ mkProp "resizeMode" $ enumT e_ResizeMode+  , test (qtVersion >= [4, 3]) $ mkBoolIsProp "selectionRectVisible"+  , just $ mkProp "spacing" intT+  , test (qtVersion >= [4, 1]) $ mkProp "uniformItemSizes" boolT+  , just $ mkProp "viewMode" $ enumT e_ViewMode+  , test (qtVersion >= [4, 2]) $ mkProp "wordWrap" boolT++  , just $ mkConstMethod "indexAt" [refT $ constT $ objT c_QPoint] $ objT c_QModelIndex+  , just $ mkConstMethod "isRowHidden" [intT] boolT+  , just $ mkMethod' "scrollTo" "scrollTo" [refT $ constT $ objT c_QModelIndex] voidT+  , just $ mkMethod' "scrollTo" "scrollToWithHint" [refT $ constT $ objT c_QModelIndex, enumT e_ScrollHint] voidT+  , just $ mkMethod "setRowHidden" [intT, boolT] voidT+  , just $ mkMethod "visualRect" [refT $ constT $ objT c_QModelIndex] $ objT c_QRect   ]++signals =+  collect+  [ test (qtVersion >= [4, 2]) $ makeSignal c_QListView "indexesMoved" listenerRefConstQListQModelIndex+  ]++e_Flow =+  makeQtEnum (ident1 "QListView" "Flow") [includeStd "QListView"]+  [ "LeftToRight"+  , "TopToBottom"+  ]++e_LayoutMode =+  makeQtEnum (ident1 "QListView" "LayoutMode") [includeStd "QListView"]+  [ "SinglePass"+  , "Batched"+  ]++e_Movement =+  makeQtEnum (ident1 "QListView" "Movement") [includeStd "QListView"]+  [ "Static"+  , "Free"+  , "Snap"+  ]++e_ResizeMode =+  makeQtEnum (ident1 "QListView" "ResizeMode") [includeStd "QListView"]+  [ "Fixed"+  , "Adjust"+  ]++e_ViewMode =+  makeQtEnum (ident1 "QListView" "ViewMode") [includeStd "QListView"]+  [ "ListMode"+  , "IconMode"+  ]++
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMainWindow.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@  import Foreign.Hoppy.Generator.Spec (   Class,-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -34,6 +33,7 @@   mkMethod,   mkMethod',   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray)@@ -44,7 +44,7 @@   e_DockWidgetArea,   e_Orientation,   )-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerQSize)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerQSize) import Graphics.UI.Qtah.Generator.Interface.Widgets.QDockWidget (c_QDockWidget) import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu (c_QMenu) import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenuBar (c_QMenuBar)@@ -60,7 +60,7 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QMainWindow"] $-  QtExport (ExportClass c_QMainWindow) :+  qtExport c_QMainWindow :   map QtExportSignal signals  c_QMainWindow :: Class@@ -68,7 +68,7 @@   addReqIncludes [includeStd "QMainWindow"] $   classSetEntityPrefix "" $   makeClass (ident "QMainWindow") Nothing [c_QWidget]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]     -- TODO Ctor with Qt::WindowFlags.   , mkMethod "addDockWidget" [enumT e_DockWidgetArea, ptrT $ objT c_QDockWidget] voidT@@ -82,7 +82,7 @@   , mkBoolIsProp "animated"   , mkProp "centralWidget" $ ptrT $ objT c_QWidget   , mkConstMethod "corner" [enumT e_Corner] $ enumT e_DockWidgetArea-  , mkMethod "createPopupMenu" [] $ ptrT $ objT c_QMenu+  , mkMethod "createPopupMenu" np $ ptrT $ objT c_QMenu   , mkBoolIsProp "dockNestingEnabled"     -- TODO dockOptions   , mkConstMethod "dockWidgetArea" [ptrT $ objT c_QDockWidget] $ enumT e_DockWidgetArea@@ -96,7 +96,7 @@   , mkMethod "restoreDockWidget" [ptrT $ objT c_QDockWidget] boolT   , mkMethod "restoreState" [objT c_QByteArray] boolT   , mkMethod' "restoreState" "restoreStateWithVersion" [objT c_QByteArray, intT] boolT-  , mkConstMethod "saveState" [] (objT c_QByteArray)+  , mkConstMethod "saveState" np (objT c_QByteArray)   , mkConstMethod' "saveState" "saveStateWithVersion" [intT] (objT c_QByteArray)   , mkMethod "setCorner" [enumT e_Corner, enumT e_DockWidgetArea] voidT     -- TODO setTabPosition@@ -116,6 +116,6 @@  signals :: [Signal] signals =-  [ makeSignal c_QMainWindow "iconSizeChanged" c_ListenerQSize+  [ makeSignal c_QMainWindow "iconSizeChanged" listenerQSize     -- TODO toolButtonStyleChanged   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMenu.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -33,15 +32,16 @@   mkMethod,   mkMethod',   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, objT, ptrT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_Listener, c_ListenerPtrQAction)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listener, listenerPtrQAction) 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 (AQtModule), makeQtModule)@@ -52,7 +52,7 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QMenu"] $-  QtExport (ExportClass c_QMenu) :+  qtExport c_QMenu :   map QtExportSignal signals  c_QMenu =@@ -60,7 +60,7 @@   classSetEntityPrefix "" $   makeClass (ident "QMenu") Nothing [c_QWidget] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , just $ mkCtor "newWithTitle" [objT c_QString]   , just $ mkCtor "newWithTitleAndParent" [objT c_QString, ptrT $ objT c_QWidget]@@ -81,13 +81,13 @@   , test (qtVersion >= [5, 1]) $     mkMethod' "addSection" "addSectionWithIcon" [objT c_QIcon, objT c_QString] $     ptrT $ objT c_QAction-  , just $ mkMethod "addSeparator" [] $ ptrT $ objT c_QAction-  , just $ mkMethod "clear" [] voidT+  , just $ mkMethod "addSeparator" np $ ptrT $ objT c_QAction+  , just $ mkMethod "clear" np voidT   , just $ mkProp "defaultAction" $ ptrT $ objT c_QAction-  , just $ mkMethod' "exec" "exec" [] $ ptrT $ objT c_QAction+  , just $ mkMethod' "exec" "exec" np $ ptrT $ objT c_QAction   , just $ mkMethod' "exec" "execAt" [objT c_QPoint, ptrT $ objT c_QAction] $ ptrT $ objT c_QAction     -- TODO Static exec-  , just $ mkMethod "hideTearOffMenu" [] voidT+  , just $ mkMethod "hideTearOffMenu" np voidT   , just $ mkProp "icon" $ objT c_QIcon   , just $ mkMethod "insertMenu" [ptrT $ objT c_QAction, ptrT $ objT c_QMenu] $     ptrT $ objT c_QAction@@ -98,9 +98,9 @@     mkMethod' "insertSection" "insertSectionWithIcon"     [ptrT $ objT c_QAction, objT c_QIcon, objT c_QString] $ ptrT $ objT c_QAction   , just $ mkMethod "insertSeparator" [ptrT $ objT c_QAction] $ ptrT $ objT c_QAction-  , just $ mkConstMethod "isEmpty" [] boolT-  , just $ mkConstMethod "isTearOffMenuVisible" [] boolT-  , just $ mkConstMethod "menuAction" [] $ ptrT $ objT c_QAction+  , just $ mkConstMethod "isEmpty" np boolT+  , just $ mkConstMethod "isTearOffMenuVisible" np boolT+  , just $ mkConstMethod "menuAction" np $ ptrT $ objT c_QAction   , just $ mkMethod' "popup" "popup" [objT c_QPoint] voidT   , just $ mkMethod' "popup" "popupAction" [objT c_QPoint, ptrT $ objT c_QAction] voidT   , just $ mkProp "separatorsCollapsible" boolT@@ -109,8 +109,8 @@   ]  signals =-  [ makeSignal c_QMenu "aboutToHide" c_Listener-  , makeSignal c_QMenu "aboutToShow" c_Listener-  , makeSignal c_QMenu "hovered" c_ListenerPtrQAction-  , makeSignal c_QMenu "triggered" c_ListenerPtrQAction+  [ makeSignal c_QMenu "aboutToHide" listener+  , makeSignal c_QMenu "aboutToShow" listener+  , makeSignal c_QMenu "hovered" listenerPtrQAction+  , makeSignal c_QMenu "triggered" listenerPtrQAction   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMenuBar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -33,16 +32,17 @@   mkMethod,   mkMethod',   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (enumT, objT, ptrT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (wsWince)+import Graphics.UI.Qtah.Generator.Config (wsWince) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_Corner) import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerPtrQAction)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerPtrQAction) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction) import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu (c_QMenu) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)@@ -52,7 +52,7 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QMenuBar"] $-  QtExport (ExportClass c_QMenuBar) :+  qtExport c_QMenuBar :   map QtExportSignal signals  c_QMenuBar =@@ -60,7 +60,7 @@   classSetEntityPrefix "" $   makeClass (ident "QMenuBar") Nothing [c_QWidget] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , just $ mkConstMethod "actionAt" [objT c_QPoint] $ ptrT $ objT c_QAction   , just $ mkConstMethod "actionGeometry" [ptrT $ objT c_QAction] $ objT c_QRect@@ -71,8 +71,8 @@   , just $ mkMethod' "addMenu" "addNewMenu" [objT c_QString] $ ptrT $ objT c_QMenu   , just $ mkMethod' "addMenu" "addNewMenuWithIcon" [objT c_QIcon, objT c_QString] $     ptrT $ objT c_QMenu-  , just $ mkMethod "addSeparator" [] $ ptrT $ objT c_QAction-  , just $ mkMethod "clear" [] voidT+  , just $ mkMethod "addSeparator" np $ ptrT $ objT c_QAction+  , just $ mkMethod "clear" np voidT   , just $ mkConstMethod "cornerWidget" [enumT e_Corner] $ ptrT $ objT c_QWidget   , test wsWince $ mkProp "defaultAction" $ ptrT $ objT c_QAction   , just $ mkBoolIsProp "defaultUp"@@ -84,6 +84,6 @@   ]  signals =-  [ makeSignal c_QMenuBar "hovered" c_ListenerPtrQAction-  , makeSignal c_QMenuBar "triggered" c_ListenerPtrQAction+  [ makeSignal c_QMenuBar "hovered" listenerPtrQAction+  , makeSignal c_QMenuBar "triggered" listenerPtrQAction   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QMessageBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportBitspace, ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -34,18 +33,20 @@   mkProp,   mkStaticMethod,   mkStaticMethod',+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, enumT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (enumT, objT, ptrT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQAbstractButton) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.Types (-  bs_TextInteractionFlags,   e_TextFormat,+  fl_TextInteractionFlags,   e_WindowModality,   )-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerPtrQAbstractButton)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerPtrQAbstractButton) import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractButton (c_QAbstractButton) import Graphics.UI.Qtah.Generator.Interface.Widgets.QCheckBox (c_QCheckBox)@@ -60,12 +61,12 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QMessageBox"] $-  QtExport (ExportClass c_QMessageBox) :+  qtExport c_QMessageBox :   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_ButtonRole-  , QtExport $ ExportEnum e_Icon-  , QtExport $ ExportEnum e_StandardButton-  , QtExport $ ExportBitspace bs_StandardButtons+  [ qtExport e_ButtonRole+  , qtExport e_Icon+  , qtExport e_StandardButton+  , qtExport fl_StandardButtons   ]  c_QMessageBox =@@ -73,7 +74,7 @@   classSetEntityPrefix "" $   makeClass (ident "QMessageBox") Nothing [c_QDialog] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , just $ mkStaticMethod "about" [ptrT $ objT c_QWidget, objT c_QString, objT c_QString] voidT   , just $ mkStaticMethod "aboutQt" [ptrT $ objT c_QWidget, objT c_QString] voidT@@ -87,25 +88,25 @@     [enumT e_StandardButton] $ ptrT $ objT c_QAbstractButton   , test (qtVersion >= [4, 5]) $ mkConstMethod "buttonRole"     [ptrT $ objT c_QAbstractButton] $ enumT e_ButtonRole-  , test (qtVersion >= [4, 5]) $ mkConstMethod "buttons" [] $ objT c_QListQAbstractButton+  , test (qtVersion >= [4, 5]) $ mkConstMethod "buttons" np $ objT c_QListQAbstractButton   , test (qtVersion >= [5, 2]) $ mkProp "checkBox" $ ptrT $ objT c_QCheckBox-  , test (qtVersion >= [4, 2]) $ mkConstMethod "clickedButton" [] $ ptrT $ objT c_QAbstractButton+  , test (qtVersion >= [4, 2]) $ mkConstMethod "clickedButton" np $ ptrT $ objT c_QAbstractButton   , test (qtVersion >= [4, 2]) $ mkStaticMethod' "critical" "critical"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString] $ enumT e_StandardButton   , test (qtVersion >= [4, 2]) $ mkStaticMethod' "critical" "criticalWithButtons"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString,-     bitspaceT bs_StandardButtons, enumT e_StandardButton] $+     flagsT fl_StandardButtons, enumT e_StandardButton] $     enumT e_StandardButton-  , just $ mkConstMethod "defaultButton" [] $ ptrT $ objT c_QPushButton+  , just $ mkConstMethod "defaultButton" np $ ptrT $ objT c_QPushButton   , test (qtVersion >= [4, 2]) $ mkProp "detailedText" $ objT c_QString-  , test (qtVersion >= [4, 2]) $ mkConstMethod "escapeButton" [] $ ptrT $ objT c_QAbstractButton+  , test (qtVersion >= [4, 2]) $ mkConstMethod "escapeButton" np $ ptrT $ objT c_QAbstractButton   , just $ mkProp "icon" $ enumT e_Icon   , just $ mkProp "iconPixmap" $ objT c_QPixmap   , test (qtVersion >= [4, 2]) $ mkStaticMethod' "information" "information"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString] $ enumT e_StandardButton   , test (qtVersion >= [4, 2]) $ mkStaticMethod' "information" "informationWithButtons"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString,-     bitspaceT bs_StandardButtons, enumT e_StandardButton] $+     flagsT fl_StandardButtons, enumT e_StandardButton] $     enumT e_StandardButton     -- OMIT open   , test (qtVersion >= [4, 2]) $ mkProp "informativeText" $ objT c_QString@@ -113,7 +114,7 @@     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString] $ enumT e_StandardButton   , test (qtVersion >= [4, 2]) $ mkStaticMethod' "question" "questionWithButtons"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString,-     bitspaceT bs_StandardButtons, enumT e_StandardButton] $+     flagsT fl_StandardButtons, enumT e_StandardButton] $     enumT e_StandardButton   , test (qtVersion >= [4, 2]) $ mkMethod "removeButton" [ptrT $ objT c_QAbstractButton] voidT   , test (qtVersion >= [4, 2]) $ mkMethod' "setDefaultButton" "setDefaultButton"@@ -128,65 +129,65 @@   , test (qtVersion >= [4, 2]) $ mkMethod "setWindowTitle" [objT c_QString] voidT   , test (qtVersion >= [4, 2]) $ mkConstMethod "standardButton"     [ptrT $ objT c_QAbstractButton] $ enumT e_StandardButton-  , test (qtVersion >= [4, 2]) $ mkProp "standardButtons" $ bitspaceT bs_StandardButtons+  , test (qtVersion >= [4, 2]) $ mkProp "standardButtons" $ flagsT fl_StandardButtons   , just $ mkProp "text" $ objT c_QString   , just $ mkProp "textFormat" $ enumT e_TextFormat-  , test (qtVersion >= [5, 1]) $ mkProp "textInteractionFlags" $ bitspaceT bs_TextInteractionFlags+  , test (qtVersion >= [5, 1]) $ mkProp "textInteractionFlags" $ flagsT fl_TextInteractionFlags   , test (qtVersion >= [4, 2]) $ mkStaticMethod' "warning" "warning"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString] $ enumT e_StandardButton   , test (qtVersion >= [4, 2]) $ mkStaticMethod' "warning" "warningWithButtons"     [ptrT $ objT c_QWidget, objT c_QString, objT c_QString,-     bitspaceT bs_StandardButtons, enumT e_StandardButton] $+     flagsT fl_StandardButtons, enumT e_StandardButton] $     enumT e_StandardButton   ]  signals =-  [ makeSignal c_QMessageBox "buttonClicked" c_ListenerPtrQAbstractButton+  [ makeSignal c_QMessageBox "buttonClicked" listenerPtrQAbstractButton   ]  e_ButtonRole =   makeQtEnum (ident1 "QMessageBox" "ButtonRole") [includeStd "QMessageBox"]-  [ (-1, ["invalid", "role"])-  , (0, ["accept", "role"])-  , (1, ["reject", "role"])-  , (2, ["descructive", "role"])-  , (3, ["action", "role"])-  , (4, ["help", "role"])-  , (5, ["yes", "role"])-  , (6, ["no", "role"])-  , (7, ["apply", "role"])-  , (8, ["reset", "role"])+  [ "InvalidRole"+  , "AcceptRole"+  , "RejectRole"+  , "DestructiveRole"+  , "ActionRole"+  , "HelpRole"+  , "YesRole"+  , "NoRole"+  , "ApplyRole"+  , "ResetRole"   ]  e_Icon =   makeQtEnum (ident1 "QMessageBox" "Icon") [includeStd "QMessageBox"]-  [ (0, ["no", "icon"])-  , (1, ["information"])-  , (2, ["warning"])-  , (3, ["critical"])-  , (4, ["question"])+  [ "NoIcon"+  , "Information"+  , "Warning"+  , "Critical"+  , "Question"   ] -(e_StandardButton, bs_StandardButtons) =-  makeQtEnumBitspace (ident1 "QMessageBox" "StandardButton") "StandardButtons"+(e_StandardButton, fl_StandardButtons) =+  makeQtEnumAndFlags (ident1 "QMessageBox" "StandardButton") "StandardButtons"   [includeStd "QMessageBox"]-  [ (0x00000400, ["ok"])-  , (0x00002000, ["open"])-  , (0x00000800, ["save"])-  , (0x00400000, ["cancel"])-  , (0x00200000, ["close"])-  , (0x00800000, ["discard"])-  , (0x02000000, ["apply"])-  , (0x04000000, ["reset"])-  , (0x08000000, ["restore", "defaults"])-  , (0x01000000, ["help"])-  , (0x00001000, ["save", "all"])-  , (0x00004000, ["yes"])-  , (0x00008000, ["yes", "to", "all"])-  , (0x00010000, ["no"])-  , (0x00020000, ["no", "to", "all"])-  , (0x00040000, ["abort"])-  , (0x00080000, ["retry"])-  , (0x00100000, ["ignore"])-  , (0x00000000, ["no", "button"])+  [ "Ok"+  , "Open"+  , "Save"+  , "Cancel"+  , "Close"+  , "Discard"+  , "Apply"+  , "Reset"+  , "RestoreDefaults"+  , "Help"+  , "SaveAll"+  , "Yes"+  , "YesToAll"+  , "No"+  , "NoToAll"+  , "Abort"+  , "Retry"+  , "Ignore"+  , "NoButton"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QOpenGLWidget.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -32,13 +31,15 @@   mkCtor,   mkMethod,   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (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.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_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.Internal.Listener (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@@ -50,38 +51,38 @@ aModule =   AQtModule $   makeQtModuleWithMinVersion ["Widgets", "QOpenGLWidget"] minVersion $-  [ QtExport $ ExportClass c_QOpenGLWidget ] +++  [ qtExport c_QOpenGLWidget ] ++   map QtExportSignal signals ++   collect-  [ test (qtVersion >= [5, 5]) $ QtExport $ ExportEnum e_UpdateBehavior ]+  [ test (qtVersion >= [5, 5]) $ qtExport e_UpdateBehavior ]  c_QOpenGLWidget =   addReqIncludes [includeStd "QOpenGLWidget"] $   classSetEntityPrefix "" $   makeClass (ident "QOpenGLWidget") Nothing [c_QWidget] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , 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+  , just $ mkCtor "newWithParentAndFlags" [ptrT $ objT c_QOpenGLWidget, flagsT fl_WindowFlags]+    -- TODO mkConstMethod "context" np $ ptrT $ objT c_QOpenGLContext+  , just $ mkConstMethod "defaultFramebufferObject" np gluint+  , just $ mkMethod "doneCurrent" np voidT     -- TODO mkProp "format" $ objT c_QSurfaceFormat-  , just $ mkMethod "grabFramebuffer" [] $ objT c_QImage-  , just $ mkConstMethod "isValid" [] boolT-  , just $ mkMethod "makeCurrent" [] voidT+  , just $ mkMethod "grabFramebuffer" np $ objT c_QImage+  , just $ mkConstMethod "isValid" np boolT+  , just $ mkMethod "makeCurrent" np 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+  [ makeSignal c_QOpenGLWidget "aboutToCompose" listener+  , makeSignal c_QOpenGLWidget "aboutToResize" listener+  , makeSignal c_QOpenGLWidget "frameSwapped" listener+  , makeSignal c_QOpenGLWidget "resized" listener   ]  e_UpdateBehavior =   makeQtEnum (ident1 "QOpenGLWidget" "UpdateBehavior") [includeStd "QOpenGLWidget"]-  [ (0, ["no", "partial", "update"])-  , (1, ["partial", "update"])+  [ "NoPartialUpdate"+  , "PartialUpdate"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QProgressBar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -32,13 +31,15 @@   mkCtor,   mkMethod,   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (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.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment, e_Orientation)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerInt)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment, e_Orientation)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerInt) 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@@ -48,10 +49,10 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QProgressBar"] $-  QtExport (ExportClass c_QProgressBar) :+  qtExport c_QProgressBar :   map QtExportSignal signals ++   collect-  [ test (qtVersion >= [4, 1]) $ QtExport $ ExportEnum e_Direction+  [ test (qtVersion >= [4, 1]) $ qtExport e_Direction   ]  c_QProgressBar =@@ -59,31 +60,31 @@   classSetEntityPrefix "" $   makeClass (ident "QProgressBar") Nothing [c_QWidget] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget] -  , just $ mkProp "alignment" $ bitspaceT bs_Alignment+  , just $ mkProp "alignment" $ flagsT fl_Alignment   , test (qtVersion >= [4, 2]) $ mkProp "format" $ objT c_QString   , test (qtVersion >= [4, 1]) $ mkProp "invertedAppearance" boolT   , just $ mkProp "maximum" intT   , just $ mkProp "minimum" intT   , test (qtVersion >= [4, 1]) $ mkProp "orientation" $ enumT e_Orientation-  , just $ mkMethod "reset" [] voidT-  , test (qtVersion >= [5, 0]) $ mkMethod "resetFormat" [] voidT  -- ADDED-BETWEEN 4.8 5.4+  , just $ mkMethod "reset" np voidT+  , test (qtVersion >= [5, 0]) $ mkMethod "resetFormat" np voidT  -- ADDED-BETWEEN 4.8 5.4   , just $ mkMethod "setRange" [intT, intT] voidT-  , just $ mkConstMethod "text" [] $ objT c_QString+  , just $ mkConstMethod "text" np $ objT c_QString   , test (qtVersion >= [4, 1]) $ mkProp "textDirection" $ enumT e_Direction   , just $ mkBoolIsProp "textVisible"   , just $ mkProp "value" intT   ]  signals =-  [ makeSignal c_QProgressBar "valueChanged" c_ListenerInt+  [ makeSignal c_QProgressBar "valueChanged" listenerInt   ]  -- Introduced in Qt 4.1. e_Direction =   makeQtEnum (ident1 "QProgressBar" "Direction") [includeStd "QProgressBar"]-  [ (0, ["top", "to", "bottom"])-  , (1, ["bottom", "to", "top"])+  [ "TopToBottom"+  , "BottomToTop"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QPushButton.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -31,6 +30,7 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)@@ -46,14 +46,14 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QPushButton"]-  [ QtExport $ ExportClass c_QPushButton ]+  [ qtExport c_QPushButton ]  c_QPushButton =   addReqIncludes [includeStd "QPushButton"] $   classSetEntityPrefix "" $   makeClass (ident "QPushButton") Nothing   [ c_QAbstractButton ]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkCtor "newWithText" [objT c_QString]   , mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QWidget]@@ -63,5 +63,5 @@   , mkBoolIsProp "default"   , mkBoolIsProp "flat"   , mkProp "menu" $ ptrT $ objT c_QMenu-  , mkMethod "showMenu" [] voidT+  , mkMethod "showMenu" np voidT   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QRadioButton.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,13 +20,13 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,   includeStd,   makeClass,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)@@ -40,13 +40,13 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QRadioButton"]-  [ QtExport $ ExportClass c_QRadioButton ]+  [ qtExport c_QRadioButton ]  c_QRadioButton =   addReqIncludes [includeStd "QRadioButton"] $   classSetEntityPrefix "" $   makeClass (ident "QRadioButton") Nothing [c_QAbstractButton]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkCtor "newWithText" [objT c_QString]   , mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QWidget]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QRubberBand.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -30,6 +29,7 @@   mkConstMethod,   mkCtor,   mkMethod,+  np,   ) import Foreign.Hoppy.Generator.Types (enumT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint)@@ -44,8 +44,8 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QRubberBand"]-  [ QtExport $ ExportClass c_QRubberBand-  , QtExport $ ExportEnum e_Shape+  [ qtExport c_QRubberBand+  , qtExport e_Shape   ]  c_QRubberBand =@@ -57,11 +57,11 @@   , mkMethod "move" [objT c_QPoint] voidT   , mkMethod "resize" [objT c_QSize] voidT   , mkMethod "setGeometry" [objT c_QRect] voidT-  , mkConstMethod "shape" [] $ enumT e_Shape+  , mkConstMethod "shape" np $ enumT e_Shape   ]  e_Shape =   makeQtEnum (ident1 "QRubberBand" "Shape") [includeStd "QRubberBand"]-  [ (0, ["line"])-  , (1, ["rectangle"])+  [ "Line"+  , "Rectangle"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QScrollArea.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -30,11 +29,13 @@   mkMethod,   mkMethod',   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, 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.Types (bs_Alignment)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment) 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)@@ -45,23 +46,23 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QScrollArea"]-  [ QtExport $ ExportClass c_QScrollArea ]+  [ qtExport c_QScrollArea ]  c_QScrollArea =   addReqIncludes [includeStd "QScrollArea"] $   classSetEntityPrefix "" $   makeClass (ident "QScrollArea") Nothing [c_QAbstractScrollArea] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]-  , test (qtVersion >= [4, 2]) $ mkProp "alignment" $ bitspaceT bs_Alignment+  , test (qtVersion >= [4, 2]) $ mkProp "alignment" $ flagsT fl_Alignment   , just $ mkMethod' "ensureVisible" "ensureVisible" [intT, intT] voidT   , just $ mkMethod' "ensureVisible" "ensureVisibleWithMargins" [intT, intT, intT, intT] voidT   , test (qtVersion >= [4, 2]) $ mkMethod' "ensureWidgetVisible" "ensureWidgetVisible"     [ptrT $ objT c_QWidget] voidT   , test (qtVersion >= [4, 2]) $ mkMethod' "ensureWidgetVisible" "ensureWidgetVisibleWithMargins"     [ptrT $ objT c_QWidget, intT, intT] voidT-  , just $ mkMethod "takeWidget" [] $ ptrT $ objT c_QWidget+  , just $ mkMethod "takeWidget" np $ ptrT $ objT c_QWidget   , just $ mkProp "widget" $ ptrT $ objT c_QWidget   , just $ mkProp "widgetResizable" boolT   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QScrollBar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,13 +21,13 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,   includeStd,   makeClass,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (enumT, objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_Orientation)@@ -41,13 +41,13 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QScrollBar"]-  [ QtExport $ ExportClass c_QScrollBar ]+  [ qtExport c_QScrollBar ]  c_QScrollBar =   addReqIncludes [includeStd "QScrollBar"] $   classSetEntityPrefix "" $   makeClass (ident "QScrollBar") Nothing [c_QAbstractSlider]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkCtor "newWithOrientation" [enumT e_Orientation]   , mkCtor "newWithOrientationAndParent" [enumT e_Orientation, ptrT $ objT c_QWidget]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSizePolicy.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,7 +22,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportBitspace, ExportClass, ExportEnum),   addReqIncludes,   classSetConversionToGc,   classSetEntityPrefix,@@ -35,15 +34,17 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Spec.ClassFeature (   ClassFeature (Copyable, Equatable),   classAddFeatures,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, 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_Orientations)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Orientations) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -53,11 +54,11 @@   AQtModule $   makeQtModule ["Widgets", "QSizePolicy"] $   collect-  [ just $ QtExport $ ExportClass c_QSizePolicy-  , test (qtVersion >= [4, 3]) $ QtExport $ ExportEnum e_ControlType-  , test (qtVersion >= [4, 3]) $ QtExport $ ExportBitspace bs_ControlTypes-  , just $ QtExport $ ExportEnum e_Policy-  , just $ QtExport $ ExportEnum e_PolicyFlag+  [ just $ qtExport c_QSizePolicy+  , test (qtVersion >= [4, 3]) $ qtExport e_ControlType+  , test (qtVersion >= [4, 3]) $ qtExport fl_ControlTypes+  , just $ qtExport e_Policy+  , just $ qtExport e_PolicyFlag   ]  c_QSizePolicy =@@ -67,11 +68,11 @@   classSetEntityPrefix "" $   makeClass (ident "QSizePolicy") Nothing [] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , test (qtVersion >= [4, 3]) $ mkCtor "newWithOptions"     [enumT e_Policy, enumT e_Policy, enumT e_ControlType]   , test (qtVersion >= [4, 3]) $ mkProp "controlType" $ enumT e_ControlType-  , just $ mkConstMethod "expandingDirections" [] $ bitspaceT bs_Orientations+  , just $ mkConstMethod "expandingDirections" np $ flagsT fl_Orientations   , just $ mkBoolHasProp "heightForWidth"   , just $ mkBoolHasProp "widthForHeight"   , just $ mkProp "horizontalPolicy" $ enumT e_Policy@@ -79,44 +80,44 @@   , just $ mkProp "verticalPolicy" $ enumT e_Policy   , just $ mkProp "verticalStretch" intT   , test (qtVersion >= [5, 2]) $ mkProp "retainSizeWhenHidden" boolT-  , just $ mkMethod "transpose" [] voidT+  , just $ mkMethod "transpose" np voidT   ] -(e_ControlType, bs_ControlTypes) =-  makeQtEnumBitspace (ident1 "QSizePolicy" "ControlType") "ControlTypes"+(e_ControlType, fl_ControlTypes) =+  makeQtEnumAndFlags (ident1 "QSizePolicy" "ControlType") "ControlTypes"   [includeStd "QSizePolicy"]-  [ (0x00000001, ["default", "type"])-  , (0x00000002, ["button", "box"])-  , (0x00000004, ["check", "box"])-  , (0x00000008, ["combo", "box"])-  , (0x00000010, ["frame"])-  , (0x00000020, ["group", "box"])-  , (0x00000040, ["label"])-  , (0x00000080, ["line"])-  , (0x00000100, ["line", "edit"])-  , (0x00000200, ["push", "button"])-  , (0x00000400, ["radio", "button"])-  , (0x00000800, ["slider"])-  , (0x00001000, ["spin", "box"])-  , (0x00002000, ["tab", "widget"])-  , (0x00004000, ["tool", "button"])+  [ "DefaultType"+  , "ButtonBox"+  , "CheckBox"+  , "ComboBox"+  , "Frame"+  , "GroupBox"+  , "Label"+  , "Line"+  , "LineEdit"+  , "PushButton"+  , "RadioButton"+  , "Slider"+  , "SpinBox"+  , "TabWidget"+  , "ToolButton"   ]  e_Policy =   makeQtEnum (ident1 "QSizePolicy" "Policy") [includeStd "QSizePolicy"]-  [ (0x0, ["fixed"])-  , (0x1, ["minimum"])  -- GrowFlag-  , (0x4, ["maximum"])  -- ShrinkFlag-  , (0x5, ["preferred"])  -- GrowFlag | ShrinkFlag-  , (0x7, ["expanding"])  -- GrowFlag | ShrinkFlag | ExpandFlag-  , (0x3, ["minimum", "expanding"])  -- GrowFlag | ExpandFlag-  , (0xd, ["ignored"])  -- ShrinkFlag | GrowFlag | IgnoreFlag+  [ "Fixed"+  , "Minimum"  -- GrowFlag+  , "Maximum"  -- ShrinkFlag+  , "Preferred"  -- GrowFlag | ShrinkFlag+  , "Expanding"  -- GrowFlag | ShrinkFlag | ExpandFlag+  , "MinimumExpanding"  -- GrowFlag | ExpandFlag+  , "Ignored"  -- ShrinkFlag | GrowFlag | IgnoreFlag   ]  e_PolicyFlag =   makeQtEnum (ident1 "QSizePolicy" "PolicyFlag") [includeStd "QSizePolicy"]-  [ (0x1, ["grow", "flag"])-  , (0x2, ["expand", "flag"])-  , (0x4, ["shrink", "flag"])-  , (0x8, ["ignore", "flag"])+  [ "GrowFlag"+  , "ExpandFlag"+  , "ShrinkFlag"+  , "IgnoreFlag"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSlider.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -29,6 +28,7 @@   makeClass,   mkCtor,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (enumT, intT, objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_Orientation)@@ -42,15 +42,15 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QSlider"]-  [ QtExport $ ExportClass c_QSlider-  , QtExport $ ExportEnum e_TickPosition+  [ qtExport c_QSlider+  , qtExport e_TickPosition   ]  c_QSlider =   addReqIncludes [includeStd "QSlider"] $   classSetEntityPrefix "" $   makeClass (ident "QSlider") Nothing [c_QAbstractSlider]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkCtor "newWithOrientation" [enumT e_Orientation]   , mkCtor "newWithOrientationAndParent" [enumT e_Orientation, ptrT $ objT c_QWidget]@@ -60,13 +60,10 @@  e_TickPosition =   makeQtEnum (ident1 "QSlider" "TickPosition") [includeStd "QSlider"]-  [ (0, ["no", "ticks"])-  , (1, ["ticks", "both", "sides"])-  , (2, ["ticks", "above"])-  , (3, ["ticks", "below"])-    -- TicksLeft = TicksAbove-    -- TicksRight = TicksBelow-    ---    -- We can't include these because duplicate enum values cause problems with-    -- Hoppy.+  [ "NoTicks"+  , "TicksBothSides"+  , "TicksAbove"+  , "TicksBelow"+  , "TicksLeft"+  , "TicksRight"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSpacerItem.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -30,10 +29,11 @@   mkConstMethod,   mkCtor,   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Types (enumT, intT, objT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayoutItem (c_QLayoutItem) import Graphics.UI.Qtah.Generator.Interface.Widgets.QSizePolicy (c_QSizePolicy, e_Policy) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -44,7 +44,7 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QSpacerItem"]-  [ QtExport $ ExportClass c_QSpacerItem ]+  [ qtExport c_QSpacerItem ]  c_QSpacerItem =   addReqIncludes [includeStd "QSpacerItem"] $@@ -57,5 +57,5 @@   , just $ mkMethod' "changeSize" "changeSize" [intT, intT] voidT   , just $ mkMethod' "changeSize" "changeSizeWithOptions"     [intT, intT, enumT e_Policy, enumT e_Policy] voidT-  , test (qtVersion >= [5, 5]) $ mkConstMethod "sizePolicy" [] $ objT c_QSizePolicy+  , test (qtVersion >= [5, 5]) $ mkConstMethod "sizePolicy" np $ objT c_QSizePolicy   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSpinBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -31,14 +30,15 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_ListenerInt,-  c_ListenerQString,+  listenerInt,+  listenerQString,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractSpinBox (c_QAbstractSpinBox) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)@@ -50,7 +50,7 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QSpinBox"] $-  QtExport (ExportClass c_QSpinBox) :+  qtExport c_QSpinBox :   map QtExportSignal signals  c_QSpinBox =@@ -58,9 +58,9 @@   classSetEntityPrefix "" $   makeClass (ident "QSpinBox") Nothing [c_QAbstractSpinBox] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]-  , just $ mkConstMethod "cleanText" [] $ objT c_QString+  , just $ mkConstMethod "cleanText" np $ objT c_QString   , test (qtVersion >= [5, 2]) $ mkProp "displayIntegerBase" intT   , just $ mkProp "maximum" intT   , just $ mkProp "minimum" intT@@ -72,6 +72,6 @@   ]  signals =-  [ makeSignal' c_QSpinBox "valueChanged" "valueChangedInt" c_ListenerInt-  , makeSignal' c_QSpinBox "valueChanged" "valueChangedString" c_ListenerQString+  [ makeSignal' c_QSpinBox "valueChanged" "valueChangedInt" listenerInt+  , makeSignal' c_QSpinBox "valueChanged" "valueChangedString" listenerQString   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSplitter.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -30,11 +29,12 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListInt) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_Orientation)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerIntInt)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerIntInt) import Graphics.UI.Qtah.Generator.Interface.Widgets.QFrame (c_QFrame) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -45,20 +45,20 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QSplitter"] $-  [ QtExport $ ExportClass c_QSplitter-  ] ++ map QtExportSignal signals+  (qtExport c_QSplitter) :+  map QtExportSignal signals  c_QSplitter =   addReqIncludes [includeStd "QSplitter"] $   classSetEntityPrefix "" $   makeClass (ident "QSplitter") Nothing [c_QFrame]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkCtor "newWithOrientation" [enumT e_Orientation]   , mkCtor "newWithOrientationAndParent" [enumT e_Orientation, ptrT $ objT c_QWidget]   , mkMethod "addWidget" [ptrT $ objT c_QWidget] voidT   , mkProp "childrenCollapsible" boolT-  , mkConstMethod "count" [] intT+  , mkConstMethod "count" np intT     -- TODO getRange     -- TODO handle   , mkProp "handleWidth" intT@@ -67,15 +67,15 @@   , mkConstMethod "isCollapsible" [intT] boolT   , mkProp "opaqueResize" boolT   , mkProp "orientation" $ enumT e_Orientation-  , mkMethod "refresh" [] voidT+  , mkMethod "refresh" np voidT     -- TODO restoreState     -- TODO saveState   , mkMethod "setCollapsible" [intT, boolT] voidT   , mkMethod "setSizes" [objT c_QListInt] voidT   , mkMethod "setStretchFactor" [intT, intT] voidT-  , mkMethod "sizes" [] $ objT c_QListInt+  , mkMethod "sizes" np $ objT c_QListInt   , mkConstMethod "widget" [intT] $ ptrT $ objT c_QWidget   ]  signals =-  [ makeSignal c_QSplitter "splitterMoved" c_ListenerIntInt ]+  [ makeSignal c_QSplitter "splitterMoved" listenerIntInt ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QStackedLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -31,11 +30,12 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (enumT, intT, objT, ptrT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerInt)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerInt) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayout (c_QLayout) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -48,10 +48,10 @@   makeQtModule ["Widgets", "QStackedLayout"] $   collect $   concat-  [ [ just $ QtExport $ ExportClass c_QStackedLayout+  [ [ just $ qtExport c_QStackedLayout     ]   , map (just . QtExportSignal) signals-  , [ test (qtVersion >= [4, 4]) $ QtExport $ ExportEnum e_StackingMode+  , [ test (qtVersion >= [4, 4]) $ qtExport e_StackingMode     ]   ] @@ -60,11 +60,11 @@   classSetEntityPrefix "" $   makeClass (ident "QStackedLayout") Nothing [c_QLayout] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , just $ mkCtor "newWithLayout" [ptrT $ objT c_QLayout]   , just $ mkMethod "addWidget" [ptrT $ objT c_QWidget] intT-  , just $ mkConstMethod "count" [] intT+  , just $ mkConstMethod "count" np intT   , just $ mkProp "currentIndex" intT   , just $ mkProp "currentWidget" $ ptrT $ objT c_QWidget   , just $ mkMethod "insertWidget" [intT, ptrT $ objT c_QWidget] intT@@ -73,12 +73,12 @@   ]  signals =-  [ makeSignal c_QStackedLayout "currentChanged" c_ListenerInt-  , makeSignal c_QStackedLayout "widgetRemoved" c_ListenerInt+  [ makeSignal c_QStackedLayout "currentChanged" listenerInt+  , makeSignal c_QStackedLayout "widgetRemoved" listenerInt   ]  e_StackingMode =   makeQtEnum (ident1 "QStackedLayout" "StackingMode") [includeStd "QStackedLayout"]-  [ (0, ["stack", "one"])-  , (1, ["stack", "all"])+  [ "StackOne"+  , "StackAll"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QStackedWidget.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -30,9 +29,10 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, voidT)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerInt)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerInt) import Graphics.UI.Qtah.Generator.Interface.Widgets.QFrame (c_QFrame) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -43,17 +43,17 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QStackedWidget"] $-  QtExport (ExportClass c_QStackedWidget) :+  qtExport c_QStackedWidget :   map QtExportSignal signals  c_QStackedWidget =   addReqIncludes [includeStd "QStackedWidget"] $   classSetEntityPrefix "" $   makeClass (ident "QStackedWidget") Nothing [c_QFrame]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkMethod "addWidget" [ptrT $ objT c_QWidget] intT-  , mkConstMethod "count" [] intT+  , mkConstMethod "count" np intT   , mkProp "currentIndex" intT   , mkProp "currentWidget" $ ptrT $ objT c_QWidget   , mkConstMethod "indexOf" [ptrT $ objT c_QWidget] intT@@ -63,6 +63,6 @@   ]  signals =-  [ makeSignal c_QStackedWidget "currentChanged" c_ListenerInt-  , makeSignal c_QStackedWidget "widgetRemoved" c_ListenerInt+  [ makeSignal c_QStackedWidget "currentChanged" listenerInt+  , makeSignal c_QStackedWidget "widgetRemoved" listenerInt   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QStatusBar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -32,10 +31,11 @@   mkCtor,   mkMethod,   mkMethod',+  np,   ) import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerQString)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerQString) 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@@ -45,22 +45,22 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QStatusBar"] $-  QtExport (ExportClass c_QStatusBar) :+  qtExport c_QStatusBar :   map QtExportSignal signals  c_QStatusBar =   addReqIncludes [includeStd "QStatusBar"] $   classSetEntityPrefix "" $   makeClass (ident "QStatusBar") Nothing [c_QWidget]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkMethod' "addPermanentWidget" "addPermanentWidget" [ptrT $ objT c_QWidget] voidT   , mkMethod' "addPermanentWidget" "addPermanentWidgetWithStretch"     [ptrT $ objT c_QWidget, intT] voidT   , mkMethod' "addWidget" "addWidget" [ptrT $ objT c_QWidget] voidT   , mkMethod' "addWidget" "addWidgetWithStretch" [ptrT $ objT c_QWidget, intT] voidT-  , mkMethod "clearMessage" [] voidT-  , mkConstMethod "currentMessage" [] $ objT c_QString+  , mkMethod "clearMessage" np voidT+  , mkConstMethod "currentMessage" np $ objT c_QString   , mkMethod' "insertPermanentWidget" "insertPermanentWidget" [intT, ptrT $ objT c_QWidget] voidT   , mkMethod' "insertPermanentWidget" "insertPermanentWidgetWithStretch"     [intT, ptrT $ objT c_QWidget, intT] voidT@@ -73,5 +73,5 @@   ]  signals =-  [ makeSignal c_QStatusBar "messageChanged" c_ListenerQString+  [ makeSignal c_QStatusBar "messageChanged" listenerQString   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QStyledItemDelegate.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2018 The Qtah Authors.+-- Copyright 2018-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,13 +21,13 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,   includeStd,   makeClass,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (objT, ptrT) -- import Graphics.UI.Qtah.Generator.Interface.Core.QLocale (c_QLocale)@@ -38,20 +38,20 @@  {-# ANN module "HLint: ignore Use camelCase" #-} -minVersion = [4, 4]+minVersion = [4, 2]  aModule =   AQtModule $   makeQtModuleWithMinVersion ["Widgets", "QStyledItemDelegate"] minVersion-  [ QtExport $ ExportClass c_QStyledItemDelegate ]+  [ qtExport c_QStyledItemDelegate ]  c_QStyledItemDelegate =   addReqIncludes [includeStd "QStyledItemDelegate"] $   classSetEntityPrefix "" $-  makeClass (ident "QStyledItemDelegate") Nothing [c_QAbstractItemDelegate] $+  makeClass (ident "QStyledItemDelegate") Nothing [c_QAbstractItemDelegate]   [   -- Public Functions-    mkCtor "new" []+    mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QObject]   -- TODO mkConstMethod   --     "displayText" [objT c_QVariant, objT c_QLocale] (objT c_QString)
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSystemTrayIcon.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,7 +22,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -36,71 +35,72 @@   mkMethod',   mkProp,   mkStaticMethod,+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_Listener,-  c_ListenerQSystemTrayIconActivationReason,+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listener,+  listenerQSystemTrayIconActivationReason,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu (c_QMenu)-import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModuleWithMinVersion) import Graphics.UI.Qtah.Generator.Types  {-# ANN module "HLint: ignore Use camelCase" #-}  aModule =   AQtModule $-  makeQtModule ["Widgets", "QSystemTrayIcon"] $-  QtExport (ExportClass c_QSystemTrayIcon) :+  makeQtModuleWithMinVersion ["Widgets", "QSystemTrayIcon"] [4, 2] $+  qtExport c_QSystemTrayIcon :   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_ActivationReason-  , QtExport $ ExportEnum e_MessageIcon+  [ qtExport e_ActivationReason+  , qtExport e_MessageIcon   ]  c_QSystemTrayIcon =   addReqIncludes [includeStd "QSystemTrayIcon"] $   classSetEntityPrefix "" $   makeClass (ident "QSystemTrayIcon") Nothing [c_QObject]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QObject]   , mkCtor "newWithIcon" [objT c_QIcon]   , mkCtor "newWithIconAndParent" [objT c_QIcon, ptrT $ objT c_QObject]   , mkProp "contextMenu" $ ptrT $ objT c_QMenu-  , mkConstMethod "geometry" [] $ objT c_QRect-  , mkMethod "hide" [] voidT+  , mkConstMethod "geometry" np $ objT c_QRect+  , mkMethod "hide" np voidT   , mkProp "icon" $ objT c_QIcon-  , mkStaticMethod "isSystemTrayAvailable" [] boolT-  , mkMethod "show" [] voidT+  , mkStaticMethod "isSystemTrayAvailable" np boolT+  , mkMethod "show" np voidT   , mkMethod' "showMessage" "showMessage" [objT c_QString, objT c_QString] voidT   , mkMethod' "showMessage" "showMessageAll"     [objT c_QString, objT c_QString, enumT e_MessageIcon, intT] voidT-  , mkStaticMethod "supportsMessages" [] boolT+  , mkStaticMethod "supportsMessages" np boolT   , mkProp "toolTip" $ objT c_QString   , mkBoolIsProp "visible"   ]  signals =-  [ makeSignal c_QSystemTrayIcon "activated" c_ListenerQSystemTrayIconActivationReason-  , makeSignal c_QSystemTrayIcon "messageClicked" c_Listener+  [ makeSignal c_QSystemTrayIcon "activated" listenerQSystemTrayIconActivationReason+  , makeSignal c_QSystemTrayIcon "messageClicked" listener   ]  e_ActivationReason =   makeQtEnum (ident1 "QSystemTrayIcon" "ActivationReason") [includeStd "QSystemTrayIcon"]-  [ (0, ["unknown"])-  , (1, ["context"])-  , (2, ["double", "click"])-  , (3, ["trigger"])-  , (4, ["middle", "click"])+  [ "Unknown"+  , "Context"+  , "DoubleClick"+  , "Trigger"+  , "MiddleClick"   ]  e_MessageIcon =   makeQtEnum (ident1 "QSystemTrayIcon" "MessageIcon") [includeStd "QSystemTrayIcon"]-  [ (0, ["no", "icon"])-  , (1, ["information"])-  , (2, ["warning"])-  , (3, ["critical"])+  [ "NoIcon"+  , "Information"+  , "Warning"+  , "Critical"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSystemTrayIcon.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -33,15 +32,16 @@   mkMethod,   mkMethod',   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (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.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_Corner, e_TextElideMode) import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerInt)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerInt) 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@@ -51,10 +51,10 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QTabWidget"] $-  QtExport (ExportClass c_QTabWidget) :+  qtExport c_QTabWidget :   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_TabPosition-  , QtExport $ ExportEnum e_TabShape+  [ qtExport e_TabPosition+  , qtExport e_TabShape   ]  c_QTabWidget =@@ -62,14 +62,14 @@   classSetEntityPrefix "" $   makeClass (ident "QTabWidget") Nothing [c_QWidget] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , just $ mkMethod' "addTab" "addTab" [ptrT $ objT c_QWidget, objT c_QString] intT   , just $ mkMethod' "addTab" "addTabWithIcon" [ptrT $ objT c_QWidget, objT c_QIcon, objT c_QString]     intT-  , just $ mkMethod "clear" [] voidT+  , just $ mkMethod "clear" np voidT   , just $ mkConstMethod "cornerWidget" [enumT e_Corner] $ ptrT $ objT c_QWidget-  , just $ mkConstMethod "count" [] intT+  , just $ mkConstMethod "count" np intT   , just $ mkProp "currentIndex" intT   , just $ mkProp "currentWidget" $ ptrT $ objT c_QWidget   , test (qtVersion >= [4, 5]) $ mkProp "documentMode" boolT@@ -103,21 +103,21 @@  e_TabPosition =   makeQtEnum (ident1 "QTabWidget" "TabPosition") [includeStd "QTabWidget"]-  [ (0, ["north"])-  , (1, ["south"])-  , (2, ["west"])-  , (3, ["east"])+  [ "North"+  , "South"+  , "West"+  , "East"   ]  e_TabShape =   makeQtEnum (ident1 "QTabWidget" "TabShape") [includeStd "QTabWidget"]-  [ (0, ["rounded"])-  , (1, ["triangular"])+  [ "Rounded"+  , "Triangular"   ]  signals =-  [ makeSignal c_QTabWidget "currentChanged" c_ListenerInt-  , makeSignal c_QTabWidget "tabBarClicked" c_ListenerInt-  , makeSignal c_QTabWidget "tabBarDoubleClicked" c_ListenerInt-  , makeSignal c_QTabWidget "tabCloseRequested" c_ListenerInt+  [ makeSignal c_QTabWidget "currentChanged" listenerInt+  , makeSignal c_QTabWidget "tabBarClicked" listenerInt+  , makeSignal c_QTabWidget "tabBarDoubleClicked" listenerInt+  , makeSignal c_QTabWidget "tabCloseRequested" listenerInt   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTextEdit.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,7 +20,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -34,17 +33,19 @@   mkMethod,   mkMethod',   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QPoint (c_QPoint) import Graphics.UI.Qtah.Generator.Interface.Core.QRect (c_QRect) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_Alignment, qreal)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_Alignment, qreal) import Graphics.UI.Qtah.Generator.Interface.Gui.QColor (c_QColor) import Graphics.UI.Qtah.Generator.Interface.Gui.QFont (c_QFont) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_Listener,-  c_ListenerBool,+  listener,+  listenerBool,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAbstractScrollArea (c_QAbstractScrollArea) import Graphics.UI.Qtah.Generator.Interface.Widgets.QMenu (c_QMenu)@@ -57,39 +58,42 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QTextEdit"] $-  QtExport (ExportClass c_QTextEdit) :+  qtExport c_QTextEdit :   map QtExportSignal signals ++-  [ QtExport $ ExportEnum e_LineWrapMode ]+  [ qtExport e_LineWrapMode+  , qtExport e_AutoFormattingFlag+  , qtExport fl_AutoFormatting+  ]  c_QTextEdit =   addReqIncludes [includeStd "QTextEdit"] $   classSetEntityPrefix "" $   makeClass (ident "QTextEdit") Nothing [c_QAbstractScrollArea]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkCtor "newWithText" [objT c_QString]   , mkCtor "newWithTextAndParent" [objT c_QString, ptrT $ objT c_QWidget]   , mkProp "acceptRichText" boolT-  , mkProp "alignment" $ bitspaceT bs_Alignment+  , mkProp "alignment" $ flagsT fl_Alignment   , mkConstMethod "anchorAt" [objT c_QPoint] $ objT c_QString   , mkMethod "append" [objT c_QString] voidT-    -- TODO autoFormatting-  , mkConstMethod "canPaste" [] boolT-  , mkMethod "clear" [] voidT-  , mkMethod "copy" [] voidT-  , mkMethod' "createStandardContextMenu" "createStandardContextMenu" [] $ ptrT $ objT c_QMenu+  , mkProp "autoFormatting" $ flagsT fl_AutoFormatting+  , mkConstMethod "canPaste" np boolT+  , mkMethod "clear" np voidT+  , mkMethod "copy" np voidT+  , mkMethod' "createStandardContextMenu" "createStandardContextMenu" np $ ptrT $ objT c_QMenu   , mkMethod' "createStandardContextMenu" "createStandardContextMenuAt" [objT c_QPoint] $     ptrT $ objT c_QMenu     -- TODO currentCharFormat   , mkProp "currentFont" $ objT c_QFont     -- TODO cursorForPosition-  , mkConstMethod' "cursorRect" "cursorRect" [] $ objT c_QRect+  , mkConstMethod' "cursorRect" "cursorRect" np $ objT c_QRect     -- TODO cursorRect(const QTextCursor&)   , mkProp "cursorWidth" intT-  , mkMethod "cut" [] voidT+  , mkMethod "cut" np voidT     -- TODO document   , mkProp "documentTitle" $ objT c_QString-  , mkMethod "ensureCursorVisible" [] voidT+  , mkMethod "ensureCursorVisible" np voidT     -- TODO extraSelections   , mkMethod' "find" "find" [objT c_QString] boolT     -- TODO find with FindFlags@@ -106,12 +110,12 @@     -- TODO mergeCurrentCharFormat     -- TODO moveCursor   , mkProp "overwriteMode" boolT-  , mkMethod "paste" [] voidT+  , mkMethod "paste" np voidT     -- TODO print   , mkBoolIsProp "readOnly"-  , mkMethod "redo" [] voidT+  , mkMethod "redo" np voidT   , mkMethod "scrollToAnchor" [objT c_QString] voidT-  , mkMethod "selectAll" [] voidT+  , mkMethod "selectAll" np voidT   , mkMethod "setHtml" [objT c_QString] voidT   , mkMethod "setPlainText" [objT c_QString] voidT   , mkMethod "setText" [objT c_QString] voidT@@ -121,31 +125,38 @@   , mkProp "textColor" $ objT c_QColor     -- TODO textCursor     -- TODO textInteractionFlags-  , mkConstMethod "toHtml" [] $ objT c_QString-  , mkConstMethod "toPlainText" [] $ objT c_QString-  , mkMethod "undo" [] voidT+  , mkConstMethod "toHtml" np $ objT c_QString+  , mkConstMethod "toPlainText" np $ objT c_QString+  , mkMethod "undo" np voidT   , mkBoolIsProp "undoRedoEnabled"     -- TODO wordWrapMode-  , mkMethod "zoomIn" [] voidT+  , mkMethod "zoomIn" np voidT   , mkMethod' "zoomIn" "zoomInPoints" [intT] voidT-  , mkMethod "zoomOut" [] voidT+  , mkMethod "zoomOut" np voidT   , mkMethod' "zoomOut" "zoomOutPoints" [intT] voidT   ]  signals =-  [ makeSignal c_QTextEdit "copyAvailable" c_ListenerBool+  [ makeSignal c_QTextEdit "copyAvailable" listenerBool     -- TODO currentCharFormatChanged-  , makeSignal c_QTextEdit "cursorPositionChanged" c_Listener-  , makeSignal c_QTextEdit "redoAvailable" c_ListenerBool-  , makeSignal c_QTextEdit "selectionChanged" c_Listener-  , makeSignal c_QTextEdit "textChanged" c_Listener-  , makeSignal c_QTextEdit "undoAvailable" c_ListenerBool+  , makeSignal c_QTextEdit "cursorPositionChanged" listener+  , makeSignal c_QTextEdit "redoAvailable" listenerBool+  , makeSignal c_QTextEdit "selectionChanged" listener+  , makeSignal c_QTextEdit "textChanged" listener+  , makeSignal c_QTextEdit "undoAvailable" listenerBool   ]  e_LineWrapMode =   makeQtEnum (ident1 "QTextEdit" "LineWrapMode") [includeStd "QTextEdit"]-  [ (0, ["no", "wrap"])-  , (1, ["widget", "width"])-  , (2, ["fixed", "pixel", "width"])-  , (3, ["fixed", "column", "width"])+  [ "NoWrap"+  , "WidgetWidth"+  , "FixedPixelWidth"+  , "FixedColumnWidth"+  ]++(e_AutoFormattingFlag, fl_AutoFormatting) =+  makeQtEnumAndFlags (ident1 "QTextEdit" "AutoFormattingFlag") "AutoFormatting" [includeStd "QTextEdit"]+  [ "AutoNone"+  , "AutoBulletList"+  , "AutoAll"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QToolBar.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,7 +22,6 @@  import Foreign.Hoppy.Generator.Spec (   Class,-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -34,24 +33,26 @@   mkMethod,   mkMethod',   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, enumT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString) import Graphics.UI.Qtah.Generator.Interface.Core.Types (-  bs_ToolBarAreas,   e_Orientation,   e_ToolBarArea,+  fl_ToolBarAreas,   e_ToolButtonStyle,   ) import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon) import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_ListenerBool,-  c_ListenerOrientation,-  c_ListenerPtrQAction,-  c_ListenerQSize,-  c_ListenerToolBarAreas,-  c_ListenerToolButtonStyle,+  listenerBool,+  listenerOrientation,+  listenerPtrQAction,+  listenerQSize,+  listenerToolBarAreas,+  listenerToolButtonStyle,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)@@ -64,7 +65,7 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QToolBar"] $-  QtExport (ExportClass c_QToolBar) :+  qtExport c_QToolBar :   map QtExportSignal signals  c_QToolBar :: Class@@ -72,37 +73,37 @@   addReqIncludes [includeStd "QToolBar"] $   classSetEntityPrefix "" $   makeClass (ident "QToolBar") Nothing [c_QWidget]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkCtor "newWithTitle" [objT c_QString]   , mkCtor "newWithTitleAndParent" [objT c_QString, ptrT $ objT c_QWidget]   , mkMethod' "addAction" "addAction" [objT c_QString] $ ptrT $ objT c_QAction   , mkMethod' "addAction" "addActionWithIcon" [objT c_QIcon, objT c_QString] $ ptrT $ objT c_QAction-  , mkMethod "addSeparator" [] $ ptrT $ objT c_QAction+  , mkMethod "addSeparator" np $ ptrT $ objT c_QAction   , mkMethod "addWidget" [ptrT $ objT c_QWidget] $ ptrT $ objT c_QAction-  , mkProp "allowedAreas" $ bitspaceT bs_ToolBarAreas-  , mkMethod "clear" [] voidT+  , mkProp "allowedAreas" $ flagsT fl_ToolBarAreas+  , mkMethod "clear" np voidT   , mkBoolIsProp "floatable"   , mkProp "iconSize" $ objT c_QSize   , mkMethod "insertSeparator" [ptrT $ objT c_QAction] $ ptrT $ objT c_QAction   , mkMethod "insertWidget" [ptrT $ objT c_QAction, ptrT $ objT c_QWidget] $ ptrT $ objT c_QAction   , mkConstMethod "isAreaAllowed" [enumT e_ToolBarArea] boolT-  , mkConstMethod "isFloating" [] boolT+  , mkConstMethod "isFloating" np boolT   , mkBoolIsProp "movable"   , mkProp "orientation" $ enumT e_Orientation-  , mkMethod "toggleViewAction" [] $ ptrT $ objT c_QAction+  , mkMethod "toggleViewAction" np $ ptrT $ objT c_QAction   , mkProp "toolButtonStyle" $ enumT e_ToolButtonStyle   , mkConstMethod "widgetForAction" [ptrT $ objT c_QAction] $ ptrT $ objT c_QWidget   ]  signals :: [Signal] signals =-  [ makeSignal c_QToolBar "actionTriggered" c_ListenerPtrQAction-  , makeSignal c_QToolBar "allowedAreasChanged" c_ListenerToolBarAreas-  , makeSignal c_QToolBar "iconSizeChanged" c_ListenerQSize-  , makeSignal c_QToolBar "movableChanged" c_ListenerBool-  , makeSignal c_QToolBar "orientationChanged" c_ListenerOrientation-  , makeSignal c_QToolBar "toolButtonStyleChanged" c_ListenerToolButtonStyle-  , makeSignal c_QToolBar "topLevelChanged" c_ListenerBool-  , makeSignal c_QToolBar "visibilityChanged" c_ListenerBool+  [ makeSignal c_QToolBar "actionTriggered" listenerPtrQAction+  , makeSignal c_QToolBar "allowedAreasChanged" listenerToolBarAreas+  , makeSignal c_QToolBar "iconSizeChanged" listenerQSize+  , makeSignal c_QToolBar "movableChanged" listenerBool+  , makeSignal c_QToolBar "orientationChanged" listenerOrientation+  , makeSignal c_QToolBar "toolButtonStyleChanged" listenerToolButtonStyle+  , makeSignal c_QToolBar "topLevelChanged" listenerBool+  , makeSignal c_QToolBar "visibilityChanged" listenerBool   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QToolBox.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2018 The Qtah Authors.+-- Copyright 2018-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,7 +22,6 @@  import Foreign.Hoppy.Generator.Spec (   Class,-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -32,14 +31,14 @@   mkCtor,   mkMethod,   mkMethod',-  )-import Foreign.Hoppy.Generator.Types (-  bitspaceT, boolT, intT, objT, ptrT, voidT,+  np,   )+import Foreign.Hoppy.Generator.Types (boolT, intT, objT, ptrT, voidT)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (bs_WindowFlags)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (fl_WindowFlags) import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (c_ListenerInt)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (listenerInt) import Graphics.UI.Qtah.Generator.Interface.Widgets.QFrame (c_QFrame) import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)@@ -51,7 +50,7 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QToolBox"] $-  QtExport (ExportClass c_QToolBox) :+  qtExport c_QToolBox :   map QtExportSignal signals  c_QToolBox :: Class@@ -61,20 +60,20 @@   makeClass (ident "QToolBox") Nothing [c_QFrame]   [   -- Properties-    mkConstMethod "count" [] intT-  , mkConstMethod "currentIndex" [] intT+    mkConstMethod "count" np intT+  , mkConstMethod "currentIndex" np intT   -- Public Functions-  , mkCtor "new" []+  , mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkCtor-      "newWithParentAndFlags" [ptrT $ objT c_QWidget, bitspaceT bs_WindowFlags]+      "newWithParentAndFlags" [ptrT $ objT c_QWidget, flagsT fl_WindowFlags]   , mkMethod'       "addItem"       "addItemWithIcon"       [ptrT $ objT c_QWidget, objT c_QIcon, objT c_QString]       intT   , mkMethod "addItem" [ptrT $ objT c_QWidget, objT c_QString] intT-  , mkConstMethod "currentWidget" [] (ptrT $ objT c_QWidget)+  , mkConstMethod "currentWidget" np (ptrT $ objT c_QWidget)   , mkConstMethod "indexOf" [ptrT $ objT c_QWidget] intT   , mkMethod'       "insertItem"@@ -99,5 +98,5 @@  signals :: [Signal] signals =-  [ makeSignal c_QToolBox "currentChanged" c_ListenerInt+  [ makeSignal c_QToolBox "currentChanged" listenerInt   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QToolButton.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportEnum, ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -31,6 +30,7 @@   mkCtor,   mkMethod,   mkProp,+  np,   ) import Foreign.Hoppy.Generator.Types (boolT, enumT, objT, ptrT, voidT) import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_ArrowType, e_ToolButtonStyle)@@ -46,8 +46,8 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QToolButton"]-  [ QtExport $ ExportClass c_QToolButton-  , QtExport $ ExportEnum e_ToolButtonPopupMode+  [ qtExport c_QToolButton+  , qtExport e_ToolButtonPopupMode   ]  c_QToolButton =@@ -55,7 +55,7 @@   classSetEntityPrefix "" $   makeClass (ident "QToolButton") Nothing   [ c_QAbstractButton ]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   , mkProp "arrowType" $ enumT e_ArrowType   , mkProp "autoRaise" boolT@@ -63,12 +63,12 @@   , mkProp "menu" $ ptrT $ objT c_QMenu   , mkProp "popupMode" $ enumT e_ToolButtonPopupMode   , mkProp "toolButtonStyle" $ enumT e_ToolButtonStyle-  , mkMethod "showMenu" [] voidT+  , mkMethod "showMenu" np voidT   ]  e_ToolButtonPopupMode =   makeQtEnum (ident1 "QToolButton" "ToolButtonPopupMode") [includeStd "QToolButton"]-  [ (0, ["delayed", "popup"])-  , (1, ["menu", "button", "popup"])-  , (2, ["instant", "popup"])+  [ "DelayedPopup"+  , "MenuButtonPopup"+  , "InstantPopup"   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTreeView.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -22,7 +22,6 @@  import Foreign.Hoppy.Generator.Spec (   Class,-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -31,15 +30,23 @@   mkBoolIsProp,   mkCtor,   mkMethod,+  mkMethod',+  mkConstMethod,   mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (boolT, intT, objT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, intT, objT, voidT, constT, refT, enumT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion) import Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex (c_QModelIndex)+import Graphics.UI.Qtah.Generator.Interface.Core.QVector (c_QVectorInt) 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+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_SortOrder)+import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listenerRefConstQModelIndex,+  )  {-# ANN module "HLint: ignore Use camelCase" #-} @@ -47,7 +54,7 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QTreeView"] $-  QtExport (ExportClass c_QTreeView) :+  qtExport c_QTreeView :   map QtExportSignal signals  c_QTreeView :: Class@@ -70,20 +77,43 @@   , just $ mkProp "uniformRowHeights" boolT   , test (qtVersion >= [4, 3]) $ mkProp "wordWrap" boolT   -- Public Functions-  , just $ mkCtor "new" []+  , just $ mkCtor "new" np+  , just $ mkConstMethod "columnAt" [intT] intT+  , just $ mkConstMethod "columnViewportPosition" [intT] intT+  , just $ mkConstMethod "columnWidth" [intT] intT+  , just $ mkMethod' "dataChanged" "dataChanged" [refT $ constT $ objT c_QModelIndex, refT $ constT $ objT c_QModelIndex] voidT+  , just $ mkMethod' "dataChanged" "dataChangedWithRoles" [refT $ constT $ objT c_QModelIndex, refT $ constT $ objT c_QModelIndex, refT $ constT $ objT c_QVectorInt] voidT+  -- QHeaderView *QTreeView::header() const+  , just $ mkConstMethod "indexAbove" [refT $ constT $ objT c_QModelIndex] $ objT c_QModelIndex+  , just $ mkConstMethod "indexBelow" [refT $ constT $ objT c_QModelIndex] $ objT c_QModelIndex+  , just $ mkConstMethod "isColumnHidden" [intT] boolT+  , just $ mkConstMethod "isExpanded" [refT $ constT $ objT c_QModelIndex] boolT+  , test (qtVersion >= [4, 3]) $ mkConstMethod "isFirstColumnSpanned" [intT, refT $ constT $ objT c_QModelIndex] boolT+  , just $ mkConstMethod "isRowHidden" [intT, refT $ constT $ objT c_QModelIndex] boolT+  , just $ mkMethod "setColumnHidden" [intT, boolT] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod "setColumnWidth" [intT, intT] voidT+  , just $ mkMethod "setExpanded" [refT $ constT $ objT c_QModelIndex, boolT] voidT+  , test (qtVersion >= [4, 3]) $ mkMethod "setFirstColumnSpanned" [intT, refT $ constT $ objT c_QModelIndex, boolT] voidT+  -- TODO void QTreeView::setHeader(QHeaderView *header)+  , just $ mkMethod "setRowHidden" [intT, refT $ constT $ objT c_QModelIndex, boolT] voidT+  , test (qtVersion >= [5, 2]) $ mkMethod "setTreePosition" [intT] voidT+  , just $ mkMethod "selectAll" np voidT   -- Public Slots   , just $ mkMethod "collapse" [objT c_QModelIndex] voidT-  , test (qtVersion >= [4, 2]) $ mkMethod "collapseAll" [] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod "collapseAll" np voidT   , just $ mkMethod "expand" [objT c_QModelIndex] voidT-  , test (qtVersion >= [4, 2]) $ mkMethod "expandAll" [] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod "expandAll" np voidT+  , test (qtVersion >= [5, 13]) $ mkMethod' "expandRecursively" "expandRecursively" [refT $ constT $ objT c_QModelIndex] voidT+  , test (qtVersion >= [5, 13]) $ mkMethod' "expandRecursively" "expandRecursivelyWithDepth" [refT $ constT $ objT c_QModelIndex, intT] voidT   , test (qtVersion >= [4, 3]) $ mkMethod "expandToDepth" [intT] voidT   , just $ mkMethod "hideColumn" [intT] voidT   , just $ mkMethod "resizeColumnToContents" [intT] voidT   , just $ mkMethod "showColumn" [intT] voidT-  -- TODO Other methods.+  , test (qtVersion >= [4, 2]) $ mkMethod "sortByColumn" [intT, enumT e_SortOrder] voidT   ]  signals :: [Signal] signals =-  [ -- TODO add signals+  [ makeSignal c_QTreeView "collapsed" listenerRefConstQModelIndex+  , makeSignal c_QTreeView "expanded" listenerRefConstQModelIndex   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTreeWidget.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -16,45 +16,46 @@ -- along with this program.  If not, see <http://www.gnu.org/licenses/>.  module Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidget (-  -- modules   aModule,-  itemModule,-  -- classes   c_QTreeWidget,-  c_QTreeWidgetItem,   ) where  import Foreign.Hoppy.Generator.Spec (   Class,-  CppEnum,-  Export (ExportClass, ExportEnum),   addReqIncludes,   classSetEntityPrefix,   ident,-  ident1,   includeStd,   makeClass,   mkConstMethod,   mkConstMethod',   mkCtor,   mkMethod,+  mkMethod',+  mkProp,+  np,   )-import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, voidT, boolT, enumT)+import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, voidT, enumT, constT, refT, boolT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (qtVersion)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQTreeWidgetItem)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidgetItem (c_QTreeWidgetItem) import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)-import Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant)-import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_SortOrder)-import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_Listener,-  c_ListenerPtrQTreeWidgetItem,-  c_ListenerPtrQTreeWidgetItemInt,-  c_ListenerPtrQTreeWidgetItemPtrQTreeWidgetItem,+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_SortOrder, fl_MatchFlags)+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.Widgets.QAbstractItemView (e_ScrollHint)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listener,+  listenerPtrQTreeWidgetItem,+  listenerPtrQTreeWidgetItemInt,+  listenerPtrQTreeWidgetItemPtrQTreeWidgetItem,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeView (c_QTreeView)-import Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QWidget (c_QWidget)+import Graphics.UI.Qtah.Generator.Interface.Core.QItemSelectionModel (fl_SelectionFlags) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -64,18 +65,9 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QTreeWidget"] $-  QtExport (ExportClass c_QTreeWidget) :+  qtExport c_QTreeWidget :   map QtExportSignal signals -itemModule :: AModule-itemModule =-  AQtModule $-  makeQtModule ["Widgets", "QTreeWidgetItem"] $-  map-    QtExport-    [ ExportClass c_QTreeWidgetItem-    , ExportEnum e_ChildIndicatorPolicy-    ]  c_QTreeWidget :: Class c_QTreeWidget =@@ -83,82 +75,66 @@   classSetEntityPrefix "" $   makeClass (ident "QTreeWidget") Nothing [c_QTreeView] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]-  , test (qtVersion >= [4, 1]) $-    mkMethod "addTopLevelItem" [ptrT $ objT c_QTreeWidgetItem] voidT-  , just $ mkConstMethod "currentItem" [] (ptrT $ objT c_QTreeWidgetItem)-  , just $ mkConstMethod "headerItem" [] (ptrT $ objT c_QTreeWidgetItem)-  , test (qtVersion >= [4, 2]) $-    mkConstMethod "invisibleRootItem" [] (ptrT $ objT c_QTreeWidgetItem)-  , just $ mkMethod "setCurrentItem" [ptrT $ objT c_QTreeWidgetItem] voidT+  , test (qtVersion >= [4, 1]) $ mkMethod "addTopLevelItem" [ptrT $ objT c_QTreeWidgetItem] voidT+  , just $ mkMethod "addTopLevelItems" [refT $ constT $ objT c_QListQTreeWidgetItem] voidT+  , just $ mkMethod' "closePersistentEditor" "closePersistentEditor" [ptrT $ objT c_QTreeWidgetItem] voidT+  , just $ mkMethod' "closePersistentEditor" "closePersistentEditorWithColumn" [ptrT $ objT c_QTreeWidgetItem, intT] voidT+  , just $ mkProp "columnCount" intT+  , test (qtVersion >= [4, 1]) $ mkConstMethod "currentColumn" np intT+  , just $ mkConstMethod "currentItem" np (ptrT $ objT c_QTreeWidgetItem)+  , just $ mkMethod' "editItem" "editItem" [ptrT $ objT c_QTreeWidgetItem] voidT+  , just $ mkMethod' "editItem" "editItemWithColumn" [ptrT $ objT c_QTreeWidgetItem, intT] voidT+  , just $ mkConstMethod' "findItems" "findItems" [objT c_QString, flagsT fl_MatchFlags] $ objT c_QListQTreeWidgetItem+  , just $ mkConstMethod' "findItems" "findItemsWithColumn" [objT c_QString, flagsT fl_MatchFlags, intT] $ objT c_QListQTreeWidgetItem+  , just $ mkConstMethod "headerItem" np (ptrT $ objT c_QTreeWidgetItem)+  , just $ mkConstMethod "indexOfTopLevelItem" [ptrT $ objT c_QTreeWidgetItem] intT+  , just $ mkMethod "insertTopLevelItem" [intT, ptrT $ objT c_QTreeWidgetItem] voidT+  , test (qtVersion >= [4, 1]) $ mkMethod "insertTopLevelItems" [intT, refT $ constT $ objT c_QListQTreeWidgetItem] voidT+  , test (qtVersion >= [4, 2]) $ mkConstMethod "invisibleRootItem" np (ptrT $ objT c_QTreeWidgetItem)+  , test (qtVersion >= [5, 10]) $ mkConstMethod' "isPersistentEditorOpen" "isPersistentEditorOpen" [ptrT $ objT c_QTreeWidgetItem] boolT+  , test (qtVersion >= [5, 10]) $ mkConstMethod' "isPersistentEditorOpen" "isPersistentEditorOpenWithColumn" [ptrT $ objT c_QTreeWidgetItem, intT] boolT+  , test (qtVersion >= [4, 3]) $ mkConstMethod "itemAbove" [constT $ ptrT $ objT c_QTreeWidgetItem] (ptrT $ objT c_QTreeWidgetItem)+  , just $ mkConstMethod' "itemAt" "itemAt" [constT $ objT c_QPoint] (ptrT $ objT c_QTreeWidgetItem)+  , just $ mkConstMethod' "itemAt" "itemAtRaw" [intT, intT] (ptrT $ objT c_QTreeWidgetItem)+  , test (qtVersion >= [4, 3]) $ mkConstMethod "itemBelow" [constT $ ptrT $ objT c_QTreeWidgetItem] (ptrT $ objT c_QTreeWidgetItem)+  -- TODO QTreeWidgetItem *QTreeWidget::itemFromIndex(const QModelIndex &index) const+  , test (qtVersion >= [4, 1]) $ mkConstMethod "itemWidget" [ptrT $ objT c_QTreeWidgetItem, intT] $ ptrT $ objT c_QWidget+  , just $ mkMethod' "openPersistentEditor" "openPersistentEditor" [ptrT $ objT c_QTreeWidgetItem] voidT+  , just $ mkMethod' "openPersistentEditor" "openPersistentEditorWithColumn" [ptrT $ objT c_QTreeWidgetItem, intT] voidT+  , test (qtVersion >= [4, 3]) $ mkMethod "removeItemWidget" [ptrT $ objT c_QTreeWidgetItem, intT] voidT+  , just $ mkConstMethod "selectedItems" np $ objT c_QListQTreeWidgetItem+  , just $ mkMethod' "setCurrentItem" "setCurrentItem" [ptrT $ objT c_QTreeWidgetItem] voidT+  , test (qtVersion >= [4, 1]) $ mkMethod' "setCurrentItem" "setCurrentItemWithColumn" [ptrT $ objT c_QTreeWidgetItem, intT] voidT+  , test (qtVersion >= [4, 4]) $ mkMethod' "setCurrentItem" "setCurrentItemWithColumnAndFlags" [ptrT $ objT c_QTreeWidgetItem, intT, flagsT fl_SelectionFlags] voidT   , just $ mkMethod "setHeaderItem" [ptrT $ objT c_QTreeWidgetItem] voidT-  , test (qtVersion >= [4, 2]) $-    mkMethod "setHeaderLabel" [objT c_QString] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod "setHeaderLabel" [objT c_QString] voidT   , just $ mkMethod "setHeaderLabels" [objT c_QStringList] voidT+  , test (qtVersion >= [4, 1]) $ mkMethod "setItemWidget" [ptrT $ objT c_QTreeWidgetItem, intT, ptrT $ objT c_QWidget] voidT+  , test (qtVersion >= [4, 1]) $ mkConstMethod "sortColumn" np intT   , just $ mkMethod "sortItems" [intT, enumT e_SortOrder] voidT+  , just $ mkMethod "takeTopLevelItem" [intT] $ ptrT $ objT c_QTreeWidgetItem   , just $ mkConstMethod "topLevelItem" [intT] (ptrT $ objT c_QTreeWidgetItem)-  , just $ mkConstMethod "topLevelItemCount" [] intT-  -- TODO add more methods-  ]--c_QTreeWidgetItem :: Class-c_QTreeWidgetItem =-  addReqIncludes [includeStd "QTreeWidgetItem"] $-  classSetEntityPrefix "" $-  makeClass (ident "QTreeWidgetItem") Nothing [] $-  collect-  [ just $ mkCtor "new" []-  , just $ mkCtor "newWithType" [intT]-  , just $ mkCtor "newWithStrings" [objT c_QStringList]-  , just $ mkCtor "newWithStringsAndType" [objT c_QStringList, intT]-  , just $ mkCtor "newWithParentTree" [ptrT $ objT c_QTreeWidget]-  , just $ mkCtor "newWithParentTreeAndType" [ptrT $ objT c_QTreeWidget, intT]-  , just $ mkCtor "newWithParentTreeAndStrings" [ptrT $ objT c_QTreeWidget, objT c_QStringList]-  , just $ mkCtor "newWithParentTreeAndStringsAndType"-    [ptrT $ objT c_QTreeWidget, objT c_QStringList, intT]-  , just $ mkCtor "newWithParentItem" [ptrT $ objT c_QTreeWidgetItem]-  , just $ mkCtor "newWithParentItemAndType" [ptrT $ objT c_QTreeWidgetItem, intT]-  , just $ mkCtor "newWithParentItemAndStrings" [ptrT $ objT c_QTreeWidgetItem, objT c_QStringList]-  , just $ mkCtor "newWithParentItemAndStringsAndType"-    [ptrT $ objT c_QTreeWidgetItem, objT c_QStringList, intT]-  , just $ mkConstMethod "child" [intT] (ptrT $ objT c_QTreeWidgetItem)-  , just $ mkConstMethod "childCount" [] intT-  , just $ mkConstMethod "childIndicatorPolicy" [] (enumT e_ChildIndicatorPolicy)-  , just $ mkConstMethod "columnCount" [] intT-  , just $ mkConstMethod' "data" "getData" [intT, intT] (objT c_QVariant)-  , test (qtVersion >= [4, 2]) $ mkConstMethod "isHidden" [] boolT-  , just $ mkConstMethod "parent" [] (ptrT $ objT c_QTreeWidgetItem)-  , just $ mkMethod "setChildIndicatorPolicy" [enumT e_ChildIndicatorPolicy] voidT-  , just $ mkMethod "setData" [intT, intT, objT c_QVariant] voidT-  , test (qtVersion >= [4, 2]) $ mkMethod "setHidden" [boolT] voidT-  , just $ mkMethod "setIcon" [intT, objT c_QIcon] voidT-  , just $ mkMethod "setText" [intT, objT c_QString] voidT-  , just $ mkConstMethod "text" [intT] (objT c_QString)-  , just $ mkConstMethod' "type" "getType" [] intT-  -- TODO add more methods+  , just $ mkConstMethod "topLevelItemCount" np intT+  , just $ mkConstMethod "visualItemRect" [constT $ ptrT $ objT c_QTreeWidgetItem] $ objT c_QRect+  , just $ mkMethod "clear" np voidT+  , just $ mkMethod "collapseItem" [constT $ ptrT $ objT c_QTreeWidgetItem] voidT+  , just $ mkMethod "expandItem" [constT $ ptrT $ objT c_QTreeWidgetItem] voidT+  , just $ mkMethod' "scrollToItem" "scrollToItem" [constT $ ptrT $ objT c_QTreeWidgetItem] voidT+  , just $ mkMethod' "scrollToItem" "scrollToItemWithHint" [constT $ ptrT $ objT c_QTreeWidgetItem, enumT e_ScrollHint] voidT   ]  signals :: [Signal] signals =-  [ makeSignal c_QTreeWidget "currentItemChanged" c_ListenerPtrQTreeWidgetItemPtrQTreeWidgetItem-  , makeSignal c_QTreeWidget "itemActivated" c_ListenerPtrQTreeWidgetItemInt-  , makeSignal c_QTreeWidget "itemChanged" c_ListenerPtrQTreeWidgetItemInt-  , makeSignal c_QTreeWidget "itemClicked" c_ListenerPtrQTreeWidgetItemInt-  , makeSignal c_QTreeWidget "itemCollapsed" c_ListenerPtrQTreeWidgetItem-  , makeSignal c_QTreeWidget "itemDoubleClicked" c_ListenerPtrQTreeWidgetItemInt-  , makeSignal c_QTreeWidget "itemEntered" c_ListenerPtrQTreeWidgetItemInt-  , makeSignal c_QTreeWidget "itemExpanded" c_ListenerPtrQTreeWidgetItem-  , makeSignal c_QTreeWidget "itemPressed" c_ListenerPtrQTreeWidgetItemInt-  , makeSignal c_QTreeWidget "itemSelectionChanged" c_Listener+  [ makeSignal c_QTreeWidget "currentItemChanged" listenerPtrQTreeWidgetItemPtrQTreeWidgetItem+  , makeSignal c_QTreeWidget "itemActivated" listenerPtrQTreeWidgetItemInt+  , makeSignal c_QTreeWidget "itemChanged" listenerPtrQTreeWidgetItemInt+  , makeSignal c_QTreeWidget "itemClicked" listenerPtrQTreeWidgetItemInt+  , makeSignal c_QTreeWidget "itemCollapsed" listenerPtrQTreeWidgetItem+  , makeSignal c_QTreeWidget "itemDoubleClicked" listenerPtrQTreeWidgetItemInt+  , makeSignal c_QTreeWidget "itemEntered" listenerPtrQTreeWidgetItemInt+  , makeSignal c_QTreeWidget "itemExpanded" listenerPtrQTreeWidgetItem+  , makeSignal c_QTreeWidget "itemPressed" listenerPtrQTreeWidgetItemInt+  , makeSignal c_QTreeWidget "itemSelectionChanged" listener   ]--e_ChildIndicatorPolicy :: CppEnum-e_ChildIndicatorPolicy =-  makeQtEnum-    (ident1 "QTreeWidgetItem" "ChildIndicatorPolicy")-    [includeStd "QTreeWidgetItem"]-    [ (0, ["show", "indicator"])-    , (1, ["dont", "show", "indicator"])-    , (2, ["dont", "show", "indicator", "when", "childless"])-    ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTreeWidget.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,10 +17,8 @@  module Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidget (   c_QTreeWidget,-  c_QTreeWidgetItem,   ) where  import Foreign.Hoppy.Generator.Spec (Class)  c_QTreeWidget :: Class-c_QTreeWidgetItem :: Class
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTreeWidgetItem.hs view
@@ -0,0 +1,171 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QTreeWidgetItem (+  -- modules+  aModule,+  c_QTreeWidgetItem,+  ) where++import Foreign.Hoppy.Generator.Spec (+  Class,+  CppEnum,+  Operator (OpLt),+  addReqIncludes,+  classSetEntityPrefix,+  ident,+  ident1,+  includeStd,+  makeClass,+  mkConstMethod,+  mkConstMethod',+  mkCtor,+  mkMethod,+  np,+  )+import Foreign.Hoppy.Generator.Spec.ClassFeature (+  ClassFeature (Assignable),+  classAddFeatures,+  )+import Foreign.Hoppy.Generator.Types (intT, objT, ptrT, refT, constT, voidT, boolT, enumT)+import Foreign.Hoppy.Generator.Version (collect, just, test)+import Graphics.UI.Qtah.Generator.Config (qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT)+import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Core.QList (c_QListQTreeWidgetItem)+import Graphics.UI.Qtah.Generator.Interface.Gui.QBrush (c_QBrush)+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Widgets.QTreeWidget (c_QTreeWidget)+import Graphics.UI.Qtah.Generator.Interface.Core.QSize (c_QSize)+import Graphics.UI.Qtah.Generator.Interface.Gui.QFont (c_QFont)+import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)+import Graphics.UI.Qtah.Generator.Interface.Core.QVariant (c_QVariant)+import Graphics.UI.Qtah.Generator.Interface.Core.Types (e_CheckState, e_SortOrder, fl_ItemFlags)+import Graphics.UI.Qtah.Generator.Interface.Gui.QIcon (c_QIcon)+import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule)+import Graphics.UI.Qtah.Generator.Types++{-# ANN module "HLint: ignore Use camelCase" #-}++aModule :: AModule+aModule =+  AQtModule $+  makeQtModule ["Widgets", "QTreeWidgetItem"] $+  [ qtExport c_QTreeWidgetItem+  , qtExport e_ChildIndicatorPolicy+  , qtExport e_ItemType+  ]++c_QTreeWidgetItem :: Class+c_QTreeWidgetItem =+  addReqIncludes [includeStd "QTreeWidgetItem"] $+  classAddFeatures [Assignable] $+  classSetEntityPrefix "" $+  makeClass (ident "QTreeWidgetItem") Nothing [] $+  collect+  [ just $ mkCtor "new" np+  , just $ mkCtor "newWithType" [intT]+  , just $ mkCtor "newWithStrings" [objT c_QStringList]+  , just $ mkCtor "newWithStringsAndType" [objT c_QStringList, intT]+  , just $ mkCtor "newWithParentTree" [ptrT $ objT c_QTreeWidget]+  , just $ mkCtor "newWithParentTreeAndType" [ptrT $ objT c_QTreeWidget, intT]+  , just $ mkCtor "newWithParentTreeAndStrings" [ptrT $ objT c_QTreeWidget, objT c_QStringList]+  , just $ mkCtor "newWithParentTreeAndStringsAndType"+    [ptrT $ objT c_QTreeWidget, objT c_QStringList, intT]+  , just $ mkCtor "newWithParentItem" [ptrT $ objT c_QTreeWidgetItem]+  , just $ mkCtor "newWithParentItemAndType" [ptrT $ objT c_QTreeWidgetItem, intT]+  , just $ mkCtor "newWithParentItemAndStrings" [ptrT $ objT c_QTreeWidgetItem, objT c_QStringList]+  , just $ mkCtor "newWithParentItemAndStringsAndType"+    [ptrT $ objT c_QTreeWidgetItem, objT c_QStringList, intT]+  , just $ mkMethod "addChild" [ptrT $ objT c_QTreeWidgetItem] voidT+  , test (qtVersion >= [4, 1]) $ mkMethod "addChildren" [refT $ constT $ objT c_QListQTreeWidgetItem] voidT+  , test (qtVersion >= [4, 2]) $ mkConstMethod "background" [intT] $ objT c_QBrush+  , just $ mkConstMethod "checkState" [intT] $ enumT e_CheckState+  , just $ mkConstMethod "child" [intT] (ptrT $ objT c_QTreeWidgetItem)+  , just $ mkConstMethod "childCount" np intT+  , just $ mkConstMethod "childIndicatorPolicy" np (enumT e_ChildIndicatorPolicy)+  , just $ mkConstMethod "clone" np $ ptrT $ objT c_QTreeWidgetItem+  , just $ mkConstMethod "columnCount" np intT+  , just $ mkConstMethod' "data" "getData" [intT, intT] (objT c_QVariant)+  , just $ mkConstMethod "flags" np $ flagsT fl_ItemFlags+  , just $ mkConstMethod "font" [intT] $ objT c_QFont+  , test (qtVersion >= [4, 2]) $ mkConstMethod "foreground" [intT] $ objT c_QBrush+  , just $ mkConstMethod "icon" [intT] $ objT c_QIcon+  , just $ mkConstMethod "indexOfChild" [ptrT $ objT c_QTreeWidgetItem] intT+  , just $ mkMethod "insertChild" [intT, ptrT $ objT c_QTreeWidgetItem] voidT+  , test (qtVersion >= [4, 1]) $ mkMethod "insertChildren" [intT, refT $ constT $ objT c_QListQTreeWidgetItem] voidT+  , test (qtVersion >= [4, 3]) $ mkConstMethod "isDisabled" np boolT+  , test (qtVersion >= [4, 2]) $ mkConstMethod "isExpanded" np boolT+  , test (qtVersion >= [4, 3]) $ mkConstMethod "isFirstColumnSpanned" np boolT+  , test (qtVersion >= [4, 2]) $ mkConstMethod "isHidden" np boolT+  , test (qtVersion >= [4, 2]) $ mkConstMethod "isSelected" np boolT+  , just $ mkConstMethod "parent" np (ptrT $ objT c_QTreeWidgetItem)+  -- TODO void QTreeWidgetItem::read(QDataStream &in)+  , just $ mkMethod "removeChild" [ptrT $ objT c_QTreeWidgetItem] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod "setBackground" [intT, objT c_QBrush] voidT+  , just $ mkMethod "setCheckState" [intT, enumT e_CheckState] voidT+  , just $ mkMethod "setChildIndicatorPolicy" [enumT e_ChildIndicatorPolicy] voidT+  , just $ mkMethod "setData" [intT, intT, objT c_QVariant] voidT+  , test (qtVersion >= [4, 3]) $ mkMethod "setDisabled" [boolT] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod "setExpanded" [boolT] voidT+  , test (qtVersion >= [4, 3]) $ mkMethod "setFirstColumnSpanned" [boolT] voidT+  , just $ mkMethod "setFlags" [flagsT fl_ItemFlags] voidT+  , just $ mkMethod "setFont" [intT, objT c_QFont] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod "setForeground" [intT, objT c_QBrush] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod "setHidden" [boolT] voidT+  , just $ mkMethod "setIcon" [intT, objT c_QIcon] voidT+  , test (qtVersion >= [4, 2]) $ mkMethod "setSelected" [boolT] voidT+  , test (qtVersion >= [4, 1]) $ mkMethod "setSizeHint" [intT, objT c_QSize] voidT+  , just $ mkMethod "setStatusTip" [intT, objT c_QString] voidT+  , just $ mkMethod "setText" [intT, objT c_QString] voidT+  , just $ mkMethod "setTextAlignment" [intT, intT] voidT+  , just $ mkMethod "setToolTip" [intT, objT c_QString] voidT+  , just $ mkMethod "setWhatsThis" [intT, objT c_QString] voidT+  , test (qtVersion >= [4, 1]) $ mkConstMethod "sizeHint" [intT] $ objT c_QSize+  , test (qtVersion >= [4, 2]) $ mkMethod "sortChildren" [intT, enumT e_SortOrder] voidT+  , just $ mkConstMethod "statusTip" [intT] $ objT c_QString+  , just $ mkMethod "takeChild" [intT] $ ptrT $ objT c_QTreeWidgetItem+  , test (qtVersion >= [4, 1]) $ mkMethod "takeChildren" np $ objT c_QListQTreeWidgetItem+  , just $ mkConstMethod "text" [intT] (objT c_QString)+  , just $ mkConstMethod "textAlignment" [intT] intT+  , just $ mkConstMethod "toolTip" [intT] $ objT c_QString+  , just $ mkConstMethod "treeWidget" np $ ptrT $ objT c_QTreeWidget+  , just $ mkConstMethod' "type" "getType" np intT+  , just $ mkConstMethod "whatsThis" [intT] $ objT c_QString+  , just $ mkMethod OpLt [refT $ constT $ objT c_QTreeWidgetItem] boolT+  -- TODO void QTreeWidgetItem::write(QDataStream &out) const+  ]+++e_ChildIndicatorPolicy :: CppEnum+e_ChildIndicatorPolicy =+  makeQtEnum+    (ident1 "QTreeWidgetItem" "ChildIndicatorPolicy")+    [includeStd "QTreeWidgetItem"]+    [ "ShowIndicator"+    , "DontShowIndicator"+    , "DontShowIndicatorWhenChildless"+    ]++e_ItemType :: CppEnum+e_ItemType =+  makeQtEnum+    (ident1 "QTreeWidgetItem" "ItemType")+    [includeStd "QTreeWidgetItem"]+    [ "Type"+    , "UserType"+    ]+
+ src/Graphics/UI/Qtah/Generator/Interface/Widgets/QTreeWidgetItem.hs-boot view
@@ -0,0 +1,24 @@+-- This file is part of Qtah.+--+-- Copyright 2015-2019 The Qtah Authors.+--+-- This program 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.QTreeWidgetItem (+  c_QTreeWidgetItem,+  ) where++import Foreign.Hoppy.Generator.Spec (Class)++c_QTreeWidgetItem :: Class
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QVBoxLayout.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,13 +20,13 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,   includeStd,   makeClass,   mkCtor,+  np,   ) import Foreign.Hoppy.Generator.Types (objT, ptrT) import Graphics.UI.Qtah.Generator.Interface.Widgets.QBoxLayout (c_QBoxLayout)@@ -39,12 +39,12 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QVBoxLayout"]-  [ QtExport $ ExportClass c_QVBoxLayout ]+  [ qtExport c_QVBoxLayout ]  c_QVBoxLayout =   addReqIncludes [includeStd "QVBoxLayout"] $   classSetEntityPrefix "" $   makeClass (ident "QVBoxLayout") Nothing [c_QBoxLayout]-  [ mkCtor "new" []+  [ mkCtor "new" np   , mkCtor "newWithParent" [ptrT $ objT c_QWidget]   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QWidget.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -21,7 +21,6 @@   ) where  import Foreign.Hoppy.Generator.Spec (-  Export (ExportClass),   addReqIncludes,   classSetEntityPrefix,   ident,@@ -34,10 +33,12 @@   mkMethod',   mkProp,   mkStaticMethod,+  np,   )-import Foreign.Hoppy.Generator.Types (bitspaceT, boolT, enumT, intT, objT, ptrT, voidT)+import Foreign.Hoppy.Generator.Types (boolT, enumT, intT, objT, ptrT, voidT) import Foreign.Hoppy.Generator.Version (collect, just, test)-import Graphics.UI.Qtah.Generator.Flags (keypadNavigation, qdoc, qtVersion)+import Graphics.UI.Qtah.Generator.Config (keypadNavigation, qdoc, qtVersion)+import Graphics.UI.Qtah.Generator.Flags (flagsT) import Graphics.UI.Qtah.Generator.Interface.Core.QByteArray (c_QByteArray) import Graphics.UI.Qtah.Generator.Interface.Core.QMargins (c_QMargins) import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)@@ -46,16 +47,17 @@ 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,-  bs_WindowStates,   e_ContextMenuPolicy,   e_LayoutDirection,+  fl_WindowFlags,   e_WindowModality,+  fl_WindowStates,   e_WindowType,   qreal,   ) import Graphics.UI.Qtah.Generator.Interface.Core.QPalette (-  e_ColorRole+  c_QPalette,+  e_ColorRole,   ) import Graphics.UI.Qtah.Generator.Interface.Gui.QCursor (c_QCursor) import Graphics.UI.Qtah.Generator.Interface.Gui.QFont (c_QFont)@@ -64,13 +66,14 @@ import Graphics.UI.Qtah.Generator.Interface.Gui.QPainter (c_QPainter) import Graphics.UI.Qtah.Generator.Interface.Gui.QPixmap (c_QPixmap) import Graphics.UI.Qtah.Generator.Interface.Gui.QRegion (c_QRegion)-import Graphics.UI.Qtah.Generator.Interface.Internal.Listener (-  c_ListenerQPoint,-  c_ListenerQString,-  c_ListenerRefConstQIcon,+import {-# SOURCE #-} Graphics.UI.Qtah.Generator.Interface.Internal.Listener (+  listenerQPoint,+  listenerQString,+  listenerRefConstQIcon,   ) import Graphics.UI.Qtah.Generator.Interface.Widgets.QAction (c_QAction) import Graphics.UI.Qtah.Generator.Interface.Widgets.QLayout (c_QLayout)+import Graphics.UI.Qtah.Generator.Interface.Widgets.QSizePolicy (c_QSizePolicy, e_Policy) import Graphics.UI.Qtah.Generator.Module (AModule (AQtModule), makeQtModule) import Graphics.UI.Qtah.Generator.Types @@ -79,7 +82,7 @@ aModule =   AQtModule $   makeQtModule ["Widgets", "QWidget"] $-  QtExport (ExportClass c_QWidget) :+  qtExport c_QWidget :   map QtExportSignal signals  c_QWidget =@@ -87,112 +90,112 @@   classSetEntityPrefix "" $   makeClass (ident "QWidget") Nothing [c_QObject] $   collect-  [ just $ mkCtor "new" []+  [ just $ mkCtor "new" np   , just $ mkCtor "newWithParent" [ptrT $ objT c_QWidget]-  , just $ mkConstMethod "acceptDrops" [] boolT-  , just $ mkConstMethod "accessibleDescription" [] $ objT c_QString-  , just $ mkConstMethod "accessibleName" [] $ objT c_QString+  , just $ mkConstMethod "acceptDrops" np boolT+  , just $ mkConstMethod "accessibleDescription" np $ objT c_QString+  , just $ mkConstMethod "accessibleName" np $ objT c_QString     -- TODO actions-  , just $ mkMethod "activateWindow" [] voidT+  , just $ mkMethod "activateWindow" np voidT   , just $ mkMethod "addAction" [ptrT $ objT c_QAction] voidT     -- TODO addActions-  , just $ mkMethod "adjustSize" [] voidT-  , just $ mkConstMethod "autoFillBackground" [] boolT+  , just $ mkMethod "adjustSize" np voidT+  , just $ mkConstMethod "autoFillBackground" np boolT   , just $ mkProp "backgroundRole" $ enumT e_ColorRole-  , just $ mkConstMethod "baseSize" [] $ objT c_QSize+  , just $ mkConstMethod "baseSize" np $ objT c_QSize   , just $ mkConstMethod' "childAt" "childAtRaw" [intT, intT] $ ptrT $ objT c_QWidget   , just $ mkConstMethod' "childAt" "childAtPoint" [objT c_QPoint] $ ptrT $ objT c_QWidget-  , just $ mkConstMethod "childrenRect" [] $ objT c_QRect+  , just $ mkConstMethod "childrenRect" np $ objT c_QRect     -- TODO childrenRegion-  , just $ mkMethod "clearFocus" [] voidT-  , just $ mkMethod "clearMask" [] voidT-  , just $ mkMethod "close" [] boolT-  , just $ mkConstMethod "contentsMargins" [] $ objT c_QMargins-  , just $ mkConstMethod "contentsRect" [] $ objT c_QRect+  , just $ mkMethod "clearFocus" np voidT+  , just $ mkMethod "clearMask" np voidT+  , just $ mkMethod "close" np boolT+  , just $ mkConstMethod "contentsMargins" np $ objT c_QMargins+  , just $ mkConstMethod "contentsRect" np $ objT c_QRect   , just $ mkProp "contextMenuPolicy" $ enumT e_ContextMenuPolicy   , just $ mkProp "cursor" $ objT c_QCursor     -- TODO effectiveWinId-  , just $ mkConstMethod "ensurePolished" [] voidT+  , just $ mkConstMethod "ensurePolished" np voidT     -- TODO find     -- TODO focusPolicy-  , just $ mkConstMethod "focusProxy" [] $ ptrT $ objT c_QWidget-  , just $ mkConstMethod "focusWidget" [] $ ptrT $ objT c_QWidget+  , just $ mkConstMethod "focusProxy" np $ ptrT $ objT c_QWidget+  , just $ mkConstMethod "focusWidget" np $ ptrT $ objT c_QWidget   , just $ mkProp "font" $ objT c_QFont     -- TODO fontInfo     -- TODO fontMetrics     -- TODO foregroundRole-  , just $ mkConstMethod "frameGeometry" [] $ objT c_QRect-  , just $ mkConstMethod "frameSize" [] $ objT c_QSize-  , just $ mkConstMethod "geometry" [] $ objT c_QRect-  , test (qtVersion >= [5, 0]) $ mkMethod "grab" [] $ objT c_QPixmap+  , just $ mkConstMethod "frameGeometry" np $ objT c_QRect+  , just $ mkConstMethod "frameSize" np $ objT c_QSize+  , just $ mkConstMethod "geometry" np $ objT c_QRect+  , test (qtVersion >= [5, 0]) $ mkMethod "grab" np $ objT c_QPixmap   , test (qtVersion >= [5, 0]) $     mkMethod' "grab" "grabWithRect" [objT c_QRect] $ objT c_QPixmap     -- TODO grabGesture-  , just $ mkMethod "grabKeyboard" [] voidT-  , just $ mkMethod "grabMouse" [] voidT+  , just $ mkMethod "grabKeyboard" np voidT+  , just $ mkMethod "grabMouse" np voidT   , just $ mkMethod' "grabMouse" "grabMouseWithCursor" [objT c_QCursor] voidT     -- TODO grabShortcut     -- TODO graphicsEffect     -- TODO graphicsProxyWidget-  , test keypadNavigation $ mkConstMethod "hasEditFocus" [] boolT-  , just $ mkConstMethod "hasFocus" [] boolT-  , just $ mkConstMethod "hasMouseTracking" [] boolT-  , just $ mkConstMethod "height" [] intT+  , test keypadNavigation $ mkConstMethod "hasEditFocus" np boolT+  , just $ mkConstMethod "hasFocus" np boolT+  , just $ mkConstMethod "hasMouseTracking" np boolT+  , just $ mkConstMethod "height" np intT   , just $ mkConstMethod "heightForWidth" [intT] intT-  , just $ mkMethod "hide" [] voidT+  , just $ mkMethod "hide" np voidT     -- TODO inputContext     -- TODO inputMethodHints     -- TODO inputMethodQuery   , just $ mkMethod "insertAction" [ptrT $ objT c_QAction, ptrT $ objT c_QAction] voidT     -- TODO insertActions-  , just $ mkConstMethod "isActiveWindow" [] boolT+  , just $ mkConstMethod "isActiveWindow" np boolT   , just $ mkConstMethod "isAncestorOf" [ptrT $ objT c_QWidget] boolT-  , just $ mkConstMethod "isEnabled" [] boolT+  , just $ mkConstMethod "isEnabled" np boolT   , just $ mkConstMethod "isEnabledTo" [ptrT $ objT c_QWidget] boolT-  , just $ mkConstMethod "isFullScreen" [] boolT-  , just $ mkConstMethod "isHidden" [] boolT-  , just $ mkConstMethod "isMaximized" [] boolT-  , just $ mkConstMethod "isMinimized" [] boolT-  , just $ mkConstMethod "isModal" [] boolT-  , just $ mkConstMethod "isVisible" [] boolT+  , just $ mkConstMethod "isFullScreen" np boolT+  , just $ mkConstMethod "isHidden" np boolT+  , just $ mkConstMethod "isMaximized" np boolT+  , just $ mkConstMethod "isMinimized" np boolT+  , just $ mkConstMethod "isModal" np boolT+  , just $ mkConstMethod "isVisible" np boolT   , just $ mkConstMethod "isVisibleTo" [ptrT $ objT c_QWidget] boolT-  , just $ mkConstMethod "isWindow" [] boolT-  , just $ mkConstMethod "isWindowModified" [] boolT-  , just $ mkStaticMethod "keyboardGrabber" [] $ ptrT $ objT c_QWidget-  , just $ mkConstMethod "layout" [] $ ptrT $ objT c_QLayout-  , just $ mkConstMethod "layoutDirection" [] $ enumT e_LayoutDirection+  , just $ mkConstMethod "isWindow" np boolT+  , just $ mkConstMethod "isWindowModified" np boolT+  , just $ mkStaticMethod "keyboardGrabber" np $ ptrT $ objT c_QWidget+  , just $ mkConstMethod "layout" np $ ptrT $ objT c_QLayout+  , just $ mkConstMethod "layoutDirection" np $ enumT e_LayoutDirection     -- TODO locale     -- TODO macCGHandle     -- TODO macQDHandle-  , just $ mkMethod "lower" [] voidT+  , just $ mkMethod "lower" np voidT   , just $ mkConstMethod "mapFrom" [ptrT $ objT c_QWidget, objT c_QPoint] $ objT c_QPoint   , just $ mkConstMethod "mapFromGlobal" [objT c_QPoint] $ objT c_QPoint   , just $ mkConstMethod "mapFromParent" [objT c_QPoint] $ objT c_QPoint   , just $ mkConstMethod "mapTo" [ptrT $ objT c_QWidget, objT c_QPoint] $ objT c_QPoint   , just $ mkConstMethod "mapToGlobal" [objT c_QPoint] $ objT c_QPoint   , just $ mkConstMethod "mapToParent" [objT c_QPoint] $ objT c_QPoint-  , just $ mkConstMethod "maximumHeight" [] intT-  , just $ mkConstMethod "maximumSize" [] $ objT c_QSize-  , just $ mkConstMethod "maximumWidth" [] intT-  , just $ mkConstMethod "minimumHeight" [] intT-  , just $ mkConstMethod "minimumSize" [] $ objT c_QSize-  , just $ mkConstMethod "minimumWidth" [] intT-  , just $ mkStaticMethod "mouseGrabber" [] $ ptrT $ objT c_QWidget+  , just $ mkConstMethod "maximumHeight" np intT+  , just $ mkConstMethod "maximumSize" np $ objT c_QSize+  , just $ mkConstMethod "maximumWidth" np intT+  , just $ mkConstMethod "minimumHeight" np intT+  , just $ mkConstMethod "minimumSize" np $ objT c_QSize+  , just $ mkConstMethod "minimumWidth" np intT+  , just $ mkStaticMethod "mouseGrabber" np $ ptrT $ objT c_QWidget   , just $ mkMethod "move" [objT c_QPoint] voidT-  , just $ mkConstMethod "nativeParentWidget" [] $ ptrT $ objT c_QWidget-  , just $ mkConstMethod "nextInFocusChain" [] $ ptrT $ objT c_QWidget-  , just $ mkConstMethod "normalGeometry" [] $ objT c_QRect+  , just $ mkConstMethod "nativeParentWidget" np $ ptrT $ objT c_QWidget+  , just $ mkConstMethod "nextInFocusChain" np $ ptrT $ objT c_QWidget+  , just $ mkConstMethod "normalGeometry" np $ objT c_QRect     -- TODO overrideWindowFlags-    -- TODO palette-  , just $ mkConstMethod "parentWidget" [] $ ptrT $ objT c_QWidget+  , just $ mkProp "palette" $ objT c_QPalette+  , just $ mkConstMethod "parentWidget" np $ ptrT $ objT c_QWidget     -- TODO platformWindow     -- TODO platformWindowFormat-  , just $ mkConstMethod "pos" [] $ objT c_QPoint-  , just $ mkConstMethod "previousInFocusChain" [] $ ptrT $ objT c_QWidget-  , just $ mkMethod "raise" [] voidT-  , just $ mkConstMethod "rect" [] $ objT c_QRect-  , just $ mkMethod "releaseKeyboard" [] voidT-  , just $ mkMethod "releaseMouse" [] voidT+  , just $ mkConstMethod "pos" np $ objT c_QPoint+  , just $ mkConstMethod "previousInFocusChain" np $ ptrT $ objT c_QWidget+  , just $ mkMethod "raise" np voidT+  , just $ mkConstMethod "rect" np $ objT c_QRect+  , just $ mkMethod "releaseKeyboard" np voidT+  , just $ mkMethod "releaseMouse" np voidT     -- TODO releaseShortcut   , just $ mkMethod "removeAction" [ptrT $ objT c_QAction] voidT   , test (qtVersion >= [4, 3]) $@@ -214,14 +217,14 @@       [ptrT $ objT c_QPainter, objT c_QPoint, objT c_QRegion] voidT     -- TODO void render(QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion,     --      RenderFlags renderFlags)-  , just $ mkMethod' "repaint" "repaint" [] voidT+  , just $ mkMethod' "repaint" "repaint" np voidT   , just $ mkMethod' "repaint" "repaintRaw" [intT, intT, intT, intT] voidT   , just $ mkMethod' "repaint" "repaintRect" [objT c_QRect] voidT     -- TODO repaint(const QRegion&)   , just $ mkMethod' "resize" "resize" [objT c_QSize] voidT   , just $ mkMethod' "resize" "resizeRaw" [intT, intT] voidT   , just $ mkMethod "restoreGeometry" [objT c_QByteArray] boolT-  , just $ mkConstMethod "saveGeometry" [] (objT c_QByteArray)+  , just $ mkConstMethod "saveGeometry" np (objT c_QByteArray)   , just $ mkMethod' "scroll" "scrollRaw" [intT, intT] voidT   , just $ mkMethod' "scroll" "scrollRect" [intT, intT, objT c_QRect] voidT   , just $ mkMethod "setAcceptDrops" [boolT] voidT@@ -242,7 +245,7 @@   , just $ mkMethod' "setFixedSize" "setFixedSize" [objT c_QSize] voidT   , just $ mkMethod' "setFixedSize" "setFixedSizeRaw" [intT, intT] voidT   , just $ mkMethod "setFixedWidth" [intT] voidT-  , just $ mkMethod "setFocus" [] voidT+  , just $ mkMethod "setFocus" np voidT     -- TODO setFocus(Qt::FocusReason)     -- TODO setFocusPolicy   , just $ mkMethod "setFocusProxy" [ptrT $ objT c_QWidget] voidT@@ -269,14 +272,14 @@     -- TODO setPalette   , just $ mkMethod' "setParent" "setParent" [ptrT $ objT c_QWidget] voidT   , just $ mkMethod' "setParent" "setParentWithFlags"-    [ptrT $ objT c_QWidget, bitspaceT bs_WindowFlags] voidT+    [ptrT $ objT c_QWidget, flagsT fl_WindowFlags] voidT     -- TODO setPlatformWindow     -- TODO setPlatformWindowFormat     -- TODO setShortcutAutoRepeat     -- TODO setShortcutEnabled   , just $ mkMethod' "setSizeIncrement" "setSizeIncrement" [objT c_QSize] voidT   , just $ mkMethod' "setSizeIncrement" "setSizeIncrementRaw" [intT, intT] voidT-    -- TODO setSizePolicy+  , just $ mkMethod' "setSizePolicy" "setSizePolicyRaw" [enumT e_Policy, enumT e_Policy] voidT   , just $ mkMethod "setStatusTip" [objT c_QString] voidT     -- TODO setStyle   , just $ mkMethod "setStyleSheet" [objT c_QString] voidT@@ -291,58 +294,58 @@   , just $ mkMethod "setWindowRole" [objT c_QString] voidT     -- TODO setWindowSurface   , test qdoc $ mkMethod "setupUi" [ptrT $ objT c_QWidget] voidT-  , just $ mkMethod "show" [] voidT-  , just $ mkMethod "showFullScreen" [] voidT-  , just $ mkMethod "showMaximized" [] voidT-  , just $ mkMethod "showMinimized" [] voidT-  , just $ mkMethod "showNormal" [] voidT-  , just $ mkConstMethod "size" [] $ objT c_QSize-  , just $ mkConstMethod "sizeHint" [] $ objT c_QSize-  , just $ mkConstMethod "sizeIncrement" [] $ objT c_QSize-    -- TODO sizePolicy+  , just $ mkMethod "show" np voidT+  , just $ mkMethod "showFullScreen" np voidT+  , just $ mkMethod "showMaximized" np voidT+  , just $ mkMethod "showMinimized" np voidT+  , just $ mkMethod "showNormal" np voidT+  , just $ mkConstMethod "size" np $ objT c_QSize+  , just $ mkConstMethod "sizeHint" np $ objT c_QSize+  , just $ mkConstMethod "sizeIncrement" np $ objT c_QSize+  , just $ mkProp "sizePolicy" $ objT c_QSizePolicy   , just $ mkMethod "stackUnder" [ptrT $ objT c_QWidget] voidT-  , just $ mkConstMethod "statusTip" [] $ objT c_QString-  , just $ mkConstMethod "styleSheet" [] $ objT c_QString+  , just $ mkConstMethod "statusTip" np $ objT c_QString+  , just $ mkConstMethod "styleSheet" np $ objT c_QString     -- TODO testAttribute-  , just $ mkConstMethod "toolTip" [] $ objT c_QString-  , just $ mkConstMethod "underMouse" [] boolT+  , just $ mkConstMethod "toolTip" np $ objT c_QString+  , just $ mkConstMethod "underMouse" np boolT     -- TODO ungrabGesture-  , just $ mkMethod "unsetCursor" [] voidT-  , just $ mkMethod "unsetLayoutDirection" [] voidT-  , just $ mkMethod "unsetLocale" [] voidT-  , just $ mkMethod' "update" "update" [] voidT+  , just $ mkMethod "unsetCursor" np voidT+  , just $ mkMethod "unsetLayoutDirection" np voidT+  , just $ mkMethod "unsetLocale" np voidT+  , just $ mkMethod' "update" "update" np voidT   , just $ mkMethod' "update" "updateRaw" [intT, intT, intT, intT] voidT   , just $ mkMethod' "update" "updateRect" [objT c_QRect] voidT     -- TODO update(const QRegion&)-  , just $ mkMethod "updateGeometry" [] voidT-  , just $ mkConstMethod "updatesEnabled" [] boolT+  , just $ mkMethod "updateGeometry" np voidT+  , just $ mkConstMethod "updatesEnabled" np boolT     -- TODO visibleRegion-  , just $ mkConstMethod "whatsThis" [] $ objT c_QString-  , just $ mkConstMethod "width" [] intT-  , just $ mkConstMethod "window" [] $ ptrT $ objT c_QWidget-  , just $ mkConstMethod "windowFilePath" [] $ objT c_QString-  , just $ mkProp "windowFlags" $ bitspaceT bs_WindowFlags+  , just $ mkConstMethod "whatsThis" np $ objT c_QString+  , just $ mkConstMethod "width" np intT+  , just $ mkConstMethod "window" np $ ptrT $ objT c_QWidget+  , just $ mkConstMethod "windowFilePath" np $ objT c_QString+  , just $ mkProp "windowFlags" $ flagsT fl_WindowFlags   , just $ mkProp "windowIcon" $ objT c_QIcon   , -- DEPRECATED by 5.7.-    just $ mkConstMethod "windowIconText" [] $ objT c_QString+    just $ mkConstMethod "windowIconText" np $ objT c_QString   , just $ mkProp "windowModality" $ enumT e_WindowModality   , just $ mkProp "windowOpacity" qreal-  , just $ mkConstMethod "windowRole" [] $ objT c_QString+  , just $ mkConstMethod "windowRole" np $ objT c_QString     -- TODO windowSurface-  , just $ mkProp "windowState" $ bitspaceT bs_WindowStates+  , just $ mkProp "windowState" $ flagsT fl_WindowStates   , just $ mkProp "windowTitle" $ objT c_QString-  , test (qtVersion < [5, 0]) $ mkConstMethod "windowType" [] $ enumT e_WindowType+  , test (qtVersion < [5, 0]) $ mkConstMethod "windowType" np $ enumT e_WindowType     -- TODO winId-  , just $ mkConstMethod "x" [] intT+  , just $ mkConstMethod "x" np intT     -- TODO x11Info     -- TODO x11PictureHandle-  , just $ mkConstMethod "y" [] intT+  , just $ mkConstMethod "y" np intT   ]  signals =   collect-  [ just $ makeSignal c_QWidget "customContextMenuRequested" c_ListenerQPoint-  , test (qtVersion >= [5, 0]) $ makeSignal c_QWidget "windowIconChanged" c_ListenerRefConstQIcon+  [ just $ makeSignal c_QWidget "customContextMenuRequested" listenerQPoint+  , test (qtVersion >= [5, 0]) $ makeSignal c_QWidget "windowIconChanged" listenerRefConstQIcon     -- TODO windowIconTextChanged (>=5.0?  Deprecated by 5.7.)-  , test (qtVersion >= [5, 0]) $ makeSignal c_QWidget "windowTitleChangd" c_ListenerQString+  , test (qtVersion >= [5, 0]) $ makeSignal c_QWidget "windowTitleChangd" listenerQString   ]
src/Graphics/UI/Qtah/Generator/Interface/Widgets/QWidget.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,8 +15,6 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with this program.  If not, see <http://www.gnu.org/licenses/>. -{-# LANGUAGE CPP #-}- module Graphics.UI.Qtah.Generator.Module (   AModule (..),   aModuleHoppyModules,@@ -29,23 +27,18 @@   ) where  import Control.Monad (unless)-#if MIN_VERSION_mtl(2,2,1) import Control.Monad.Except (throwError)-#else-import Control.Monad.Error (throwError)-#endif import Data.Char (toLower) import Data.Foldable (forM_) import Data.List (find, intersperse, sort)-import Data.Maybe (isJust, mapMaybe)-#if !MIN_VERSION_base(4,8,0)+import Data.Maybe (isJust) import Data.Monoid (mconcat)-#endif-import Foreign.Hoppy.Generator.Language.Cpp (execChunkWriter, sayType)+import Foreign.Hoppy.Generator.Language.Cpp (chunkContents, execChunkWriter, sayType) import Foreign.Hoppy.Generator.Language.Haskell (   Generator,   HsTypeSide (HsHsSide),   addExport,+  addExport',   addExports,   addExtension,   addImports,@@ -60,33 +53,23 @@   prettyPrint,   sayLn,   saysLn,-  toHsBitspaceClassName',-  toHsBitspaceToNumName',-  toHsBitspaceTypeName',-  toHsBitspaceValueName',-  toHsCastMethodName',-  toHsDataTypeName',-  toHsDownCastMethodName',-  toHsEnumTypeName',   toHsFnName',-  toHsPtrClassName',-  toHsValueClassName',   ) import Foreign.Hoppy.Generator.Spec (   Class,   Constness (Const, Nonconst),   Ctor,-  Export (ExportBitspace, ExportCallback, ExportClass, ExportEnum, ExportFn, ExportVariable),   ExtName,   FnName (FnName),+  ForeignLanguage (Haskell),   Function,   Method,   MethodImpl (RealMethod),   Module,-  Type (Internal_TCallback),+  Type,   addAddendumHaskell,-  bitspaceValueNames,   callbackParams,+  castExport,   classCtors,   classEntityForeignName,   classExtName,@@ -94,7 +77,7 @@   classHaskellConversionToCppFn,   classMethods,   ctorExtName,-  ctorParams,+  enumValueMapNames,   fnExtName,   fromExtName,   getPrimaryExtName,@@ -107,23 +90,41 @@   moduleAddExports,   moduleAddHaskellName,   moduleModify',+  parameterType,   varGetterExtName,   varIsConst,   varSetterExtName,   )+import Foreign.Hoppy.Generator.Spec.Callback (callbackT)+import Foreign.Hoppy.Generator.Spec.Class (+  toHsCastMethodName',+  toHsDataTypeName',+  toHsDownCastMethodName',+  toHsPtrClassName',+  toHsValueClassName',+  )+import Foreign.Hoppy.Generator.Spec.Enum (enumGetOverriddenEntryName, enumValues, toHsEnumTypeName') import Foreign.Hoppy.Generator.Types (objT)-import Graphics.UI.Qtah.Generator.Flags (Version, qrealFloat, qtVersion)+import Graphics.UI.Qtah.Generator.Config (Version, qrealFloat, qtVersion) import Graphics.UI.Qtah.Generator.Common (fromMaybeM)+import Graphics.UI.Qtah.Generator.Flags (+  flagsEnum,+  toHsFlagsBindingName',+  toHsFlagsTypeName',+  toHsFlagsTypeclassName',+  ) import Graphics.UI.Qtah.Generator.Types (-  QtExport (QtExport,-            QtExportEvent,-            QtExportSceneEvent,-            QtExportFnRenamed,-            QtExportSignal,-            QtExportSpecials-           ),+  QtExport (+    QtExport,+    QtExportEvent,+    QtExportFnRenamed,+    QtExportSceneEvent,+    QtExportSignal,+    QtExportSpecials+  ),   Signal,-  qtExportToExport,+  qtExportToExports,+  signalCallback,   signalClass,   signalCName,   signalHaskellName,@@ -171,7 +172,7 @@                       (concat ["b_", lowerName, ".hpp"])                       (concat ["b_", lowerName, ".cpp"])) $ do          moduleAddHaskellName $ "Generated" : modulePath-         moduleAddExports $ mapMaybe qtExportToExport qtExports+         moduleAddExports $ concatMap qtExportToExports qtExports      , qtModuleHoppyWrapper =        addAddendumHaskell (sayWrapperModule modulePath qtExports) $        moduleModify' (makeModule (lowerName ++ "wrap")@@ -198,7 +199,7 @@   addImports $ hsImports "Prelude" []    -- Import the underlying Hoppy module wholesale.-  case mapMaybe qtExportToExport qtExports of+  case concatMap qtExportToExports qtExports of     [] -> return ()     export:_ -> importWholeModuleForExtName $ getPrimaryExtName export @@ -282,32 +283,12 @@  sayQtExport :: [String] -> QtExport -> Generator () sayQtExport path qtExport = case qtExport of-  QtExport (ExportVariable v) -> do-    addExport $ toHsFnName' $ varGetterExtName v-    unless (varIsConst v) $ addExport $ toHsFnName' $ varSetterExtName v--  QtExport (ExportEnum e) -> do-    let spec = toHsEnumTypeName' e ++ " (..)"-    addExport spec--  QtExport (ExportBitspace b) -> do-    addExport $ toHsBitspaceTypeName' b-    addExport $ toHsBitspaceToNumName' b-    addExport $ toHsBitspaceClassName' b ++ " (..)"-    forM_ (bitspaceValueNames b) $ \(_, valueName) ->-      addExport $ toHsBitspaceValueName' b valueName--  QtExport (ExportFn fn) -> do-    addExport $ getFnReexportName fn+  QtExport export -> doExport export    QtExportFnRenamed fn rename -> do     addExport rename     sayBind rename $ getFnImportName fn -  QtExport (ExportCallback _) -> return ()--  QtExport (ExportClass cls) -> sayExportClass cls-   QtExportSignal sig -> sayExportSignal sig    QtExportEvent cls -> do@@ -330,6 +311,42 @@     ln     saysLn ["type QReal = ", if qrealFloat then "QtahP.Float" else "QtahP.Double"] +  where doExport export = case castExport export of+          Just c -> doExportClass c+          Nothing -> case castExport export of+            Just e -> doExportEnum e+            Nothing -> case castExport export of+              Just flags -> doExportFlags flags+              Nothing -> case castExport export of+                Just f -> doExportFunction f+                Nothing -> case castExport export of+                  Just v -> doExportVariable v+                  Nothing -> return ()++        doExportClass cls = sayExportClass cls++        doExportEnum e = do+          let spec = toHsEnumTypeName' e ++ " (..)"+          addExport spec++        doExportFlags flags = do+          let enum = flagsEnum flags+              typeName = toHsFlagsTypeName' flags+              typeclassName = toHsFlagsTypeclassName' flags+          -- Re-export the data type and typeclass.+          addExport typeName+          addExport' typeclassName+          -- Re-export the entries' bindings.+          forM_ (enumValueMapNames $ enumValues enum) $ \words -> do+            let words' = enumGetOverriddenEntryName Haskell enum words+            addExport $ toHsFlagsBindingName' flags words'++        doExportFunction f = addExport $ getFnReexportName f++        doExportVariable v = do+          addExport $ toHsFnName' $ varGetterExtName v+          unless (varIsConst v) $ addExport $ toHsFnName' $ varSetterExtName v+ sayExportClass :: Class -> Generator () sayExportClass cls = do   addExports $@@ -365,8 +382,6 @@ -- scratch in this module, rather than reexporting it from somewhere else. sayExportSignal :: Signal -> Generator () sayExportSignal signal = inFunction "sayExportSignal" $ do-  addImports importForSignal-   let name = signalCName signal       cls = signalClass signal       ptrClassName = toHsPtrClassName' Nonconst cls@@ -375,26 +390,25 @@    let listenerClass = signalListenerClass signal   importWholeModuleForExtName $ classExtName listenerClass+   -- Find the listener constructor that only takes a callback.   listenerCtor <-     fromMaybeM (throwError $ concat                 ["Couldn't find an appropriate ",                 show (fromExtName $ classExtName listenerClass),                 " constructor for signal ", show name]) $-    flip find (classCtors listenerClass) $ \ctor -> case ctorParams ctor of-      [Internal_TCallback {}] -> True-      _ -> False-  let [callbackType@(Internal_TCallback callback)] = ctorParams listenerCtor-      paramTypes = callbackParams callback+    flip find (classCtors listenerClass) $ \ctor -> fromExtName (ctorExtName ctor) == "new"+  let callback = signalCallback signal+      paramTypes = map parameterType $ callbackParams callback -  -- Also find the 'connectListener' method.-  listenerConnectMethod <-+  -- Also find the 'isValid' method.+  isValidMethod <-     fromMaybeM (throwError $ concat-                ["Couldn't find the connectListener method in ",+                ["Couldn't find the isValid method in ",                  show listenerClass, " for signal ", show name]) $-    find ((RealMethod (FnName "connectListener") ==) . methodImpl) $ classMethods listenerClass+    find ((RealMethod (FnName "isValid") ==) . methodImpl) $ classMethods listenerClass -  callbackHsType <- cppTypeToHsTypeAndUse HsHsSide callbackType+  callbackHsType <- cppTypeToHsTypeAndUse HsHsSide $ callbackT callback    let varType = HsQualType [(UnQual $ HsIdent ptrClassName, [HsTyVar $ HsIdent "object"])] $                 HsTyApp (HsTyApp (HsTyCon $ UnQual $ HsIdent "QtahSignal.Signal") $@@ -408,6 +422,11 @@                      , fromExtName $ classExtName listenerClass                      , ")"                      ]++  addImports $ mconcat [hsImports "Prelude" ["($)", "(>>)"],+                        importForPrelude,+                        importForRuntime,+                        importForSignal]   ln   saysLn [varName, " :: ", prettyPrint varType]   saysLn [varName, " = QtahSignal.Signal"]@@ -415,9 +434,17 @@     sayLn "{ QtahSignal.internalConnectSignal = \\object' fn' -> do"     indent $ do       saysLn ["listener' <- ",-              toHsFnName' $ classEntityForeignName listenerClass listenerCtor, " fn'"]-      saysLn [toHsFnName' $ classEntityForeignName listenerClass listenerConnectMethod,-              " listener' object' ", show (toSignalConnectName signal paramTypes)]+              toHsFnName' $ classEntityForeignName listenerClass listenerCtor,+              " object' ",+              show (toSignalConnectName signal paramTypes),+              " fn'"]+      saysLn ["valid' <- ",+              toHsFnName' $ classEntityForeignName listenerClass isValidMethod,+              " listener'"]+      sayLn "if valid'"+      indent $ do+        sayLn "then QtahP.fmap QtahP.Just $ QtahSignal.internalMakeConnection listener'"+        sayLn "else QtahFHR.delete listener' >> QtahP.return QtahP.Nothing"     saysLn [", QtahSignal.internalName = ", show internalName]     sayLn "}" @@ -433,7 +460,7 @@   "2" :  -- This is a magic code added by the SIGNAL() macro.   signalCName signal :   "(" :-  intersperse "," (map (execChunkWriter . sayType Nothing) paramTypes) +++  intersperse "," (map (chunkContents . execChunkWriter . sayType Nothing) paramTypes) ++   [")"]  importWholeModuleForExtName :: ExtName -> Generator ()
src/Graphics/UI/Qtah/Generator/Types.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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,35 +17,42 @@  module Graphics.UI.Qtah.Generator.Types (   QtExport (..),-  qtExportToExport,+  qtExport,+  qtExportToExports,   makeQtEnum,-  makeQtEnumBitspace,+  makeQtEnum',+  makeQtEnumAndFlags,+  makeQtEnumAndFlags',+  makeQtEnumAndFlagsWithOverrides,+  ListenerInfo (ListenerInfo),   Signal, makeSignal, makeSignal',-  signalCName, signalHaskellName, signalClass, signalListenerClass,+  signalCName, signalHaskellName, signalClass, signalListenerClass, signalCallback,   ) where +import qualified Data.Set as S import Foreign.Hoppy.Generator.Spec (-  Bitspace,+  Callback,   Class,   CppEnum,-  Export (ExportClass, ExportFn),+  Scoped (Unscoped),+  Export (Export),+  Exportable,+  ForeignLanguage (Haskell),   Function,   Identifier,   Include,   addReqIncludes,-  bitspaceAddCppType,-  bitspaceAddEnum,-  bitspaceSetValuePrefix,+  enumAddEntryNameOverrides,+  enumSetHasBitOperations,+  enumSetUnknownValueEntry,   enumSetValuePrefix,   identifierParts,-  identT,   idPartBase,-  includeStd,-  makeBitspace,-  makeEnum,+  makeAutoEnum,   toExtName,+  toExport,   )-import Foreign.Hoppy.Generator.Types (enumT, intT)+import Graphics.UI.Qtah.Generator.Flags (Flags, makeFlags)  data QtExport =   QtExport Export@@ -57,45 +64,81 @@     -- ^ This is a special value that is exported exactly once, and generates     -- some bindings that need special logic. -qtExportToExport :: QtExport -> Maybe Export-qtExportToExport qtExport = case qtExport of-  QtExport export -> Just export-  QtExportFnRenamed fn _ -> Just $ ExportFn fn-  QtExportSignal {} -> Nothing-  QtExportEvent cls -> Just $ ExportClass cls-  QtExportSceneEvent cls -> Just $ ExportClass cls-  QtExportSpecials -> Nothing+qtExport :: Exportable a => a -> QtExport+qtExport = QtExport . toExport +qtExportToExports :: QtExport -> [Export]+qtExportToExports qtExport = case qtExport of+  QtExport export -> [export]+  QtExportFnRenamed fn _ -> [Export fn]+  QtExportSignal {} -> []+  QtExportEvent cls -> [Export cls]+  QtExportSceneEvent cls -> [Export cls]+  QtExportSpecials -> []+ -- | Creates a 'CppEnum' whose 'ExtName' is the concatenation of all part of its -- 'Identifier'.  This should be used for all Qt enums.-makeQtEnum :: Identifier -> [Include] -> [(Int, [String])] -> CppEnum-makeQtEnum identifier includes valueNames =+makeQtEnum :: Identifier -> [Include] -> [String] -> CppEnum+makeQtEnum identifier includes names =+  makeQtEnum' identifier+              Unscoped  -- Most Qt enums are unscoped.+              includes+              names++-- | Creates a 'CppEnum' like 'makeQtEnum' does, but also takes a boolean+-- parameter indicating whether the enum is scoped.+makeQtEnum' :: Identifier -> Scoped -> [Include] -> [String] -> CppEnum+makeQtEnum' identifier scoped includes names =   addReqIncludes includes $   enumSetValuePrefix "" $-  makeEnum identifier-           (Just $ toExtName $ concat $ map idPartBase $ identifierParts identifier)-           valueNames+  enumSetUnknownValueEntry ("Unknown" ++ niceName) $+  enumSetHasBitOperations False $+  addEntryOverrides $+  makeAutoEnum identifier+               (Just $ toExtName niceName)+               scoped+               names+  where niceName = concatMap idPartBase $ identifierParts identifier+        addEntryOverrides = enumAddEntryNameOverrides Haskell applicableOverrides+        applicableOverrides = filter (\(from, _) -> S.member from nameSet) enumNameOverrides+        nameSet = S.fromList names --- | Creates an (enum, bitspace) pair with the same values and similar names,--- and whose enum values can be converted to bitspace values.-makeQtEnumBitspace :: Identifier -> String -> [Include] -> [(Int, [String])] -> (CppEnum, Bitspace)-makeQtEnumBitspace identifier bitspaceName includes valueNames =-  let enum = makeQtEnum identifier includes valueNames-      bitspaceExtName = toExtName $ concat $-                        replaceLast bitspaceName $-                        map idPartBase (identifierParts identifier)-  in (enum,-      addReqIncludes (includeStd "QFlag" : includeStd "QFlags" : includes) $-      bitspaceAddCppType (identT "QFlags" [enumT enum])-                         (Just "QFlag")-                         (Just "int") $-      bitspaceAddEnum enum $-      bitspaceSetValuePrefix "" $-      makeBitspace bitspaceExtName intT valueNames)-  where replaceLast _ [] = []-        replaceLast y [_] = [y]-        replaceLast y (x:xs) = x:replaceLast y xs+-- | Creates a 'CppEnum' and 'Flags' pair, with the same entries and related+-- names.+makeQtEnumAndFlags :: Identifier -> String -> [Include] -> [String] -> (CppEnum, Flags)+makeQtEnumAndFlags enumIdentifier flagsName includes names =+  let enum = makeQtEnum enumIdentifier includes names+      flags = makeFlags enum flagsName+  in (enum, flags) +-- | Creates a 'CppEnum' and 'Flags' pair like 'makeQtEnumAndFlags' does, but+-- also takes a boolean parameter indicating whether the enum is scoped.+makeQtEnumAndFlags' :: Identifier -> String -> Scoped -> [Include] -> [String] -> (CppEnum, Flags)+makeQtEnumAndFlags' enumIdentifier flagsName scoped includes names =+  let enum = makeQtEnum' enumIdentifier scoped includes names+      flags = makeFlags enum flagsName+  in (enum, flags)++-- | This version of 'makeQtEnumAndFlags' accepts entry name overrides, which is+-- useful because flag bindings can conflict with method names (they're both+-- Haskell identifiers starting with lower-case letters).+makeQtEnumAndFlagsWithOverrides ::+  Identifier -> String -> [Include] -> [String] -> [(String, String)] -> (CppEnum, Flags)+makeQtEnumAndFlagsWithOverrides enumIdentifier flagsName includes names nameOverrides =+  let enum = enumAddEntryNameOverrides Haskell nameOverrides $+             makeQtEnum enumIdentifier includes names+      flags = makeFlags enum flagsName+  in (enum, flags)++-- | Global enum entry name overrides.  These are applied to all enum entries,+-- to handle the cases where they overlap with Haskell keywords.+--+-- TODO Fill these out based on enums we're defined so far.+enumNameOverrides :: [(String, String)]+enumNameOverrides =+  [ ("Type", "Typ")+  ]+ -- | Specification for a signal in the Qt signals and slots framework. data Signal = Signal   { signalClass :: Class@@ -107,17 +150,23 @@     -- as the C name.   , signalListenerClass :: Class     -- ^ An appropriately typed listener class.+  , signalCallback :: Callback+    -- ^ The callback type used by the listener.   } +data ListenerInfo = ListenerInfo Class Callback+ makeSignal :: Class  -- ^ 'signalClass'            -> String  -- ^ 'signalCName'-           -> Class  -- ^ 'signalListenerClass'+           -> ListenerInfo  -- ^ 'signalListenerClass' and 'signalCallback'.            -> Signal-makeSignal cls cName = Signal cls cName cName+makeSignal cls cName (ListenerInfo listenerClass callback) =+  Signal cls cName cName listenerClass callback  makeSignal' :: Class  -- ^ 'signalClass'             -> String  -- ^ 'signalCName'             -> String  -- ^ 'signalHaskellName'-            -> Class  -- ^ 'signalListenerClass'+            -> ListenerInfo  -- ^ 'signalListenerClass' and 'signalCallback'.             -> Signal-makeSignal' = Signal+makeSignal' cls cName hsName (ListenerInfo listenerClass callback) =+  Signal cls cName hsName listenerClass callback
src/Main.hs view
@@ -1,6 +1,6 @@ -- This file is part of Qtah. ----- Copyright 2015-2018 The Qtah Authors.+-- Copyright 2015-2019 The Qtah Authors. -- -- This program 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 Main where +import Control.Monad (when) import Data.List (intercalate) import Foreign.Hoppy.Generator.Main (run) import Foreign.Hoppy.Generator.Spec (@@ -29,7 +30,8 @@   moduleSetHppPath,   ) import qualified Foreign.Hoppy.Generator.Std as Std-import Graphics.UI.Qtah.Generator.Flags (qmakeArguments, qmakeExecutable, qtVersion)+import Graphics.UI.Qtah.Generator.Enum (installEnumCalculator)+import Graphics.UI.Qtah.Generator.Config (qmakeArguments, qmakeExecutable, qtVersion) import Graphics.UI.Qtah.Generator.Module import qualified Graphics.UI.Qtah.Generator.Interface.Core as Core import qualified Graphics.UI.Qtah.Generator.Interface.Gui as Gui@@ -42,6 +44,7 @@   takeDirectory,   takeFileName,   )+import System.IO (hPutStrLn, stderr)  mod_std :: Module mod_std = moduleModify' Std.mod_std $ do@@ -61,6 +64,7 @@  interfaceResult :: Either String Interface interfaceResult =+  fmap installEnumCalculator $   interfaceAddHaskellModuleBase ["Graphics", "UI", "Qtah"] =<<   interface "qtah" (concatMap aModuleHoppyModules modules) @@ -71,6 +75,12 @@       putStrLn $ "Error initializing interface: " ++ errorMsg       exitFailure     Right iface -> do+      -- If building against Qt 4, then warn that it is no longer supported.+      when (qtVersion < [5, 0]) $ do+        hPutStrLn stderr $+          "WARNING: Qtah no longer supports Qt 4.x.  Please upgrade to Qt 5.  Found version " +++          intercalate "." (map show qtVersion) ++ "."+       args <- getArgs       case args of         ["--qt-version"] -> putStrLn $ intercalate "." $ map show qtVersion