videocollection/tsrc/stubs/inc/hbmessagebox.h
changeset 24 7d93ee07fb27
parent 15 cf5481c2bc0b
child 44 518105d52e45
child 52 e3cecb93e76a
equal deleted inserted replaced
20:b9e04db066d4 24:7d93ee07fb27
    17 
    17 
    18 
    18 
    19 #ifndef HBMESSAGEBOX_H
    19 #ifndef HBMESSAGEBOX_H
    20 #define HBMESSAGEBOX_H
    20 #define HBMESSAGEBOX_H
    21 
    21 
       
    22 #include <qobject.h>
    22 #include <qstring.h>
    23 #include <qstring.h>
       
    24 #include "hbaction.h"
    23 
    25 
    24 class QGraphicsWidget;
    26 class QGraphicsWidget;
    25 class QGraphicsScene;
    27 class QGraphicsScene;
    26 class QGraphicsItem;
    28 class QGraphicsItem;
    27 
    29 
    28 class HbMessageBox
    30 class HbMessageBox : public QObject
    29 {   
    31 {   
       
    32     Q_OBJECT
       
    33     
    30 public:
    34 public:
       
    35     enum MessageBoxType {
       
    36         MessageTypeInformation,
       
    37         MessageTypeQuestion,
       
    38         MessageTypeWarning
       
    39     };
       
    40     
       
    41     HbMessageBox(MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
       
    42     HbMessageBox(const QString &text, MessageBoxType type = MessageTypeInformation, QGraphicsItem *parent = 0);
       
    43     ~HbMessageBox();
       
    44     
       
    45     /**
       
    46     * Create new HbMessageBox and call emitDialogFinished after this one to finish the sequence.
       
    47      */
       
    48     void open( QObject* receiver = 0, const char* member = 0 );
       
    49     
       
    50     void emitDialogFinished( QObject* receiver, const char* member, int actionNum );
       
    51 
       
    52     void show();
       
    53     
       
    54     void setAttribute(int attribute);
       
    55     
    31     /** stubbed from HbMessgeBox */
    56     /** stubbed from HbMessgeBox */
    32     static bool question(const QString &questionText,
    57 /*    static void question(const QString &questionText,
    33         const QString &primaryButtonText = QString(),
    58                             QObject *receiver,
    34         const QString &secondaryButtonText = QString(),
    59                             const char *member,
    35         QGraphicsWidget *headWidget = 0,
    60                             const QString &primaryButtonText = tr("Yes"),
    36         QGraphicsScene *scene = 0,
    61                             const QString &secondaryButtonText = tr("No"),
    37         QGraphicsItem *parent = 0);
    62                             QGraphicsWidget *headWidget = 0,
       
    63                             QGraphicsScene *scene = 0,
       
    64                             QGraphicsItem *parent = 0 );*/
    38 
    65 
    39     /** stubbed from HbMessgeBox */
    66     /** stubbed from HbMessgeBox */
    40     static void information(const QString &informationText,
    67     static void information(const QString &informationText,
    41         QGraphicsWidget *headWidget = 0,
    68         QGraphicsWidget *headWidget = 0,
    42         QGraphicsScene *scene = 0,
    69         QGraphicsScene *scene = 0,
    45     /** stubbed from HbMessgeBox */
    72     /** stubbed from HbMessgeBox */
    46     static void warning(const QString &warningText,
    73     static void warning(const QString &warningText,
    47         QGraphicsWidget *headWidget = 0,
    74         QGraphicsWidget *headWidget = 0,
    48         QGraphicsScene *scene = 0,
    75         QGraphicsScene *scene = 0,
    49         QGraphicsItem *parent = 0 );
    76         QGraphicsItem *parent = 0 );
       
    77     
       
    78     QList<HbAction*> actions() const
       
    79     {
       
    80         return mActions;
       
    81     }
       
    82 
       
    83 signals:
       
    84 
       
    85     void finished(HbAction *action);
       
    86     
       
    87 public:
       
    88     
       
    89     QList<HbAction*> mActions;
       
    90     
    50 };
    91 };
    51 
    92 
    52 
       
    53 
       
    54 #endif // HBMESSAGEBOX_H
    93 #endif // HBMESSAGEBOX_H