RoboDK Plug-In Interface
iapprobodk.h
1
169#ifndef IAPPROBODK_H
170#define IAPPROBODK_H
171
172#include <QString>
173#include <QList>
174
175#include "iitem.h"
176
177class QMainWindow;
178class QMenuBar;
179class QStatusBar;
180class QToolBar;
181class QTreeWidgetItem;
182class QMenu;
183class IRoboDK;
184
185
189{
190public:
191
194
197
200
203
206
209 };
210
213
217
220
224
227
231
234
238
242 };
243
244
245 virtual ~IAppRoboDK() {}
246
248 virtual QString PluginName()=0;
249
256 virtual QString PluginLoad(QMainWindow *mw, QMenuBar *menubar, QStatusBar *statusbar, IRoboDK *rdk, const QString &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, int iconsize){}
267
274 virtual bool PluginItemClick(Item item, QMenu *menu, TypeClick click_type){ return false; }
275
282 virtual QString PluginCommand(const QString &command, const QString &value){ return ""; };
283
287 // Make sure to make this code as fast as possible to not provoke render lags
289 virtual void PluginEvent(TypeEvent event_type){};
290
296 virtual bool PluginItemClickMulti(QList<Item> &item_list, QMenu *menu, TypeClick click_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
@ 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)
This function is called every time there is a new 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