|
1 /* |
|
2 * LoadGenListItem.h |
|
3 * |
|
4 * Created on: Jul 29, 2010 |
|
5 * Author: sopirbo |
|
6 */ |
|
7 |
|
8 #ifndef LOADGENLISTITEM_H_ |
|
9 #define LOADGENLISTITEM_H_ |
|
10 |
|
11 #include "enginewrapper.h" |
|
12 |
|
13 #include <hblistview.h> |
|
14 #include <HbListViewItem> |
|
15 |
|
16 #include <QGraphicsWidget> |
|
17 #include <QtGlobal> |
|
18 |
|
19 class HbAbstractViewItem; |
|
20 class HbLabel; |
|
21 class HbPushButton; |
|
22 class HbWidget; |
|
23 |
|
24 class QGraphicsLinearLayout; |
|
25 class QModelIndex; |
|
26 class QGraphicsItem; |
|
27 class EngineWrapper; |
|
28 |
|
29 class LoadGenListItem : public HbListViewItem |
|
30 { |
|
31 Q_OBJECT |
|
32 public: |
|
33 LoadGenListItem( EngineWrapper& engWrapp , QGraphicsItem *parent = 0 ); |
|
34 |
|
35 //from HbListViewItem |
|
36 virtual HbAbstractViewItem* createItem(); |
|
37 virtual void updateChildItems(); |
|
38 virtual ~LoadGenListItem(); |
|
39 |
|
40 void LoadGenListItem::setTransientState(const QHash<QString, QVariant> &state); |
|
41 QHash<QString, QVariant> LoadGenListItem::transientState() const; |
|
42 |
|
43 void ChangeExpandedState(); |
|
44 |
|
45 signals: |
|
46 |
|
47 |
|
48 public slots: |
|
49 void EditButtonClicked(); |
|
50 void StopButtonClicked(); |
|
51 void SuspendButtonClicked(); |
|
52 private: |
|
53 void init(); |
|
54 void initButtonLayout(); |
|
55 void initLayoutShort(); |
|
56 |
|
57 private: |
|
58 QGraphicsLinearLayout *hLayout; |
|
59 QGraphicsLinearLayout *hButtonLayout; |
|
60 QGraphicsLinearLayout *vLayout; |
|
61 HbLabel *mItemText; |
|
62 HbLabel *mIcon; |
|
63 HbPushButton *mEditButton; |
|
64 HbPushButton *mSuspendButton; |
|
65 HbPushButton *mStopButton; |
|
66 EngineWrapper& mEngineWrapper; |
|
67 bool mExpanded; |
|
68 }; |
|
69 |
|
70 #endif /* LOADGENLISTITEM_H_ */ |