RoboDK Plug-In Interface
iapprobodk.h
1
169 #ifndef IAPPROBODK_H
170 #define IAPPROBODK_H
171
172 # include < QString >
173 #include
174
175 #include "iitem.h"
176
177 classQMainWindow;
178 classQMenuBar;
179 classQStatusBar;
180 classQToolBar;
181 classQTreeWidgetItem;
182 classQMenu;
183 class IRoboDK;
184
185
188 class IAppRoboDK
189{
190 public:
191
193 enum TypeClick{
194
197
200
203
206
209};
210
212 enum TypeEvent{
213
217
220
224
227
231
234
238
242};
243
244
245 virtual ~IAppRoboDK() {}
246
248 virtualQStringPluginName()=0;
249
256 virtualQStringPluginLoad(QMainWindow *mw, QMenuBar *menubar, QStatusBar *statusbar,IRoboDK*rdk,constQString &settings=""){return "";};
257
259 // It is recommended to remove the toolbar and menus that were added by the plugin. It will help during de debugging process.
260 virtual void PluginUnload(){}
261
266 virtual void PluginLoadToolbar(QMainWindow *mw,inticonsize){}
267
274 virtual bool PluginItemClick(Itemitem, QMenu *menu,TypeClickclick_type){return false; }
275
282 virtualQStringPluginCommand(constQString &command,constQString &value){return ""; };
283
287 // Make sure to make this code as fast as possible to not provoke render lags
289 virtual void PluginEvent(TypeEventevent_type){};
290
296 virtual bool PluginItemClickMulti(QList &item_list, QMenu *menu,TypeClickclick_type){return false; }
297
298};
299
300
301QT_BEGIN_NAMESPACE
302Q_DECLARE_INTERFACE(IAppRoboDK,"RoboDK.IAppRoboDK")
303QT_END_NAMESPACE
304
305
306
307
308
309 #endif // IAPPROBODK_H
Interface to RoboDK. Each plugin must implement this class to establish the interface to RoboDK....
Definition: iapprobodk.h:189
virtual bool PluginItemClickMulti(QList< Item > &item_list, QMenu *menu, TypeClick click_type)
This function is called every time a new context menu is created for a list of items.
Definition: iapprobodk.h:296
virtual bool PluginItemClick(Item item, QMenu *menu, TypeClick click_type)
This function is called every time a new context menu is created for an item.
Definition: iapprobodk.h:274
virtual QString PluginLoad(QMainWindow *mw, QMenuBar *menubar, QStatusBar *statusbar, IRoboDK *rdk, const QString &settings="")
Load the plugin. This function is called only once when the plugin is loaded (or RoboDK is started wi...
Definition: iapprobodk.h:256
virtual void PluginUnload()
This function is called once only when the plugin is being unloaded.
Definition: iapprobodk.h:260
virtual void PluginLoadToolbar(QMainWindow *mw, int iconsize)
This function is called every time the toolbar is set up. This function is called at least once right...
Definition: iapprobodk.h:266
TypeEvent
Event types for PluginEvent function.
Definition: iapprobodk.h:212
@ EventChanged
Definition: iapprobodk.h:223
@ EventRender
Definition: iapprobodk.h:216
@ EventAbout2ChangeStation
The current RoboDK station is about to loose focus because the user requested to open a new station (...
Definition: iapprobodk.h:233
@ EventAbout2Save
Definition: iapprobodk.h:230
@ EventAbout2CloseStation
Definition: iapprobodk.h:237
@ EventTrajectoryStep
Definition: iapprobodk.h:241
@ EventChangedStation
This event is triggered when we change the active station and a new station gains focus (IRoboDK::get...
Definition: iapprobodk.h:226
@ EventMoved
Moved event: Something has moved, such as a robot, reference frame, object or tool....
Definition: iapprobodk.h:219
virtual void PluginEvent(TypeEvent event_type)
每次调用这个函数有一个新的RoboDK event such as rendering the screen,...
Definition: iapprobodk.h:289
virtual QString PluginName()=0
Return the plugin name. Try to be creative and make sure the name is unique.
virtual QString PluginCommand(const QString &command, const QString &value)
Specific commands can be passed from the RoboDK API. For example, a parent application can rely on a ...
Definition: iapprobodk.h:282
TypeClick
Types of clicks for PluginItemClick function.
Definition: iapprobodk.h:193
@ ClickRight
Right click.
Definition: iapprobodk.h:205
@ ClickCtrlLeft
Ctrl Left click.
Definition: iapprobodk.h:202
@ ClickDouble
Double click.
Definition: iapprobodk.h:208
@ ClickLeft
Left click.
Definition: iapprobodk.h:199
@ ClickNone
No click.
Definition: iapprobodk.h:196
The Item class represents an item in RoboDK station. An item can be a robot, a frame,...
Definition: iitem.h:14
This class is the iterface to the RoboDK API. With the RoboDK API you can automate certain tasks and ...
Definition: irobodk.h:14