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 ) |
38 |
39 |
39 public: |
40 public: |
40 enum DialogCode { Rejected, Accepted }; |
41 enum DialogCode { Rejected, Accepted }; |
41 |
42 |
42 explicit HbDialog( QGraphicsItem *parent = 0 ); |
43 explicit HbDialog( QGraphicsItem *parent = 0 ); |
43 virtual ~HbDialog(); |
44 virtual ~HbDialog(); |
44 |
45 |
45 QGraphicsWidget *headingWidget() const; |
46 QGraphicsWidget *headingWidget() const; |
46 void setHeadingWidget( QGraphicsWidget *headingWidget ); |
47 void setHeadingWidget( QGraphicsWidget *headingWidget ); |
47 |
48 |
48 QGraphicsWidget *contentWidget() const; |
49 QGraphicsWidget *contentWidget() const; |
49 void setContentWidget( QGraphicsWidget *contentWidget ); |
50 void setContentWidget( QGraphicsWidget *contentWidget ); |
50 |
51 |
|
52 bool dismissOnAction() const; |
|
53 void setDismissOnAction(bool dismissOnAction); |
|
54 |
51 HbAction *primaryAction() const; |
55 HbAction *primaryAction() const; |
52 void setPrimaryAction( HbAction *action ); |
56 void setPrimaryAction( HbAction *action ); |
53 |
57 |
54 HbAction *secondaryAction() const; |
58 HbAction *secondaryAction() const; |
55 void setSecondaryAction( HbAction *action ); |
59 void setSecondaryAction( HbAction *action ); |
56 |
60 |
57 void open( QObject* receiver, const char* member ); |
61 void open( QObject* receiver, const char* member ); |
58 |
62 |
59 enum { Type = Hb::ItemType_Dialog }; // TODO: Hb::ItemType_Dialog |
63 enum { Type = Hb::ItemType_Dialog }; |
60 int type() const { return Type; } |
64 int type() const { return Type; } |
61 |
65 |
62 public slots: |
66 public slots: |
63 void open(); |
67 void open(); |
64 virtual void done(int code); |
68 virtual void done(int code); |