RoboDK Plug-In Interface
IAppRoboDK Class Referenceabstract

Interface to RoboDK. Each plugin must implement this class to establish the interface to RoboDK. More information in theRoboDK Plug-In Structuresection. An examplePluginExampleis available to show how to implement this class.More...

#include <iapprobodk.h>

Inheritance diagram for IAppRoboDK:
PluginExample

Public Types

enum TypeClick{
ClickNone=-1 ,ClickLeft=0 ,ClickCtrlLeft=1 ,ClickRight=2 ,
ClickDouble=3
}
Types of clicks forPluginItemClickfunction.More...
enum TypeEvent{
EventRender=1 ,EventMoved=2 ,EventChanged=3 ,EventChangedStation=4 ,
EventAbout2Save=5 ,EventAbout2ChangeStation=6 ,EventAbout2CloseStation=7 ,EventTrajectoryStep=8
}
Event types forPluginEventfunction.More...

Public Member Functions

virtual QString PluginName()=0
Return the plugin name. Try to be creative and make sure the name is unique.
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 with the plugin).More...
virtual void PluginUnload()
This function is called once only when the plugin is being unloaded.More...
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 afterPluginLoadand it can be called when the user changes the view settings (such as changing from cinema to normal mode) or changes the default toolbar layout (in Tools-Toolbar Layout)More...
virtual bool PluginItemClick(Itemitem, QMenu *menu,TypeClickclick_type)
This function is called every time a new context menu is created for an item.More...
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 plugin for certain operations (for example, to create native windows within RoboDK application or take advantage of the RoboDK API speed within the plugin). Use the RoboDK API (PluginCommand(plugin_name, command, value) to send specific commands to your plugin from an external application.More...
virtual void PluginEvent(TypeEventevent_type)
This function is called every time there is a new RoboDK event such as rendering the screen, adding/removing items or changing the active station. If event_type isEventRenderyou can render your own graphics here usingIRoboDK::DrawGeometry.More...
virtual bool PluginItemClickMulti(QList<Item> &item_list, QMenu *menu,TypeClickclick_type)
This function is called every time a new context menu is created for a list of items.More...

Detailed Description

Interface to RoboDK. Each plugin must implement this class to establish the interface to RoboDK. More information in theRoboDK Plug-In Structuresection. An examplePluginExampleis available to show how to implement this class.

Definition at line188of fileiapprobodk.h.

Member Enumeration Documentation

TypeClick

enumTypeClick

Types of clicks forPluginItemClickfunction.

Enumerator
ClickNone

No click.

ClickLeft

Left click.

ClickCtrlLeft

Ctrl Left click.

ClickRight

Right click.

ClickDouble

Double click.

Definition at line193of fileiapprobodk.h.

TypeEvent

enumTypeEvent

Event types forPluginEventfunction.

Enumerator
EventRender

Render event: The RoboDK screen is re-drawn, including the tree and the 3D environment. This function is called with the main OpenGL context active. At this moment you can callIRoboDK::DrawGeometryto customize the displayed scene

EventMoved

Moved event: Something has moved, such as a robot, reference frame, object or tool. It is very likely that an EventRender will be triggered immediately after this event.

EventChanged

An item has been added or deleted in the station or the active station has changed. This event is usually followed by a EventMoved and EventRender event. If we added a new item (for example, a reference frame) it is very likely that an EventMoved will follow with the updated position of the newly added item(s)

EventChangedStation

This event is triggered when we change the active station and a new station gains focus (IRoboDK::getActiveStationreturns the station that was just opened). In this case we can load station-specific settings usingIRoboDK::getParamorIRoboDK::getData.

EventAbout2Save

的user requested to save the project and the RDK file will be saved to disk. It is recommended to save all station-specific settings at this moment. At this momment you can save station-specific parameters usingIRoboDK::setParamorIRoboDK::setData

EventAbout2ChangeStation

的current RoboDK station is about to loose focus because the user requested to open a new station (or just changed the open station). It is recommended to save session/station-specific settings at this moment, if any.

EventAbout2CloseStation

当前RoboDK站(RDK文件)be closed. Items in the tree will be deleted and become invalid pointers shortly after this event. The RDK file may be saved if the user accepted to save changes and the corresponding EventAbout2Save event will be triggered.

EventTrajectoryStep

A new simulation move event completed for one or more robots or mechanisms. This event is usually triggered after one or more EventMoved to signal the completition of moves. This event is usually followed by a Render event after a few ms. Tip: Use the command TrajectoryTime to retrieve accurate timing according to moving objects (time_sec = RDK->Command("TrajectoryTime").toDouble())

Definition at line212of fileiapprobodk.h.

Constructor & Destructor Documentation

~IAppRoboDK()

virtual ~IAppRoboDK ( )
inlinevirtual

Definition at line245of fileiapprobodk.h.

Member Function Documentation

PluginCommand()

virtual QString PluginCommand ( const QString & command,
const QString & value
)
inlinevirtual

Specific commands can be passed from the RoboDK API. For example, a parent application can rely on a plugin for certain operations (for example, to create native windows within RoboDK application or take advantage of the RoboDK API speed within the plugin). Use the RoboDK API (PluginCommand(plugin_name, command, value) to send specific commands to your plugin from an external application.

Parameters
command
value
Returns

Reimplemented inPluginExample.

Definition at line282of fileiapprobodk.h.

PluginEvent()

virtual void PluginEvent ( TypeEvent event_type )
inlinevirtual

This function is called every time there is a new RoboDK event such as rendering the screen, adding/removing items or changing the active station. If event_type isEventRenderyou can render your own graphics here usingIRoboDK::DrawGeometry.

Parameters
event_type type of event (EventRender, EventMoved, EventChanged)

Reimplemented inPluginExample.

Definition at line289of fileiapprobodk.h.

PluginItemClick()

virtual bool PluginItemClick ( Item item,
QMenu * menu,
TypeClick click_type
)
inlinevirtual

This function is called every time a new context menu is created for an item.

Parameters
item 的Item (IItem) clicked
menu Pointer to the context menu
click_type Click type (usually left click)
Returns

Reimplemented inPluginExample.

Definition at line274of fileiapprobodk.h.

PluginItemClickMulti()

virtual bool PluginItemClickMulti ( QList<Item> & item_list,
QMenu * menu,
TypeClick click_type
)
inlinevirtual

This function is called every time a new context menu is created for a list of items.

Parameters
item 的List of Items (IItem) clicked
menu Pointer to the context menu
click_type Click type (usually left click)
Returns

Definition at line296of fileiapprobodk.h.

PluginLoad()

virtual QString PluginLoad ( QMainWindow * mw,
QMenuBar * menubar,
QStatusBar * statusbar,
IRoboDK* rdk,
const QString & settings=""
)
inlinevirtual

Load the plugin. This function is called only once when the plugin is loaded (or RoboDK is started with the plugin).

Parameters
mw RoboDK's QMainwindow. Use this object to add menus in the main window.
menubar Pointer to RoboDK's main menu bar
statusbar Pointer to RoboDK's main status bar
statusbar Pointer RoboDK's interface (implementation of the RoboDK API):IRoboDKandIItem
settings Additional settings (reserved for future compatibility)

Reimplemented inPluginExample.

Definition at line256of fileiapprobodk.h.

PluginLoadToolbar()

virtual void PluginLoadToolbar ( QMainWindow * mw,
int iconsize
)
inlinevirtual

This function is called every time the toolbar is set up. This function is called at least once right afterPluginLoadand it can be called when the user changes the view settings (such as changing from cinema to normal mode) or changes the default toolbar layout (in Tools-Toolbar Layout)

Parameters
mw Pointer to RoboDK's main window.
iconsize 工具栏图标的大小。的size may differ depending on the screen's DPI. It can also be set in Tools-Options-Display menu.

Reimplemented inPluginExample.

Definition at line266of fileiapprobodk.h.

PluginUnload()

virtual void PluginUnload ( )
inlinevirtual

This function is called once only when the plugin is being unloaded.

Reimplemented inPluginExample.

Definition at line260of fileiapprobodk.h.


的documentation for this class was generated from the following file: