videocollection/tsrc/stubs/inc/hbinputdialog.h
changeset 38 ff53afa8ad05
parent 36 8aed59de29f9
child 39 f6d44a0cd476
equal deleted inserted replaced
37:4eb2df7f7cbe 38:ff53afa8ad05
    18 
    18 
    19 #ifndef HBINPUT_DIALOG_H
    19 #ifndef HBINPUT_DIALOG_H
    20 #define HBINPUT_DIALOG_H
    20 #define HBINPUT_DIALOG_H
    21 
    21 
    22 #include "hbwidget.h"
    22 #include "hbwidget.h"
       
    23 #include "hbaction.h"
       
    24 #include <qvariant.h>
    23 #include <qgraphicsitem.h>
    25 #include <qgraphicsitem.h>
    24 
    26 
    25 class HbInputDialog : public HbWidget
    27 class HbInputDialog : public HbWidget
    26 {
    28 {
    27     Q_OBJECT
    29     Q_OBJECT
    28 
    30 
    29 public:
    31 public:
    30     HbInputDialog(QGraphicsItem *parent= 0) : HbWidget(parent) {}
    32     HbInputDialog(QGraphicsItem *parent= 0);
    31     ~HbInputDialog() {}
    33     ~HbInputDialog();
    32 
    34 
    33     /**
    35     /**
    34      * Returns string in parameter text if mGetTextReturnValue is null QString.
    36      * Returns string in parameter text if mGetTextReturnValue is null QString.
    35      */
    37      */
       
    38     /*
    36     static QString getText(const QString &label,const QString &text = QString(),
    39     static QString getText(const QString &label,const QString &text = QString(),
    37             bool *ok = 0, QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);
    40             bool *ok = 0, QGraphicsScene *scene = 0, QGraphicsItem *parent = 0);*/
    38     
    41     
    39     static bool mGetTextFails;
    42     /**
       
    43      * Create new HbInputDialog after call to this and call emitDialogFinished to finish the sequence.
       
    44      */
       
    45     void getText(const QString &heading
       
    46             ,QObject *receiver
       
    47             ,const char *member
       
    48             ,const QString &text=QString()
       
    49             ,QGraphicsScene *scene=0
       
    50             ,QGraphicsItem *parent=0);
    40     
    51     
    41     static QString mGetTextReturnValue;
    52     void emitDialogFinished( QObject* receiver, const char* member, int actionNum );
    42     
    53     
       
    54     void setAttribute(int attribute);
       
    55     
       
    56     QList<HbAction*> actions() const
       
    57     {
       
    58         return mActions;
       
    59     }
       
    60     
       
    61     QVariant value(int row = 0) { Q_UNUSED(row); mValueCallCount++; return mValueReturnValue; }
       
    62     
       
    63 signals:
       
    64 
       
    65     void finished(HbAction *action);
       
    66     
       
    67 public:
       
    68 
       
    69     QList<HbAction*> mActions;
       
    70     
       
    71     static QString mLastHeading;
       
    72     static QString mLastText;
    43     static int mGetTextCallCount;
    73     static int mGetTextCallCount;
       
    74     static int mAttribute;
       
    75     
       
    76     static QVariant mValueReturnValue;
       
    77     static int mValueCallCount;
    44 };
    78 };
    45 
    79 
    46 #endif //HBINPUT_DIALOG_H
    80 #endif //HBINPUT_DIALOG_H
    47 
    81