add QFileSystemModel to qtah
just a try and simple implementation, in case somebody need it!
module Graphics.UI.Qtah.Generator.Interface.Core.QFileSystemModel (
aModule,
c_QFileSystemModel,
) where
import Foreign.Hoppy.Generator.Spec (
Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
mkCtor,
mkProp,
mkMethod,
)
import Foreign.Hoppy.Generator.Types (objT, ptrT)
import Graphics.UI.Qtah.Generator.Interface.Core.QAbstractItemModel (c_QAbstractItemModel)
import Graphics.UI.Qtah.Generator.Interface.Core.QObject (c_QObject)
import Graphics.UI.Qtah.Generator.Interface.Core.QStringList (c_QStringList)
import Graphics.UI.Qtah.Generator.Interface.Core.QString (c_QString)
import Graphics.UI.Qtah.Generator.Interface.Core.QModelIndex (c_QModelIndex)
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", "QFileSystemModel"] $
[ QtExport $ ExportClass c_QFileSystemModel ]
c_QFileSystemModel =
addReqIncludes [includeStd "QFileSystemModel"] $
classSetEntityPrefix "" $
makeClass (ident "QFileSystemModel") Nothing [c_QAbstractItemModel]
[ mkCtor "new" []
, mkCtor "newWithParent" [ptrT $ objT c_QObject]
-- QModelIndex setRootPath(const QString &newPath)
, mkMethod "setRootPath" [objT c_QString] $ objT c_QModelIndex
]
then in core.hs
add import qualified Graphics.UI.Qtah.Generator.Interface.Core.QFileSystemModel as QFileSystemModel
add , QFileSystemModel.aModule
to modules array