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 CPTHEMECONTROL_H |
|
19 #define CPTHEMECONTROL_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <QList> |
|
23 |
|
24 #include "cpthemechanger.h" |
|
25 #include <hbicon.h> |
|
26 |
|
27 QT_BEGIN_NAMESPACE |
|
28 class QModelIndex; |
|
29 class QString; |
|
30 class QSortFilterProxyModel; |
|
31 QT_END_NAMESPACE |
|
32 |
|
33 class HbDialog; |
|
34 class CpThemeListView; |
|
35 class CpBaseSettingView; |
|
36 class CpThemeListModel; |
|
37 |
|
38 |
|
39 class CpThemeControl : public QObject |
|
40 { |
|
41 Q_OBJECT |
|
42 |
|
43 public: |
|
44 CpThemeControl(); |
|
45 ~CpThemeControl(); |
|
46 CpBaseSettingView* themeListView(); |
|
47 QString currentThemeName() const; |
|
48 HbIcon currentThemeIcon() const; |
|
49 |
|
50 signals: |
|
51 void themeUpdated(const QString& themeName, const HbIcon& icon); |
|
52 |
|
53 private slots: |
|
54 void newThemeSelected(const QModelIndex& index); |
|
55 void applyTheme(const CpThemeInfo& theme); |
|
56 void themeListClosed(); |
|
57 void themeChangeTimeout(); |
|
58 void themeWaitTimeout(); |
|
59 void themeChangeFinished(); |
|
60 void getOviTheme(); |
|
61 |
|
62 private: |
|
63 void createThemeList(); |
|
64 void triggerThemeListClose(); |
|
65 void setActiveThemeIndex(); |
|
66 |
|
67 private: |
|
68 CpThemeListView* mThemeListView; |
|
69 CpThemeChanger* mThemeChanger; |
|
70 QAbstractItemModel* mListModel; |
|
71 bool mThemeChangeFinished; |
|
72 HbDialog* mWaitDialog; |
|
73 }; |
|
74 |
|
75 #endif //CPTHEMECONTROL_H |
|