src/gui/kernel/qsoftkeymanager_p.h
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
child 8 3f74d0d4af4c
equal deleted inserted replaced
4:3b1da2848fc7 5:d3bac044e0f0
    61 #ifndef QT_NO_SOFTKEYMANAGER
    61 #ifndef QT_NO_SOFTKEYMANAGER
    62 QT_BEGIN_NAMESPACE
    62 QT_BEGIN_NAMESPACE
    63 
    63 
    64 class QSoftKeyManagerPrivate;
    64 class QSoftKeyManagerPrivate;
    65 
    65 
       
    66 const char MENU_ACTION_PROPERTY[] = "_q_menuaction";
       
    67 
    66 class Q_AUTOTEST_EXPORT QSoftKeyManager : public QObject
    68 class Q_AUTOTEST_EXPORT QSoftKeyManager : public QObject
    67 {
    69 {
    68     Q_OBJECT
    70     Q_OBJECT
    69     Q_DECLARE_PRIVATE(QSoftKeyManager)
    71     Q_DECLARE_PRIVATE(QSoftKeyManager)
    70 
    72 
    77         MenuSoftKey,
    79         MenuSoftKey,
    78         CancelSoftKey
    80         CancelSoftKey
    79     };
    81     };
    80 
    82 
    81     static void updateSoftKeys();
    83     static void updateSoftKeys();
       
    84 #ifdef Q_WS_S60
       
    85     static bool handleCommand(int);
       
    86 #endif
       
    87 
    82     static QAction *createAction(StandardSoftKey standardKey, QWidget *actionWidget);
    88     static QAction *createAction(StandardSoftKey standardKey, QWidget *actionWidget);
    83     static QAction *createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget);
    89     static QAction *createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget);
    84 
    90 
    85 #ifdef Q_WS_S60
    91 protected:
    86     static bool handleCommand(int);
    92     bool event(QEvent *e);
    87 #endif
       
    88 
    93 
    89 private:
    94 private:
    90     QSoftKeyManager();
    95     QSoftKeyManager();
    91     static QSoftKeyManager *instance();
    96     static QSoftKeyManager *instance();
    92     static const char *standardSoftKeyText(StandardSoftKey standardKey);
    97     static const char *standardSoftKeyText(StandardSoftKey standardKey);
    93 
    98     bool appendSoftkeys(const QWidget &source, int level);
    94 protected:
    99     QWidget *softkeySource(QWidget *previousSource, bool& recursiveMerging);
    95     bool event(QEvent *e);
   100     bool handleUpdateSoftKeys();
    96 
       
    97     Q_DISABLE_COPY(QSoftKeyManager)
       
    98 
   101 
    99 private Q_SLOTS:
   102 private Q_SLOTS:
   100     void cleanupHash(QObject* obj);
   103     void cleanupHash(QObject* obj);
   101     void sendKeyEvent();
   104     void sendKeyEvent();
       
   105 
       
   106 private:
       
   107     Q_DISABLE_COPY(QSoftKeyManager)
   102 };
   108 };
   103 
   109 
   104 QT_END_NAMESPACE
   110 QT_END_NAMESPACE
   105 #endif //QT_NO_SOFTKEYMANAGER
   111 #endif //QT_NO_SOFTKEYMANAGER
   106 
   112