blob: 8db8f9f844130b9645bb312005dc9d4f3651cd00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#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, QWidget *parent = 0);
protected:
bool eventFilter(QObject *obj, QEvent *event);
public slots:
void setCurrentObject(const QmlDebugObjectReference &obj);
private slots:
void executeExpression();
void showResult();
void lineEditTextChanged(const QString &s);
private:
void appendPrompt();
void checkCurrentContext();
void showCurrentContext();
void updateTitle();
Style m_style;
QmlEngineDebug *m_client;
QmlDebugExpressionQuery *m_query;
QGroupBox *m_groupBox;
QTextEdit *m_textEdit;
QLineEdit *m_lineEdit;
QPushButton *m_button;
QString m_prompt;
QString m_expr;
QString m_lastExpr;
QmlDebugObjectReference m_currObject;
QmlDebugObjectReference m_objectAtLastFocus;
};
QT_END_NAMESPACE
#endif
|