videocollection/tsrc/stubs/inc/hbmessagebox.h
changeset 52 e3cecb93e76a
parent 24 7d93ee07fb27
child 65 a9d57bd8d7b7
equal deleted inserted replaced
47:45e72b57a2fd 52:e3cecb93e76a
    28 class QGraphicsItem;
    28 class QGraphicsItem;
    29 
    29 
    30 class HbMessageBox : public QObject
    30 class HbMessageBox : public QObject
    31 {   
    31 {   
    32     Q_OBJECT
    32     Q_OBJECT
       
    33 
       
    34     Q_FLAGS(StandardButton StandardButtons)
       
    35     Q_ENUMS(MessageBoxType StandardButton)
    33     
    36     
    34 public:
    37 public:
       
    38 
    35     enum MessageBoxType {
    39     enum MessageBoxType {
    36         MessageTypeInformation,
    40         MessageTypeInformation,
    37         MessageTypeQuestion,
    41         MessageTypeQuestion,
    38         MessageTypeWarning
    42         MessageTypeWarning
    39     };
    43     };
    40     
    44 
       
    45     enum StandardButton {
       
    46         NoButton           = 0x00000000,
       
    47         Ok                 = 0x00000400,
       
    48         Save               = 0x00000800,
       
    49         Open               = 0x00001000,
       
    50         Yes                = 0x00002000,
       
    51         Continue           = 0x00004000,
       
    52         Delete             = 0x00008000,
       
    53         No                 = 0x00010000,
       
    54         Retry              = 0x00020000,
       
    55         Close              = 0x00040000,
       
    56         Cancel             = 0x00080000,
       
    57         Help               = 0x00100000,
       
    58         Apply              = 0x00200000,
       
    59         Reset              = 0x00400000
       
    60     };    
       
    61 
       
    62     Q_DECLARE_FLAGS(StandardButtons, StandardButton)
       
    63 
    41     HbMessageBox(MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
    64     HbMessageBox(MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
    42     HbMessageBox(const QString &text, MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
    65     HbMessageBox(const QString &text, MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
    43     ~HbMessageBox();
    66     ~HbMessageBox();
    44     
    67     
    45     /**
    68     /**
    73     static void warning(const QString &warningText,
    96     static void warning(const QString &warningText,
    74         QGraphicsWidget *headWidget = 0,
    97         QGraphicsWidget *headWidget = 0,
    75         QGraphicsScene *scene = 0,
    98         QGraphicsScene *scene = 0,
    76         QGraphicsItem *parent = 0 );
    99         QGraphicsItem *parent = 0 );
    77     
   100     
       
   101     static void setStandardButtons(StandardButtons buttons);
       
   102 
    78     QList<HbAction*> actions() const
   103     QList<HbAction*> actions() const
    79     {
   104     {
    80         return mActions;
   105         return mActions;
    81     }
   106     }
    82 
   107 
    83 signals:
   108 signals:
    84 
   109 
    85     void finished(HbAction *action);
   110     void finished(int action);
    86     
   111     
    87 public:
   112 public:
    88     
   113     
    89     QList<HbAction*> mActions;
   114     QList<HbAction*> mActions;
    90     
   115     
    91 };
   116 };
    92 
   117 
       
   118 Q_DECLARE_OPERATORS_FOR_FLAGS(HbMessageBox::StandardButtons)
       
   119 
    93 #endif // HBMESSAGEBOX_H
   120 #endif // HBMESSAGEBOX_H