1 /* |
|
2 * Copyright (c) 2010 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: Provides and maintains SAT main view (selection list)s |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef SATAPPMENUPROVIDER_H |
|
19 #define SATAPPMENUPROVIDER_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <msatuiobserver.h> //for TSatUiResponse |
|
23 |
|
24 class SatAppAction; |
|
25 class HbMainWindow; |
|
26 class HbListWidgetItem; |
|
27 class HbView; |
|
28 class QEventLoop; |
|
29 class QTimer; |
|
30 class HbMainWindow; |
|
31 class HbAction; |
|
32 class HbListWidget; |
|
33 class HbLabel; |
|
34 class QPixmap; |
|
35 |
|
36 class SatAppMenuProvider : public QObject |
|
37 { |
|
38 Q_OBJECT |
|
39 |
|
40 public: |
|
41 |
|
42 SatAppMenuProvider(HbMainWindow *window, QObject *parent = 0); |
|
43 |
|
44 virtual ~SatAppMenuProvider(); |
|
45 |
|
46 /** takes a screen shot of the menu */ |
|
47 QPixmap takeScreenShot(); |
|
48 |
|
49 public slots: |
|
50 |
|
51 /** signal request to display a menu */ |
|
52 void setUpMenu(SatAppAction &action); |
|
53 |
|
54 /** requests a list selection menu to be displayed */ |
|
55 void selectItem(SatAppAction &action); |
|
56 |
|
57 void resetState(); |
|
58 |
|
59 private slots: |
|
60 void menuItemSelected(HbListWidgetItem *item); |
|
61 |
|
62 private: |
|
63 |
|
64 void loadMainView(); |
|
65 void switchView(); |
|
66 void connectItem(); |
|
67 void disconnectItem(); |
|
68 |
|
69 private: |
|
70 |
|
71 QList<QObject *> mObjects; |
|
72 HbMainWindow *mMainWindow; |
|
73 HbView *mSetupMenuView; |
|
74 HbView *mSelectItemView; |
|
75 HbAction *mSoftKeyQuitAction; |
|
76 HbAction *mSoftKeyBackAction; |
|
77 HbListWidget *mListWidget; |
|
78 HbListWidget *mSelectListWidget; |
|
79 HbLabel *mSubTitle; |
|
80 SatAppAction* mCurrentAction; // not own |
|
81 |
|
82 // for unit testing |
|
83 friend class MenuProviderTest; |
|
84 }; |
|
85 |
|
86 #endif /* SATAPPMENUPROVIDER_H */ |
|