fotaapplication/fotaserver/inc/fotafullscreendialog.h
changeset 73 ae69c2e8bc34
parent 51 2e64dc50f295
equal deleted inserted replaced
71:d2517372cc44 73:ae69c2e8bc34
    40     };
    40     };
    41 
    41 
    42 // CLASS DECLARATION
    42 // CLASS DECLARATION
    43 
    43 
    44 /**
    44 /**
    45  *  FotaFullscreenDialog
    45  *  HbFotaFullscreenDialog
    46  * 
    46  * 
    47  */
    47  */
    48 class FotaFullscreenDialog : public QObject
    48 class HbFotaFullscreenDialog : public QObject
    49     {
    49     {
    50 Q_OBJECT
    50 Q_OBJECT
    51 
    51 
    52 public:
    52 public:
    53 
    53 
    54     FotaFullscreenDialog(CFotaServer* aObserver);
    54 		/**
    55 
    55      * Constructor to construct the fullscreen dialog.
    56     ~FotaFullscreenDialog();
    56      * @param   aObserver - Observer to notify the user inputs from the fullscreen dialog
       
    57      * @return   void
       
    58      */
       
    59     HbFotaFullscreenDialog(CFotaServer* aObserver);
       
    60 
       
    61 
       
    62 		/**
       
    63      * Destructor for the full screen dialog
       
    64      * @return   void
       
    65      */
       
    66     ~HbFotaFullscreenDialog();
    57 
    67 
    58     /**
    68     /**
    59      * This function updates the details of the update to the fullscreen dialog.
    69      * This function updates the details of the update to the fullscreen dialog.
    60      * @param   size - The total size of the update package.
    70      * @param   size - The total size of the update package.
    61      * @param   version - The version of the soeftware that is being updated.
    71      * @param   version - The version of the soeftware that is being updated.
    62      * @param   aName - the package name of the current update.
    72      * @param   aName - the package name of the current update.
    63      * @return   void
    73      * @return   void
    64      */
    74      */
    65     void SetSoftwareDetails(int size, const QString version,
    75     void setSoftwareDetails(int size, const QString version,
    66             const QString aName);
    76             const QString aName);
    67 
    77 
    68     /**
    78     /**
    69      * This function updates the download progress bar to the progress value passed.
    79      * This function updates the download progress bar to the progress value passed.
    70      * @param   aType - the state in which the firmware update is in(downloading or donwload complete)
    80      * @param   aType - the state in which the firmware update is in(downloading or donwload complete)
    71      * @return   void
    81      * @return   void
    72      */
    82      */
    73     void SetWarningDetails(TFotaWarningType aType);
    83     void setWarningDetails(TFotaWarningType aType);
    74 
    84 
    75     /**
    85     /**
    76      * This function updates the download progress bar to the progress value passed.
    86      * This function updates the download progress bar to the progress value passed.
    77      * @param   aProgress - the progress value to be update to the progress bar.
    87      * @param   aProgress - the progress value to be update to the progress bar.
    78      * @return   void
    88      * @return   void
    79      */
    89      */
    80     void UpdateProgressBar(TInt aProgress);
    90     void updateProgressBar(TInt aProgress);
    81 
    91 
    82     /**
    92     /**
    83      * Used to change the warnings and softkeys required for the update dialog
    93      * Used to change the warnings and softkeys required for the update dialog
    84      * @param   void
    94      * @param   void
    85      * @return   void
    95      * @return   void
    86      */
    96      */
    87     void ShowUpdateDialog();
    97     void showUpdateDialog();
    88 
    98 
    89     /**
    99     /**
    90      * Used to refresh the dialog when the content of the dialog content changes.
   100      * Used to refresh the dialog when the content of the dialog content changes.
    91      * @param   void
   101      * @param   void
    92      * @return   void
   102      * @return   void
    93      */
   103      */
    94     void Close();
   104     void close();
    95 
   105 
    96     /**
   106     /**
    97      * Used to disable the RSK of the dialog when resume dialogs
   107      * Used to disable the RSK of the dialog when resume dialogs
    98      * @param   aVal - to enable or disable the key
   108      * @param   aVal - to enable or disable the key
    99      * @return   void
   109      * @return   void
   100      */
   110      */
   101     void DisableRSK(TBool aVal);
   111     void disableRSK(TBool aVal);
   102 
   112 
   103     bool IsLSKEnabled();
   113     /**
   104 
   114      * Used to determine if the LSK of the dialog is enabled or not.
   105     void SetVisible(TBool aVisible);
   115      * @return   bool: returns if LSK id enabled or disabled.
       
   116      */
       
   117     bool isLSKEnabled();
       
   118 
       
   119     /**
       
   120      * Used to set the fullscreen dialog visible
       
   121      * @param   aVisible - To set the visibility to true/false.
       
   122      * @return   void
       
   123      */
       
   124     void setVisible(TBool aVisible);
   106 
   125 
   107 private:
   126 private:
   108 
   127 
   109     /**
   128     /**
   110      * Used to refresh the dialog when the content of the dialog changes.
   129      * Used to refresh the dialog when the content of the dialog changes.
   111      * @param   void
   130      * @param   void
   112      * @return   void
   131      * @return   void
   113      */
   132      */
   114     void RefreshDialog();
   133     void refreshDialog();
   115 
   134 
   116 public slots:
   135 public slots:
   117 
   136 
   118     /**
   137     /**
   119      * Slot to be called when user selects the Left soft key.
   138      * Slot to be called when user selects the Left soft key.
   120      * @param   void
   139      * @param   void
   121      * @return   void
   140      * @return   void
   122      */
   141      */
   123     void LSKSelected();
   142     void lSKSelected();
   124 
   143 
   125     /**
   144     /**
   126      * Slot to be called when user selects the Right soft key.
   145      * Slot to be called when user selects the Right soft key.
   127      * @param   void
   146      * @param   void
   128      * @return   void
   147      * @return   void
   129      */
   148      */
   130     void RSKSelected();
   149     void rSKSelected();
   131 
   150 
   132     /**
   151     /**
   133      * Slot to be called when the dialog is about to get closed.
   152      * Slot to be called when the dialog is about to get closed.
   134      * @param   void
   153      * @param   void
   135      * @return   void
   154      * @return   void
   137     void aboutToClose();
   156     void aboutToClose();
   138 
   157 
   139 private:
   158 private:
   140 
   159 
   141     // dialog instance
   160     // dialog instance
   142     HbDialog * idialog;
   161     HbDialog * m_dialog;
   143 
   162 
   144     //document loader to load the widgets
   163     //document loader to load the widgets
   145     HbDocumentLoader iloader;
   164     HbDocumentLoader m_loader;
   146 
   165 
   147     //progress bar for updating download progress
   166     //progress bar for updating download progress
   148     HbProgressBar * iprogressBar;
   167     HbProgressBar * m_progressBar;
   149 
   168 
   150     // Fota server instance to send the keypress event
   169     // Fota server instance to send the keypress event
   151     CFotaServer* iServer;
   170     CFotaServer* m_Server;
   152 
   171 
   153     // LSK of the dialog
   172     // LSK of the dialog
   154     HbPushButton * iPrimaryAction;
   173     HbPushButton * m_PrimaryAction;
   155 
   174 
   156     // RSK of the dialog
   175     // RSK of the dialog
   157     HbPushButton * iSecondaryAction;
   176     HbPushButton * m_SecondaryAction;
   158 
   177 
   159     // Flag to differentiate from keypress and dialog timeout case.
   178     // Flag to differentiate from keypress and dialog timeout case.
   160     TBool iClicked;
   179     TBool m_Clicked;
   161 
   180 
   162     // Warning note displayed in the full screen dialog 
   181     // Warning note displayed in the full screen dialog 
   163     HbLabel *iInstallNote;
   182     HbLabel *m_InstallNote;
   164 
   183 
   165     // Warning note displayed in the full screen dialog
   184     // Warning note displayed in the full screen dialog
   166     HbLabel *iRestartNote;
   185     HbLabel *m_RestartNote;
   167 
   186 
   168     // Warning note displayed in the full screen dialog
   187     // Warning note displayed in the full screen dialog
   169     HbLabel *iRestartIcon;
   188     HbLabel *m_RestartIcon;
   170 
   189 
   171     // Warning note displayed in the full screen dialog
   190     // Warning note displayed in the full screen dialog
   172     HbLabel *iEmergencyNote;
   191     HbLabel *m_EmergencyNote;
   173 
   192 
   174     // Warning note displayed in the full screen dialog
   193     // Warning note displayed in the full screen dialog
   175     HbLabel *iEmergencyIcon;
   194     HbLabel *m_EmergencyIcon;
   176 
   195 
   177     // Warning note displayed in the full screen dialog
   196     // Warning note displayed in the full screen dialog
   178     HbLabel *iChargerNote;
   197     HbLabel *m_ChargerNote;
   179 
   198 
   180     HbLabel *iChargerIcon;
   199 		// Variable which holds the charger icon from the docml.
       
   200     HbLabel *m_ChargerIcon;
   181 
   201 
   182     // To display the state of the download above progress bar
   202     // To display the state of the download above progress bar
   183     HbLabel *iDownloadState;
   203     HbLabel *m_DownloadState;
   184 
   204 
   185     // Fullscreen dialog title.
   205     // Fullscreen dialog title.
   186     HbLabel *iTitle;
   206     HbLabel *m_Title;
   187     // Firmware details that is to be shwon in full screen dialog.
   207     // Firmware details that is to be shwon in full screen dialog.
   188     HbLabel *iSwDetails;
   208     HbLabel *m_SwDetails;
   189     };
   209     };
   190 
   210 
   191 #endif // CLASSNAME_H
   211 #endif // CLASSNAME_H