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

Copyright(c) Marcin Mrotek, 2015
LicenseBSD3
Maintainermarcin.jan.mrotek@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010
Extensions
  • ScopedTypeVariables
  • PolyKinds
  • DefaultSignatures
  • TypeSynonymInstances
  • FlexibleContexts
  • FlexibleInstances
  • KindSignatures
  • TypeOperators
  • ExplicitNamespaces
  • ExplicitForAll

Graphics.QML.DataModel.Internal.Generic.Get

Description

Indexing data types by columns.

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 GQtTable f where Source

A generic implementation of QtTable.

Methods

gGetColumn :: Int -> f a -> IO QtVariant Source

Instances

QtField t => GQtTable * (K1 i t) Source

If only one value is available, it's returned regardless of the index.

(GCountFields (* -> *) a, GCountFields (* -> *) b, GQtTable * a, GQtTable * b) => GQtTable * ((:*:) a b) Source

One branch of a product type is chosen depending on the index.

GQtTable * f => GQtTable * (M1 i t f) Source

Meta information is skipped, and the recursion proceeds further down.

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.