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 _KwSongdbSongBook_h_
21 #define _KwSongdbSongBook_h_
24 * @file KwSongdbSongBook.h
25 * @brief A song book of songs from the database.
26 * @author James Hogan <james@albanarts.com>
32 /// A song book of songs from the database.
33 class KwSongdbSongBook
41 /// Version data fields.
48 Q_DECLARE_FLAGS(Fields
, Field
)
51 * Constructors + destructor
54 /** Construct a new song book for database insertion.
55 * This constructs a blank song book which will be inserted into the
56 * database when it is saved.
60 /** Construct from the database.
61 * Loads the song book information from the database.
62 * @param id Database id of song book.
64 KwSongdbSongBook(int id
);
67 virtual ~KwSongdbSongBook();
76 /// Get the abreviation of the song book.
77 QString
abreviation() const;
79 /// Get the name of the song book.
82 /// Get the description of the song book.
83 QString
description() const;
89 /// Set the abreviation.
90 void setAbreviation(const QString
& abreviation
);
93 void setName(const QString
& name
);
95 /// Set the description.
96 void setDescription(const QString
& description
);
98 /// Save changes to the song book data.
110 /// Which fields have been modified.
111 Fields m_modifiedFields
;
113 /// Short abreviation text.
114 QString m_abreviation
;
120 QString m_description
;
123 Q_DECLARE_OPERATORS_FOR_FLAGS(KwSongdbSongBook::Fields
)
125 #endif // _KwSongdbSongBook_h_