qmljsinspectorplugin.h 2.51 KB
Newer Older
Bea Lam's avatar
Bea Lam committed
1
2
3
4
/**************************************************************************
**
** This file is part of Qt Creator
**
hjk's avatar
hjk committed
5
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
Bea Lam's avatar
Bea Lam committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
29
30
#ifndef QMLJSINSPECTORPLUGIN_H
#define QMLJSINSPECTORPLUGIN_H
Bea Lam's avatar
Bea Lam committed
31
32

#include <extensionsystem/iplugin.h>
33
#include <qmljs/qmljsmodelmanagerinterface.h>
Bea Lam's avatar
Bea Lam committed
34
35
36

#include <QtCore/QObject>
#include <QtCore/QPointer>
37
#include <QtCore/QTimer>
Bea Lam's avatar
Bea Lam committed
38

39
QT_FORWARD_DECLARE_CLASS(QStringList)
Bea Lam's avatar
Bea Lam committed
40

ck's avatar
ck committed
41
42
43
namespace Core {
    class IMode;
}
Bea Lam's avatar
Bea Lam committed
44

45
46
47
namespace ProjectExplorer {
    class Project;
}
Bea Lam's avatar
Bea Lam committed
48

49
namespace QmlJSInspector {
50
namespace Internal {
51

Roberto Raggi's avatar
Roberto Raggi committed
52
class ClientProxy;
53
54
55
class Inspector;

class InspectorPlugin : public ExtensionSystem::IPlugin
Bea Lam's avatar
Bea Lam committed
56
57
58
59
{
    Q_OBJECT

public:
60
61
    InspectorPlugin();
    virtual ~InspectorPlugin();
Bea Lam's avatar
Bea Lam committed
62

63
    static InspectorPlugin *instance();
64

65
    QmlJS::ModelManagerInterface *modelManager() const;
Roberto Raggi's avatar
Roberto Raggi committed
66
67
68
    ClientProxy *clientProxy() const;
    Inspector *inspector() const;

69
    // ExtensionSystem::IPlugin interface
Bea Lam's avatar
Bea Lam committed
70
71
    virtual bool initialize(const QStringList &arguments, QString *errorString);
    virtual void extensionsInitialized();
72
    virtual void aboutToShutdown();
Bea Lam's avatar
Bea Lam committed
73

74
public slots:
75
    void activateDebuggerForProject(ProjectExplorer::Project *project, const QString &runMode);
76
77
    void setDockWidgetArrangement(const QString &activeLanguage);

Bea Lam's avatar
Bea Lam committed
78
private slots:
79
    void prepareDebugger(Core::IMode *mode);
80
81

private:
Roberto Raggi's avatar
Roberto Raggi committed
82
    ClientProxy *_clientProxy;
83
    Inspector *_inspector;
Bea Lam's avatar
Bea Lam committed
84
85
};

86
} // end of namespace Internal
87
} // end of QmlJSInspector
Bea Lam's avatar
Bea Lam committed
88
89

#endif // QMLINSPECTORPLUGIN_H