Image Component Library (ICL)
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
icl::qt::GUIComponent Class Reference

The GUIComponent class servers as a generic interface for GUI definitions. More...

#include <GUIComponent.h>

Inheritance diagram for icl::qt::GUIComponent:
icl::geom::Plot3D icl::qt::CamCfg icl::qt::Combo icl::qt::Create icl::qt::Disp icl::qt::Draw icl::qt::Draw3D icl::qt::Dummy icl::qt::Fps icl::qt::GUIComponentWithOutput icl::qt::Image icl::qt::Label icl::qt::Plot icl::qt::Prop icl::qt::Ps icl::qt::Show icl::qt::State icl::qt::String

Classes

struct  Options
 Actual options (set using the .xxx methods) More...
 

Public Member Functions

const GUIComponent & handle (const std::string &handle) const
 sets the component handle More...
 
const GUIComponent & label (const std::string &label) const
 sets the component label More...
 
const GUIComponent & tooltip (const std::string &tooltip) const
 sets the component tooltip More...
 
const GUIComponent & size (const utils::Size &size) const
 sets the component initial size More...
 
const GUIComponent & size (int w, int h) const
 sets the component initial size More...
 
const GUIComponent & minSize (const utils::Size &minSize) const
 sets the component minimum size constraint More...
 
const GUIComponent & minSize (int w, int h) const
 sets the component minimum size constraint More...
 
const GUIComponent & maxSize (const utils::Size &maxSize) const
 sets the component maximum size constraint More...
 
const GUIComponent & maxSize (int w, int h) const
 sets the component maximum size constraint More...
 
const GUIComponent & hideIf (bool flag) const
 hides the component if the given flag is true More...
 
GUIComponent & handle (std::string &handle)
 sets the component handle More...
 
GUIComponent & label (std::string &label)
 sets the component label More...
 
GUIComponent & tooltip (std::string &tooltip)
 sets the component tooltip More...
 
GUIComponent & size (utils::Size &size)
 sets the component initial size More...
 
GUIComponent & size (int w, int h)
 sets the component initial size More...
 
GUIComponent & minSize (utils::Size &minSize)
 sets the component minimum size constraint More...
 
GUIComponent & minSize (int w, int h)
 sets the component minimum size constraint More...
 
GUIComponent & maxSize (utils::Size &maxSize)
 sets the component maximum size constraint More...
 
GUIComponent & maxSize (int w, int h)
 sets the component maximum size constraint More...
 
GUIComponent & hideIf (bool flag)
 hides the component if the given flag is true More...
 
std::string toString () const
 creates a string representation of the component More...
 

Protected Member Functions

 GUIComponent (const std::string &type, const std::string &params="")
 creates a component with given type and optionally given parameters More...
 

Static Protected Member Functions

template<class A , class B , class C >
static std::string form_args_3 (const A &a, const B &b, const C &c)
 utility method to concatenate 3 values More...
 
template<class A , class B , class C , class D >
static std::string form_args_4 (const A &a, const B &b, const C &c, const D &d)
 utility method to concatenate 4 values More...
 
template<class A , class B , class C , class D , class E >
static std::string form_args_5 (const A &a, const B &b, const C &c, const D &d, const E &e)
 utility method to concatenate 5 values More...
 
template<class A , class B , class C , class D , class E , class F >
static std::string form_args_6 (const A &a, const B &b, const C &c, const D &d, const E &e, const F &f)
 utility method to concatenate 5 values More...
 

Protected Attributes

Options m_options
 all component options (mutable for C++-reasons) More...
 
std::string m_type
 component type More...
 
std::string m_params
 component parameters More...
 

Friends

struct ContainerGUIComponent
 friend container class More...
 
class GUI
 friend GUI class More...
 

Detailed Description

The GUIComponent class servers as a generic interface for GUI definitions.

Please refer to the ICL-manual for an introduction to the GUI toolkit

Constructor & Destructor Documentation

◆ GUIComponent()

icl::qt::GUIComponent::GUIComponent ( const std::string &  type,
const std::string &  params = "" 
)
inlineprotected

creates a component with given type and optionally given parameters

the params parameter is a comma-separated list of single entries

Member Function Documentation

◆ form_args_3()

template<class A , class B , class C >
static std::string icl::qt::GUIComponent::form_args_3 ( const A &  a,
const B &  b,
const C &  c 
)
inlinestaticprotected

utility method to concatenate 3 values

◆ form_args_4()

template<class A , class B , class C , class D >
static std::string icl::qt::GUIComponent::form_args_4 ( const A &  a,
const B &  b,
const C &  c,
const D &  d 
)
inlinestaticprotected

utility method to concatenate 4 values

◆ form_args_5()

