MyBooks
dlgprtitles.hpp
Go to the documentation of this file.
1 #ifndef DLGPRTITLES_HPP
2 #define DLGPRTITLES_HPP
3 #include <QObject>
4 #include <QEvent>
5 #include <QList>
6 #include <QStringList>
7 #include <QDialog>
8 #include <QWidget>
9 #include <QPrinter>
10 #include <QPainter>
11 #include <QSqlDatabase>
12 
13 #include "ui_dlgprtitles.h"
14 
15 class QPrinter;
16 class QPainter;
17 
18 namespace Ui {
19 class DlgPrTitles;
20 }
21 
22 class DlgPrTitles : public QDialog
23 {
24  Q_OBJECT
25 
26 public:
27  explicit DlgPrTitles(QWidget *parent = 0);
28  ~DlgPrTitles();
29 
30 protected:
31  void changeEvent(QEvent *);
32 
33 private slots:
34  void slotPrintTitles();
35  void slotPrevTitles();
36  void slotSelectPtr();
37  void printDocument(QPrinter *);
38 
39 private:
40  QStringList prtlines;
41 
44 
45  QSqlDatabase db;
46 
47  Ui::DlgPrTitles *ui;
48 
49  void printPage(int index, QPainter *painter, QPrinter *printer);
50  void paginate(QPainter *painter, QList<QStringList> *pages, const QStringList &entries);
51 
52  QSqlQuery* createRelationalQuery();
53 };
54 
55 #endif // DLGPRTITLES_HPP
Definition: reportpreview.h:30
QStringList prtlines
Definition: dlgprtitles.hpp:40
Definition: dlgprtitles.cpp:27
TitlesPrivate * d
Definition: dlgprtitles.hpp:42
Ui::DlgPrTitles * ui
Definition: dlgprtitles.hpp:47
QSqlDatabase db
Definition: dlgprtitles.hpp:45
Definition: dlgprtitles.hpp:22