src/hbcore/gui/hbdialog.h
branchGCC_SURGE
changeset 15 f378acbc9cfb
parent 6 c3690ec91ef8
child 21 4633027730f5
child 34 ed14f46c0e55
equal deleted inserted replaced
9:730c025d4b77 15:f378acbc9cfb
    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 
    38 
    39 public:
    39 public:
       
    40     enum DialogCode { Rejected, Accepted };
       
    41 
    40     explicit HbDialog( QGraphicsItem *parent = 0 );
    42     explicit HbDialog( QGraphicsItem *parent = 0 );
    41     virtual  ~HbDialog();
    43     virtual  ~HbDialog();
    42 
    44 
    43     QGraphicsWidget *headingWidget() const;
    45     QGraphicsWidget *headingWidget() const;
    44     void setHeadingWidget( QGraphicsWidget *headingWidget );
    46     void setHeadingWidget( QGraphicsWidget *headingWidget );
    50     void setPrimaryAction( HbAction *action );
    52     void setPrimaryAction( HbAction *action );
    51 
    53 
    52     HbAction *secondaryAction() const;
    54     HbAction *secondaryAction() const;
    53     void setSecondaryAction( HbAction *action );
    55     void setSecondaryAction( HbAction *action );
    54 
    56 
       
    57     void open( QObject* receiver, const char* member );
       
    58 
    55     enum { Type = Hb::ItemType_Dialog }; // TODO: Hb::ItemType_Dialog
    59     enum { Type = Hb::ItemType_Dialog }; // TODO: Hb::ItemType_Dialog
    56     int type() const { return Type; }
    60     int type() const { return Type; }
    57 
    61 
    58 public slots:
    62 public slots:
    59     void open( QObject* receiver = 0, const char* member = 0 );
    63     void open();
       
    64     virtual void done(int code);
       
    65     virtual void accept();
       
    66     virtual void reject();   
    60 
    67 
    61  signals:
    68 signals:
    62     void finished(HbAction*); 
    69     void finished(HbAction*); 
       
    70     void finished(int);
       
    71     void accepted();
       
    72     void rejected();
    63 
    73 
    64 protected:
    74 protected:
    65     HbDialog( HbDialogPrivate &dd, QGraphicsItem *parent );
    75     HbDialog( HbDialogPrivate &dd, QGraphicsItem *parent );
    66 
    76 
    67     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
    77     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;