videocollection/videofiledetailsview/tsrc/testplugin/stub/inc/hbmessagebox.h
changeset 52 e3cecb93e76a
parent 24 7d93ee07fb27
equal deleted inserted replaced
47:45e72b57a2fd 52:e3cecb93e76a
    26 #include <hbaction.h>
    26 #include <hbaction.h>
    27 
    27 
    28 class HbMessageBox : public QObject 
    28 class HbMessageBox : public QObject 
    29 {
    29 {
    30     Q_OBJECT
    30     Q_OBJECT
       
    31 
    31 public:
    32 public:
    32 
    33 
    33     enum MessageBoxType {
    34     enum MessageBoxType {
    34         MessageTypeInformation,
    35         MessageTypeInformation,
    35         MessageTypeQuestion,
    36         MessageTypeQuestion,
    36         MessageTypeWarning
    37         MessageTypeWarning
    37     };
    38     };
    38     
    39 
       
    40     enum StandardButton {
       
    41         NoButton           = 0x00000000,
       
    42         Ok                 = 0x00000400,
       
    43         Save               = 0x00000800,
       
    44         Open               = 0x00001000,
       
    45         Yes                = 0x00002000,
       
    46         Continue           = 0x00004000,
       
    47         Delete             = 0x00008000,
       
    48         No                 = 0x00010000,
       
    49         Retry              = 0x00020000,
       
    50         Close              = 0x00040000,
       
    51         Cancel             = 0x00080000,
       
    52         Help               = 0x00100000,
       
    53         Apply              = 0x00200000,
       
    54         Reset              = 0x00400000
       
    55     };    
       
    56 
       
    57     Q_DECLARE_FLAGS(StandardButtons, StandardButton)
       
    58 
    39     HbMessageBox(MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
    59     HbMessageBox(MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
    40     HbMessageBox(const QString &text, MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
    60     HbMessageBox(const QString &text, MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
    41     ~HbMessageBox();
    61     ~HbMessageBox();
    42     
    62     
    43     void show();
    63     void show();
    65     static void information(QString text)
    85     static void information(QString text)
    66     {
    86     {
    67         mLatestTxt = text;
    87         mLatestTxt = text;
    68     }
    88     }
    69     
    89     
       
    90     static void setStandardButtons(StandardButtons buttons);
       
    91 
    70     QList<HbAction*> actions() const
    92     QList<HbAction*> actions() const
    71     {
    93     {
    72         return mActions;
    94         return mActions;
    73     }
    95     }
    74     
    96     
    84     
   106     
    85     QList<HbAction*> mActions;
   107     QList<HbAction*> mActions;
    86     
   108     
    87 signals:
   109 signals:
    88 
   110 
    89     void finished(HbAction *action);
   111     void finished(int);
    90 };
   112 };
    91 
   113 
       
   114 Q_DECLARE_OPERATORS_FOR_FLAGS(HbMessageBox::StandardButtons)
       
   115 
    92 #endif // HBMESSAGEBOX_H
   116 #endif // HBMESSAGEBOX_H