26 #ifndef ACTIONGENERATOR_H
27 #define ACTIONGENERATOR_H
31 #include <QtGui/QIcon>
32 #include <QtGui/QAction>
33 #include <QtCore/QEvent>
36 namespace qutim_sdk_0_3
38 class ActionGenerator;
39 class ActionGeneratorPrivate;
42 class ActionCollectionPrivate;
71 QAction *
action()
const {
return m_action; }
85 QAction *
action()
const {
return m_action; }
90 QObject *m_controller;
116 enum Type { StatusType = 0, GeneralType };
136 const QObject *receiver()
const;
137 const char *member()
const;
138 ActionGenerator *addProperty(
const QByteArray &name,
const QVariant &value);
141 int priority()
const;
144 void subscribe(QObject *
object,
const char *method);
146 void addHandler(
int type, QObject *obj);
147 void removeHandler(
int type, QObject *obj);
148 void setCheckable(
bool checkable);
149 void setChecked(
bool checked);
151 void setShortcut(
const QKeySequence &shortcut);
152 void setShortcut(
const QString &
id);
153 QString shortcut()
const;
154 void setMenuRole(QAction::MenuRole role);
155 QAction::MenuRole menuRole()
const;
156 void setIconVisibleInMenu(
bool visible);
157 bool iconVisibleInMenu()
const;
158 QList<QAction*> actions(QObject *
object)
const;
159 QMap<QObject*, QAction*> actions()
const;
162 QAction *prepareAction(QAction *action)
const;
163 virtual QObject *generateHelper()
const;
164 virtual const QMetaObject *metaObject()
const;
165 virtual QList<QByteArray> interfaces()
const;
166 void create(QAction *action,QObject *obj)
const;
167 virtual void createImpl(QAction *action,QObject *obj)
const;
168 virtual void showImpl(QAction *action,QObject *obj);
169 virtual void hideImpl(QAction *action,QObject *obj);
173 friend class MenuControllerPrivate;
174 friend class ActionValue;
175 friend class ActionContainerPrivate;
187 virtual QObject *generateHelper()
const;
193 #endif // ACTIONGENERATOR_H