qaction
public:
enum MenuRole { NoRole, TextHeuristicRole, ApplicationSpecificRole, AboutQtRole,
AboutRole, PreferencesRole, QuitRole };
enum SoftKeyRole {
NoSoftKey, PositiveSoftKey, NegativeSoftKey, SelectSoftKey };
enum Priority { LowPriority = 0,
NormalPriority = 128,
HighPriority = 256};
explicit QAction(QObject* parent);
QAction(const QString &text, QObject* parent);
QAction(const QIcon &icon, const QString &text, QObject* parent);
#ifdef QT3_SUPPORT
QT3_SUPPORT_CONSTRUCTOR QAction(QObject* parent, const char* name);
QT3_SUPPORT_CONSTRUCTOR QAction(const QString &text, const QKeySequence &shortcut,
QObject* parent, const char* name);
QT3_SUPPORT_CONSTRUCTOR QAction(const QIcon &icon, const QString &text,
const QKeySequence &shortcut,
QObject* parent, const char* name);
#endif
~QAction();
void setActionGroup(QActionGroup *group);
QActionGroup *actionGroup() const;
void setIcon(const QIcon &icon);
QIcon icon() const;
void setText(const QString &text);
QString text() const;
void setIconText(const QString &text);
QString iconText() const;
void setToolTip(const QString &tip);
QString toolTip() const;
void setStatusTip(const QString &statusTip);
QString statusTip() const;
void setWhatsThis(const QString &what);
QString whatsThis() const;
void setPriority(Priority priority);
Priority priority() const;
#ifndef QT_NO_MENU
QMenu *menu() const;
void setMenu(QMenu *menu);
#endif
void setSeparator(bool b);
bool isSeparator() const;
#ifndef QT_NO_SHORTCUT
void setShortcut(const QKeySequence &shortcut);
QKeySequence shortcut() const;
void setShortcuts(const QList<QKeySequence> &shortcuts);
void setShortcuts(QKeySequence::StandardKey);
QList<QKeySequence> shortcuts() const;
void setShortcutContext(Qt::ShortcutContext context);
Qt::ShortcutContext shortcutContext() const;
void setAutoRepeat(bool);
bool autoRepeat() const;
#endif
void setFont(const QFont &font);
QFont font() const;
void setCheckable(bool);
bool isCheckable() const;
QVariant data() const;
void setData(const QVariant &var);
bool isChecked() const;
bool isEnabled() const;
bool isVisible() const;
enum ActionEvent { Trigger, Hover };
void activate(ActionEvent event);
bool showStatusText(QWidget *widget=0);
void setMenuRole(MenuRole menuRole);
MenuRole menuRole() const;
void setSoftKeyRole(SoftKeyRole softKeyRole);
SoftKeyRole softKeyRole() const;
void setIconVisibleInMenu(bool visible);
bool isIconVisibleInMenu() const;
#ifdef QT3_SUPPORT
inline QT3_SUPPORT void setMenuText(const QString &text) { setText(text); }
inline QT3_SUPPORT QString menuText() const { return text(); }
inline QT3_SUPPORT bool isOn() const { return isChecked(); }
inline QT3_SUPPORT bool isToggleAction() const { return isCheckable(); }
inline QT3_SUPPORT void setToggleAction(bool b) { setCheckable(b); }
inline QT3_SUPPORT void setIconSet(const QIcon &i) { setIcon(i); }
inline QT3_SUPPORT QIcon iconSet() const { return icon(); }
inline QT3_SUPPORT bool addTo(QWidget *w) { w->addAction(this); return true; }
inline QT3_SUPPORT bool removeFrom(QWidget *w) { w->removeAction(this); return true; }
inline QT3_SUPPORT void setAccel(const QKeySequence &shortcut) { setShortcut(shortcut); }
inline QT3_SUPPORT QKeySequence accel() const { return shortcut(); }
#endif
QWidget *parentWidget() const;
QList<QWidget *> associatedWidgets() const;
#ifndef QT_NO_GRAPHICSVIEW
QList<QGraphicsWidget *> associatedGraphicsWidgets() const;
#endif