File indexing completed on 2024-12-22 03:46:48
0001 /**************************************************************************** 0002 ** 0003 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 0004 ** Contact: Qt Software Information (qt-info@nokia.com) 0005 ** 0006 ** This file is part of the demonstration applications of the Qt Toolkit. 0007 ** 0008 ** $QT_BEGIN_LICENSE:LGPL$ 0009 ** No Commercial Usage 0010 ** This file contains pre-release code and may not be distributed. 0011 ** You may use this file in accordance with the terms and conditions 0012 ** contained in the either Technology Preview License Agreement or the 0013 ** Beta Release License Agreement. 0014 ** 0015 ** GNU Lesser General Public License Usage 0016 ** Alternatively, this file may be used under the terms of the GNU Lesser 0017 ** General Public License version 2.1 as published by the Free Software 0018 ** Foundation and appearing in the file LICENSE.LGPL included in the 0019 ** packaging of this file. Please review the following information to 0020 ** ensure the GNU Lesser General Public License version 2.1 requirements 0021 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 0022 ** 0023 ** In addition, as a special exception, Nokia gives you certain 0024 ** additional rights. These rights are described in the Nokia Qt LGPL 0025 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 0026 ** package. 0027 ** 0028 ** GNU General Public License Usage 0029 ** Alternatively, this file may be used under the terms of the GNU 0030 ** General Public License version 3.0 as published by the Free Software 0031 ** Foundation and appearing in the file LICENSE.GPL included in the 0032 ** packaging of this file. Please review the following information to 0033 ** ensure the GNU General Public License version 3.0 requirements will be 0034 ** met: http://www.gnu.org/copyleft/gpl.html. 0035 ** 0036 ** If you are unsure which license is appropriate for your use, please 0037 ** contact the sales department at qt-sales@nokia.com. 0038 ** $QT_END_LICENSE$ 0039 ** 0040 ****************************************************************************/ 0041 0042 #ifndef BOOKWINDOW_H 0043 #define BOOKWINDOW_H 0044 0045 #include <QMainWindow> 0046 0047 #include "ui_bookwindow.h" 0048 0049 class QSqlRelationalTableModel; 0050 class QSqlError; 0051 0052 namespace KTextTemplate 0053 { 0054 class Engine; 0055 } 0056 0057 class BookWindow : public QMainWindow 0058 { 0059 Q_OBJECT 0060 public: 0061 BookWindow(); 0062 0063 protected Q_SLOTS: 0064 void renderBooks() const; 0065 0066 private: 0067 void showError(const QSqlError &err); 0068 Ui::BookWindow ui; 0069 QSqlRelationalTableModel *model; 0070 int authorIdx, genreIdx; 0071 KTextTemplate::Engine *m_engine; 0072 }; 0073 0074 #endif