Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
icl::qt::GUIDefinition Class Reference

Utilty class to simplify creation of GUI components. More...

#include <GUIDefinition.h>

List of all members.

Public Member Functions

 GUIDefinition (const std::string &def, GUI *gui, QLayout *parentLayout=0, ProxyLayout *parentProxyLayout=0, QWidget *parentWidget=0)
 create a new GUI Definition
const std::string & type () const
 return the type string
const std::string & label () const
 return the lable string
const std::string & handle () const
 return the handle id string
const utils::Sizesize () const
 return this size (or utils::Size::null)
const utils::SizeminSize () const
 retunrs the minimum size of the widget or size::null
const utils::SizemaxSize () const
 returns the maxinum size of the widget or size::null
int margin () const
 returns the layout margin
int spacing () const
 returns the layout spacing
GUIgetGUI () const
 return the parent GUI
QLayout * parentLayout () const
 return the parent layout or null if there is nor parent
ProxyLayoutgetProxyLayout () const
 returns the parent widgets proxy layout
unsigned int numParams () const
 returns the number of params
const std::string & param (unsigned int idx) const
 returns a param at given index
int intParam (unsigned int idx) const
 returns a param at given index as int (using atoi)
float floatParam (unsigned int idx) const
 returns a param at given index as float (using atof)
const std::string & input (unsigned int idx) const
 returns an input name
const std::string & output (unsigned int idx) const
 returns an output name
unsigned int numInputs () const
 returns the number of params
unsigned int numOutputs () const
 returns the number of params
void show () const
 show this GUIDefinition to std::out
const std::string & defString () const
 returns the whole definition string (for debugging!)
QWidget * parentWidget () const
 returns the current parent widget (or 0 if there is non)
const std::vector< std::string > & allParams () const
 returns a list of all parameters
const std::string & toolTip () const
 returns the tooltip text
bool hasToolTip () const
 returns whether the tooltip text is not ""

Private Attributes

std::string m_sDefinitionString
std::string m_sType
std::vector< std::string > m_vecParams
std::vector< std::string > m_vecOutputs
std::vector< std::string > m_vecInputs
std::string m_sLabel
std::string m_sHandle
utils::Size m_oSize
utils::Size m_oMinSize
utils::Size m_oMaxSize
int m_iMargin
int m_iSpacing
GUIm_poGUI
QLayout * m_poParentLayout
QWidget * m_poParentWidget
ProxyLayoutm_poParentProxyLayout
std::string m_toolTip

Detailed Description

Utilty class to simplify creation of GUI components.


Constructor & Destructor Documentation

icl::qt::GUIDefinition::GUIDefinition ( const std::string &  def,
GUI gui,
QLayout *  parentLayout = 0,
ProxyLayout parentProxyLayout = 0,
QWidget *  parentWidget = 0 
)

create a new GUI Definition


Member Function Documentation

const std::vector<std::string>& icl::qt::GUIDefinition::allParams ( ) const [inline]

returns a list of all parameters

const std::string& icl::qt::GUIDefinition::defString ( ) const [inline]

returns the whole definition string (for debugging!)

float icl::qt::GUIDefinition::floatParam ( unsigned int  idx) const

returns a param at given index as float (using atof)

GUI* icl::qt::GUIDefinition::getGUI ( ) const [inline]

return the parent GUI

returns the parent widgets proxy layout

const std::string& icl::qt::GUIDefinition::handle ( ) const [inline]

return the handle id string

bool icl::qt::GUIDefinition::hasToolTip ( ) const [inline]

returns whether the tooltip text is not ""

const std::string& icl::qt::GUIDefinition::input ( unsigned int  idx) const

returns an input name

if the given input index was actually not defined, a dummy input name is created

int icl::qt::GUIDefinition::intParam ( unsigned int  idx) const

returns a param at given index as int (using atoi)

const std::string& icl::qt::GUIDefinition::label ( ) const [inline]

return the lable string

int icl::qt::GUIDefinition::margin ( ) const [inline]

returns the layout margin

const utils::Size& icl::qt::GUIDefinition::maxSize ( ) const [inline]

returns the maxinum size of the widget or size::null

const utils::Size& icl::qt::GUIDefinition::minSize ( ) const [inline]

retunrs the minimum size of the widget or size::null

unsigned int icl::qt::GUIDefinition::numInputs ( ) const [inline]

returns the number of params

unsigned int icl::qt::GUIDefinition::numOutputs ( ) const [inline]

returns the number of params

unsigned int icl::qt::GUIDefinition::numParams ( ) const [inline]

returns the number of params

const std::string& icl::qt::GUIDefinition::output ( unsigned int  idx) const

returns an output name

if the given output index was actually not defined, a dummy output name is created

const std::string& icl::qt::GUIDefinition::param ( unsigned int  idx) const

returns a param at given index

QLayout* icl::qt::GUIDefinition::parentLayout ( ) const [inline]

return the parent layout or null if there is nor parent

QWidget* icl::qt::GUIDefinition::parentWidget ( ) const [inline]

returns the current parent widget (or 0 if there is non)

show this GUIDefinition to std::out

const utils::Size& icl::qt::GUIDefinition::size ( ) const [inline]

return this size (or utils::Size::null)

int icl::qt::GUIDefinition::spacing ( ) const [inline]

returns the layout spacing

const std::string& icl::qt::GUIDefinition::toolTip ( ) const [inline]

returns the tooltip text

const std::string& icl::qt::GUIDefinition::type ( ) const [inline]

return the type string


Member Data Documentation

std::string icl::qt::GUIDefinition::m_sHandle [private]
std::string icl::qt::GUIDefinition::m_sLabel [private]
std::string icl::qt::GUIDefinition::m_sType [private]
std::string icl::qt::GUIDefinition::m_toolTip [private]
std::vector<std::string> icl::qt::GUIDefinition::m_vecInputs [private]
std::vector<std::string> icl::qt::GUIDefinition::m_vecOutputs [private]
std::vector<std::string> icl::qt::GUIDefinition::m_vecParams [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines