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

Abstract class for GUI components. More...

#include <GUIWidget.h>

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

List of all members.

Public Types

enum  layoutType { noLayout, hboxLayout, vboxLayout, gridLayout }

Public Slots

void ioSlot ()
 imediately calls processIO
void addToGrid (QWidget *c, int x=0, int y=0, int width=1, int height=1)
 help function to add new sub components
virtual void processIO ()
 virtual function which must be implemented for a components custom "new-data"-event
virtual QLayout * getGUIWidgetLayout ()
 this function must be reimplemented for other layouts the hbox, vbox or grid
virtual ProxyLayoutgetProxyLayout ()
 this shall help to add containes that dont work with layouts (such as tab-widgets)
GUIgetGUI ()
 returns the underlying GUI structure
void registerCallback (const GUI::Callback &cb)
 registers a callback on this gui widget
void registerCallback (const GUI::ComplexCallback &cb)
 registers a callback on this gui widget
void removeCallbacks ()
 remove all callbacks from this widget
void cb ()
 Callback execution.
virtual QSize sizeHint () const
 returns the widgets preferres size

Public Member Functions

 GUIWidget (const GUIDefinition &def, int minParamCount, int maxParamCount=-1, layoutType lt=gridLayout, const utils::Size &defMinSize=utils::Size(0, 0))
 create a new GUIWidget ( this constructor must be called by all subclasses )
virtual ~GUIWidget ()
 Destructor.

Private Attributes

QGridLayout * m_poGridLayout
 initial layout managers
QLayout * m_poOtherLayout
GUIm_poGUI
std::string * m_handle
std::vector< GUI::Callbackm_vecCallbacks
std::vector< GUI::ComplexCallbackm_vecComplexCallbacks
utils::Size m_preferredSize

Detailed Description

Abstract class for GUI components.


Member Enumeration Documentation

Enumerator:
noLayout 
hboxLayout 
vboxLayout 
gridLayout 

Constructor & Destructor Documentation

icl::qt::GUIWidget::GUIWidget ( const GUIDefinition def,
int  minParamCount,
int  maxParamCount = -1,
layoutType  lt = gridLayout,
const utils::Size defMinSize = utils::Size(0, 0) 
)

create a new GUIWidget ( this constructor must be called by all subclasses )

Parameters:
defGUIDefinition instance
minParamCountminimum count of expected parameters
maxParamCountmaximum count of expected parameters (if -1, this is also minParamCount)
ltlayout-type to use
defMinSizedefault minimum size constraint for the widget
virtual icl::qt::GUIWidget::~GUIWidget ( ) [virtual]

Destructor.


Member Function Documentation

void icl::qt::GUIWidget::addToGrid ( QWidget *  c,
int  x = 0,
int  y = 0,
int  width = 1,
int  height = 1 
) [slot]

help function to add new sub components

This function does only work as long the underlying layout manamer is a QGridLayout

void icl::qt::GUIWidget::cb ( ) [slot]

Callback execution.

this function must be called by each special component when registered callbacks should be executed

GUI* icl::qt::GUIWidget::getGUI ( ) [inline, slot]

returns the underlying GUI structure

virtual QLayout* icl::qt::GUIWidget::getGUIWidgetLayout ( ) [inline, virtual, slot]

this function must be reimplemented for other layouts the hbox, vbox or grid

virtual ProxyLayout* icl::qt::GUIWidget::getProxyLayout ( ) [inline, virtual, slot]

this shall help to add containes that dont work with layouts (such as tab-widgets)

void icl::qt::GUIWidget::ioSlot ( ) [slot]

imediately calls processIO

This slot must be connected to the custom widgets "somethis-has-changed"-signal e.g. A button's "clicked" or a sliders "moved" function

virtual void icl::qt::GUIWidget::processIO ( ) [inline, virtual, slot]

virtual function which must be implemented for a components custom "new-data"-event

void icl::qt::GUIWidget::registerCallback ( const GUI::Callback cb) [inline, slot]

registers a callback on this gui widget

void icl::qt::GUIWidget::registerCallback ( const GUI::ComplexCallback cb) [inline, slot]

registers a callback on this gui widget

void icl::qt::GUIWidget::removeCallbacks ( ) [inline, slot]

remove all callbacks from this widget

virtual QSize icl::qt::GUIWidget::sizeHint ( ) const [virtual, slot]

returns the widgets preferres size


Member Data Documentation

std::string* icl::qt::GUIWidget::m_handle [private]
QGridLayout* icl::qt::GUIWidget::m_poGridLayout [private]

initial layout managers


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