File indexing completed on 2024-04-14 05:41:19
0001 /** 0002 * SPDX-FileCopyrightText: (C) 2003 Sébastien Laoût <slaout@linux62.org> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef NOTESELECTION_H 0008 #define NOTESELECTION_H 0009 0010 #include <QtCore/QList> 0011 #include <QtCore/QString> 0012 0013 class Note; 0014 0015 /** This represent a hierarchy of the selected classes. 0016 * If this is null, then there is no selected note. 0017 */ 0018 class NoteSelection 0019 { 0020 public: 0021 NoteSelection() 0022 : note(nullptr) 0023 , parent(nullptr) 0024 , firstChild(nullptr) 0025 , next(nullptr) 0026 , fullPath() 0027 { 0028 } 0029 NoteSelection(Note *n) 0030 : note(n) 0031 , parent(nullptr) 0032 , firstChild(nullptr) 0033 , next(nullptr) 0034 , fullPath() 0035 { 0036 } 0037 0038 Note *note; 0039 NoteSelection *parent; 0040 NoteSelection *firstChild; 0041 NoteSelection *next; 0042 QString fullPath; // Needeed for 'Cut' code to store temporary path of the cut note. 0043 0044 NoteSelection *firstStacked(); 0045 NoteSelection *nextStacked(); 0046 void append(NoteSelection *node); 0047 int count(); 0048 0049 QList<Note *> parentGroups(); 0050 }; 0051 0052 #endif // NOTESELECTION_H