equal
deleted
inserted
replaced
21 #include "cxeerror.h" |
21 #include "cxeerror.h" |
22 |
22 |
23 class HbAction; |
23 class HbAction; |
24 class HbDialog; |
24 class HbDialog; |
25 class CxuiDocumentLoader; |
25 class CxuiDocumentLoader; |
26 class CxuiCaptureKeyHandler; |
|
27 |
26 |
28 |
27 |
29 /* |
28 /* |
30 * class which handles errors and reports |
29 * class which handles errors and reports |
31 */ |
30 */ |
33 { |
32 { |
34 Q_OBJECT |
33 Q_OBJECT |
35 |
34 |
36 public: |
35 public: |
37 |
36 |
38 CxuiErrorManager(CxuiCaptureKeyHandler &keyHandler,CxuiDocumentLoader *documentLoader); |
37 CxuiErrorManager(CxuiDocumentLoader *documentLoader); |
39 ~CxuiErrorManager(); |
38 ~CxuiErrorManager(); |
40 |
39 |
41 signals: |
40 signals: |
42 |
41 |
43 void aboutToRecoverError(); |
42 void errorPopupShown(); |
44 void errorRecovered(); |
43 void errorPopupClosed(); |
45 |
44 |
46 public slots: |
45 public slots: |
47 |
46 |
48 void showPopup(CxeError::Id error); |
47 void check(CxeError::Id error); |
49 void hidePopup(CxeError::Id error); |
48 void clear(); |
50 |
49 |
51 private slots: |
50 private slots: |
52 void popupClosed(HbAction *action); |
51 void popupClosed(HbAction *action); |
53 void closeApp(); |
52 void closeApp(); |
54 |
53 |
56 |
55 |
57 // error severity |
56 // error severity |
58 enum ErrorSeverity |
57 enum ErrorSeverity |
59 { |
58 { |
60 None = 0, |
59 None = 0, |
61 Warning, // Low severity, just warning user needed |
60 Warning, |
62 Severe, // when error cannot be recovered |
61 Error |
63 Critical // when error can be recovered, but needs actions e.g. camera in use |
|
64 }; |
62 }; |
65 |
63 |
66 void launchPopup(const QString &errorText, const QString &buttonText); |
64 void launchPopup(const QString &errorText, const QString &buttonText); |
67 void showHighSeverityNote(const QString &errorText, const QString &buttonText); |
65 void showErrorPopup(const QString &errorText, const QString &buttonText); |
68 void showLowSeverityNote(const QString &errorText); |
66 void showWarningPopup(const QString &errorText); |
69 void getErrorDetails(QString &errorText, QString &buttonText); |
67 void getErrorDetails(QString &errorText, QString &buttonText); |
70 |
68 |
71 private: |
69 private: |
72 |
70 |
73 //data |
71 //data |
74 CxuiCaptureKeyHandler &mKeyHandler; |
|
75 CxuiDocumentLoader *mDocumentLoader; // not own |
72 CxuiDocumentLoader *mDocumentLoader; // not own |
76 HbDialog* mErrorMsgPopup; |
73 HbDialog* mErrorMsgPopup; |
77 CxeError::Id mErrorId; |
74 CxeError::Id mErrorId; |
78 CxuiErrorManager::ErrorSeverity mErrorSeverity; |
75 CxuiErrorManager::ErrorSeverity mErrorSeverity; |
79 }; |
76 }; |