summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativepositioners_p.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-04-15 03:34:07 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-04-15 03:34:07 (GMT)
commit451f1f33fa65ba213b1585592225c358f124146a (patch)
tree6f24ff4af2bcd42bbc6f4f10254e7a4182484127 /src/declarative/graphicsitems/qdeclarativepositioners_p.h
parentc0eb81664f2bae225dcaca897c23564d6f97a3d1 (diff)
downloadQt-451f1f33fa65ba213b1585592225c358f124146a.zip
Qt-451f1f33fa65ba213b1585592225c358f124146a.tar.gz
Qt-451f1f33fa65ba213b1585592225c358f124146a.tar.bz2
Add flow property to Grid, adding TopToBottom mode.
Task-number: QTBUG-9183
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativepositioners_p.h')
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners_p.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
index c4414d1..24b65fa 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
@@ -138,25 +138,34 @@ class Q_DECLARATIVE_EXPORT QDeclarativeGrid : public QDeclarativeBasePositioner
Q_OBJECT
Q_PROPERTY(int rows READ rows WRITE setRows NOTIFY rowChanged)
Q_PROPERTY(int columns READ columns WRITE setColumns NOTIFY columnsChanged)
+ Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged)
+
public:
QDeclarativeGrid(QDeclarativeItem *parent=0);
- int rows() const {return _rows;}
+ int rows() const {return m_rows;}
void setRows(const int rows);
- int columns() const {return _columns;}
+ int columns() const {return m_columns;}
void setColumns(const int columns);
+ Q_ENUMS(Flow)
+ enum Flow { LeftToRight, TopToBottom };
+ Flow flow() const;
+ void setFlow(Flow);
+
Q_SIGNALS:
void rowsChanged();
void columnsChanged();
+ void flowChanged();
protected:
virtual void doPositioning(QSizeF *contentSize);
private:
- int _rows;
- int _columns;
+ int m_rows;
+ int m_columns;
+ Flow m_flow;
Q_DISABLE_COPY(QDeclarativeGrid)
};