blob: 422b0989223135e341aed4e715ca6567f915d5b2 (
plain)
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
|
// Copyright (C) 2016 Lorenz Haas
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include <texteditor/command.h>
#include <QObject>
namespace Core {
class IDocument;
class IEditor;
}
namespace Beautifier {
namespace Internal {
class BeautifierAbstractTool : public QObject
{
Q_OBJECT
public:
BeautifierAbstractTool() = default;
virtual QString id() const = 0;
virtual void updateActions(Core::IEditor *editor) = 0;
/**
* Returns the tool's command to format an entire file.
*
* @note The received command may be invalid.
*/
virtual TextEditor::Command command() const = 0;
virtual bool isApplicable(const Core::IDocument *document) const = 0;
};
} // namespace Internal
} // namespace Beautifier
|