72 Q_PROPERTY(
bool checkable READ isCheckable WRITE setCheckable NOTIFY changed)
73 Q_PROPERTY(
bool checked READ isChecked WRITE setChecked DESIGNABLE isCheckable NOTIFY toggled)
74 Q_PROPERTY(
bool enabled READ isEnabled WRITE setEnabled NOTIFY changed)
82 #ifndef QT_NO_SHORTCUT
85 Q_PROPERTY(
bool autoRepeat READ autoRepeat WRITE setAutoRepeat NOTIFY changed)
87 Q_PROPERTY(
bool visible READ isVisible WRITE setVisible NOTIFY changed)
90 Q_PROPERTY(
bool iconVisibleInMenu READ isIconVisibleInMenu WRITE setIconVisibleInMenu NOTIFY changed)
95 AboutRole, PreferencesRole, QuitRole };
97 NoSoftKey, PositiveSoftKey, NegativeSoftKey, SelectSoftKey };
117 void setIcon(
const QIcon &icon);
120 void setText(
const QString &text);
123 void setIconText(
const QString &text);
126 void setToolTip(
const QString &tip);
129 void setStatusTip(
const QString &statusTip);
132 void setWhatsThis(
const QString &what);
135 void setPriority(Priority priority);
136 Priority priority()
const;
140 void setMenu(
QMenu *menu);
143 void setSeparator(
bool b);
144 bool isSeparator()
const;
146 #ifndef QT_NO_SHORTCUT
157 void setAutoRepeat(
bool);
158 bool autoRepeat()
const;
161 void setFont(
const QFont &font);
164 void setCheckable(
bool);
165 bool isCheckable()
const;
170 bool isChecked()
const;
172 bool isEnabled()
const;
174 bool isVisible()
const;
177 void activate(ActionEvent event);
178 bool showStatusText(
QWidget *widget=0);
180 void setMenuRole(MenuRole menuRole);
181 MenuRole menuRole()
const;
183 void setSoftKeyRole(SoftKeyRole softKeyRole);
184 SoftKeyRole softKeyRole()
const;
186 void setIconVisibleInMenu(
bool visible);
187 bool isIconVisibleInMenu()
const;
190 inline QT3_SUPPORT
void setMenuText(
const QString &text) { setText(text); }
191 inline QT3_SUPPORT
QString menuText()
const {
return text(); }
192 inline QT3_SUPPORT
bool isOn()
const {
return isChecked(); }
193 inline QT3_SUPPORT
bool isToggleAction()
const {
return isCheckable(); }
194 inline QT3_SUPPORT
void setToggleAction(
bool b) { setCheckable(b); }
195 inline QT3_SUPPORT
void setIconSet(
const QIcon &i) { setIcon(i); }
196 inline QT3_SUPPORT
QIcon iconSet()
const {
return icon(); }
199 inline QT3_SUPPORT
void setAccel(
const QKeySequence &shortcut) { setShortcut(shortcut); }
200 inline QT3_SUPPORT
QKeySequence accel()
const {
return shortcut(); }
206 #ifndef QT_NO_GRAPHICSVIEW
216 inline QT_MOC_COMPAT
void setOn(
bool b) { setChecked(b); }
220 void setChecked(
bool);
222 void setEnabled(
bool);
224 void setVisible(
bool);
228 void triggered(
bool checked =
false);
232 QT_MOC_COMPAT
void activated(
int = 0);
239 friend class QMenuItem;
245 friend class QMenuPrivate;
247 friend class QShortcutMap;
250 friend void qt_mac_clear_status_text(
QAction *action);
258 #endif // QT_NO_ACTION
#define QT_END_INCLUDE_NAMESPACE
#define QT_BEGIN_NAMESPACE
GLsizei GLsizei GLenum GLenum const GLvoid * data
virtual bool event(QEvent *)
GLuint const GLchar * name
#define QT_BEGIN_INCLUDE_NAMESPACE
GLubyte GLubyte GLubyte GLubyte w