00001 /*************************************************************************** 00002 * Copyright (C) 2008 by Ilya Kotov * 00003 * forkotov02@hotmail.ru * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00019 ***************************************************************************/ 00020 #ifndef PLAYLISTITEM_H 00021 #define PLAYLISTITEM_H 00022 00023 #include <qmmp/qmmp.h> 00024 #include <qmmpui/abstractplaylistitem.h> 00025 00026 class FileInfo; 00027 class QSettings; 00028 00032 class PlayListItem : public AbstractPlaylistItem 00033 { 00034 public: 00042 enum FLAGS 00043 { 00044 FREE = 0, 00045 EDITING, 00046 SCHEDULED_FOR_DELETION 00047 }; 00051 PlayListItem(); 00056 PlayListItem(FileInfo *info); 00060 ~PlayListItem(); 00065 void setSelected(bool select); 00069 bool isSelected() const; 00073 void setCurrent(bool yes); 00077 bool isCurrent() const; 00081 FLAGS flag() const; 00085 void setFlag(FLAGS); 00089 const QString text(); 00094 void setText(const QString &title); 00099 void updateMetaData(const QMap <Qmmp::MetaData, QString> &metaData); 00103 void updateTags(); 00104 00105 private: 00106 void readMetadata(); 00107 QString m_title; 00108 FileInfo *m_info; 00109 bool m_selected; 00110 bool m_current; 00111 FLAGS m_flag; 00112 }; 00113 00114 #endif
1.5.9