1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
5 * KWorship is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 2 of the License, or *
8 * (at your option) any later version. *
10 * KWorship is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with KWorship. If not, write to the Free Software Foundation, *
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
20 #ifndef _KwSongdbVersionItem_h_
21 #define _KwSongdbVersionItem_h_
24 * @file KwSongdbVersionItem.h
25 * @brief A list widget item for a song version.
26 * @author James Hogan <james@albanarts.com>
30 #include <QListWidgetItem>
34 class KwSongdbVersion
;
36 /// A list widget item for a song version.
37 class KwSongdbVersionItem
: public QObject
, public QListWidgetItem
44 * Constructors + destructor
47 /// Construct a new song version.
48 KwSongdbVersionItem(QListWidget
* parent
= 0);
50 /// Construct from an existing song version.
51 KwSongdbVersionItem(KwSongdbVersion
* version
, QListWidget
* parent
= 0);
54 virtual ~KwSongdbVersionItem();
60 /// Get the song version.
61 KwSongdbVersion
* version();
63 /// Get the version name.
64 QString
versionName() const;
66 /// Get the name of the writer.
67 QString
writer() const;
69 /// Get the copyright notice.
70 QString
copyright() const;
72 /// Get the lyrics markup.
73 QString
lyricsMarkup() const;
81 /// Save the changes to the version object.
82 void save(KwSongdbSong
* song
);
84 /// Set the version name.
85 void setVersionName(const QString
& name
);
87 /// Set the name of the writer.
88 void setWriter(const QString
& writer
);
90 /// Set the copyright notice.
91 void setCopyright(const QString
& copyright
);
93 /// Set the lyrics markup.
94 void setLyricsMarkup(const QString
& lyricsMarkup
);
102 /// Original database version object.
103 KwSongdbVersion
* m_version
;
115 QString m_lyricsMarkup
;
119 #endif // _KwSongdbVersionItem_h_