15 #include "uibasemod.h" 45 const char* icon_identifier);
61 static void updateToolTips();
65 uiMenu* getMenu() {
return menu_; }
66 const uiMenu* getMenu()
const {
return menu_; }
68 void setShortcut(
const char*);
70 void setIcon(
const char* identifier);
71 void setIcon(
const uiIcon&);
72 const char* getIconName()
const {
return iconfile_; }
75 void setCheckable(
bool);
76 bool isCheckable()
const;
77 void setChecked(
bool);
78 bool isChecked()
const;
79 void setEnabled(
bool);
80 bool isEnabled()
const;
81 void setVisible(
bool);
82 bool isVisible()
const;
84 void setSeparator(
bool);
85 bool isSeparator()
const;
91 mQtclass(QAction*) qaction() {
return qaction_; }
92 const mQtclass(QAction*) qaction()
const {
return qaction_; }
101 virtual void trigger(
bool checked);
102 void translateCB(CallBacker*);
104 void updateToolTip(CallBacker* = 0);
109 void updateEnabled(CallBacker* = 0);
110 void updateCheckable(CallBacker* = 0);
111 void updateChecked(CallBacker* = 0);
112 void updateVisible(CallBacker* = 0);
135 static
void addCmdRecorder(const
CallBack&);
136 static
void removeCmdRecorder(const CallBack&);
137 int beginCmdRecEvent(const
char* msg=0);
138 void endCmdRecEvent(
int refnr,const
char* msg=0);
155 virtual ~uiActionContainer();
157 int nrActions()
const;
162 uiAction* findAction(
const char* itmtxt);
168 {
return findAction(fs.
str()); }
170 int getID(
const mQtclass(QAction)*)
const;
172 int insertAction(
uiAction*,
int id=-1,
186 void removeAction(
int id);
187 void removeAllActions();
193 int getFreeID()
const;
195 virtual void doInsertSeparator(
mQtclass(QAction)* before) = 0;
196 virtual void doInsertMenu(
mQtclass(QMenu)*,
198 virtual void doInsertAction(
mQtclass(QAction)*,
200 virtual void doClear() = 0;
201 virtual void doRemoveAction(
mQtclass(QAction)*) = 0;
210 {
return insertAction( a,
id, before ); }
212 int insertItem(
uiMenu* mnu);
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
const char * str() const
Definition: odstring.h:48
#define mQtclass(cls)
Definition: commondefs.h:229
TypeSet< int > ids_
Definition: uiaction.h:204
OD::String that holds an existing text string.
Definition: fixedstring.h:29
void toggled(bool checked)
Definition: i_qaction.h:49
List encoded in a string.
Definition: separstr.h:33
Definition: uistring.h:89
Definition: callback.h:254
void triggered(bool checked)
Definition: i_qaction.h:55
uiActionSeparString(const char *str=0)
Definition: uiaction.h:147
Definition: uiaction.h:144
ObjectSet< uiAction > actions_
Definition: uiaction.h:203
#define mFDQtclass(cls)
Definition: commondefs.h:228
Off-screen pixel-based paint device.
Definition: uipixmap.h:34
void removeItem(int id)
Legacy.
Definition: uiaction.h:216
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
void removeItem(uiAction *a)
Legacy.
Definition: uiaction.h:214
uiAction * findAction(const FixedString &fs)
Definition: uiaction.h:167
Helper class for uiAction to relay Qt's messages.
Definition: i_qaction.h:25
int insertItem(uiAction *a, int id=-1, const uiAction *before=0)
Legacy.
Definition: uiaction.h:208
bool isEmpty(const NLAModel *mdl)
CallBacks object-oriented (object + method).
Definition: callback.h:57
friend class uiAction
Definition: i_qaction.h:28
Definition: uiaction.h:152