camerauis/cameraxui/cxui/inc/cxuierrormanager.h
changeset 40 2922f70fca82
parent 28 3075d9b614e6
child 37 64817133cd1d
equal deleted inserted replaced
39:c5025ea871a1 40:2922f70fca82
    18 #define CXUIERRORMANAGER_H
    18 #define CXUIERRORMANAGER_H
    19 
    19 
    20 #include <QObject>
    20 #include <QObject>
    21 #include "cxeerror.h"
    21 #include "cxeerror.h"
    22 
    22 
       
    23 class HbAction;
    23 class HbDialog;
    24 class HbDialog;
    24 class CxuiDocumentLoader;
    25 class CxuiDocumentLoader;
    25 class CxuiCaptureKeyHandler;
    26 class CxuiCaptureKeyHandler;
    26 
    27 
    27 
    28 
    40 signals:
    41 signals:
    41 
    42 
    42     void aboutToRecoverError();
    43     void aboutToRecoverError();
    43     void errorRecovered();
    44     void errorRecovered();
    44 
    45 
       
    46 public slots:
       
    47 
       
    48     void showPopup(CxeError::Id error);
       
    49     void hidePopup(CxeError::Id error);
       
    50 
    45 private slots:
    51 private slots:
    46 
    52     void popupClosed(HbAction *action);
    47     void analyze(CxeError::Id error);
       
    48     void aboutToClosePopup();
       
    49     void closeApp();
    53     void closeApp();
    50 
    54 
    51 private:
    55 private:
    52 
    56 
    53     // error severity
    57     // error severity
    57         Warning, // Low severity, just warning user needed
    61         Warning, // Low severity, just warning user needed
    58         Severe, // when error cannot be recovered
    62         Severe, // when error cannot be recovered
    59         Critical // when error can be recovered, but needs actions e.g. camera in use
    63         Critical // when error can be recovered, but needs actions e.g. camera in use
    60     };
    64     };
    61 
    65 
    62     void launchPopup(QString& errorMsgTxt);
    66     void launchPopup(const QString &errorText, const QString &buttonText);
    63     void showHighSeverityNote(QString& errorMsgTxt);
    67     void showHighSeverityNote(const QString &errorText, const QString &buttonText);
    64     void showLowSeverityNote(QString& errorMsgTxt);
    68     void showLowSeverityNote(const QString &errorText);
    65     QString getErrorDetails(CxeError::Id error);
    69     void getErrorDetails(QString &errorText, QString &buttonText);
    66 
    70 
    67 private:
    71 private:
    68 
    72 
    69     //data
    73     //data
    70     CxuiCaptureKeyHandler &mKeyHandler;
    74     CxuiCaptureKeyHandler &mKeyHandler;
    71     CxuiDocumentLoader *mDocumentLoader; // not own
    75     CxuiDocumentLoader *mDocumentLoader; // not own
    72     HbDialog* mErrorMsgPopup;
    76     HbDialog* mErrorMsgPopup;
       
    77     CxeError::Id mErrorId;
    73     CxuiErrorManager::ErrorSeverity mErrorSeverity;
    78     CxuiErrorManager::ErrorSeverity mErrorSeverity;
    74 };
    79 };
    75 
    80 
    76 #endif // CXUIVIEWMANAGER_H
    81 #endif // CXUIVIEWMANAGER_H