equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CHROMECONSOLE_H |
|
20 #define CHROMECONSOLE_H |
|
21 |
|
22 #include <QWidget> |
|
23 #include <QtGui> |
|
24 #include "../chromeview.h" |
|
25 |
|
26 /** |
|
27 * \brief Javascript console window for development and testing |
|
28 * |
|
29 * The ChromeConsole class displays a simple dialog that allows the user to enter javascript |
|
30 * statements into a text field and then execute them in the chrome's javascript engine. |
|
31 * Not used in S60 builds. |
|
32 */ |
|
33 class ChromeConsole : public QDialog |
|
34 { |
|
35 Q_OBJECT |
|
36 public: |
|
37 ChromeConsole(ChromeView *chromeView); |
|
38 |
|
39 QVariant evaluateExpression(const QString &expression); |
|
40 |
|
41 public slots: |
|
42 void evaluate(); |
|
43 virtual void accept(); |
|
44 |
|
45 protected: |
|
46 virtual void keyPressEvent(QKeyEvent *event); |
|
47 |
|
48 protected: |
|
49 QTextEdit m_textEdit; |
|
50 ChromeView *m_chromeView; |
|
51 class Ui_ConsoleDialog *m_ui; |
|
52 QStringList m_expressionHistory; |
|
53 int m_historyIndex; |
|
54 }; |
|
55 |
|
56 #endif // CHROMECONSOLE_H |
|