coreplugin.h 2.64 KB
Newer Older
hjk's avatar
hjk committed
1
/****************************************************************************
con's avatar
con committed
2
**
3
4
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
con's avatar
con committed
5
**
hjk's avatar
hjk committed
6
** This file is part of Qt Creator.
con's avatar
con committed
7
**
hjk's avatar
hjk committed
8
9
10
11
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
12
13
14
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
15
**
16
17
18
19
20
21
22
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
con's avatar
con committed
23
**
hjk's avatar
hjk committed
24
****************************************************************************/
hjk's avatar
hjk committed
25

hjk's avatar
hjk committed
26
#pragma once
con's avatar
con committed
27

28
29
#include "reaper_p.h"

con's avatar
con committed
30
31
#include <extensionsystem/iplugin.h>

32
33
34
35
36
37
38
39
QT_BEGIN_NAMESPACE
class QMenu;
QT_END_NAMESPACE

namespace Utils {
class PathChooser;
class Theme;
}
40

con's avatar
con committed
41
namespace Core {
42

Lasse Holmstedt's avatar
Lasse Holmstedt committed
43
class DesignMode;
44

con's avatar
con committed
45
46
47
48
namespace Internal {

class EditMode;
class MainWindow;
hjk's avatar
hjk committed
49
class Locator;
con's avatar
con committed
50
51
52
53

class CorePlugin : public ExtensionSystem::IPlugin
{
    Q_OBJECT
54
    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "Core.json")
con's avatar
con committed
55
56
57
58
59

public:
    CorePlugin();
    ~CorePlugin();

60
61
62
63
    bool initialize(const QStringList &arguments, QString *errorMessage = 0);
    void extensionsInitialized();
    bool delayedInitialize();
    ShutdownFlag aboutToShutdown();
64
65
66
    QObject *remoteCommand(const QStringList & /* options */,
                           const QString &workingDirectory,
                           const QStringList &args);
con's avatar
con committed
67
68

public slots:
69
    void fileOpenRequest(const QString&);
con's avatar
con committed
70

Tobias Hunger's avatar
Tobias Hunger committed
71
72
73
74
private slots:
#if defined(WITH_TESTS)
    void testVcsManager_data();
    void testVcsManager();
75
76
    void testSplitLineAndColumnNumber();
    void testSplitLineAndColumnNumber_data();
77
78
79
    // Locator:
    void test_basefilefilter();
    void test_basefilefilter_data();
Tobias Hunger's avatar
Tobias Hunger committed
80
81
#endif

con's avatar
con committed
82
private:
83
    void parseArguments(const QStringList & arguments);
84
    static void addToPathChooserContextMenu(Utils::PathChooser *pathChooser, QMenu *menu);
85

con's avatar
con committed
86
87
    MainWindow *m_mainWindow;
    EditMode *m_editMode;
Lasse Holmstedt's avatar
Lasse Holmstedt committed
88
    DesignMode *m_designMode;
hjk's avatar
hjk committed
89
    Locator *m_locator;
90
    ReaperPrivate m_reaper;
con's avatar
con committed
91
92
93
94
};

} // namespace Internal
} // namespace Core