WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. Zuble QML Types   |  Zuble C++ Classes   |  Zuble Overview
Zuble  0.1
Zuble Framework C++/QML extension API
ZTableColumnList.h
Go to the documentation of this file.
1 /*
2  * Zuble - A run-time system for QML/Javascript applications
3  * Copyright (C) 2016 Bob Dinitto
4  *
5  * Filename:
6  * Created on: 2/29/2016
7  * Author: Bob Dinitto
8  *
9  * Zuble is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  */
24 
25 #ifndef ZTABLECOLUMNLIST_H
26 #define ZTABLECOLUMNLIST_H
27 
28 #include <QObject>
29 #include <QQmlListProperty>
30 #include "ZTableColumn.h"
31 
32 namespace Zbl {
33 
40 class ZTableColumnList : public QObject
41 {
42  Q_OBJECT
43  Q_CLASSINFO("DefaultProperty", "items")
44 public:
45  explicit ZTableColumnList(QObject *parent = 0);
46 
47  Q_PROPERTY(QQmlListProperty<Zbl::ZTableColumn> items READ getColumns)
48 
49  QQmlListProperty<Zbl::ZTableColumn> getColumns();
50 
54  static void registerType();
55 
56 
57 protected:
58 
59  static void append(QQmlListProperty<ZTableColumn> *list, ZTableColumn *column);
60  static ZTableColumn* at(QQmlListProperty<ZTableColumn> *list, int index);
61  static void clear(QQmlListProperty<ZTableColumn> *list);
62  static int count(QQmlListProperty<ZTableColumn> *list);
63 
64  QList<ZTableColumn*> m_columns;
65 
66 signals:
67 
68 public slots:
69 
70 };
71 
72 } // Zbl
73 
74 #endif // ZTABLECOLUMNLIST_H
QQmlListProperty< Zbl::ZTableColumn > getColumns()
ZTableColumnList(QObject *parent=0)
QList< ZTableColumn * > m_columns
static void registerType()
Registers ZTableColumnList as a QML type.
static void append(QQmlListProperty< ZTableColumn > *list, ZTableColumn *column)
static ZTableColumn * at(QQmlListProperty< ZTableColumn > *list, int index)
Definition: ZAndGate.cpp:6
static void clear(QQmlListProperty< ZTableColumn > *list)
Defines a column in a ZTableView.
Definition: ZTableColumn.h:38
QQmlListProperty< Zbl::ZTableColumn > items
Defines columns in a ZTableView.
static int count(QQmlListProperty< ZTableColumn > *list)