File indexing completed on 2024-03-24 04:00:56
0001 /* 0002 SPDX-FileCopyrightText: KDE Developers 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KATEVI_JUMPS_H 0008 #define KATEVI_JUMPS_H 0009 0010 #include <ktexteditor/cursor.h> 0011 0012 #include <KConfigGroup> 0013 0014 #include <QList> 0015 0016 namespace KateVi 0017 { 0018 class Jumps 0019 { 0020 public: 0021 explicit Jumps() = default; 0022 ~Jumps() = default; 0023 0024 Jumps(const Jumps &) = delete; 0025 Jumps &operator=(const Jumps &) = delete; 0026 0027 void add(const KTextEditor::Cursor cursor); 0028 KTextEditor::Cursor next(const KTextEditor::Cursor cursor); 0029 KTextEditor::Cursor prev(const KTextEditor::Cursor cursor); 0030 0031 void writeSessionConfig(KConfigGroup &config) const; 0032 void readSessionConfig(const KConfigGroup &config); 0033 0034 private: 0035 QList<KTextEditor::Cursor> m_jumps; 0036 QList<KTextEditor::Cursor>::iterator m_current = m_jumps.begin(); 0037 }; 0038 0039 } 0040 0041 #endif // KATEVI_JUMPS_H