#include <QObject>
#include <QStringList>
+#include <QMetaType>
class AlarmSender;
class HWKeyListener;
/*!
* Enumeration of errors
*/
+
enum ErrorCode
{
FileCreationFailed, /*!< File couldn't be created. */
//! Changes the operation mode.
/*!
* Changes the operation mode.
- * \param aChange To indicate if the mode should be changed or not
*/
- void changeMode( bool aChange );
+ void changeMode();
+ void handleHWKeyPresses( bool aToggle );
signals:
//! Signal. Emitted if user tries to change the operation mode.
* \param aAddInfo Possible additional information.
*/
void error( int aCode, const QString &aAddInfo );
-
+ //! Signal. Emitted during the operation mode change to explain the current sub-change.
+ /*!
+ * Signal. Emitted during the operation mode change to explain the current sub-change.
+ * \param aMessage Explains the sub-change
+ */
void changingMode( const QString &aMessage );
+ //! Signal. Emitted if the operation mode change fails.
+ /*!
+ * Signal. Emitted if the operation mode change fails.
+ */
+ void changeModeFailed();
private slots:
//! Slot. Handles "full screen"-hardware key presses.
* \param aAddInfo The possible additional error text.
*/
void errorSender( DeviceManager::ErrorCode aErrorCode, const QString &aAddInfo = "" );
+ //! Slot. Is called after the operation mode changing is finished.
+ /*!
+ * Slot. Is called after the operation mode changing is finished. If everything went fine, restarts
+ * the device.
+ */
void modeChanged();
+ //! Slot. Toggles an attribute that indicates whether the errors should be sent.
+ /*!
+ * Slot. Toggles an attribute that indicates whether the errors should be sent.
+ * \param aToggle Indicates if the errors are wanted to be shown.
+ */
+ void toggleErrorSending( bool aToggle );
private:
//! Updates the internal indicator of the current operation mode.
* \return True if operation mode storing and deactivation of the init script succeed; otherwise, false.
*/
bool finalizeStandAloneMode();
- //! Connects/disconnects the HWKeyListener signals to the private HWKeyFullScreenPressed() slot.
- /*!
- * Connects/disconnects the HWKeyListener signals to the private HWKeyFullScreenPressed() slot. In case
- * a signal is caught the connection is disabled until the signal handling is finished.
- * \param aHandle indicates if the signals should be connected or not.
- */
- void handleKeyPresses( bool aHandle );
- void toggleErrorSending( bool aToggle );
private:
AlarmSender *iAlarmSender;
};
+Q_DECLARE_METATYPE( DeviceManager::ErrorCode )
+
#endif /*DEVICEMANAGER_H_*/