36 |
40 |
37 HgWidgetTestView(QGraphicsItem *parent = 0); |
41 HgWidgetTestView(QGraphicsItem *parent = 0); |
38 ~HgWidgetTestView(); |
42 ~HgWidgetTestView(); |
39 |
43 |
40 private slots: |
44 private slots: |
41 |
45 void initWidget(HgTestWidgetType type); |
42 void switchWidget(HbAction* action); |
46 void changeScrollBarVisibility(HgWidget::ScrollBarPolicy policy); |
|
47 void changeScrollBarInteractivity(bool value); |
|
48 void changeModelImageType(HgTestImageType); |
|
49 void changeLowResImageUse(bool value); |
|
50 void changeTitlePosition(HgMediawall::LabelPosition); |
|
51 void changeTitleFont(const HbFontSpec &); |
|
52 void changeDescriptionPosition(HgMediawall::LabelPosition); |
|
53 void changeDescriptionFont(const HbFontSpec &); |
|
54 void changeWidgetHeight(int); |
|
55 void changeWidgetWidth(int); |
43 void toggleScrollDirection(); |
56 void toggleScrollDirection(); |
44 void openDialog(const QModelIndex &index); |
57 void openDialog(const QModelIndex &index); |
45 void openView(const QModelIndex& index); |
58 void openView(const QModelIndex& index); |
|
59 void closeCurrentView(); |
46 void openDeleteItemsDialog(); |
60 void openDeleteItemsDialog(); |
47 void openMoveItemsDialog(); |
61 void openMoveItemsDialog(); |
48 void openAddItemsDialog(); |
62 void openAddItemsDialog(); |
49 void autoHideScrollBar(); |
|
50 void scrollBarAlwaysOn(); |
|
51 void scrollBarAlwaysOff(); |
|
52 void interactiveScrollBar(); |
|
53 void unInteractiveScrollBar(); |
|
54 void feedqimages(); |
|
55 void feedqicons(); |
|
56 void feedhbicons(); |
|
57 void flipClosed(); |
63 void flipClosed(); |
58 void orientationChanged(); |
|
59 void onScrollingStarted(); |
64 void onScrollingStarted(); |
60 void onScrollingEnded(); |
65 void onScrollingEnded(); |
61 void setDescriptionAboveImage(); |
66 void showOptions(); |
62 void setDescriptionBelowImage(); |
67 void hideOptions(); |
63 void setDescriptionHidden(); |
68 void orientationChanged(Qt::Orientation); |
64 void setTitleAboveImage(); |
69 |
65 void setTitleBelowImage(); |
70 void startItemSizeChange(); |
66 void setTitleHidden(); |
71 void itemSizeDialogClosed(); |
67 void toggleLowResForCoverflow(); |
72 void updateItemSizeAndSpacing(); |
68 |
73 |
|
74 void startItemPosChange(); |
|
75 void updateItemPos(); |
|
76 void itemPosDialogClosed(); |
|
77 |
|
78 void resetOptions(); |
|
79 void changeReflectionsEnabled(bool); |
|
80 void resetModel(); |
69 private: |
81 private: |
70 |
|
71 enum WidgetType { |
|
72 HgWidgetGrid, |
|
73 HgWidgetCoverflow |
|
74 }; |
|
75 |
82 |
76 void createMenu(); |
83 void createMenu(); |
77 void initWidget( WidgetType type ); |
84 void setupWidget(); |
78 void setScrollBarPolicy( HgWidget::ScrollBarPolicy policy ); |
85 void setupWidgetOptions(); |
79 void setScrollBarInteractive( bool value ); |
86 void setupWidgetSize(); |
80 HgWidget *createWidget(WidgetType type) const; |
87 HgWidget *createWidget(HgTestWidgetType type) const; |
81 HgWidget *copyWidget() const; |
88 HgWidget *copyWidget() const; |
|
89 void resizeEvent(QGraphicsSceneResizeEvent *event); |
|
90 Qt::Orientation orientation() const; |
82 |
91 |
83 private: // data |
92 private: // data |
84 |
93 |
85 HgWidget *mWidget; |
94 HgWidget *mWidget; |
86 QGraphicsLinearLayout *mLayout; |
95 QGraphicsLinearLayout *mLayout; |
87 HgWidgetTestDataModel *mModel; |
96 HgWidgetTestDataModel *mModel; |
88 WidgetType mWidgetType; |
97 HgTestWidgetType mWidgetType; |
89 HbListWidget *mListWidget; |
98 HbListWidget *mListWidget; |
90 bool mToggleOrientation; |
99 bool mToggleOrientation; |
91 bool mTBone; |
|
92 QItemSelectionModel *mSelectionModel; |
100 QItemSelectionModel *mSelectionModel; |
93 HgFlipWidget* mFlipWidget; |
101 HgFlipWidget* mFlipWidget; |
94 QModelIndex mFlippedIndex; |
102 QModelIndex mFlippedIndex; |
95 HbLabel* mFrontItem; |
103 HbLabel* mFrontItem; |
96 HbAction* mUseLowResAction; |
104 HbView *mOptionsView; |
|
105 HgItemSizeDialog *mItemSizeDialog; |
|
106 HgItemSizeDialog *mItemPosDialog; |
97 }; |
107 }; |
98 |
108 |
99 |
109 |
100 #endif /* HGWIDGETTESTVIEW_H_ */ |
110 #endif /* HGWIDGETTESTVIEW_H_ */ |