src/hbwidgets/popups/hbprogressdialog.h
changeset 1 f7ac710697a9
parent 0 16d8024aca5e
child 2 06ff229162e9
--- a/src/hbwidgets/popups/hbprogressdialog.h	Mon Apr 19 14:02:13 2010 +0300
+++ b/src/hbwidgets/popups/hbprogressdialog.h	Mon May 03 12:48:33 2010 +0300
@@ -23,13 +23,13 @@
 **
 ****************************************************************************/
 
-
 #ifndef HBPROGRESSDIALOG_H
 #define HBPROGRESSDIALOG_H
 
 #include <hbdialog.h>
 
 class HbProgressDialogPrivate;
+class HbStyleOptionProgressDialog;
 
 class HB_WIDGETS_EXPORT HbProgressDialog : public HbDialog
 {
@@ -39,69 +39,77 @@
     Q_PROPERTY( int minimum READ minimum WRITE setMinimum )
     Q_PROPERTY( int value READ progressValue WRITE setProgressValue )
     Q_PROPERTY( bool autoClose READ autoClose WRITE setAutoClose )
-    Q_PROPERTY( ProgressDialogType progressDialogType READ progressDialogType WRITE setProgressDialogType)
     Q_PROPERTY( QString text READ text WRITE setText )
     Q_PROPERTY( HbIcon icon READ icon WRITE setIcon )
+    Q_PROPERTY( ProgressDialogType progressDialogType READ progressDialogType WRITE setProgressDialogType )
+
+    /*  Deprecated */
     Q_PROPERTY( Qt::Alignment textAlignment READ textAlignment WRITE setTextAlignment )
+    /*  Deprecated */
     Q_PROPERTY( Qt::Alignment iconAlignment READ iconAlignment WRITE setIconAlignment )
 
 public:
 
-    enum ProgressDialogType { ProgressDialog,WaitDialog };
+    enum ProgressDialogType { ProgressDialog, WaitDialog };
+
+    explicit HbProgressDialog(QGraphicsItem *parent = 0);
+    HbProgressDialog(ProgressDialogType type, QGraphicsItem *parent = 0);
+    ~HbProgressDialog();
+
+    int maximum() const;
+    int minimum() const;
+
+    void setRange(int min,int max);
+    int progressValue() const;
 
-    HbProgressDialog(ProgressDialogType type , QGraphicsItem *parent = 0);
-    explicit HbProgressDialog(QGraphicsItem *parent = 0);
+    void setAutoClose (bool close);
+    bool autoClose () const;
+
+    void setText(const QString &text);
+    QString text() const;
+
+    void setIcon(const HbIcon &icon);
+    HbIcon icon() const;
+
+    void setProgressDialogType(HbProgressDialog::ProgressDialogType type );
+    HbProgressDialog::ProgressDialogType progressDialogType() const;
 
     enum { Type = Hb::ItemType_ProgressDialog };
     int type() const { return Type; }
 
-    int maximum() const;
-    int minimum() const;
-   
-	void setRange(int min,int max);
-    int progressValue() const;
-    
-	bool autoClose () const ;
-    void setAutoClose ( bool b ) ;
+    QGraphicsItem* primitive(HbStyle::Primitive primitive) const;
+
+    /*  Deprecated */
+    void setTextAlignment(Qt::Alignment align);
+    /*  Deprecated */
+    Qt::Alignment textAlignment() const;
 
-	void setText(const QString &text);
-	QString text() const;
-    
-	void setIcon(const HbIcon &icon);
-	HbIcon icon() const;
-    
-	void setTextAlignment(Qt::Alignment align);
-	Qt::Alignment textAlignment() const;
-    
-	void setIconAlignment(Qt::Alignment align);
-	Qt::Alignment iconAlignment() const;
-    
-    void setProgressDialogType(HbProgressDialog::ProgressDialogType type );
-    HbProgressDialog::ProgressDialogType progressDialogType() const;
-    
-    QGraphicsItem* primitive(HbStyle::Primitive primitive) const;
-    
+    /*  Deprecated */
+    void setIconAlignment(Qt::Alignment align);
+    /*  Deprecated */
+    Qt::Alignment iconAlignment() const;
+
+signals:
+    void cancelled();
+
 public slots:
     void cancel();
     void setProgressValue(int progressValue);
     void setMinimum(int min);
-	void setMaximum(int max);
+    void setMaximum(int max);
     void delayedShow();
 
-signals:
-    void cancelled();
-
 protected:
-	void showEvent(QShowEvent *event);
-	void initStyleOption(HbStyleOption *option) const;
-    void closeEvent ( QCloseEvent * event );
+    void initStyleOption(HbStyleOptionProgressDialog *option) const;
+    void showEvent(QShowEvent *event);
+    void closeEvent(QCloseEvent *event);
 
 private:
     Q_DECLARE_PRIVATE_D(d_ptr, HbProgressDialog)
     Q_DISABLE_COPY(HbProgressDialog)
     Q_PRIVATE_SLOT(d_func(), void _q_finished())
-	Q_PRIVATE_SLOT(d_func(), void _q_progressValueChanged(int))
-	Q_PRIVATE_SLOT(d_func(), void _q_userCancel())
+    Q_PRIVATE_SLOT(d_func(), void _q_progressValueChanged(int))
+    Q_PRIVATE_SLOT(d_func(), void _q_userCancel())
 };
 
 #endif // HBPROGRESSDIALOG_H