hsqml-datamodel-0.2.0.2: HsQML (Qt5) data model.

Safe HaskellNone
LanguageHaskell2010

Graphics.QML.DataModel.Generic

Synopsis

Documentation

class QtTable t where Source

A class of types with columns that can be indexed by an integer. A generic implementation is provided for all single constructor types.

Minimal complete definition

Nothing

Methods

getColumn :: Int -> t -> IO QtVariant Source

class QtField t where Source

A class of types with columns that can be cast to a QtVariant.

Methods

qtField :: t -> IO QtVariant Source

Instances

QtField Bool Source 
QtField Double Source 
QtField Int Source 
QtField Integer Source

Integers are marshalled through QT strings rather than ints.

QtField String Source 
QtField Natural Source

Naturals are marshalled through QT strings rather than ints.

QtField Text Source 
QtField t => QtField (Maybe t) Source

Nothing is marshalled as QT null.

class CountFields t where Source

A class of types that have a specific number of fields. Generic implementation is provided for all purely product types.

Minimal complete definition

Nothing

Methods

countFields :: proxy t -> Int Source

class SetupColumns t where Source

A class of types that can provide a template to setup the QT HaskellModel. A generic implementation is provided for all proxyle constructor types.

Minimal complete definition

Nothing

Methods

setupColumns :: HmDelegateHandle -> proxy t -> IO () Source

data ColumnIndexException Source

Exception thrown when QML tries to acces a column that is not available. Shouldn't really happen.

Constructors

ColumnIndexNegative Int

QML called for a negative column index.

ColumnIndexOutOfBounds Int Int

QML called for a column index that is too high.