equal
deleted
inserted
replaced
98 |
98 |
99 QActionPrivate::~QActionPrivate() |
99 QActionPrivate::~QActionPrivate() |
100 { |
100 { |
101 } |
101 } |
102 |
102 |
|
103 bool QActionPrivate::showStatusText(QWidget *widget, const QString &str) |
|
104 { |
|
105 #ifdef QT_NO_STATUSTIP |
|
106 Q_UNUSED(widget); |
|
107 Q_UNUSED(str); |
|
108 #else |
|
109 if(QObject *object = widget ? widget : parent) { |
|
110 QStatusTipEvent tip(str); |
|
111 QApplication::sendEvent(object, &tip); |
|
112 return true; |
|
113 } |
|
114 #endif |
|
115 return false; |
|
116 } |
|
117 |
103 void QActionPrivate::sendDataChanged() |
118 void QActionPrivate::sendDataChanged() |
104 { |
119 { |
105 Q_Q(QAction); |
120 Q_Q(QAction); |
106 QActionEvent e(QEvent::ActionChanged, q); |
121 QActionEvent e(QEvent::ActionChanged, q); |
107 for (int i = 0; i < widgets.size(); ++i) { |
122 for (int i = 0; i < widgets.size(); ++i) { |
284 \value SelectSoftKey This action is used to describe a role that selects a particular item or widget |
299 \value SelectSoftKey This action is used to describe a role that selects a particular item or widget |
285 in the application. |
300 in the application. |
286 |
301 |
287 Actions with a softkey role defined are only visible in the softkey bar when the widget containing |
302 Actions with a softkey role defined are only visible in the softkey bar when the widget containing |
288 the action has focus. If no widget currently has focus, the softkey framework will traverse up the |
303 the action has focus. If no widget currently has focus, the softkey framework will traverse up the |
289 widget parent heirarchy looking for a widget containing softkey actions. |
304 widget parent hierarchy looking for a widget containing softkey actions. |
290 */ |
305 */ |
291 |
306 |
292 /*! |
307 /*! |
293 Constructs an action with \a parent. If \a parent is an action |
308 Constructs an action with \a parent. If \a parent is an action |
294 group the action will be automatically inserted into the group. |
309 group the action will be automatically inserted into the group. |
1204 \sa statusTip |
1219 \sa statusTip |
1205 */ |
1220 */ |
1206 bool |
1221 bool |
1207 QAction::showStatusText(QWidget *widget) |
1222 QAction::showStatusText(QWidget *widget) |
1208 { |
1223 { |
1209 #ifdef QT_NO_STATUSTIP |
1224 return d_func()->showStatusText(widget, statusTip()); |
1210 Q_UNUSED(widget); |
|
1211 #else |
|
1212 if(QObject *object = widget ? widget : parent()) { |
|
1213 QStatusTipEvent tip(statusTip()); |
|
1214 QApplication::sendEvent(object, &tip); |
|
1215 return true; |
|
1216 } |
|
1217 #endif |
|
1218 return false; |
|
1219 } |
1225 } |
1220 |
1226 |
1221 /*! |
1227 /*! |
1222 Sends the relevant signals for ActionEvent \a event. |
1228 Sends the relevant signals for ActionEvent \a event. |
1223 |
1229 |