|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HSUNINSTALLITEMSTATE_H |
|
19 #define HSUNINSTALLITEMSTATE_H |
|
20 |
|
21 #include <QState> |
|
22 |
|
23 #include "hsmenustates_global.h" |
|
24 HS_STATES_TEST_CLASS(MenuStatesTest) |
|
25 |
|
26 class QAction; |
|
27 class HbAction; |
|
28 class HbMessageBox; |
|
29 class HsShortcutService; |
|
30 class HsMenuService; |
|
31 class HbDialog; |
|
32 class CaNotifier; |
|
33 |
|
34 class HsUninstallItemState: public QState |
|
35 { |
|
36 Q_OBJECT |
|
37 |
|
38 HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) |
|
39 |
|
40 public: |
|
41 enum UninstallDialogType { |
|
42 UninstallDialogDefinition02 = 1, |
|
43 UninstallDialogDefinition03, |
|
44 UninstallDialogDefinition04 |
|
45 }; |
|
46 |
|
47 HsUninstallItemState(QState *parent = 0); |
|
48 |
|
49 virtual ~HsUninstallItemState(); |
|
50 |
|
51 protected: |
|
52 |
|
53 void onEntry(QEvent *event); |
|
54 |
|
55 private slots: |
|
56 |
|
57 void uninstallMessageFinished(HbAction* finishedAction); |
|
58 |
|
59 void cleanUp(); |
|
60 |
|
61 signals: |
|
62 |
|
63 void exit(); |
|
64 |
|
65 private: |
|
66 |
|
67 void construct(); |
|
68 |
|
69 bool getApplicationsNames(QString &componentName, |
|
70 QStringList &applicationsNames, |
|
71 QString &confirmationMessage); |
|
72 |
|
73 void createSimpleUninstallMessage(bool isJava=false); |
|
74 void createUninstallJavaMessage(); |
|
75 |
|
76 private: |
|
77 |
|
78 int mItemId; |
|
79 |
|
80 HbMessageBox *mUninstallMessage; // deletes itself automatically on close |
|
81 HbDialog *mUninstallJavaMessage; |
|
82 UninstallDialogType mDialogType; |
|
83 |
|
84 QAction *mConfirmAction; // child for mConfirmMessage |
|
85 |
|
86 }; |
|
87 |
|
88 #endif //HSUNINSTALLITEMSTATE_H |