9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: Implements the wizard activation and interactions. |
14 * Description: Search Setting state. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include "searchsettingsstate.h" |
18 #include "searchsettingsstate.h" |
19 |
19 #include "settingswidget.h" |
20 #include <hbdocumentloader.h> |
20 #include <hbdocumentloader.h> |
21 #include <hbview.h> |
21 #include <hbview.h> |
22 #include <hblabel.h> |
22 #include <hblabel.h> |
23 #include <hbstackedwidget.h> |
23 #include <hbstackedwidget.h> |
24 #include <hbicon.h> |
24 #include <hbicon.h> |
27 #include <hbgridview.h> |
27 #include <hbgridview.h> |
28 #include <qstandarditemmodel.h> |
28 #include <qstandarditemmodel.h> |
29 #include <qdebug.h> |
29 #include <qdebug.h> |
30 #include <qgraphicswidget.h> |
30 #include <qgraphicswidget.h> |
31 #include <qdir.h> |
31 #include <qdir.h> |
32 #include"settingswidget.h" |
|
33 |
|
34 // --------------------------------------------------------------------------- |
32 // --------------------------------------------------------------------------- |
35 // SearchSettingsState::SearchSettingsState |
33 // SearchSettingsState::SearchSettingsState |
36 // --------------------------------------------------------------------------- |
34 // --------------------------------------------------------------------------- |
37 // |
35 // |
38 SearchSettingsState::SearchSettingsState(QState *parent) : |
36 SearchSettingsState::SearchSettingsState(QState *parent) : |
44 connect(mWidget, SIGNAL(settingsEvent(bool)), this, |
42 connect(mWidget, SIGNAL(settingsEvent(bool)), this, |
45 SLOT(handleBackEvent(bool))); |
43 SLOT(handleBackEvent(bool))); |
46 |
44 |
47 connect(mWidget, SIGNAL(selectedItemCategory(int, bool)), this, |
45 connect(mWidget, SIGNAL(selectedItemCategory(int, bool)), this, |
48 SLOT(getItemCategory(int, bool))); |
46 SLOT(getItemCategory(int, bool))); |
49 |
47 |
50 connect(mWidget, SIGNAL(ISProvidersIcon(HbIcon, int)), this, |
48 connect(mWidget, SIGNAL(ISProvidersIcon(HbIcon, int)), this, |
51 SLOT(slotISProvidersIcon(HbIcon, int))); |
49 SLOT(slotISProvidersIcon(HbIcon, int))); |
52 |
|
53 } |
50 } |
54 // --------------------------------------------------------------------------- |
51 // --------------------------------------------------------------------------- |
55 // SearchSettingsState::~SearchSettingsState |
52 // SearchSettingsState::~SearchSettingsState |
56 // --------------------------------------------------------------------------- |
53 // --------------------------------------------------------------------------- |
57 // |
54 // |
58 SearchSettingsState::~SearchSettingsState() |
55 SearchSettingsState::~SearchSettingsState() |
59 { |
56 { |
60 delete mDocumentLoader; |
57 delete mDocumentLoader; |
61 delete mWidget; |
58 delete mWidget; |
62 |
|
63 } |
59 } |
64 // --------------------------------------------------------------------------- |
60 // --------------------------------------------------------------------------- |
65 // SearchSettingsState::slotISProvidersIcon |
61 // SearchSettingsState::slotISProvidersIcon |
66 // --------------------------------------------------------------------------- |
62 // --------------------------------------------------------------------------- |
67 // |
63 // |
68 void SearchSettingsState::slotISProvidersIcon(HbIcon icon, int id) |
64 void SearchSettingsState::slotISProvidersIcon(HbIcon icon, int id) |
69 { |
65 { |
70 emit publishISProviderIcon(id,icon); |
66 emit publishISProviderIcon(id, icon); |
71 } |
67 } |
72 |
|
73 // --------------------------------------------------------------------------- |
68 // --------------------------------------------------------------------------- |
74 // SearchSettingsState::getItemCategory |
69 // SearchSettingsState::getItemCategory |
75 // --------------------------------------------------------------------------- |
70 // --------------------------------------------------------------------------- |
76 // |
71 // |
77 void SearchSettingsState::getItemCategory(int str, bool avalue) |
72 void SearchSettingsState::getItemCategory(int str, bool avalue) |
82 // SearchSettingsState::onEntry |
77 // SearchSettingsState::onEntry |
83 // --------------------------------------------------------------------------- |
78 // --------------------------------------------------------------------------- |
84 // |
79 // |
85 void SearchSettingsState::onEntry(QEvent *event) |
80 void SearchSettingsState::onEntry(QEvent *event) |
86 { |
81 { |
87 qDebug() << "search:SearchSettingsState::onEntry"; |
|
88 QState::onEntry(event); |
82 QState::onEntry(event); |
89 emit settingslaunched(); |
83 emit settingslaunched(); |
90 if (minitialCount) |
84 if (minitialCount) |
91 { |
85 { |
92 mWidget->loadBaseSettings(); |
86 mWidget->loadBaseSettings(); |
107 // --------------------------------------------------------------------------- |
101 // --------------------------------------------------------------------------- |
108 // |
102 // |
109 void SearchSettingsState::onExit(QEvent *event) |
103 void SearchSettingsState::onExit(QEvent *event) |
110 { |
104 { |
111 QState::onExit(event); |
105 QState::onExit(event); |
112 |
|
113 } |
106 } |
114 // --------------------------------------------------------------------------- |
107 // --------------------------------------------------------------------------- |
115 // SearchSettingsState::handleBackEvent |
108 // SearchSettingsState::handleBackEvent |
116 // --------------------------------------------------------------------------- |
109 // --------------------------------------------------------------------------- |
117 // |
110 // |