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

Abstract class for GUI components. More...

#include <GUIWidget.h>

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

Public Types

enum  layoutType { noLayout, hboxLayout, vboxLayout, gridLayout }
 

Public Slots

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

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 ) More...
 
virtual ~GUIWidget ()
 Destructor. More...
 

Private Attributes

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

Additional Inherited Members

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

Detailed Description

Abstract class for GUI components.

Member Enumeration Documentation

◆ layoutType

Enumerator
noLayout 
hboxLayout 
vboxLayout 
gridLayout 

Constructor & Destructor Documentation

◆ GUIWidget()

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

◆ ~GUIWidget()

virtual icl::qt::GUIWidget::~GUIWidget ( )
virtual

Destructor.

Member Function Documentation

◆ addToGrid

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

◆ cb

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

Callback execution.

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

◆ getGUI

GUI* icl::qt::GUIWidget::getGUI ( )
inlineslot

returns the underlying GUI structure

◆ getGUIWidgetLayout

virtual QLayout* icl::qt::GUIWidget::getGUIWidgetLayout ( )
inlinevirtualslot

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

◆ getProxyLayout

virtual ProxyLayout* icl::qt::GUIWidget::getProxyLayout ( )
inlinevirtualslot

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

◆ ioSlot

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

◆ processIO

virtual void icl::qt::GUIWidget::processIO ( )
inlinevirtualslot

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

◆ registerCallback [1/2]

void icl::qt::GUIWidget::registerCallback ( const GUI::Callback cb)
inlineslot

registers a callback on this gui widget

◆ registerCallback [2/2]

void icl::qt::GUIWidget::registerCallback ( const GUI::ComplexCallback cb)
inlineslot

registers a callback on this gui widget

◆ removeCallbacks

void icl::qt::GUIWidget::removeCallbacks ( )
inlineslot

remove all callbacks from this widget

◆ sizeHint

virtual QSize icl::qt::GUIWidget::sizeHint ( ) const
virtualslot

returns the widgets preferres size

Member Data Documentation

◆ m_handle

std::string* icl::qt::GUIWidget::m_handle
private

◆ m_poGridLayout

QGridLayout* icl::qt::GUIWidget::m_poGridLayout
private

initial layout managers

◆ m_poGUI

GUI* icl::qt::GUIWidget::m_poGUI
private

◆ m_poOtherLayout

QLayout* icl::qt::GUIWidget::m_poOtherLayout
private

◆ m_preferredSize

utils::Size icl::qt::GUIWidget::m_preferredSize
private

◆ m_vecCallbacks

std::vector<GUI::Callback> icl::qt::GUIWidget::m_vecCallbacks
private

◆ m_vecComplexCallbacks

std::vector<GUI::ComplexCallback> icl::qt::GUIWidget::m_vecComplexCallbacks
private

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