21 #include <hblistviewitem.h> |
21 #include <hblistviewitem.h> |
22 #include <HbProgressBar> |
22 #include <HbProgressBar> |
23 |
23 |
24 #include "hsmenustates_global.h" |
24 #include "hsmenustates_global.h" |
25 |
25 |
|
26 HS_STATES_TEST_CLASS(MenuStatesTest) |
|
27 |
26 // TODO: this is only temporary class for show progress bar. |
28 // TODO: this is only temporary class for show progress bar. |
27 // It should be remove when fix from orbit will be in official platfrom. |
29 // It should be remove when fix from orbit will be in official platfrom. |
28 class HsProgressBar: public HbProgressBar { |
30 class HsProgressBar: public HbProgressBar |
29 public: |
31 { |
30 HsProgressBar(QGraphicsItem *parent=0):HbProgressBar(parent),mTargetValue(0),mTimerId(0) {} |
32 public: |
31 void setTargetProgressValue(int value); |
33 HsProgressBar(QGraphicsItem *parent = 0) : HbProgressBar(parent), |
|
34 mTargetValue(0), mTimerId(0) {} |
|
35 void setTargetProgressValue(int value); |
32 |
36 |
33 protected: |
37 protected: |
34 void paint ( QPainter * painter, |
38 void paint(QPainter *painter, |
35 const QStyleOptionGraphicsItem * option, |
39 const QStyleOptionGraphicsItem *option, |
36 QWidget * widget = 0 ); |
40 QWidget *widget = 0 ); |
37 void timerEvent(QTimerEvent *event); |
41 void timerEvent(QTimerEvent *event); |
38 private: |
42 |
39 int mTargetValue; |
43 private: |
40 int mTimerId; |
44 int mTargetValue; |
|
45 int mTimerId; |
|
46 |
|
47 HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) |
41 }; |
48 }; |
42 |
49 |
43 HS_STATES_TEST_CLASS(MenuStatesTest) |
50 |
44 |
51 |
45 class HsListViewItem : public HbListViewItem |
52 class HsListViewItem : public HbListViewItem |
46 { |
53 { |
47 Q_OBJECT |
54 Q_OBJECT |
48 public: |
55 public: |
49 |
56 |
50 explicit HsListViewItem(QGraphicsItem* parent=0); |
57 explicit HsListViewItem(QGraphicsItem *parent = 0); |
51 virtual ~HsListViewItem(); |
58 virtual ~HsListViewItem(); |
52 |
59 |
53 virtual HbAbstractViewItem* createItem(); |
60 virtual HbAbstractViewItem* createItem(); |
54 virtual void updateChildItems(); |
61 virtual void updateChildItems(); |
55 |
62 |
56 protected: |
63 protected: |
57 virtual void polish(HbStyleParameters& params); |
64 virtual void polish(HbStyleParameters ¶ms); |
58 |
65 |
59 private: |
66 private: |
60 HsProgressBar *progress; |
67 HsProgressBar *progress; |
61 bool isProgress; |
68 bool isProgress; |
62 HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) |
69 HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) |