Files
qt-creator/src/plugins/texteditor/texteditor_p.h

37 lines
927 B
C
Raw Normal View History

// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
2008-12-02 16:19:05 +01:00
#pragma once
2008-12-02 12:01:29 +01:00
2009-12-08 17:43:01 +01:00
#include "texteditor_global.h"
2008-12-02 12:01:29 +01:00
#include <QList>
#include <QTextCursor>
2008-12-02 12:01:29 +01:00
namespace TextEditor {
class TextDocument;
2008-12-02 12:01:29 +01:00
namespace Internal {
//
// TextEditorPrivate
//
2008-12-02 12:01:29 +01:00
struct TextEditorPrivateHighlightBlocks
{
QList<int> open;
QList<int> close;
QList<int> visualIndent;
inline int count() const { return visualIndent.size(); }
inline bool isEmpty() const { return open.isEmpty() || close.isEmpty() || visualIndent.isEmpty(); }
inline bool operator==(const TextEditorPrivateHighlightBlocks &o) const {
return (open == o.open && close == o.close && visualIndent == o.visualIndent);
}
inline bool operator!=(const TextEditorPrivateHighlightBlocks &o) const { return !(*this == o); }
};
2008-12-02 12:01:29 +01:00
} // namespace Internal
} // namespace TextEditor