template<class A , class B , class C , class D , class E >
static std::string icl::qt::GUIComponent::form_args_5 ( const A &  a,
const B &  b,
const C &  c,
const D &  d,
const E &  e 
)
inlinestaticprotected

utility method to concatenate 5 values

◆ form_args_6()

template<class A , class B , class C , class D , class E , class F >
static std::string icl::qt::GUIComponent::form_args_6 ( const A &  a,
const B &  b,
const C &  c,
const D &  d,
const E &  e,
const F &  f 
)
inlinestaticprotected

utility method to concatenate 5 values

◆ handle() [1/2]

const GUIComponent& icl::qt::GUIComponent::handle ( const std::string &  handle) const
inline

sets the component handle

◆ handle() [2/2]

GUIComponent& icl::qt::GUIComponent::handle ( std::string &  handle)
inline

sets the component handle

◆ hideIf() [1/2]

const GUIComponent& icl::qt::GUIComponent::hideIf ( bool  flag) const
inline

hides the component if the given flag is true

this can be used to circumvent C++-language issues when creating GUI components optionally, e.g.

bool flag = ....;
GUI gui;
gui << (flag ? Image() : Dummy()).handle("image"); // does not work
gui << Image().hideIf(!flag).handle("image"); // works

◆ hideIf() [2/2]

GUIComponent& icl::qt::GUIComponent::hideIf ( bool  flag)
inline

hides the component if the given flag is true

hides the component if the given flag is true this can be used to circumvent C++-language issues when creating GUI components optionally, e.g.

bool flag = ....;
GUI gui;
gui << (flag ? Image() : Dummy()).handle("image"); // does not work
gui << Image().hideIf(!flag).handle("image"); // works

◆ label() [1/2]

const GUIComponent& icl::qt::GUIComponent::label ( const std::string &  label) const
inline

sets the component label

◆ label() [2/2]

GUIComponent& icl::qt::GUIComponent::label ( std::string &  label)
inline

sets the component label

◆ maxSize() [1/4]

const GUIComponent& icl::qt::GUIComponent::maxSize ( const utils::Size &  maxSize) const
inline

sets the component maximum size constraint

◆ maxSize() [2/4]

const GUIComponent& icl::qt::GUIComponent::maxSize ( int  w,
int  h 
) const
inline

sets the component maximum size constraint

◆ maxSize() [3/4]

GUIComponent& icl::qt::GUIComponent::maxSize ( utils::Size &  maxSize)
inline

sets the component maximum size constraint

◆ maxSize() [4/4]

GUIComponent& icl::qt::GUIComponent::maxSize ( int  w,
int  h 
)
inline

sets the component maximum size constraint

◆ minSize() [1/4]

const GUIComponent& icl::qt::GUIComponent::minSize ( const utils::Size &  minSize) const
inline

sets the component minimum size constraint

◆ minSize() [2/4]

const GUIComponent& icl::qt::GUIComponent::minSize ( int  w,
int  h 
) const
inline

sets the component minimum size constraint

◆ minSize() [3/4]

GUIComponent& icl::qt::GUIComponent::minSize ( utils::Size &  minSize)
inline

sets the component minimum size constraint

◆ minSize() [4/4]

GUIComponent& icl::qt::GUIComponent::minSize ( int  w,
int  h 
)
inline

sets the component minimum size constraint

◆ size() [1/4]

const GUIComponent& icl::qt::GUIComponent::size ( const utils::Size &  size) const
inline

sets the component initial size

◆ size() [2/4]

const GUIComponent& icl::qt::GUIComponent::size ( int  w,
int  h 
) const
inline

sets the component initial size

◆ size() [3/4]

GUIComponent& icl::qt::GUIComponent::size ( utils::Size &  size)
inline

sets the component initial size

◆ size() [4/4]

GUIComponent& icl::qt::GUIComponent::size ( int  w,
int  h 
)
inline

sets the component initial size

◆ tooltip() [1/2]

const GUIComponent& icl::qt::GUIComponent::tooltip ( const std::string &  tooltip) const
inline

sets the component tooltip

◆ tooltip() [2/2]

GUIComponent& icl::qt::GUIComponent::tooltip ( std::string &  tooltip)
inline

sets the component tooltip

◆ toString()

std::string icl::qt::GUIComponent::toString ( ) const
inline

creates a string representation of the component

Friends And Related Function Documentation

◆ ContainerGUIComponent

friend struct ContainerGUIComponent
friend

friend container class

◆ GUI

friend class GUI
friend

friend GUI class

Member Data Documentation

◆ m_options

Options icl::qt::GUIComponent::m_options
mutableprotected

all component options (mutable for C++-reasons)

◆ m_params

std::string icl::qt::GUIComponent::m_params
protected

component parameters

◆ m_type

std::string icl::qt::GUIComponent::m_type
protected

component type


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