blob: f3fc3a28c53eee7f93f778710090c22c04673a57 (
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
|
// Copyright (C) 2016 Lorenz Haas
// Copyright (C) 2022 Xavier BESSON
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include <texteditor/command.h>
#include "cmakeformatteroptionspage.h"
namespace Core {
class IDocument;
class IEditor;
}
namespace CMakeProjectManager {
namespace Internal {
class CMakeFormatter : public QObject
{
Q_OBJECT
public:
void updateActions(Core::IEditor *editor);
TextEditor::Command command() const;
bool isApplicable(const Core::IDocument *document) const;
void initialize();
private:
void formatFile();
QAction *m_formatFile = nullptr;
CMakeFormatterOptionsPage m_page;
};
} // namespace Internal
} // namespace CMakeProjectManager
|