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

Special Utiltiy class for handling Button clicks in the ICL GUI API. More...

#include <ButtonHandle.h>

Inheritance diagram for icl::qt::ButtonHandle:
icl::qt::GUIHandle< QPushButton > icl::qt::GUIHandleBase

Public Member Functions

ICLQt_API ButtonHandle ()
 creates a n empty button handle More...
 
ICLQt_API ButtonHandle (QPushButton *b, GUIWidget *w)
 create a new event with a given button id More...
 
ICLQt_API bool wasTriggered (bool reset=true)
 check if this event/button was triggered More...
 
void trigger (bool execCallbacks=true)
 trigger this event (sets the internal boolean variable to true) More...
 
ICLQt_API void setButtonText (std::string const &text)
 
ICLQt_API void reset ()
 sets the internal boolean variable to false More...
 
ICLQt_API const std::string & getID () const
 returns this buttons id (uncommon) More...
 
- Public Member Functions inherited from icl::qt::GUIHandle< QPushButton >
const QPushButton * operator * () const
 use the *-oprator to get the wrapped component (const) More...
 
QPushButton *& operator * ()
 use the *-oprator to get the wrapped component (unconst) More...
 
QPushButton * operator-> ()
 this can be used for direct access to wrapped type More...
 
const QPushButton * operator-> () const
 this can be used for direct access to wrapped type More...
 
bool isNull () const
 returns whether wrapped pointer is null or not More...
 
void enable ()
 enables the wrapped GUI component More...
 
void disable ()
 disables the wrapped GUI component More...
 
- Public Member Functions inherited from icl::qt::GUIHandleBase
virtual ~GUIHandleBase ()
 virtual destructor More...
 
GUIWidgetgetGUIWidget ()
 returns parent GUIWidget pointer More...
 
virtual void registerCallback (const GUI::Callback &cb, const std::string &events="all")
 registers a callback on this gui widget More...
 
virtual void registerCallback (const GUI::ComplexCallback &cb, const std::string &events="all")
 registers a complex callback on this gui component More...
 
virtual void removeCallbacks ()
 removes all callbacks from parent GUIWidget component More...
 
virtual void cb ()
 envokes all registered callbacks More...
 

Private Attributes

utils::SmartPtr< bool > m_triggered
 internal boolean variable More...
 
std::string m_sID
 corresponding id More...
 

Friends

class ButtonGUIWidget
 
class ToggleButtonGUIWidget
 

Additional Inherited Members

- Protected Member Functions inherited from icl::qt::GUIHandle< QPushButton >
 GUIHandle ()
 as GUIHandle is just an interface, its base constructor is protected More...
 
 GUIHandle (QPushButton *t, GUIWidget *w)
 as GUIHandle is just an interface, its base constructor is protected More...
 
- Protected Member Functions inherited from icl::qt::GUIHandleBase
 GUIHandleBase (GUIWidget *w=0)
 create a new GUIHandleBase More...
 

Detailed Description

Special Utiltiy class for handling Button clicks in the ICL GUI API.

Constructor & Destructor Documentation

◆ ButtonHandle() [1/2]

ICLQt_API icl::qt::ButtonHandle::ButtonHandle ( )

creates a n empty button handle

◆ ButtonHandle() [2/2]

ICLQt_API icl::qt::ButtonHandle::ButtonHandle ( QPushButton *  b,
GUIWidget w 
)

create a new event with a given button id

Member Function Documentation

◆ getID()

ICLQt_API const std::string& icl::qt::ButtonHandle::getID ( ) const

returns this buttons id (uncommon)

◆ reset()

ICLQt_API void icl::qt::ButtonHandle::reset ( )

sets the internal boolean variable to false

◆ setButtonText()

ICLQt_API void icl::qt::ButtonHandle::setButtonText ( std::string const &  text)
inline

◆ trigger()

void icl::qt::ButtonHandle::trigger ( bool  execCallbacks = true)
inline

trigger this event (sets the internal boolean variable to true)

◆ wasTriggered()

ICLQt_API bool icl::qt::ButtonHandle::wasTriggered ( bool  reset = true)

check if this event/button was triggered

Parameters
resetif set to true the internal boolen variable is set to false, so wasTriggered returns true only if the button was triggered again

Friends And Related Function Documentation

◆ ButtonGUIWidget

friend class ButtonGUIWidget
friend

◆ ToggleButtonGUIWidget

friend class ToggleButtonGUIWidget
friend

Member Data Documentation

◆ m_sID

std::string icl::qt::ButtonHandle::m_sID
private

corresponding id

◆ m_triggered

utils::SmartPtr<bool> icl::qt::ButtonHandle::m_triggered
private

internal boolean variable


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