forked from editorconfig/editorconfig-qtcreator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
editorconfigplugin.h
52 lines (39 loc) · 1.18 KB
/
editorconfigplugin.h
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
/*
* Copyright 2016,2017 Herbert Graeber
*/
#ifndef EDITORCONFIG_H
#define EDITORCONFIG_H
#include "editorconfig_global.h"
#include <extensionsystem/iplugin.h>
#include <coreplugin/editormanager/ieditor.h>
#include <texteditor/texteditor.h>
#include <texteditor/textdocument.h>
#include <QtCore/QMultiMap>
#include <QtCore/QSet>
#include <QtCore/QMetaObject>
#include <QTranslator>
namespace EditorConfig {
namespace Internal {
class EditorConfigPlugin : public ExtensionSystem::IPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "EditorConfig.json")
public:
EditorConfigPlugin();
~EditorConfigPlugin();
bool initialize(const QStringList &arguments, QString *errorString);
void extensionsInitialized();
ShutdownFlag aboutToShutdown();
private slots:
void editorCreated(Core::IEditor *, const QString &);
void overrideSettings(TextEditor::TextDocument *textDocument);
void tabSettingsChanged();
void editorAboutToClose(Core::IEditor *editor);
private:
QTranslator translator;
QMap<TextEditor::TextDocument *, QMetaObject::Connection> documents;
QSet<TextEditor::TextDocument *> changingDocuments;
};
}
}
#endif