camerauis/cameraxui/cxui/inc/cxuierrormanager.h
changeset 43 0e652f8f1fbd
parent 28 3075d9b614e6
--- a/camerauis/cameraxui/cxui/inc/cxuierrormanager.h	Thu May 13 21:30:19 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuierrormanager.h	Thu Jul 15 01:55:05 2010 +0300
@@ -20,9 +20,9 @@
 #include <QObject>
 #include "cxeerror.h"
 
+class HbAction;
 class HbDialog;
 class CxuiDocumentLoader;
-class CxuiCaptureKeyHandler;
 
 
 /*
@@ -34,18 +34,21 @@
 
 public:
 
-    CxuiErrorManager(CxuiCaptureKeyHandler &keyHandler,CxuiDocumentLoader *documentLoader);
+    CxuiErrorManager(CxuiDocumentLoader *documentLoader);
     ~CxuiErrorManager();
 
 signals:
 
-    void aboutToRecoverError();
-    void errorRecovered();
+    void errorPopupShown();
+    void errorPopupClosed();
+
+public slots:
+
+    void check(CxeError::Id error);
+    void clear();
 
 private slots:
-
-    void analyze(CxeError::Id error);
-    void aboutToClosePopup();
+    void popupClosed(HbAction *action);
     void closeApp();
 
 private:
@@ -54,22 +57,21 @@
     enum ErrorSeverity
     {
         None = 0,
-        Warning, // Low severity, just warning user needed
-        Severe, // when error cannot be recovered
-        Critical // when error can be recovered, but needs actions e.g. camera in use
+        Warning,
+        Error
     };
 
-    void launchPopup(QString& errorMsgTxt);
-    void showHighSeverityNote(QString& errorMsgTxt);
-    void showLowSeverityNote(QString& errorMsgTxt);
-    QString getErrorDetails(CxeError::Id error);
+    void launchPopup(const QString &errorText, const QString &buttonText);
+    void showErrorPopup(const QString &errorText, const QString &buttonText);
+    void showWarningPopup(const QString &errorText);
+    void getErrorDetails(QString &errorText, QString &buttonText);
 
 private:
 
     //data
-    CxuiCaptureKeyHandler &mKeyHandler;
     CxuiDocumentLoader *mDocumentLoader; // not own
     HbDialog* mErrorMsgPopup;
+    CxeError::Id mErrorId;
     CxuiErrorManager::ErrorSeverity mErrorSeverity;
 };