2
This file is part of the Grantlee template system.
4
Copyright (c) 2009 Stephen Kelly <steveire@gmail.com>
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License version 3 only, as published by the Free Software Foundation.
10
This library 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 GNU
13
Lesser General Public License version 3 for more details.
15
You should have received a copy of the GNU Lesser General Public
16
License along with this library. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef BOOK_WRAPPER_H
21
#define BOOK_WRAPPER_H
25
class BookWrapper : public QObject
28
Q_PROPERTY(QString author READ author)
29
Q_PROPERTY(QString title READ title)
30
Q_PROPERTY(QString genre READ genre)
31
Q_PROPERTY(int rating READ rating)
33
BookWrapper(QString author, QString title, QString genre, int rating, QObject *parent = 0)
34
: QObject(parent), m_author(author), m_title(title), m_genre(genre), m_rating(rating)
37
QString author() { return m_author; }
38
QString title() { return m_title; }
39
QString genre() { return m_genre; }
40
int rating() { return m_rating; }