14 * Description: hsoperatorhandler.cpp |
14 * Description: hsoperatorhandler.cpp |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include "hsoperatorhandler.h" |
18 #include "hsoperatorhandler.h" |
19 #ifndef NO_QT_EXTENSIONS |
19 |
20 #include "hsoperatorhandler_p.h" |
20 #include <HbAction> |
|
21 |
|
22 #ifdef QT_EXTENSIONS |
|
23 #include "hsoperatorhandler_p.h" |
21 #else |
24 #else |
22 #include <HbIcon> |
25 #include <HbIcon> |
23 #endif |
26 #endif |
|
27 |
|
28 |
|
29 |
24 |
30 |
25 /*! |
31 /*! |
26 \class HsOperatorHandler |
32 \class HsOperatorHandler |
27 \ingroup group_hsmenustateplugin |
33 \ingroup group_hsmenustateplugin |
28 |
34 |
69 Returns Operators text |
75 Returns Operators text |
70 \retval icon |
76 \retval icon |
71 */ |
77 */ |
72 QString HsOperatorHandler::text() |
78 QString HsOperatorHandler::text() |
73 { |
79 { |
74 #ifndef NO_QT_EXTENSIONS |
80 #ifdef QT_EXTENSIONS |
75 return m_q->text(); |
81 return m_q->text(); |
76 #else |
82 #else |
77 return QString(); |
83 return QString(); |
78 #endif |
84 #endif |
79 } |
85 } |
80 |
86 |
81 |
87 |
82 /*! |
88 /*! |
83 Open Operator application or related url |
89 Open Operator application or related url action |
84 */ |
90 */ |
85 void HsOperatorHandler::action() |
91 void HsOperatorHandler::action() |
86 { |
92 { |
87 #ifndef NO_QT_EXTENSIONS |
93 #ifdef QT_EXTENSIONS |
88 m_q->action(); |
94 m_q->action(); |
89 #endif |
95 #endif |
90 } |
96 } |
91 |
97 |
|
98 /*! |
|
99 Returns Operator Store presence value predefined in Central Repositoryicon |
|
100 \retval true if Operator Store should be present in toolbar |
|
101 */ |
|
102 bool HsOperatorHandler::operatorStorePresent() |
|
103 { |
|
104 #ifdef QT_EXTENSIONS |
|
105 return m_q->operatorStorePresent(); |
|
106 #else |
|
107 return false; |
|
108 #endif |
|
109 } |
92 |
110 |
|
111 /*! |
|
112 Returns Ovi Store presence value predefined in Central Repositoryicon |
|
113 \retval true if Ovi Store should be present in toolbar |
|
114 */ |
|
115 bool HsOperatorHandler::oviStorePresent() |
|
116 { |
|
117 #ifdef QT_EXTENSIONS |
|
118 return m_q->oviStorePresent(); |
|
119 #else |
|
120 return false; |
|
121 #endif |
|
122 } |
|
123 |
|
124 /*! |
|
125 Returns if Operator Store should first in toolbar |
|
126 \retval true if Operator Store should first in toolbar |
|
127 */ |
|
128 bool HsOperatorHandler::operatorStoreFirst() |
|
129 { |
|
130 #ifdef QT_EXTENSIONS |
|
131 return m_q->operatorStoreFirst(); |
|
132 #else |
|
133 return false; |
|
134 #endif |
|
135 } |
|
136 |
|
137 /*! |
|
138 Prepares HbAction for Operator Store |
|
139 \param HbAction to prepare |
|
140 \retval HbAction prepared action |
|
141 */ |
|
142 HbAction *HsOperatorHandler::prepareOperatorStoreAction( |
|
143 HbAction *const operatorAction) |
|
144 { |
|
145 operatorAction->setIcon(icon()); |
|
146 connect(operatorAction, SIGNAL(triggered()), this, SLOT(action())); |
|
147 return operatorAction; |
|
148 } |
|
149 |