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 #include "worksheetcursor.h"
0007 
0008 WorksheetCursor::WorksheetCursor()
0009 {
0010     m_entry = nullptr;
0011     m_textItem = nullptr;
0012     m_textCursor = QTextCursor();
0013 }
0014 
0015 WorksheetCursor::WorksheetCursor(WorksheetEntry* entry, WorksheetTextItem* item,
0016                                  const QTextCursor& cursor)
0017 {
0018     m_entry = entry;
0019     m_textItem = item;
0020     m_textCursor = cursor;
0021 }
0022 
0023 WorksheetEntry* WorksheetCursor::entry() const
0024 {
0025     return m_entry;
0026 }
0027 
0028 WorksheetTextItem* WorksheetCursor::textItem() const
0029 {
0030     return m_textItem;
0031 }
0032 
0033 QTextCursor WorksheetCursor::textCursor() const
0034 {
0035     return m_textCursor;
0036 }
0037 
0038 bool WorksheetCursor::isValid() const
0039 {
0040     return m_entry && m_textItem;
0041 }
0042