1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
13 File: YQSignalBlocker.h
15 Author: Stefan Hundhammer <sh@suse.de>
19 #ifndef YQSignalBlocker_h
20 #define YQSignalBlocker_h
25 * Helper class to block Qt signals for QWidgets or QObjects as long as this
28 * This object will restore the old blocked state when it goes out of scope.
37 * Qt signals for 'qobject' will be blocked as long as this object exists.
38 * Remember that a QWidget is also a QObject.
40 YQSignalBlocker( QObject * qobject );
45 * This will restore the old signal state.
53 bool _oldBlockedState;
57 #endif // ifndef YQSignalBlocker_h