1
#ifndef PLUGINEXAMPLE_H
2
#define PLUGINEXAMPLE_H
8
# include“iapprobodk.h”
9
#include "robodktypes.h"
29Q_PLUGIN_METADATA(IID
"RoboDK.IAppRoboDK")
36
virtualQString
PluginLoad(QMainWindow *mw, QMenuBar *menubar, QStatusBar *statusbar,
RoboDK*rdk,
constQString &settings=
"")
override;
40
virtualQString
PluginCommand(
constQString &command,
constQString &value)
override;
Interface to RoboDK. Each plugin must implement this class to establish the interface to RoboDK....
TypeEvent
Event types for PluginEvent function.
virtual QString PluginName()=0
Return the plugin name. Try to be creative and make sure the name is unique.
TypeClick
Types of clicks for PluginItemClick function.
The Item class represents an item in RoboDK station. An item can be a robot, a frame,...
This class is the iterface to the RoboDK API. With the RoboDK API you can automate certain tasks and ...
The PluginExample class shows the structure of a RoboDK plugin. A RoboDK plugin must implement the IA...
virtual void PluginEvent(TypeEvent event_type) override
This function is called every time there is a new RoboDK event such as rendering the screen,...
void callback_information()
Called when the information button/action is selected.
QDockWidget * dock_robotpilot
Pointer to the docked window.
void callback_robotpilot()
Called when the robot pilot button/action is selected.
FormRobotPilot * form_robotpilot
Pointer to the robot pilot form.
QToolBar * toolbar1
Pointer to the customized toolbar.
空白callback_help ()
Called when the user select the button/action for help.
virtual void PluginUnload() override
This function is called once only when the plugin is being unloaded.
QMainWindow * MainWindow
RoboDK's main window pointer.
QStatusBar * StatusBar
RoboDK's main status bar pointer.
void callback_robotpilot_closed()
Called when the robot pilot window is closed (event triggered by the dock window)
QAction * action_robotpilot
Open robot pilot form action. callback_robotpilot is triggered with this action. Actions are required...
QMenu * menu1
Pointer to the customized menu.
RoboDK * RDK
Pointer to the RoboDK API interface.
虚拟QString PluginCommand (const QString逗号nd, const QString &value) override
Specific commands can be passed from the RoboDK API. For example, a parent application can rely on a ...
virtual bool PluginItemClick(Item item, QMenu *menu, TypeClick click_type) override
This function is called every time a new context menu is created for an item.
QAction * action_help
Open help action. callback_help is triggered with this action. Actions are required to populate toolb...
virtual Q_PLUGIN_METADATA(IID "RoboDK.IAppRoboDK") public QString PluginLoad(QMainWindow *mw, QMenuBar *menubar, QStatusBar *statusbar, RoboDK *rdk, const QString &settings="") override
Load the plugin. This function is called only once when the plugin is loaded (or RoboDK is started wi...
virtual void PluginLoadToolbar(QMainWindow *mw, int icon_size) override
This function is called every time the toolbar is set up. This function is called at least once right...
QAction * action_information
Information action. callback_information is triggered with this action. Actions are required to popul...