1 #ifndef QCTRLSIGNALHANDLER_H 2 #define QCTRLSIGNALHANDLER_H 5 #include <QScopedPointer> 6 #include <QLoggingCategory> 11 #include <qt_windows.h> 16 class QCtrlSignalHandlerPrivate;
21 friend class QCtrlSignalHandlerPrivate;
22 friend class QCtrlSignalHandlerInstance;
73 Q_DECLARE_LOGGING_CATEGORY(logQCtrlSignals)
75 #endif // QCTRLSIGNALHANDLER_H CommonSignals
Common signals, that are available on all platforms.
static QCtrlSignalHandler * instance()
Returns the singleton instance of the signal handler.
void autoQuitActiveChanged(bool autoQuitActive)
NOTIFY-Accessor for QCtrlSignalHandler::autoQuitActive.
bool unregisterFromSignal(int signal)
Unregisters this handler from the given signal.
void sigTerm()
Shortcut signal for QCtrlSignalHandler::SigTerm.
bool isAutoQuitActive() const
READ-Accessor for QCtrlSignalHandler::autoQuitActive.
void ctrlSignal(int signal)
Will be emitted if a registered signal occures.
bool registerForSignal(int signal)
Registers this handler for the given signal.
Mapped to CTRL_BREAK_EVENT on windows and SIGTERM on unix.
void sigInt()
Shortcut signal for QCtrlSignalHandler::SigInt.
Mapped to CTRL_C_EVENT on windows and SIGINT on unix.
void setAutoQuitActive(bool autoQuitActive)
WRITE-Accessor for QCtrlSignalHandler::autoQuitActive.
bool autoQuitActive
Specifies, whether the handler should automatically handle signals that "quit" the app...
A class to listen for "CTRL-Signals".