File indexing completed on 2024-05-05 12:57:26
0001 /* 0002 * Copyright (C) 2009-2015 by Stephen Allewell 0003 * steve.allewell@gmail.com 0004 * 0005 * This program is free software; you can redistribute it and/or modify 0006 * it under the terms of the GNU General Public License as published by 0007 * the Free Software Foundation; either version 2 of the License, or 0008 * (at your option) any later version. 0009 */ 0010 0011 #ifndef LibraryTreeWidgetItem_H 0012 #define LibraryTreeWidgetItem_H 0013 0014 #include <QList> 0015 #include <QString> 0016 #include <QStringList> 0017 #include <QTreeWidgetItem> 0018 0019 #include "LibraryFile.h" 0020 #include "LibraryPattern.h" 0021 0022 class QTreeWidget; 0023 0024 class LibraryTreeWidgetItem : public QTreeWidgetItem 0025 { 0026 public: 0027 LibraryTreeWidgetItem(QTreeWidget *, const QString &); 0028 LibraryTreeWidgetItem(LibraryTreeWidgetItem *, const QString &); 0029 ~LibraryTreeWidgetItem(); 0030 0031 int maxHeight(); 0032 LibraryPattern *findCharacter(int, Qt::KeyboardModifiers); 0033 LibraryPattern *first(); 0034 LibraryPattern *next(); 0035 0036 void addPath(const QString &); 0037 QString path(); 0038 QStringList paths(); 0039 void addPattern(LibraryPattern *); 0040 void deletePattern(LibraryPattern *); 0041 0042 private: 0043 LibraryFile *writablePath(); 0044 0045 int m_libraryFilesIndex; 0046 QList<LibraryFile *> m_libraryFiles; 0047 }; 0048 0049 #endif // LibraryTreeWidgetItem_H