equal
deleted
inserted
replaced
21 #include <QGraphicsLayout> |
21 #include <QGraphicsLayout> |
22 #include "hstest_global.h" |
22 #include "hstest_global.h" |
23 |
23 |
24 HOMESCREEN_TEST_CLASS(TestHsDomainModel) |
24 HOMESCREEN_TEST_CLASS(TestHsDomainModel) |
25 class HsWidgetHost; |
25 class HsWidgetHost; |
26 class HsPageNewWidgetLayout : public QGraphicsLayout |
26 class HsPageNewWidgetLayout : public QGraphicsLayout |
27 { |
27 { |
28 public: |
28 public: |
29 HsPageNewWidgetLayout(const QPointF &touchPoint = QPointF(), |
29 HsPageNewWidgetLayout(const QPointF &touchPoint = QPointF(), |
30 QGraphicsLayoutItem *parent = 0); |
30 QGraphicsLayoutItem *parent = 0); |
31 ~HsPageNewWidgetLayout(); |
31 ~HsPageNewWidgetLayout(); |
34 QGraphicsLayoutItem *itemAt(int i) const; |
34 QGraphicsLayoutItem *itemAt(int i) const; |
35 void removeAt(int index); |
35 void removeAt(int index); |
36 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const; |
36 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const; |
37 void setGeometry(const QRectF &rect); |
37 void setGeometry(const QRectF &rect); |
38 void addItem(HsWidgetHost *item); |
38 void addItem(HsWidgetHost *item); |
39 enum sortOrder { height, width}; |
|
40 |
39 |
41 private: |
|
42 #ifdef HSWIDGETORGANIZER_ALGORITHM |
|
43 QList<HsWidgetHost*> sortWidgets(sortOrder order); |
|
44 #endif |
|
45 private: |
40 private: |
46 QSizeF mSize; |
41 QSizeF mSize; |
47 QList<HsWidgetHost*> mNewWidgets; |
42 QList<HsWidgetHost*> mNewWidgets; |
48 QPointF mTouchPoint; |
43 QPointF mTouchPoint; |
49 |
44 |