1 /* 2 * qm_itemlist.h 3 * QUIMUP library-tree item data 4 * © 2008-2018 Johan Spee 5 * 6 * This file is part of Quimup 7 * 8 * QUIMUP is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * GUIMUP is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program. If not, see http://www.gnu.org/licenses/. 20 */ 21 22 #ifndef qm_listitemInfo_H 23 #define qm_listitemInfo_H 24 25 #include <QString> 26 #include <stdlib.h> 27 #include <list> 28 29 enum 30 { 31 // list item types 32 TP_ARTIST, 33 TP_ALBUM, 34 TP_GENRE, 35 TP_SONG, 36 TP_SONGX, // external song 37 TP_NOSONG, 38 TP_STREAM, 39 TP_PLAYLIST, // playlist in MPD's playlist dir 40 TP_DIRECTORY, 41 TP_PLISTITEM, // no drag&drop 42 TP_COMMENT, // no drag&drop 43 TP_NOITEM 44 }; 45 46 class qm_listitemInfo 47 { 48 public: qsynthOptionsForm(QWidget * pParent)49 qm_listitemInfo(); 50 51 int type; 52 int time; 53 QString disc; 54 QString artist; 55 QString album; 56 QString title; 57 QString file; 58 QString track; 59 QString name; 60 QString year; 61 QString moddate; 62 QString genre; 63 QString sorter; 64 65 // Override the < operator for alist.sort(); 66 bool operator < (const qm_listitemInfo& litem) const 67 { 68 return sorter < litem.sorter; 69 } 70 }; 71 72 73 typedef std::list <qm_listitemInfo> qm_itemList; 74 75 #endif // qm_listitemInfo_H 76