File indexing completed on 2022-12-06 18:50:28

0001 /*
0002     SPDX-License-Identifier: GPL-2.0-or-later
0003     SPDX-FileCopyrightText: 2012 Martin Kuettler <martin.kuettler@gmail.com>
0004 */
0005 
0006 #ifndef WORKSHEETCURSOR_H
0007 #define WORKSHEETCURSOR_H
0008 
0009 #include <QTextCursor>
0010 
0011 class WorksheetEntry;
0012 class WorksheetTextItem;
0013 
0014 class WorksheetCursor
0015 {
0016   public:
0017     WorksheetCursor();
0018     WorksheetCursor(WorksheetEntry*, WorksheetTextItem*, const QTextCursor&);
0019     ~WorksheetCursor() = default;
0020 
0021     WorksheetEntry* entry() const;
0022     WorksheetTextItem* textItem() const;
0023     QTextCursor textCursor() const;
0024     
0025     bool isValid() const;
0026 
0027   private:
0028     WorksheetEntry* m_entry;
0029     WorksheetTextItem* m_textItem;
0030     QTextCursor m_textCursor;
0031 };
0032 
0033 #endif // WORKSHEETCURSOR_H