diff options
author | Bea Lam <bea.lam@nokia.com> | 2009-10-27 05:43:23 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2009-10-27 05:43:23 (GMT) |
commit | cc4bca61687f6441984ccc58ad177d24b6d3e92f (patch) | |
tree | c861eadc58164b58a92b6c4a2c67ef16ac7a412c /tools/qmldebugger/standalone/expressionquerywidget.h | |
parent | b5b6861dd1a82ea9be9b2d2f89ba5cc9dea150ac (diff) | |
download | Qt-cc4bca61687f6441984ccc58ad177d24b6d3e92f.zip Qt-cc4bca61687f6441984ccc58ad177d24b6d3e92f.tar.gz Qt-cc4bca61687f6441984ccc58ad177d24b6d3e92f.tar.bz2 |
Move qmldebugger/ into qmldebugger/standalone dir.
Diffstat (limited to 'tools/qmldebugger/standalone/expressionquerywidget.h')
-rw-r--r-- | tools/qmldebugger/standalone/expressionquerywidget.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/tools/qmldebugger/standalone/expressionquerywidget.h b/tools/qmldebugger/standalone/expressionquerywidget.h new file mode 100644 index 0000000..6fab059 --- /dev/null +++ b/tools/qmldebugger/standalone/expressionquerywidget.h @@ -0,0 +1,65 @@ +#ifndef EXPRESSIONQUERYWIDGET_H +#define EXPRESSIONQUERYWIDGET_H + +#include <QWidget> + +#include <QtDeclarative/qmldebug.h> + +QT_BEGIN_NAMESPACE + +class QGroupBox; +class QTextEdit; +class QLineEdit; +class QPushButton; + +class ExpressionQueryWidget : public QWidget +{ + Q_OBJECT +public: + enum Style { + Compact, + Shell + }; + + ExpressionQueryWidget(QmlEngineDebug *client = 0, QWidget *parent = 0); + + void setEngineDebug(QmlEngineDebug *client); + void clear(); + +protected: + bool eventFilter(QObject *obj, QEvent *event); + +public slots: + void setCurrentObject(const QmlDebugObjectReference &obj); + +private slots: + void executeExpression(); + void showResult(); + +private: + void appendPrompt(); + void checkCurrentContext(); + void showCurrentContext(); + void updateTitle(); + + Style m_style; + + QmlEngineDebug *m_client; + QmlDebugExpressionQuery *m_query; + QTextEdit *m_textEdit; + QLineEdit *m_lineEdit; + QPushButton *m_button; + QString m_prompt; + QString m_expr; + QString m_lastExpr; + + QString m_title; + + QmlDebugObjectReference m_currObject; + QmlDebugObjectReference m_objectAtLastFocus; +}; + +QT_END_NAMESPACE + +#endif + |