Image Component Library (ICL)
|
The GUIComponent class servers as a generic interface for GUI definitions. More...
#include <GUIComponent.h>
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 | |
const GUIComponent & | label (const std::string &label) const |
sets the component label | |
const GUIComponent & | tooltip (const std::string &tooltip) const |
sets the component tooltip | |
const GUIComponent & | size (const utils::Size &size) const |
sets the component initial size | |
const GUIComponent & | size (int w, int h) const |
sets the component initial size | |
const GUIComponent & | minSize (const utils::Size &minSize) const |
sets the component minimum size constraint | |
const GUIComponent & | minSize (int w, int h) const |
sets the component minimum size constraint | |
const GUIComponent & | maxSize (const utils::Size &maxSize) const |
sets the component maximum size constraint | |
const GUIComponent & | maxSize (int w, int h) const |
sets the component maximum size constraint | |
const GUIComponent & | hideIf (bool flag) const |
hides the component if the given flag is true | |
GUIComponent & | handle (std::string &handle) |
sets the component handle | |
GUIComponent & | label (std::string &label) |
sets the component label | |
GUIComponent & | tooltip (std::string &tooltip) |
sets the component tooltip | |
GUIComponent & | size (utils::Size &size) |
sets the component initial size | |
GUIComponent & | size (int w, int h) |
sets the component initial size | |
GUIComponent & | minSize (utils::Size &minSize) |
sets the component minimum size constraint | |
GUIComponent & | minSize (int w, int h) |
sets the component minimum size constraint | |
GUIComponent & | maxSize (utils::Size &maxSize) |
sets the component maximum size constraint | |
GUIComponent & | maxSize (int w, int h) |
sets the component maximum size constraint | |
GUIComponent & | hideIf (bool flag) |
hides the component if the given flag is true | |
std::string | toString () const |
creates a string representation of the component | |
Protected Member Functions | |
GUIComponent (const std::string &type, const std::string ¶ms="") | |
creates a component with given type and optionally given parameters | |
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 | |
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 | |
Protected Attributes | |
Options | m_options |
all component options (mutable for C++-reasons) | |
std::string | m_type |
component type | |
std::string | m_params |
component parameters | |
Friends | |
struct | ContainerGUIComponent |
friend container class | |
class | GUI |
friend GUI class |
The GUIComponent class servers as a generic interface for GUI definitions.
Please refer to the ICL-manual for an introduction to the GUI toolkit
icl::qt::GUIComponent::GUIComponent | ( | const std::string & | type, |
const std::string & | params = "" |
||
) | [inline, protected] |
creates a component with given type and optionally given parameters
the params parameter is a comma-separated list of single entries
static std::string icl::qt::GUIComponent::form_args_3 | ( | const A & | a, |
const B & | b, | ||
const C & | c | ||
) | [inline, static, protected] |
utility method to concatenate 3 values
static std::string icl::qt::GUIComponent::form_args_4 | ( | const A & | a, |
const B & | b, | ||
const C & | c, | ||
const D & | d | ||
) | [inline, static, protected] |
utility method to concatenate 4 values
const GUIComponent& icl::qt::GUIComponent::handle | ( | const std::string & | handle | ) | const [inline] |
sets the component handle
Reimplemented in icl::qt::GUIComponentWithOutput.
GUIComponent& icl::qt::GUIComponent::handle | ( | std::string & | handle | ) | [inline] |
sets the component handle
Reimplemented in icl::qt::GUIComponentWithOutput.
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
Reimplemented in icl::qt::GUIComponentWithOutput.
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
Reimplemented in icl::qt::GUIComponentWithOutput.
const GUIComponent& icl::qt::GUIComponent::label | ( | const std::string & | label | ) | const [inline] |
sets the component label
Reimplemented in icl::qt::GUIComponentWithOutput.
GUIComponent& icl::qt::GUIComponent::label | ( | std::string & | label | ) | [inline] |
sets the component label
Reimplemented in icl::qt::GUIComponentWithOutput.
const GUIComponent& icl::qt::GUIComponent::maxSize | ( | const utils::Size & | maxSize | ) | const [inline] |
sets the component maximum size constraint
Reimplemented in icl::qt::GUIComponentWithOutput.
const GUIComponent& icl::qt::GUIComponent::maxSize | ( | int | w, |
int | h | ||
) | const [inline] |
sets the component maximum size constraint
Reimplemented in icl::qt::GUIComponentWithOutput.
GUIComponent& icl::qt::GUIComponent::maxSize | ( | utils::Size & | maxSize | ) | [inline] |
sets the component maximum size constraint
Reimplemented in icl::qt::GUIComponentWithOutput.
GUIComponent& icl::qt::GUIComponent::maxSize | ( | int | w, |
int | h | ||
) | [inline] |
sets the component maximum size constraint
Reimplemented in icl::qt::GUIComponentWithOutput.
const GUIComponent& icl::qt::GUIComponent::minSize | ( | const utils::Size & | minSize | ) | const [inline] |
sets the component minimum size constraint
Reimplemented in icl::qt::GUIComponentWithOutput.
const GUIComponent& icl::qt::GUIComponent::minSize | ( | int | w, |
int | h | ||
) | const [inline] |
sets the component minimum size constraint
Reimplemented in icl::qt::GUIComponentWithOutput.
GUIComponent& icl::qt::GUIComponent::minSize | ( | utils::Size & | minSize | ) | [inline] |
sets the component minimum size constraint
Reimplemented in icl::qt::GUIComponentWithOutput.
GUIComponent& icl::qt::GUIComponent::minSize | ( | int | w, |
int | h | ||
) | [inline] |
sets the component minimum size constraint
Reimplemented in icl::qt::GUIComponentWithOutput.
const GUIComponent& icl::qt::GUIComponent::size | ( | const utils::Size & | size | ) | const [inline] |
sets the component initial size
Reimplemented in icl::qt::GUIComponentWithOutput.
const GUIComponent& icl::qt::GUIComponent::size | ( | int | w, |
int | h | ||
) | const [inline] |
sets the component initial size
Reimplemented in icl::qt::GUIComponentWithOutput.
GUIComponent& icl::qt::GUIComponent::size | ( | utils::Size & | size | ) | [inline] |
sets the component initial size
Reimplemented in icl::qt::GUIComponentWithOutput.
GUIComponent& icl::qt::GUIComponent::size | ( | int | w, |
int | h | ||
) | [inline] |
sets the component initial size
Reimplemented in icl::qt::GUIComponentWithOutput.
const GUIComponent& icl::qt::GUIComponent::tooltip | ( | const std::string & | tooltip | ) | const [inline] |
sets the component tooltip
Reimplemented in icl::qt::GUIComponentWithOutput.
GUIComponent& icl::qt::GUIComponent::tooltip | ( | std::string & | tooltip | ) | [inline] |
sets the component tooltip
Reimplemented in icl::qt::GUIComponentWithOutput.
std::string icl::qt::GUIComponent::toString | ( | ) | const [inline] |
creates a string representation of the component
friend struct ContainerGUIComponent [friend] |
friend container class
Options icl::qt::GUIComponent::m_options [mutable, protected] |
all component options (mutable for C++-reasons)
std::string icl::qt::GUIComponent::m_params [protected] |
component parameters
std::string icl::qt::GUIComponent::m_type [protected] |
component type