Changeset View
Changeset View
Standalone View
Standalone View
plugins/astyle/astyle_plugin.h
Show All 19 Lines | |||||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef ASTYLEPLUGIN_H | 22 | #ifndef ASTYLEPLUGIN_H | ||
23 | #define ASTYLEPLUGIN_H | 23 | #define ASTYLEPLUGIN_H | ||
24 | 24 | | |||
25 | #include <interfaces/iplugin.h> | 25 | #include <interfaces/iplugin.h> | ||
26 | #include <interfaces/isourceformatter.h> | 26 | #include <interfaces/isourceformatter.h> | ||
27 | 27 | | |||
28 | #include "astyle_preferences.h" | ||||
kossebau: Make first include, so plugin-specific includes come first | |||||
29 | | ||||
28 | class AStyleFormatter; | 30 | class AStyleFormatter; | ||
29 | 31 | | |||
30 | class AStylePlugin : public KDevelop::IPlugin, public KDevelop::ISourceFormatter | 32 | class AStylePlugin : public KDevelop::IPlugin, public KDevelop::ISourceFormatter | ||
31 | { | 33 | { | ||
32 | Q_OBJECT | 34 | Q_OBJECT | ||
33 | Q_INTERFACES(KDevelop::ISourceFormatter) | 35 | Q_INTERFACES(KDevelop::ISourceFormatter) | ||
34 | 36 | | |||
35 | public: | 37 | public: | ||
Show All 25 Lines | |||||
61 | /** \return The text used in the config dialog to preview the current style. | 63 | /** \return The text used in the config dialog to preview the current style. | ||
62 | */ | 64 | */ | ||
63 | QString previewText(const KDevelop::SourceFormatterStyle& style, const QMimeType& mime) const override; | 65 | QString previewText(const KDevelop::SourceFormatterStyle& style, const QMimeType& mime) const override; | ||
64 | 66 | | |||
65 | /** \return The indentation type of the currently selected style. | 67 | /** \return The indentation type of the currently selected style. | ||
66 | */ | 68 | */ | ||
67 | Indentation indentation(const QUrl &url) const override; | 69 | Indentation indentation(const QUrl &url) const override; | ||
68 | 70 | | |||
69 | static QString formattingSample(); | 71 | static QString formattingSample(AStylePreferences::Language lang); | ||
70 | static QString indentingSample(); | 72 | static QString indentingSample(AStylePreferences::Language lang); | ||
71 | 73 | | |||
72 | private: | 74 | private: | ||
73 | QScopedPointer<AStyleFormatter> m_formatter; | 75 | QScopedPointer<AStyleFormatter> m_formatter; | ||
74 | KDevelop::SourceFormatterStyle currentStyle; | 76 | KDevelop::SourceFormatterStyle currentStyle; | ||
75 | }; | 77 | }; | ||
76 | 78 | | |||
77 | #endif // ASTYLEPLUGIN_H | 79 | #endif // ASTYLEPLUGIN_H |
Make first include, so plugin-specific includes come first