24 |
24 |
25 #include "hsdomainmodel_global.h" |
25 #include "hsdomainmodel_global.h" |
26 #include "hsdomainmodeldatastructures.h" |
26 #include "hsdomainmodeldatastructures.h" |
27 |
27 |
28 #include "hstest_global.h" |
28 #include "hstest_global.h" |
29 HOMESCREEN_TEST_CLASS(TestRuntimeServices) |
29 HOMESCREEN_TEST_CLASS(TestHsDomainModel) |
30 |
30 |
31 class QStateMachine; |
31 class QStateMachine; |
32 |
32 |
|
33 class HsWidgetTouchArea; |
33 class HsWidgetComponent; |
34 class HsWidgetComponent; |
34 class HsPage; |
35 class HsPage; |
35 |
36 |
36 class HSDOMAINMODEL_EXPORT HsWidgetHost : public HbWidget |
37 class HSDOMAINMODEL_EXPORT HsWidgetHost : public HbWidget |
37 { |
38 { |
47 |
48 |
48 int databaseId() const; |
49 int databaseId() const; |
49 |
50 |
50 bool setPage(HsPage *page); |
51 bool setPage(HsPage *page); |
51 HsPage *page() const; |
52 HsPage *page() const; |
52 |
|
53 bool isPannable(QGraphicsSceneMouseEvent *event); |
|
54 |
53 |
55 bool loadPresentation(); |
54 bool loadPresentation(); |
56 bool loadPresentation(Qt::Orientation orientation); |
55 bool loadPresentation(Qt::Orientation orientation); |
57 bool savePresentation(); |
56 bool savePresentation(); |
58 bool savePresentation(Qt::Orientation orientation); |
57 bool savePresentation(Qt::Orientation orientation); |
59 bool savePresentation(HsWidgetPresentationData &presentation); |
58 bool savePresentation(HsWidgetPresentationData &presentation); |
60 bool getPresentation(HsWidgetPresentationData &presentation); |
59 bool getPresentation(HsWidgetPresentationData &presentation); |
61 bool removePresentation(Qt::Orientation orientation); |
60 bool removePresentation(Qt::Orientation orientation); |
|
61 QPainterPath shape() const; |
62 |
62 |
63 signals: |
63 signals: |
64 void event_startAndShow(); |
64 void event_startAndShow(); |
65 void event_startAndHide(); |
65 void event_startAndHide(); |
66 void event_unload(); |
66 void event_unload(); |
88 |
88 |
89 void startDragEffect(); |
89 void startDragEffect(); |
90 void startDropEffect(); |
90 void startDropEffect(); |
91 |
91 |
92 protected: |
92 protected: |
93 bool eventFilter(QObject *watched, QEvent *event); |
93 bool eventFilter(QObject *watched, QEvent *event); |
|
94 void gestureEvent(QGestureEvent *event); |
94 void mousePressEvent(QGraphicsSceneMouseEvent *) {} |
95 void mousePressEvent(QGraphicsSceneMouseEvent *) {} |
95 |
96 |
96 private: |
97 private: |
97 Q_DISABLE_COPY(HsWidgetHost) |
98 Q_DISABLE_COPY(HsWidgetHost) |
|
99 void setupTouchArea(); |
98 void setupEffects(); |
100 void setupEffects(); |
99 void setupStates(); |
101 void setupStates(); |
100 |
102 |
101 bool setProperty(const char *name, QMetaProperty &property); |
103 bool setProperty(const char *name, QMetaProperty &property); |
102 bool setMethod(const char *signature, QMetaMethod &method); |
104 bool setMethod(const char *signature, QMetaMethod &method); |
116 void action_show(); |
118 void action_show(); |
117 void action_hide(); |
119 void action_hide(); |
118 void action_finished(); |
120 void action_finished(); |
119 void action_faulted(); |
121 void action_faulted(); |
120 void action_remove(); |
122 void action_remove(); |
|
123 void action_notifyRemove(); |
121 |
124 |
122 void onFinished(); |
125 void onFinished(); |
123 void onError(); |
126 void onError(); |
124 void onSetPreferences(const QStringList &names); |
127 void onSetPreferences(const QStringList &names); |
125 |
128 |
126 private: |
129 private: |
127 int mDatabaseId; |
130 int mDatabaseId; |
128 QStateMachine *mStateMachine; |
131 QStateMachine *mStateMachine; |
129 QGraphicsWidget *mWidget; |
132 QGraphicsWidget *mWidget; |
130 HsPage *mPage; |
133 HsPage *mPage; |
131 HsWidgetComponent *mComponent; |
134 HsWidgetComponent *mComponent; |
|
135 HsWidgetTouchArea *mTouchArea; |
132 QMetaMethod mOnInitializeMethod; |
136 QMetaMethod mOnInitializeMethod; |
133 QMetaMethod mOnShowMethod; |
137 QMetaMethod mOnShowMethod; |
134 QMetaMethod mOnHideMethod; |
138 QMetaMethod mOnHideMethod; |
135 QMetaMethod mOnUninitializeMethod; |
139 QMetaMethod mOnUninitializeMethod; |
136 QMetaMethod mIsPannableMethod; |
|
137 QMetaProperty mIsOnlineProperty; |
140 QMetaProperty mIsOnlineProperty; |
138 QMetaProperty mRootPathProperty; |
141 QMetaProperty mRootPathProperty; |
139 bool mIsFinishing; |
142 bool mIsFinishing; |
140 |
143 |
141 HOMESCREEN_TEST_FRIEND_CLASS(TestRuntimeServices) |
144 HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel) |
142 }; |
145 }; |
143 |
146 |
144 #endif // HSWIDGETHOST_H |
147 #endif // HSWIDGETHOST_H |