RobWorkProject
Classes | Functions | Variables | Public Slots
RobWorkStudio

Classes

class  RobWorkStudio
 main robwork studio class More...
 
class  RobWorkStudioPlugin
 abstract interface for RobWork Studio plugins More...
 
class  RWStudioView3D
 This class adds RobWorkStudio specific functionality to a WorkCellViewer. More...
 

Functions

 RobWorkStudioPlugin (const QString &name, const QIcon &icon)
 constructor of the plugin interface More...
 
virtual void initialize ()
 is called when RobWorkStudio instance is valid. Can be used to initialize values in the plugin that depend on RobWorkStudio More...
 
virtual void open (rw::models::WorkCell *workcell)
 called when a workcell is opened More...
 
virtual void close ()
 called when a workcell is being closed.
 
virtual QString name () const
 name that describe the plugin instance
 
virtual void setupMenu (QMenu *menu)
 sets up the menu with this plugin More...
 
virtual void setupToolBar (QToolBar *toolbar)
 setsup a toolbar with the actions of this plugin More...
 
virtual void setRobWorkStudio (RobWorkStudio *studio)
 sets the RobWorkStudio instance of the plugin. Normally only done on construction.
 
virtual RobWorkStudiogetRobWorkStudio ()
 returns a handle to the RobWorkStudio instance
 
virtual void setRobWorkInstance (rw::RobWork::Ptr robwork)
 Sets the RobWork instance to be used by the plugin. More...
 
virtual rw::RobWork::Ptr getRobWorkInstance ()
 Returns RobWork instance used by the plugin.
 
virtual rw::common::Loglog ()
 returns the RobWorkStudio log instance
 
virtual void setLog (rw::common::Log::Ptr log)
 Sets the log to use. More...
 
const rw::kinematics::StategetState ()
 get current state of RobWorkStudio
 
void setState (const rw::kinematics::State &state)
 set current state of RobWorkStudio
 
boost::tuple< QWidget *, QAction *, int > getAction (QWidget *widget, const std::string &actionName)
 Find action in widget with name actionName . More...
 
boost::tuple< QWidget *, QMenu *, int > getMenu (QWidget *widget, const std::string &menuName)
 Find menu in widget with name menuName . More...
 
boost::tuple< QMenu *, QAction *, int > getAction (QWidget *widget, const std::string &actionName, const std::string &actionName2)
 Find action, actionName2, in menu, actionName, in a widget. More...
 

Variables

QAction _showAction
 ! More...
 
QString _name
 ! More...
 
RobWorkStudio_studio
 ! More...
 
rw::RobWork::Ptr _robwork
 ! More...
 
rw::common::Log::Ptr _log
 ! More...
 

Public Slots

void showPlugin ()
 toggles the visibility of the plugin
 

Detailed Description

Function Documentation

◆ getAction() [1/2]

boost::tuple<QWidget*, QAction*, int> getAction ( QWidget *  widget,
const std::string &  actionName 
)
protected

Find action in widget with name actionName .

Parameters
widget[in] the widget.
actionName[in] the name to look for.
Returns
a tuple with the widget, the found action and the index of the action. The returned action is NULL and the index is -1 if not found.

◆ getAction() [2/2]

boost::tuple<QMenu*, QAction*,int> getAction ( QWidget *  widget,
const std::string &  actionName,
const std::string &  actionName2 
)
protected

Find action, actionName2, in menu, actionName, in a widget.

Parameters
widget[in] the widget.
actionName[in] the name of the menu to look in.
actionName2[in] the name of the action to look for.
Returns
a tuple with the widget, the found action and the index of the action within the menu. The returned action is NULL and the index is -1 if not found.

◆ getMenu()

boost::tuple<QWidget*, QMenu*,int> getMenu ( QWidget *  widget,
const std::string &  menuName 
)
protected

Find menu in widget with name menuName .

Parameters
widget[in] the widget.
menuName[in] the name to look for.
Returns
a tuple with the widget, the found menu and the index of the action. The returned menu is NULL and the index is -1 if not found.

◆ initialize()

virtual void initialize ( )
virtual

is called when RobWorkStudio instance is valid. Can be used to initialize values in the plugin that depend on RobWorkStudio

Note
DO NOT fire any events under initialization since the order of which plugins are initialized is unknown. Therefore undefined behavior might occour. Instead wait until open is called for the first time.

Reimplemented in GraspTableGeneratorPlugin, TreeView, ATaskVisPlugin, ShowLog, RWSimPlugin, SimUtilityPlugin, Jog, EngineTestPlugin, RWSimulatorPlugin, SimTaskPlugin, PlayBack, GTaskVisPlugin, Lua, Sensors, PropertyView, SimTaskVisPlugin, and GraspPlugin.

◆ open()

virtual void open ( rw::models::WorkCell workcell)
virtual

called when a workcell is opened

Parameters
workcell[in] that has been loadet

Reimplemented in GraspTableGeneratorPlugin, ATaskVisPlugin, Jog, RWSimPlugin, ShowLog, SimUtilityPlugin, TreeView, RWSimulatorPlugin, Lua, Sensors, Planning, SimTaskPlugin, PlayBack, PropertyView, GTaskVisPlugin, SimTaskVisPlugin, and GraspPlugin.

◆ RobWorkStudioPlugin()

RobWorkStudioPlugin ( const QString &  name,
const QIcon &  icon 
)

constructor of the plugin interface

Parameters
name[in] the name of the plugin
icon[in] the icon of the plugin

◆ setLog()

virtual void setLog ( rw::common::Log::Ptr  log)
virtual

Sets the log to use.

Parameters
log[in] Pointer to the log to use.

◆ setRobWorkInstance()

virtual void setRobWorkInstance ( rw::RobWork::Ptr  robwork)
virtual

Sets the RobWork instance to be used by the plugin.

Parameters
robwork[in] RobWork instance

◆ setupMenu()

virtual void setupMenu ( QMenu *  menu)
virtual

sets up the menu with this plugin

Parameters
menu[in] the menu wherein the plugin can add its actions

Reimplemented in RWSimPlugin, and Lua.

◆ setupToolBar()

virtual void setupToolBar ( QToolBar *  toolbar)
virtual

setsup a toolbar with the actions of this plugin

Parameters
toolbar[in] the toolbar wherein the plugin can add its actions

Variable Documentation

◆ _log

rw::common::Log::Ptr _log
protected

!

The log instance to be used

◆ _name

QString _name
protected

!

Name of plugin

◆ _robwork

rw::RobWork::Ptr _robwork
protected

!

The RobWork instance to be used

◆ _showAction

QAction _showAction
protected

!

The show action

◆ _studio

RobWorkStudio* _studio
protected

!

hook back to RobWorkStudio