Image Component Library (ICL)
|
Special Utiltiy class for handling Button clicks in the ICL GUI API. More...
#include <ButtonHandle.h>
Public Member Functions | |
ICLQt_API | ButtonHandle () |
creates a n empty button handle | |
ICLQt_API | ButtonHandle (QPushButton *b, GUIWidget *w) |
create a new event with a given button id | |
ICLQt_API bool | wasTriggered (bool reset=true) |
check if this event/button was triggered | |
void | trigger (bool execCallbacks=true) |
trigger this event (sets the internal boolean variable to true) | |
ICLQt_API void | reset () |
sets the internal boolean variable to false | |
ICLQt_API const std::string & | getID () const |
returns this buttons id (uncommon) | |
Private Attributes | |
utils::SmartPtr< bool > | m_triggered |
internal boolean variable | |
std::string | m_sID |
corresponding id | |
Friends | |
class | ButtonGUIWidget |
class | ToggleButtonGUIWidget |
creates a n empty button handle
ICLQt_API icl::qt::ButtonHandle::ButtonHandle | ( | QPushButton * | b, |
GUIWidget * | w | ||
) |
create a new event with a given button id
ICLQt_API const std::string& icl::qt::ButtonHandle::getID | ( | ) | const |
returns this buttons id (uncommon)
ICLQt_API void icl::qt::ButtonHandle::reset | ( | ) |
sets the internal boolean variable to false
void icl::qt::ButtonHandle::trigger | ( | bool | execCallbacks = true | ) | [inline] |
trigger this event (sets the internal boolean variable to true)
ICLQt_API bool icl::qt::ButtonHandle::wasTriggered | ( | bool | reset = true | ) |
check if this event/button was triggered
reset | if set to true the internal boolen variable is set to false, so wasTriggered returns true only if the button was triggered again |
friend class ButtonGUIWidget [friend] |
friend class ToggleButtonGUIWidget [friend] |
std::string icl::qt::ButtonHandle::m_sID [private] |
corresponding id
utils::SmartPtr<bool> icl::qt::ButtonHandle::m_triggered [private] |
internal boolean variable