| 1 | /* |
| 2 | Copyright (C) 2005-2014 Mario Stephan <[email protected]> |
| 3 | |
| 4 | This library is free software; you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as published |
| 6 | by the Free Software Foundation; either version 2.1 of the License, or |
| 7 | (at your option) any later version. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU Lesser General Public License |
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | #include "collectiontreeitem.h"cxx . . $ `<file>/src/collectiontreeitem.h`/ |
| 19 | |
| 20 | struct CollectionTreeItemPrivatecxx . . $ CollectionTreeItemPrivate# { |
| 21 | QStringcxx . . $ QString# artistcxx . . $ CollectionTreeItemPrivate#artist.; |
| 22 | QStringcxx . . $ QString# albumcxx . . $ CollectionTreeItemPrivate#album.; |
| 23 | QStringcxx . . $ QString# yearcxx . . $ CollectionTreeItemPrivate#year.; |
| 24 | QStringcxx . . $ QString# genrecxx . . $ CollectionTreeItemPrivate#genre.; |
| 25 | }; |
| 26 | |
| 27 | CollectionTreeItemcxx . . $ CollectionTreeItem#::CollectionTreeItemcxx . . $ CollectionTreeItem#CollectionTreeItem(a0da2fa5542f28a7).(QTreeWidgetcxx . . $ QTreeWidget#* parent, int type) |
| 28 | : QTreeWidgetItemcxx . . $ QTreeWidgetItem#QTreeWidgetItem(a0da2fa5542f28a7).(parent, type) |
| 29 | , pcxx . . $ CollectionTreeItem#p.(new CollectionTreeItemPrivatecxx . . $ CollectionTreeItemPrivate#) |
| 30 | { |
| 31 | setChildIndicatorPolicycxx . . $ QTreeWidgetItem#setChildIndicatorPolicy(f5c7fcdc7c4a1346).(QTreeWidgetItemcxx . . $ QTreeWidgetItem#::ShowIndicatorcxx . . $ QTreeWidgetItem#ShowIndicator.); |
| 32 | } |
| 33 | |
| 34 | CollectionTreeItemcxx . . $ CollectionTreeItem#::CollectionTreeItemcxx . . $ CollectionTreeItem#CollectionTreeItem(abbf99ae0f1fc9f0).(QTreeWidgetItemcxx . . $ QTreeWidgetItem#* parent, int type) |
| 35 | : QTreeWidgetItemcxx . . $ QTreeWidgetItem#QTreeWidgetItem(abbf99ae0f1fc9f0).(parent, type) |
| 36 | , pcxx . . $ CollectionTreeItem#p.(new CollectionTreeItemPrivatecxx . . $ CollectionTreeItemPrivate#) |
| 37 | { |
| 38 | } |
| 39 | |
| 40 | CollectionTreeItemcxx . . $ CollectionTreeItem#::~cxx . . $ CollectionTreeItem#`~CollectionTreeItem`(ced63f7c635d850d).CollectionTreeItemcxx . . $ CollectionTreeItem#() |
| 41 | { |
| 42 | delete pcxx . . $ CollectionTreeItem#p.; |
| 43 | } |
| 44 | |
| 45 | QStringcxx . . $ QString# CollectionTreeItemcxx . . $ CollectionTreeItem#::artistcxx . . $ CollectionTreeItem#artist(4365c3963150523e).() |
| 46 | { |
| 47 | return pcxx . . $ QString#QString(132dd6869045752b).->artistcxx . . $ CollectionTreeItemPrivate#artist.; |
| 48 | } |
| 49 | |
| 50 | QStringcxx . . $ QString# CollectionTreeItemcxx . . $ CollectionTreeItem#::albumcxx . . $ CollectionTreeItem#album(4365c3963150523e).() |
| 51 | { |
| 52 | return pcxx . . $ QString#QString(132dd6869045752b).->albumcxx . . $ CollectionTreeItemPrivate#album.; |
| 53 | } |
| 54 | |
| 55 | QStringcxx . . $ QString# CollectionTreeItemcxx . . $ CollectionTreeItem#::yearcxx . . $ CollectionTreeItem#year(4365c3963150523e).() |
| 56 | { |
| 57 | return pcxx . . $ QString#QString(132dd6869045752b).->yearcxx . . $ CollectionTreeItemPrivate#year.; |
| 58 | } |
| 59 | |
| 60 | QStringcxx . . $ QString# CollectionTreeItemcxx . . $ CollectionTreeItem#::genrecxx . . $ CollectionTreeItem#genre(4365c3963150523e).() |
| 61 | { |
| 62 | return pcxx . . $ QString#QString(132dd6869045752b).->genrecxx . . $ CollectionTreeItemPrivate#genre.; |
| 63 | } |
| 64 | |
| 65 | void CollectionTreeItemcxx . . $ CollectionTreeItem#::setArtistcxx . . $ CollectionTreeItem#setArtist(7df51288a9ebd664).(QStringcxx . . $ QString# value) |
| 66 | { |
| 67 | pcxx . . $ CollectionTreeItem#p.->artistcxx . . $ CollectionTreeItemPrivate#artist. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). value; |
| 68 | setTextStringcxx . . $ CollectionTreeItem#setTextString(7df51288a9ebd664).(valuecxx . . $ QString#QString(132dd6869045752b).); |
| 69 | QTreeWidgetItemcxx . . $ QTreeWidgetItem#::setIconcxx . . $ QTreeWidgetItem#setIcon(40a39523e9ce8b1e).(0, QIconcxx . . $ QIcon#QIcon(8887f7d25b86c3f4).(stylecxx . . $ QWidget#style(5bbb00d3017c281f).()->standardIconcxx . . $ QStyle#standardIcon(cd3259ff6fd988a0).(QStylecxx . . $ QStyle#::SP_DirHomeIconcxx . . $ QStyle#SP_DirHomeIcon.).pixmapcxx . . $ QIcon#pixmap(422845b92bac27b2).(12))); |
| 70 | } |
| 71 | |
| 72 | void CollectionTreeItemcxx . . $ CollectionTreeItem#::setAlbumcxx . . $ CollectionTreeItem#setAlbum(7df51288a9ebd664).(QStringcxx . . $ QString# value) |
| 73 | { |
| 74 | pcxx . . $ CollectionTreeItem#p.->albumcxx . . $ CollectionTreeItemPrivate#album. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). value; |
| 75 | setTextStringcxx . . $ CollectionTreeItem#setTextString(7df51288a9ebd664).(valuecxx . . $ QString#QString(132dd6869045752b).); |
| 76 | QTreeWidgetItemcxx . . $ QTreeWidgetItem#::setIconcxx . . $ QTreeWidgetItem#setIcon(40a39523e9ce8b1e).(0, QIconcxx . . $ QIcon#QIcon(8887f7d25b86c3f4).(stylecxx . . $ QWidget#style(5bbb00d3017c281f).()->standardIconcxx . . $ QStyle#standardIcon(cd3259ff6fd988a0).(QStylecxx . . $ QStyle#::SP_DriveCDIconcxx . . $ QStyle#SP_DriveCDIcon.).pixmapcxx . . $ QIcon#pixmap(422845b92bac27b2).(12))); |
| 77 | } |
| 78 | |
| 79 | void CollectionTreeItemcxx . . $ CollectionTreeItem#::setYearcxx . . $ CollectionTreeItem#setYear(7df51288a9ebd664).(QStringcxx . . $ QString# value) |
| 80 | { |
| 81 | pcxx . . $ CollectionTreeItem#p.->yearcxx . . $ CollectionTreeItemPrivate#year. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). value; |
| 82 | setTextStringcxx . . $ CollectionTreeItem#setTextString(7df51288a9ebd664).(valuecxx . . $ QString#QString(132dd6869045752b).); |
| 83 | QTreeWidgetItemcxx . . $ QTreeWidgetItem#::setIconcxx . . $ QTreeWidgetItem#setIcon(40a39523e9ce8b1e).(0, QIconcxx . . $ QIcon#QIcon(8887f7d25b86c3f4).(stylecxx . . $ QWidget#style(5bbb00d3017c281f).()->standardIconcxx . . $ QStyle#standardIcon(cd3259ff6fd988a0).(QStylecxx . . $ QStyle#::SP_FileIconcxx . . $ QStyle#SP_FileIcon.).pixmapcxx . . $ QIcon#pixmap(422845b92bac27b2).(12))); |
| 84 | } |
| 85 | |
| 86 | void CollectionTreeItemcxx . . $ CollectionTreeItem#::setGenrecxx . . $ CollectionTreeItem#setGenre(7df51288a9ebd664).(QStringcxx . . $ QString# value) |
| 87 | { |
| 88 | pcxx . . $ CollectionTreeItem#p.->genrecxx . . $ CollectionTreeItemPrivate#genre. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). value; |
| 89 | setTextStringcxx . . $ CollectionTreeItem#setTextString(7df51288a9ebd664).(valuecxx . . $ QString#QString(132dd6869045752b).); |
| 90 | QTreeWidgetItemcxx . . $ QTreeWidgetItem#::setIconcxx . . $ QTreeWidgetItem#setIcon(40a39523e9ce8b1e).(0, QIconcxx . . $ QIcon#QIcon(8887f7d25b86c3f4).(stylecxx . . $ QWidget#style(5bbb00d3017c281f).()->standardIconcxx . . $ QStyle#standardIcon(cd3259ff6fd988a0).(QStylecxx . . $ QStyle#::SP_DirIconcxx . . $ QStyle#SP_DirIcon.).pixmapcxx . . $ QIcon#pixmap(422845b92bac27b2).(12))); |
| 91 | } |
| 92 | |
| 93 | void CollectionTreeItemcxx . . $ CollectionTreeItem#::setTextStringcxx . . $ CollectionTreeItem#setTextString(7df51288a9ebd664).(QStringcxx . . $ QString# value) |
| 94 | { |
| 95 | if (value ==cxx . . $ `operator==`(aa68d9f0d6cffae2). QStringcxx . . $ QString#::nullcxx . . $ QString#null.) { |
| 96 | setTextcxx . . $ QTreeWidgetItem#setText(4b11a7293b4ed91c).(0, QStringcxx . . $ QString#QString(85c52e162fed56f9).("( %1 )").argcxx . . $ QString#arg(bc823072288cbbb5).(trcxx . . $ CollectionTreeItem#tr(75d9f1c324b4579d).("All"))); |
| 97 | setChildIndicatorPolicycxx . . $ QTreeWidgetItem#setChildIndicatorPolicy(f5c7fcdc7c4a1346).(QTreeWidgetItemcxx . . $ QTreeWidgetItem#::DontShowIndicatorcxx . . $ QTreeWidgetItem#DontShowIndicator.); |
| 98 | } else |
| 99 | setTextcxx . . $ QTreeWidgetItem#setText(4b11a7293b4ed91c).(0, value); |
| 100 | } |