1 #ifndef OPERATIONMODETOGGLER_H_
2 #define OPERATIONMODETOGGLER_H_
4 #include "DeviceManager.h"
10 class DeviceConfigurator;
11 class DeviceDataStorage;
13 class OperationModeToggler : public QThread
20 * Constructor for HWKeyListener class
23 DeviceManager::OperationMode aMode,
24 StartupSettings *aSettings,
25 AlarmSender *aAlarmSender,
26 DeviceConfigurator *aConfigurator,
27 DeviceDataStorage *aDataStorage
31 virtual ~OperationModeToggler();
32 //! Run method of the class.
34 * Run method of the class.
38 //! Stores the current operation mode.
40 * Stores the current operation mode by asking the DeviceDataStorage to write it to the internal
42 * \param aMode The operation mode that user wants to activate.
43 * \return True if operation mode storing succeeds; otherwise, false.
45 static bool storeOperationMode( DeviceManager::OperationMode aMode, DeviceDataStorage *aDataStorage );
48 void error( DeviceManager::ErrorCode aCode );
49 void toggleErrorSending( bool aToggle );
50 void changingMode( const QString &aMessage );
53 DeviceManager::OperationMode iMode;
54 StartupSettings *iSettings;
55 AlarmSender *iAlarmSender;
56 DeviceConfigurator *iConfigurator;
57 DeviceDataStorage *iDataStorage;
61 #endif /*OPERATIONMODETOGGLER_H_*/