videocollection/tsrc/stubs/inc/hbmessagebox.h
changeset 52 e3cecb93e76a
parent 24 7d93ee07fb27
child 65 a9d57bd8d7b7
--- a/videocollection/tsrc/stubs/inc/hbmessagebox.h	Tue Jul 06 14:17:50 2010 +0300
+++ b/videocollection/tsrc/stubs/inc/hbmessagebox.h	Wed Aug 18 09:50:14 2010 +0300
@@ -30,14 +30,37 @@
 class HbMessageBox : public QObject
 {   
     Q_OBJECT
+
+    Q_FLAGS(StandardButton StandardButtons)
+    Q_ENUMS(MessageBoxType StandardButton)
     
 public:
+
     enum MessageBoxType {
         MessageTypeInformation,
         MessageTypeQuestion,
         MessageTypeWarning
     };
-    
+
+    enum StandardButton {
+        NoButton           = 0x00000000,
+        Ok                 = 0x00000400,
+        Save               = 0x00000800,
+        Open               = 0x00001000,
+        Yes                = 0x00002000,
+        Continue           = 0x00004000,
+        Delete             = 0x00008000,
+        No                 = 0x00010000,
+        Retry              = 0x00020000,
+        Close              = 0x00040000,
+        Cancel             = 0x00080000,
+        Help               = 0x00100000,
+        Apply              = 0x00200000,
+        Reset              = 0x00400000
+    };    
+
+    Q_DECLARE_FLAGS(StandardButtons, StandardButton)
+
     HbMessageBox(MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
     HbMessageBox(const QString &text, MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
     ~HbMessageBox();
@@ -75,6 +98,8 @@
         QGraphicsScene *scene = 0,
         QGraphicsItem *parent = 0 );
     
+    static void setStandardButtons(StandardButtons buttons);
+
     QList<HbAction*> actions() const
     {
         return mActions;
@@ -82,7 +107,7 @@
 
 signals:
 
-    void finished(HbAction *action);
+    void finished(int action);
     
 public:
     
@@ -90,4 +115,6 @@
     
 };
 
+Q_DECLARE_OPERATORS_FOR_FLAGS(HbMessageBox::StandardButtons)
+
 #endif // HBMESSAGEBOX_H