36 |
36 |
37 CxuiErrorManager(CxuiCaptureKeyHandler &keyHandler,CxuiDocumentLoader *documentLoader); |
37 CxuiErrorManager(CxuiCaptureKeyHandler &keyHandler,CxuiDocumentLoader *documentLoader); |
38 ~CxuiErrorManager(); |
38 ~CxuiErrorManager(); |
39 |
39 |
40 signals: |
40 signals: |
41 |
41 |
42 void aboutToRecoverError(); |
42 void aboutToRecoverError(); |
43 void errorRecovered(); |
43 void errorRecovered(); |
44 |
44 |
45 private slots: |
45 private slots: |
46 |
46 |
47 /* |
|
48 * slot which handles reporting of errors to the client |
|
49 */ |
|
50 void analyze(CxeError::Id error); |
47 void analyze(CxeError::Id error); |
51 |
|
52 /* |
|
53 * slot which handles cases to be considered when we are about to close |
|
54 * the pop-up |
|
55 */ |
|
56 void aboutToClosePopup(); |
48 void aboutToClosePopup(); |
57 |
|
58 /* |
|
59 * slot to close camera app |
|
60 */ |
|
61 void closeApp(); |
49 void closeApp(); |
62 |
50 |
63 private: |
51 private: |
64 |
52 |
65 // error severity |
53 // error severity |
66 enum ErrorSeverity |
54 enum ErrorSeverity |
67 { |
55 { |
68 Severe = 0x01, // when error cannot be recovered |
56 None = 0, |
69 Critical = 0x02, // when error can be recovered, but needs actions e.g. camera in use |
57 Warning, // Low severity, just warning user needed |
70 None = 0x08, // we can ignore the error |
58 Severe, // when error cannot be recovered |
|
59 Critical // when error can be recovered, but needs actions e.g. camera in use |
71 }; |
60 }; |
72 |
61 |
73 /* |
|
74 * Activates popup which displays the error messages based on the |
|
75 * error severity |
|
76 */ |
|
77 void launchPopup(QString& errorMsgTxt); |
62 void launchPopup(QString& errorMsgTxt); |
78 |
63 void showHighSeverityNote(QString& errorMsgTxt); |
79 /* |
64 void showLowSeverityNote(QString& errorMsgTxt); |
80 * check the error severity and get the error msg |
|
81 */ |
|
82 QString getErrorDetails(CxeError::Id error); |
65 QString getErrorDetails(CxeError::Id error); |
83 |
66 |
84 private: |
67 private: |
|
68 |
85 //data |
69 //data |
86 CxuiCaptureKeyHandler &mKeyHandler; |
70 CxuiCaptureKeyHandler &mKeyHandler; |
87 CxuiDocumentLoader *mDocumentLoader; // not own |
71 CxuiDocumentLoader *mDocumentLoader; // not own |
88 HbDialog* mErrorMsgPopup; |
72 HbDialog* mErrorMsgPopup; |
89 CxuiErrorManager::ErrorSeverity mErrorSeverity; |
73 CxuiErrorManager::ErrorSeverity mErrorSeverity; |