OpenMS
2.8.0
|
RAII class to disable the GUI and set a busy cursor and go back to the orignal state when this class is destroyed. More...
#include <OpenMS/VISUAL/MISC/GUIHelpers.h>
Public Member Functions | |
GUILock (QWidget *gui) | |
GUILock (const GUILock &rhs)=delete | |
no copy/assignment allowed More... | |
GUILock (GUILock &&rhs)=delete | |
GUILock & | operator= (const GUILock &rhs)=delete |
~GUILock () | |
D'tor: unlocks the GUI (does nothing if already unlocked) More... | |
void | lock () |
manually lock the GUI (does nothing if already locked) More... | |
void | unlock () |
manually unlock the GUI (does nothing if already unlocked) More... | |
Private Attributes | |
QWidget * | locked_widget_ { nullptr } |
bool | currently_locked_ { false } |
bool | was_enabled_ { true } |
RAII class to disable the GUI and set a busy cursor and go back to the orignal state when this class is destroyed.
C'tor receives the widget to lock
gui | QWidget to lock(including all children); can be nullptr (nothing will be locked) |
~GUILock | ( | ) |
D'tor: unlocks the GUI (does nothing if already unlocked)
void lock | ( | ) |
manually lock the GUI (does nothing if already locked)
void unlock | ( | ) |
manually unlock the GUI (does nothing if already unlocked)
Referenced by TOPPViewBase::addDataFile().
|
private |
|
private |
|
private |