00001 #ifndef PRINTDIALOG_H
00002 #define PRINTDIALOG_H
00003
00004 #include "ui_PrintDialog.h"
00005
00006 #include "printing.h"
00007 #include "printpreviewdialog.h"
00008 class ExerciseModel;
00009 class AccountModel;
00010 class Settings;
00011 class QGraphicsScene;
00012 class QAbstractItemModel;
00013 class QGraphicsView;
00014 class QDialog;
00015 class QPrinter;
00016 class QPageSetupDialog;
00017 class QCloseEvent;
00018
00019 class PrintDialog : public QDialog, private Ui::PrintDialog
00020 {
00021 Q_OBJECT
00022
00023 public:
00024 PrintDialog(QPrinter *printer, Settings &settings, ExerciseModel *model, DataProject *project, AccountModel *table, QWidget *parent=0);
00025 ~PrintDialog();
00026
00027 protected:
00028 void closeEvent(QCloseEvent *event);
00029
00030 private slots:
00031 void closeDialog();
00032 void contentChanged();
00033 void print();
00034 void showPrintPreviewDialog();
00035
00036 void showSmallPreview();
00037
00038 private:
00039 void setupSpinBox();
00040 void showExercises();
00041
00042 Printing *p_generalPrinter;
00043 QPrinter *p_printer;
00044 ExerciseModel *p_model;
00045 DataProject *p_project;
00046 AccountModel *p_table;
00047 Settings *p_settings;
00048 };
00049
00050 #endif
00051