Image Component Library (ICL)
Public Member Functions | Private Attributes | List of all members
icl::qt::RSBRemoteGUI Class Reference

Creates an RSB-interface to externally get and set parameters of the wrapped GUI. More...

#include <RSBRemoteGUI.h>

Inheritance diagram for icl::qt::RSBRemoteGUI:
icl::utils::Uncopyable

Public Member Functions

 RSBRemoteGUI (GUI *gui=0, const std::string &rsbBaseScope="", bool createSetterGUI=false, bool verboseMode=false)
 Constructor that wraps around an exisiting GUI instance. More...
 
void setVerboseMode (bool on)
 sets up the verbose mode, that writes some debug info to std::out More...
 
void init (GUI *gui, const std::string &rsbBaseScope, bool createSetterGUI=false)
 initializes this instance by wrapping around the given GUI More...
 
 ~RSBRemoteGUI ()
 Destructor. More...
 

Private Attributes

Data * m_data
 internal data class More...
 

Additional Inherited Members

- Protected Member Functions inherited from icl::utils::Uncopyable
 Uncopyable ()
 Empty base constructor. More...
 

Detailed Description

Creates an RSB-interface to externally get and set parameters of the wrapped GUI.

For each GUI-component that has a given 'handle', the RSBRemoteGUI will create an RSB-informer that informs if the component's content changes or was pressed and an RSB-listener that can be used to externally set the component state. As informer scopes, the given base-scope is used and the component's handle is appended as sub-scope. E.g. if the base-scope is /foo/bar, and the following GUI layout is used (

See also
qt::DynamicGUI):
<vbox>
  <image handle="vis" label="Current image">
  <hbox>
     <slider args="0,255,128" handle="threshold" label="The Threshold">
     <button args="Click Me" handle="the button">
  </hbox>
</vbox>
, the following RSB-informers are created /foo/bar/vis Which sends stringified mouse-events that occur on the image component /foo/bar/threshold Which sends slider valus as strings /foo/bar/the_button Which sends a "1" string when the button was pressed

Please note, that spaces in the handle-names are internally translated to underscore characters as RSB-scopes do not support spaces. All informers uses std::strings as type.

In addition to the informers, each component is also endowed with an RSB-listener: /foo/bar/set/vis Allows for setting the visualized image (*this is a more complex listener) /foo/bar/set/threshold Allows for setting the current threshold slider value /foo/bar/set/the_button Allows for externally 'clicking' the button

Please note, that for externally setting values of the RemoteGUI, the "/set/" subscope is inserted. A special treatment was needed for image, draw and draw3D componenents, as setting images using a stringified transport syntax would be very inefficient. Instead, for each component of that type, a standard io::RSBGrabber instance is instantiated and internally automatically synchronized with the corresponding GUI component, so that other applications can simply send images using an io::RSBImageOutput (we strongly recommend to use the io::GenericImageSender instead) allows for setting

Constructor & Destructor Documentation

◆ RSBRemoteGUI()

icl::qt::RSBRemoteGUI::RSBRemoteGUI ( GUI gui = 0,
const std::string &  rsbBaseScope = "",
bool  createSetterGUI = false,
bool  verboseMode = false 
)

Constructor that wraps around an exisiting GUI instance.

The existing GUI instance must have been 'created' before. An empty rsbBaseScope can only be used in the null-construction case, i.e. when the gui-argument is also null.

The createSetterGUI argument is used for debugging purpose only. It allows to create the counter-part of an RSBRemoteGUI for testing the GUI synchronization

◆ ~RSBRemoteGUI()

icl::qt::RSBRemoteGUI::~RSBRemoteGUI ( )

Destructor.

Member Function Documentation

◆ init()

void icl::qt::RSBRemoteGUI::init ( GUI gui,
const std::string &  rsbBaseScope,
bool  createSetterGUI = false 
)

initializes this instance by wrapping around the given GUI

See also
RSBRemoteGUI::RSBRemoteGUI

◆ setVerboseMode()

void icl::qt::RSBRemoteGUI::setVerboseMode ( bool  on)

sets up the verbose mode, that writes some debug info to std::out

Member Data Documentation

◆ m_data

Data* icl::qt::RSBRemoteGUI::m_data
private

internal data class

internal data pointer


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