summaryrefslogtreecommitdiffstats
path: root/tools/qmldebugger/standalone/expressionquerywidget.h
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-10-27 05:43:23 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-10-27 05:43:23 (GMT)
commitcc4bca61687f6441984ccc58ad177d24b6d3e92f (patch)
treec861eadc58164b58a92b6c4a2c67ef16ac7a412c /tools/qmldebugger/standalone/expressionquerywidget.h
parentb5b6861dd1a82ea9be9b2d2f89ba5cc9dea150ac (diff)
downloadQt-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.h65
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
+