summaryrefslogtreecommitdiff
path: root/src/plugins/cmakeprojectmanager/cmakeindenter.h
blob: 111a200d72567d61ce2a1c09c24d3bbc7ed4e995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (C) 2016 Jan Dalheimer <jan@dalheimer.de>
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include "cmake_global.h"

#include <texteditor/textindenter.h>

namespace CMakeProjectManager::Internal {

class CMAKE_EXPORT CMakeIndenter : public TextEditor::TextIndenter
{
public:
    explicit CMakeIndenter(QTextDocument *doc);
    bool isElectricCharacter(const QChar &ch) const override;

    int indentFor(const QTextBlock &block,
                  const TextEditor::TabSettings &tabSettings,
                  int cursorPositionInEditor = -1) override;
};

} // CMakeProjectManager::Internal