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
ZblTableCell.h
Go to the documentation of this file.
1 /*
2  * Zuble - A run-time system for QML/Javascript applications
3  * Copyright (C) 2015 Bob Dinitto
4  *
5  * Filename: ZblTableCell.h
6  * Created on: 3/16/2015
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 ZBLTABLECELL_H
26 #define ZBLTABLECELL_H
27 
28 //#include "ZblTableData.h"
29 
30 #include <QList>
31 #include <QVariant>
32 
33 namespace Zbl
34 {
35 
36 class ZblTableData;
37 
48 {
49 public:
50 
51  typedef QList<QList<ZblTableCell*> > zTableCells;
52 
57  ZblTableCell();
58 
69 
75  ~ZblTableCell();
76 
77 
78  ZblTableCell* getCell(int row, int col) const;
79 
80  void putCell(int row, int col, ZblTableCell* cell);
81 
82  bool hasCell(int row, int col) const;
83 
84  bool hasChildCells() const;
85 
86  ZblTableData& data();
87 
88  const ZblTableData& constData() const;
89 
90  void setData(ZblTableData* data);
91 
92 private:
93 
100 
106  zTableCells* m_childCells;
107 
117 };
118 
119 } //Zbl
120 
121 #endif // ZBLTABLECELL_H
ZblTableCell * getCell(int row, int col) const
void putCell(int row, int col, ZblTableCell *cell)
ZblTableData * m_childData
A three dimensional array of child cell data. Dimensions of the array are role, row and column...
Definition: ZblTableCell.h:116
ZblTableCell()
Constructs a ZblTableCell object encapsulating a default constructed ZblTableData object...
bool hasChildCells() const
ZblTableData & data()
void setData(ZblTableData *data)
zTableCells * m_childCells
A two dimensional array of child cells. NULL if this cell has no grandchildren.
Definition: ZblTableCell.h:106
Definition: ZAndGate.cpp:6
A table data object contains the role data and model item flags for a 2 dimensional array of model da...
Definition: ZblTableData.h:51
QList< QList< ZblTableCell * > > zTableCells
Definition: ZblTableCell.h:51
A table cell object contains the data for its child cells and maintains the cell&#39;s positional relatio...
Definition: ZblTableCell.h:47
const ZblTableData & constData() const
bool hasCell(int row, int col) const
~ZblTableCell()
Destroys encapsulated child data and cell objects if they exist.
ZblTableCell * m_parent
Parent cell of this cell. All cells have a parent except the top cell in the table cell hierarchy...
Definition: ZblTableCell.h:99