Image Component Library (ICL)
|
Abstract class for GUI components. More...
#include <GUIWidget.h>
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 ProxyLayout * | getProxyLayout () |
this shall help to add containes that dont work with layouts (such as tab-widgets) | |
GUI * | getGUI () |
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 |
GUI * | m_poGUI |
std::string * | m_handle |
std::vector< GUI::Callback > | m_vecCallbacks |
std::vector< GUI::ComplexCallback > | m_vecComplexCallbacks |
utils::Size | m_preferredSize |
Abstract class for GUI components.
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 )
def | GUIDefinition instance |
minParamCount | minimum count of expected parameters |
maxParamCount | maximum count of expected parameters (if -1, this is also minParamCount) |
lt | layout-type to use |
defMinSize | default minimum size constraint for the widget |
virtual icl::qt::GUIWidget::~GUIWidget | ( | ) | [virtual] |
Destructor.
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
std::string* icl::qt::GUIWidget::m_handle [private] |
QGridLayout* icl::qt::GUIWidget::m_poGridLayout [private] |
initial layout managers
GUI* icl::qt::GUIWidget::m_poGUI [private] |
QLayout* icl::qt::GUIWidget::m_poOtherLayout [private] |
std::vector<GUI::Callback> icl::qt::GUIWidget::m_vecCallbacks [private] |
std::vector<GUI::ComplexCallback> icl::qt::GUIWidget::m_vecComplexCallbacks [private] |