Edit song books dialog does a bit more and some of backend implemented
[kworship.git] / kworship / songdb / KwSongdbVersionItem.h
blob85344f2867f01370ba2423e611f0a9e8ae221c8c
1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
4 * *
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. *
9 * *
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. *
14 * *
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_
23 /**
24 * @file KwSongdbVersionItem.h
25 * @brief A list widget item for a song version.
26 * @author James Hogan <james@albanarts.com>
29 #include <QObject>
30 #include <QListWidgetItem>
31 #include <QString>
33 class KwSongdbSong;
34 class KwSongdbVersion;
36 /// A list widget item for a song version.
37 class KwSongdbVersionItem : public QObject, public QListWidgetItem
39 Q_OBJECT
41 public:
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);
53 /// Destructor.
54 virtual ~KwSongdbVersionItem();
57 * Accessors
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;
75 public slots:
78 * Modifier slots
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);
96 private:
99 * Variables
102 /// Original database version object.
103 KwSongdbVersion* m_version;
105 /// Version name.
106 QString m_name;
108 /// Writer.
109 QString m_writer;
111 /// Copyright.
112 QString m_copyright;
114 /// Lyrics markup.
115 QString m_lyricsMarkup;
119 #endif // _KwSongdbVersionItem_h_