applicationmanagement/server/inc/AppMgmtProgDialog.h
branchRCL_3
changeset 57 6757f1e2efd2
parent 0 3ce708148e4d
child 58 5b858729772b
--- a/applicationmanagement/server/inc/AppMgmtProgDialog.h	Thu Aug 19 09:42:30 2010 +0300
+++ b/applicationmanagement/server/inc/AppMgmtProgDialog.h	Tue Aug 31 15:05:55 2010 +0300
@@ -1,89 +1,49 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+ * Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
  *
- * Description:  Implementation of applicationmanagement components
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
  *
-*/
-
-
-#include <eikprogi.h>
-#include <AknWaitDialog.h> 
-#include <AknProgressDialog.h>
-
-#include <coemain.h>
-
-class MDLProgressDlgObserver
-    {
-public:
+ * Contributors:
+ *
+ * Description: Implementation of applicationmanagement components
+ *
+ */
 
-    /**
-     * Called when the dialog is going to be closed.
-     *
-     * @since S60 v3.1
-     * @param aButtonId    Id of the button, which was used to cancel 
-     *                       the dialog.
-     */
-    virtual void HandleDLProgressDialogExitL(TInt aButtonId) = 0;
-    };
-
-class CAppMgmtProgDialog : public CBase, public MProgressDialogCallback
-    {
-public:
+#include <QObject>
+#include <QTimeLine>
+#include <hbprogressdialog.h>
+#include <hbindicator.h>
+#include <download.h>
 
-    CAppMgmtProgDialog(MDLProgressDlgObserver *iCallback);
-    ~CAppMgmtProgDialog();
-
-    void StartProgressNoteL();
-    void UpdateProcessL(TInt aProgress);
-
-    void SetFinalValueL(TInt32 aFinalvalue);
-
-    /**
-     * Offers key event for progress dialog.
-     *
-     * @since S60 v3.1
-     * @param aKeyEvent             Key event
-     * @param aType                 Event type
-     * @return None
-     */
-    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+using namespace WRT;
+class AppMgmtProgDialog : public QObject
+    {
+    Q_OBJECT
 
 public:
-    // from base classes
-
-
-    /**
-     * From CEikDialog, respond to softkey inputs.
-     *
-     * @since S60 v3.1
-     * @para aButtonId, type of pressed Button or Softkey
-     * @return TBool, ETrue if exit the dialog, otherwise EFalse.
-     */
-    TBool OkToExitL(TInt aButtonId);
-
-    void ProgressCompletedL();
-
-public:
-
-protected:
-    // other system interface functions
-    void DialogDismissedL(TInt aButtonId);
-
+    AppMgmtProgDialog(QString aAppData, Download &mdl,int &aUserCancelled);
+    ~AppMgmtProgDialog();
+    void startDialog(int aContentSize,int aDownloaded);
+    void closeAMProgDialog();
+    void updateProgress(int aProgress);
+public slots:
+    void hideAMProgDialog();
+    void cancelDialog();
 private:
-
-    CAknProgressDialog* iProgressDialog;
-    CEikProgressInfo* iProgressInfo;
-
-    MDLProgressDlgObserver* iDlgObserver;
-
+    void sendServerToBackground();
+private:
+    int iContentSize;
+    int mUsrCancel;
+    Download* iDl;
+    QString m_Data;
+    HbProgressDialog* m_Dlg;
+    QString m_Name;
+    QString m_SizeStr;
+    HbIndicator* m_Indi;
     };