Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/interfaces/isourceformattercontroller.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 42 | public: | |||
---|---|---|---|---|---|
53 | virtual ISourceFormatter* formatterForUrl(const QUrl &url) = 0; | 53 | virtual ISourceFormatter* formatterForUrl(const QUrl &url) = 0; | ||
54 | /** \return The formatter corresponding to the language | 54 | /** \return The formatter corresponding to the language | ||
55 | * of the document corresponding to the \p url. | 55 | * of the document corresponding to the \p url. | ||
56 | * The language is then activated and the style is loaded. | 56 | * The language is then activated and the style is loaded. | ||
57 | * The source formatter is then ready to use. | 57 | * The source formatter is then ready to use. | ||
58 | * @param mime known mimetype of the url | 58 | * @param mime known mimetype of the url | ||
59 | */ | 59 | */ | ||
60 | virtual ISourceFormatter* formatterForUrl(const QUrl& url, const QMimeType& mime) = 0; | 60 | virtual ISourceFormatter* formatterForUrl(const QUrl& url, const QMimeType& mime) = 0; | ||
61 | ///\return @c true if there are formatters at all, @c false otherwise | ||||
62 | virtual bool hasFormatters() const = 0; | ||||
61 | /** \return Whether this mime type is supported by any plugin. | 63 | /** \return Whether this mime type is supported by any plugin. | ||
62 | */ | 64 | */ | ||
63 | virtual bool isMimeTypeSupported(const QMimeType &mime) = 0; | 65 | virtual bool isMimeTypeSupported(const QMimeType &mime) = 0; | ||
64 | 66 | | |||
65 | virtual KDevelop::SourceFormatterStyle styleForUrl(const QUrl& url, const QMimeType& mime) = 0; | 67 | virtual KDevelop::SourceFormatterStyle styleForUrl(const QUrl& url, const QMimeType& mime) = 0; | ||
66 | 68 | | |||
67 | ///Set whether or not source formatting is disabled with \arg disable | 69 | ///Set whether or not source formatting is disabled with \arg disable | ||
68 | virtual void disableSourceFormatting(bool disable) = 0; | 70 | virtual void disableSourceFormatting(bool disable) = 0; | ||
69 | ///\return Whether or not source formatting is enabled | 71 | ///\return Whether or not source formatting is enabled | ||
70 | virtual bool sourceFormattingEnabled() = 0; | 72 | virtual bool sourceFormattingEnabled() = 0; | ||
73 | | ||||
74 | Q_SIGNALS: | ||||
75 | void hasFormattersChanged(bool hasFormatters); | ||||
71 | }; | 76 | }; | ||
72 | 77 | | |||
73 | } | 78 | } | ||
74 | 79 | | |||
75 | #endif // KDEVPLATFORM_ISOURCEFORMATTERCONTROLLER_H | 80 | #endif // KDEVPLATFORM_ISOURCEFORMATTERCONTROLLER_H | ||
76 | 81 | | |||
77 | // kate: indent-mode cstyle; space-indent off; tab-width 4 = 0; | 82 | // kate: indent-mode cstyle; space-indent off; tab-width 4 = 0; |