17 |
17 |
18 #ifndef HSUNINSTALLITEMSTATE_H |
18 #ifndef HSUNINSTALLITEMSTATE_H |
19 #define HSUNINSTALLITEMSTATE_H |
19 #define HSUNINSTALLITEMSTATE_H |
20 |
20 |
21 #include <QState> |
21 #include <QState> |
|
22 #include <QSharedPointer> |
22 |
23 |
23 #include "hsmenustates_global.h" |
24 #include "hsmenustates_global.h" |
24 HS_STATES_TEST_CLASS(MenuStatesTest) |
25 HS_STATES_TEST_CLASS(MenuStatesTest) |
25 |
26 |
26 class QAction; |
27 class QAction; |
|
28 class HbDocumentLoader; |
|
29 class HsDialogController; |
27 class HbAction; |
30 class HbAction; |
28 class HbMessageBox; |
31 class HbMessageBox; |
29 class HsShortcutService; |
32 class HsShortcutService; |
30 class HsMenuService; |
33 class HsMenuService; |
31 class HbDialog; |
34 class HbDialog; |
32 class CaNotifier; |
35 class CaNotifier; |
|
36 class CaEntry; |
33 |
37 |
34 class HsUninstallItemState: public QState |
38 class HsUninstallItemState: public QState |
35 { |
39 { |
36 Q_OBJECT |
40 Q_OBJECT |
37 |
41 |
38 HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) |
42 HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) |
39 |
43 |
40 public: |
44 public: |
41 enum UninstallDialogType { |
|
42 UninstallDialogDefinition02 = 1, |
|
43 UninstallDialogDefinition03, |
|
44 UninstallDialogDefinition04 |
|
45 }; |
|
46 |
45 |
47 HsUninstallItemState(QState *parent = 0); |
46 HsUninstallItemState(QState *parent = 0); |
48 |
47 |
49 virtual ~HsUninstallItemState(); |
48 virtual ~HsUninstallItemState(); |
50 |
49 |
67 void exit(); |
66 void exit(); |
68 |
67 |
69 private: |
68 private: |
70 |
69 |
71 void construct(); |
70 void construct(); |
72 |
71 |
73 bool getApplicationsNames(QString &componentName, |
72 bool getApplicationsNames(QString &componentName, |
74 QStringList &applicationsNames, |
73 QStringList &applicationsNames, |
75 QString &confirmationMessage); |
74 QString &confirmationMessage); |
76 |
75 |
77 void createSimpleUninstallMessage(bool isJava=false); |
76 void createSimpleUninstallMessage(bool isJava=false); |
78 void createUninstallJavaMessage(); |
77 void createUninstallJavaMessage(); |
|
78 HsDialogController *prepareDialog(HbDialog *dialog); |
|
79 QString loadProperSection(QStringList &applicationsNames, |
|
80 QString &detailsMessage, |
|
81 HbDocumentLoader &loader); |
|
82 void prepareApplicationListLabel( QStringList & applicationsNames, |
|
83 HbDocumentLoader & loader); |
|
84 void prepareDialogLabel( |
|
85 QString &componentName, HbDocumentLoader &loader); |
79 |
86 |
80 private: |
87 private: |
81 |
88 |
82 int mItemId; |
89 QSharedPointer<CaEntry> mEntry; |
83 |
|
84 HbMessageBox *mUninstallMessage; // deletes itself automatically on close |
|
85 HbDialog *mUninstallJavaMessage; |
|
86 UninstallDialogType mDialogType; |
|
87 |
|
88 QAction *mConfirmAction; // child for mConfirmMessage |
|
89 |
90 |
90 }; |
91 }; |
91 |
92 |
92 #endif //HSUNINSTALLITEMSTATE_H |
93 #endif //HSUNINSTALLITEMSTATE_H |