summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxpositioners.h
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-08-13 08:10:16 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-08-13 08:10:16 (GMT)
commitab4920a8fd23613da010d45e4f7be1bdc40d7c9a (patch)
tree6238e630fe30caeb1e9d055bc218de1b58b30883 /src/declarative/fx/qfxpositioners.h
parentb1e221a249adbcec7e37e475fdd14ff636c18b2c (diff)
downloadQt-ab4920a8fd23613da010d45e4f7be1bdc40d7c9a.zip
Qt-ab4920a8fd23613da010d45e4f7be1bdc40d7c9a.tar.gz
Qt-ab4920a8fd23613da010d45e4f7be1bdc40d7c9a.tar.bz2
Cleanup and example for positioners
Interim progress on fixing up the positioners. - Removes margins and setting and implicit size - Purges the word 'layout' from the source files - Fixes a bug with the grid positioner, it works now - Cleaned up the code somewhat. Also adds some basic examples which demonstrate that it (mostly) works. Be warned that practically all the comments are woefully out of date.
Diffstat (limited to 'src/declarative/fx/qfxpositioners.h')
-rw-r--r--src/declarative/fx/qfxpositioners.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/declarative/fx/qfxpositioners.h b/src/declarative/fx/qfxpositioners.h
index 6acb393..9560925 100644
--- a/src/declarative/fx/qfxpositioners.h
+++ b/src/declarative/fx/qfxpositioners.h
@@ -60,11 +60,9 @@ class Q_DECLARATIVE_EXPORT QFxBasePositioner : public QFxItem
Q_OBJECT
Q_PROPERTY(int spacing READ spacing WRITE setSpacing)
- Q_PROPERTY(int margin READ margin WRITE setMargin)
Q_PROPERTY(QmlTransition *move READ move WRITE setMove)
Q_PROPERTY(QmlTransition *add READ add WRITE setAdd)
Q_PROPERTY(QmlTransition *remove READ remove WRITE setRemove)
- Q_PROPERTY(QFxItem *item READ layoutItem NOTIFY layoutItemChanged)
public:
enum AutoUpdateType { None = 0x0, Horizontal = 0x1, Vertical = 0x2, Both = 0x3 };
QFxBasePositioner(AutoUpdateType, QFxItem *parent);
@@ -72,9 +70,6 @@ public:
int spacing() const;
void setSpacing(int);
- int margin() const;
- void setMargin(int);
-
QmlTransition *move() const;
void setMove(QmlTransition *);
@@ -84,8 +79,6 @@ public:
QmlTransition *remove() const;
void setRemove(QmlTransition *);
- QFxItem *layoutItem() const;
-
protected:
virtual void componentComplete();
virtual QVariant itemChange(GraphicsItemChange, const QVariant &);
@@ -102,11 +95,10 @@ Q_SIGNALS:
void layoutItemChanged();
protected Q_SLOTS:
- virtual void doLayout()=0;
- void setLayoutItem(QFxItem *);
+ virtual void doPositioning()=0;
private Q_SLOTS:
- void preLayout();
+ void prePositioning();
protected:
QFxBasePositioner(QFxBasePositionerPrivate &dd, AutoUpdateType at, QFxItem *parent);
@@ -125,7 +117,7 @@ class Q_DECLARATIVE_EXPORT QFxVerticalPositioner : public QFxBasePositioner
public:
QFxVerticalPositioner(QFxItem *parent=0);
protected Q_SLOTS:
- virtual void doLayout();
+ virtual void doPositioning();
private:
Q_DISABLE_COPY(QFxVerticalPositioner)
};
@@ -136,7 +128,7 @@ class Q_DECLARATIVE_EXPORT QFxHorizontalPositioner: public QFxBasePositioner
public:
QFxHorizontalPositioner(QFxItem *parent=0);
protected Q_SLOTS:
- virtual void doLayout();
+ virtual void doPositioning();
private:
Q_DISABLE_COPY(QFxHorizontalPositioner)
};
@@ -155,7 +147,7 @@ public:
int columns() const {return _columns;}
void setcolumns(const int columns){_columns = columns;}
protected Q_SLOTS:
- virtual void doLayout();
+ virtual void doPositioning();
private:
int _rows;