RoboDK Plug-In Interface
Loading...
Searching...
No Matches
iapprobodk.h
1
189#ifndef IAPPROBODK_H
190#define IAPPROBODK_H
191
192#include <QtPlugin>
193#include <QString>
194#include <QList>
195
196#include "iitem.h"
197
198class QMainWindow;
199class QMenuBar;
200class QStatusBar;
201class QToolBar;
202class QTreeWidgetItem;
203class QMenu;
204class IRoboDK;
205
206
210{
211public:
212
215
218
221
224
227
229 ClickDouble = 3
230 };
231
269
271 EVENT_SELECTIONTREE_CHANGED = 1,
272
275
276 EVENT_REFERENCE_PICKED = 3,
277 EVENT_REFERENCE_RELEASED = 4,
278 EVENT_TOOL_MODIFIED = 5,
279 EVENT_CREATED_ISOCUBE = 6,
280 EVENT_SELECTION3D_CHANGED = 7,
281 EVENT_VIEWPOSE_CHANGED = 8,
282 EVENT_ROBOT_MOVED = 9,
283 EVENT_KEY = 10,
284 EVENT_ITEM_MOVED_POSE = 11,
285 EVENT_COLLISIONMAP_RESET = 12,
286 EVENT_COLLISIONMAP_TOO_LARGE = 13,
287 EVENT_CALIB_MEASUREMENT = 14,
288
291
295
298
301
304
307
310
313 };
314
315
316 virtual ~IAppRoboDK() {}
317
319 virtual QString PluginName()=0;
320
327 virtual QString PluginLoad(QMainWindow *mw, QMenuBar *menubar, QStatusBar *statusbar, IRoboDK *rdk, const QString &settings="")
328 {
329 Q_UNUSED(mw)
330 Q_UNUSED(menubar)
331 Q_UNUSED(statusbar)
332 Q_UNUSED(rdk)
333 Q_UNUSED(settings)
334 return QString();
335 };
336
338 // It is recommended to remove the toolbar and menus that were added by the plugin. It will help during de debugging process.
339 virtual void PluginUnload(){}
340
345 virtual void PluginLoadToolbar(QMainWindow *mw, int iconsize)
346 {
347 Q_UNUSED(mw)
348 Q_UNUSED(iconsize)
349 }
350
357 virtual bool PluginItemClick(Item item, QMenu *menu, TypeClick click_type)
358 {
359 Q_UNUSED(item)
360 Q_UNUSED(menu)
361 Q_UNUSED(click_type)
362 return false;
363 }
364
371 virtual QString PluginCommand(const QString &command, const QString &value)
372 {
373 Q_UNUSED(command)
374 Q_UNUSED(value)
375 return QString();
376 };
377
381 // Make sure to make this code as fast as possible to not provoke render lags
383 virtual void PluginEvent(TypeEvent event_type)
384 {
385 Q_UNUSED(event_type)
386 };
387
393 virtual bool PluginItemClickMulti(QList<Item> &item_list, QMenu *menu, TypeClick click_type)
394 {
395 Q_UNUSED(item_list)
396 Q_UNUSED(menu)
397 Q_UNUSED(click_type)
398 return false;
399 }
400
401};
402
403
404QT_BEGIN_NAMESPACE
405Q_DECLARE_INTERFACE(IAppRoboDK, "RoboDK.IAppRoboDK")
406QT_END_NAMESPACE
407
408
409
410
411
412#endif // IAPPROBODK_H
Interface to RoboDK. Each plugin must implement this class to establish the interface to RoboDK....
Definition iapprobodk.h:210
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:393
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:357
@ EVENT_PROGSLIDER_CHANGED
A program slider was opened, changed, or closed (RoboDK 5.6.4 required).
Definition iapprobodk.h:306
@ EVENT_ITEM_MOVED
Obsolete after RoboDK 4.2.0. Use EVENT_ITEM_MOVED_POSE instead.
Definition iapprobodk.h:274
@ EVENT_PROGSLIDER_SET
The index of a program slider changed (RoboDK 5.6.4 required).
Definition iapprobodk.h:309
@ EVENT_RENAME
The name of an item changed (RoboDK 5.6.3 required).
Definition iapprobodk.h:297
@ EVENT_STATIONCHANGED
A new robodk station was loaded (RoboDK 5.6.3 required).
Definition iapprobodk.h:303
@ EVENT_SETVISIBLE
The visibility state of an item changed (RoboDK 5.6.3 required).
Definition iapprobodk.h:300
@ EVENT_LICENSEUPDATED
The license that applies to the current user changed (RoboDK 5.9.4.25487 required).
Definition iapprobodk.h:312
@ EVENT_SELECTION3D_CLICK
An object in the 3D view was clicked on (right click, left click or double click),...
Definition iapprobodk.h:290
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:327
virtual void PluginUnload()
This function is called once only when the plugin is being unloaded.
Definition iapprobodk.h:339
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:345
TypeEvent
Event types for PluginEvent function.
Definition iapprobodk.h:233
@ EventAbout2ChangeStation
The current RoboDK station is about to loose focus because the user requested to open a new station (...
Definition iapprobodk.h:254
@ EventAbout2CloseStation
Definition iapprobodk.h:258
@ EventTrajectoryStep
Definition iapprobodk.h:262
@ EventChangedStation
This event is triggered when we change the active station and a new station gains focus (IRoboDK::get...
Definition iapprobodk.h:247
@ EventMoved
Moved event: Something has moved, such as a robot, reference frame, object or tool....
Definition iapprobodk.h:240
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:383
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:371
TypeClick
Types of clicks for PluginItemClick function.
Definition iapprobodk.h:214
@ ClickRight
Right click.
Definition iapprobodk.h:226
@ ClickCtrlLeft
Ctrl Left click.
Definition iapprobodk.h:223
@ ClickDouble
Double click.
Definition iapprobodk.h:229
@ ClickLeft
Left click.
Definition iapprobodk.h:220
@ ClickNone
No click.
Definition iapprobodk.h:217
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