2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 Jan Dalheimer <jan@dalheimer.de>
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2015-08-24 08:43:18 +02:00
|
|
|
|
2016-01-27 10:14:00 +01:00
|
|
|
#pragma once
|
2015-08-24 08:43:18 +02:00
|
|
|
|
|
|
|
|
#include "cmake_global.h"
|
|
|
|
|
|
2019-01-16 09:37:54 +01:00
|
|
|
#include <texteditor/textindenter.h>
|
2015-08-24 08:43:18 +02:00
|
|
|
|
|
|
|
|
namespace CMakeProjectManager {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2019-01-16 09:37:54 +01:00
|
|
|
class CMAKE_EXPORT CMakeIndenter : public TextEditor::TextIndenter
|
2015-08-24 08:43:18 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2019-01-16 09:37:54 +01:00
|
|
|
explicit CMakeIndenter(QTextDocument *doc);
|
2015-08-24 08:43:18 +02:00
|
|
|
bool isElectricCharacter(const QChar &ch) const override;
|
2016-01-13 14:32:23 +01:00
|
|
|
|
2019-01-16 09:37:54 +01:00
|
|
|
int indentFor(const QTextBlock &block,
|
2019-01-28 08:11:20 +01:00
|
|
|
const TextEditor::TabSettings &tabSettings,
|
|
|
|
|
int cursorPositionInEditor = -1) override;
|
2015-08-24 08:43:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace CMakeProjectManager
|