33 class HbDialogPrivate; |
33 class HbDialogPrivate; |
34 |
34 |
35 class HB_CORE_EXPORT HbDialog : public HbPopup |
35 class HB_CORE_EXPORT HbDialog : public HbPopup |
36 { |
36 { |
37 Q_OBJECT |
37 Q_OBJECT |
|
38 Q_PROPERTY( bool dismissOnAction READ dismissOnAction WRITE setDismissOnAction ) |
|
39 Q_PROPERTY( QString headingText READ headingText WRITE setHeadingText ) |
38 |
40 |
39 public: |
41 public: |
40 enum DialogCode { Rejected, Accepted }; |
42 enum DialogCode { Rejected, Accepted }; |
41 |
43 |
42 explicit HbDialog( QGraphicsItem *parent = 0 ); |
44 explicit HbDialog( QGraphicsItem *parent = 0 ); |
43 virtual ~HbDialog(); |
45 virtual ~HbDialog(); |
44 |
46 |
45 QGraphicsWidget *headingWidget() const; |
47 QGraphicsWidget *headingWidget() const; |
46 void setHeadingWidget( QGraphicsWidget *headingWidget ); |
48 void setHeadingWidget( QGraphicsWidget *headingWidget ); |
47 |
49 |
|
50 QString headingText() const; |
|
51 void setHeadingText(const QString &heading); |
|
52 |
48 QGraphicsWidget *contentWidget() const; |
53 QGraphicsWidget *contentWidget() const; |
49 void setContentWidget( QGraphicsWidget *contentWidget ); |
54 void setContentWidget( QGraphicsWidget *contentWidget ); |
|
55 |
|
56 bool dismissOnAction() const; |
|
57 void setDismissOnAction(bool dismissOnAction); |
50 |
58 |
51 HbAction *primaryAction() const; |
59 HbAction *primaryAction() const; |
52 void setPrimaryAction( HbAction *action ); |
60 void setPrimaryAction( HbAction *action ); |
53 |
61 |
54 HbAction *secondaryAction() const; |
62 HbAction *secondaryAction() const; |
55 void setSecondaryAction( HbAction *action ); |
63 void setSecondaryAction( HbAction *action ); |
56 |
64 |
57 void open( QObject* receiver, const char* member ); |
65 void open( QObject* receiver, const char* member ); |
58 |
66 |
59 enum { Type = Hb::ItemType_Dialog }; // TODO: Hb::ItemType_Dialog |
67 enum { Type = Hb::ItemType_Dialog }; |
60 int type() const { return Type; } |
68 int type() const { return Type; } |
61 |
69 |
62 public slots: |
70 public slots: |
63 void open(); |
71 void open(); |
64 virtual void done(int code); |
72 virtual void done(int code); |