diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2011-02-10 22:35:31 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-02-10 22:35:31 (GMT) |
commit | ca13ba801144763b1ca7c39b2ef8594de94e2d3e (patch) | |
tree | 7600e31df6ce715a5bc28c0c97983bac9484c7cb /src/declarative/graphicsitems/qdeclarativepositioners_p.h | |
parent | ab38731fe5dcfaa1a7a70bc290a8856b5b01524d (diff) | |
parent | ec20a6da3edea3031f1705c3b13e24dc2c7c6de5 (diff) | |
download | Qt-ca13ba801144763b1ca7c39b2ef8594de94e2d3e.zip Qt-ca13ba801144763b1ca7c39b2ef8594de94e2d3e.tar.gz Qt-ca13ba801144763b1ca7c39b2ef8594de94e2d3e.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into HEAD
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativepositioners_p.h')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepositioners_p.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p.h index 9efbeb9..55d8fa1 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners_p.h +++ b/src/declarative/graphicsitems/qdeclarativepositioners_p.h @@ -42,7 +42,7 @@ #ifndef QDECLARATIVELAYOUTS_H #define QDECLARATIVELAYOUTS_H -#include "qdeclarativeitem.h" +#include "qdeclarativeimplicitsizeitem_p.h" #include <private/qdeclarativestate_p.h> #include <private/qpodvector_p.h> @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeBasePositionerPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBasePositioner : public QDeclarativeItem +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBasePositioner : public QDeclarativeImplicitSizeItem { Q_OBJECT @@ -129,12 +129,21 @@ private: class Q_AUTOTEST_EXPORT QDeclarativeRow: public QDeclarativeBasePositioner { Q_OBJECT + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged REVISION 1) public: QDeclarativeRow(QDeclarativeItem *parent=0); + + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection (Qt::LayoutDirection); + +Q_SIGNALS: + Q_REVISION(1) void layoutDirectionChanged(); + protected: virtual void doPositioning(QSizeF *contentSize); virtual void reportConflictingAnchors(); private: + Qt::LayoutDirection m_layoutDirection; Q_DISABLE_COPY(QDeclarativeRow) }; @@ -144,6 +153,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeGrid : public QDeclarativeBasePositioner Q_PROPERTY(int rows READ rows WRITE setRows NOTIFY rowsChanged) Q_PROPERTY(int columns READ columns WRITE setColumns NOTIFY columnsChanged) Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged) + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged REVISION 1) public: QDeclarativeGrid(QDeclarativeItem *parent=0); @@ -159,10 +169,14 @@ public: Flow flow() const; void setFlow(Flow); + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection (Qt::LayoutDirection); + Q_SIGNALS: void rowsChanged(); void columnsChanged(); void flowChanged(); + Q_REVISION(1) void layoutDirectionChanged(); protected: virtual void doPositioning(QSizeF *contentSize); @@ -172,6 +186,7 @@ private: int m_rows; int m_columns; Flow m_flow; + Qt::LayoutDirection m_layoutDirection; Q_DISABLE_COPY(QDeclarativeGrid) }; @@ -179,6 +194,7 @@ class QDeclarativeFlowPrivate; class Q_AUTOTEST_EXPORT QDeclarativeFlow: public QDeclarativeBasePositioner { Q_OBJECT + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged REVISION 1) Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged) public: QDeclarativeFlow(QDeclarativeItem *parent=0); @@ -188,8 +204,12 @@ public: Flow flow() const; void setFlow(Flow); + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection (Qt::LayoutDirection); + Q_SIGNALS: void flowChanged(); + Q_REVISION(1) void layoutDirectionChanged(); protected: virtual void doPositioning(QSizeF *contentSize); |