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 "../ChromeWidget.h" |
|
25 |
|
26 |
|
27 /** |
|
28 * \brief Javascript console window for development and testing |
|
29 * |
|
30 * The ChromeConsole class displays a simple dialog that allows the user to enter javascript |
|
31 * statements into a text field and then execute them in the chrome's javascript engine. |
|
32 * Not used in S60 builds. |
|
33 */ |
|
34 class ChromeConsole : public QDialog |
|
35 { |
|
36 Q_OBJECT |
|
37 public: |
|
38 ChromeConsole(GVA::ChromeWidget *chromeWidget); |
|
39 |
|
40 QVariant evaluateExpression(const QString &expression); |
|
41 |
|
42 public slots: |
|
43 void evaluate(); |
|
44 void reloadChrome(); |
|
45 void dump(); |
|
46 void exit() { QApplication::exit(0); } |
|
47 virtual void accept(); |
|
48 |
|
49 protected: |
|
50 virtual void keyPressEvent(QKeyEvent *event); |
|
51 |
|
52 protected: |
|
53 QTextEdit m_textEdit; |
|
54 GVA::ChromeWidget *m_chromeWidget; |
|
55 class Ui_ConsoleDialog *m_ui; |
|
56 QStringList m_expressionHistory; |
|
57 int m_historyIndex; |
|
58 }; |
|
59 |
|
60 |
|
61 #endif // CHROMECONSOLE_H |