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
ZTableColumn.cpp
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 #include "ZTableColumn.h"
26 #include <QtQml>
27 
28 namespace Zbl
29 {
30 
31 ZTableColumn::ZTableColumn(QObject *parent) :
32  QObject(parent),
33  m_width(100),
34  m_type(0),
35  m_visible(true)
36 {
37 
38 }
39 
41 {
42  qmlRegisterType<ZTableColumn>("org.zuble.qml", 1, 0, "ZTableColumn");
43 }
44 
45 
46 
48 {
49  return m_role;
50 }
51 
52 void ZTableColumn::putRole(const QString& role)
53 {
54  m_role = role;
55 }
56 
58 {
59  return m_label;
60 }
61 
62 void ZTableColumn::putLabel(const QString& label)
63 {
64  m_label = label;
65 }
66 
68 {
69  return m_width;
70 }
71 
73 {
74  m_width = width;
75 }
76 
78 {
79  return m_type;
80 }
81 
83 {
84  m_type = width;
85 }
86 
88 {
89  return m_visible;
90 }
91 
93 {
95 }
96 
97 
98 
99 
100 } // Zbl
void putRole(const QString &role)
void putVisible(bool visible)
void putWidth(int width)
Definition: ZAndGate.cpp:6
static void registerType()
Registers ZTableColumn as a QML type.
ZTableColumn(QObject *parent=0)
void putLabel(const QString &label)
void putType(int width)
QString label
Text to display in the column header.
Definition: ZTableColumn.h:56
QString role
Role name of the data to display in this column.
Definition: ZTableColumn.h:50