2013-07-09 12:37:53 +00:00
|
|
|
#ifndef PRINTOPTIONS_H
|
|
|
|
#define PRINTOPTIONS_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
2013-10-03 18:54:24 +00:00
|
|
|
#include "ui_printoptions.h"
|
2013-07-09 12:37:53 +00:00
|
|
|
|
2015-05-30 11:27:14 +00:00
|
|
|
struct print_options {
|
|
|
|
enum print_type {
|
|
|
|
DIVELIST,
|
|
|
|
TABLE,
|
|
|
|
STATISTICS
|
|
|
|
} type;
|
2015-06-11 18:13:10 +00:00
|
|
|
enum print_template {
|
|
|
|
ONE_DIVE,
|
|
|
|
TWO_DIVE
|
|
|
|
} p_template;
|
2015-05-30 11:27:14 +00:00
|
|
|
bool print_selected;
|
|
|
|
bool color_selected;
|
|
|
|
bool landscape;
|
|
|
|
};
|
|
|
|
|
2013-07-09 12:37:53 +00:00
|
|
|
// should be based on a custom QPrintDialog class
|
|
|
|
class PrintOptions : public QWidget {
|
2014-02-28 04:09:57 +00:00
|
|
|
Q_OBJECT
|
2013-07-09 12:37:53 +00:00
|
|
|
|
|
|
|
public:
|
2014-11-13 22:57:42 +00:00
|
|
|
explicit PrintOptions(QWidget *parent = 0, struct print_options *printOpt = 0);
|
|
|
|
void setup(struct print_options *printOpt);
|
2013-07-09 12:37:53 +00:00
|
|
|
|
|
|
|
private:
|
2013-10-03 18:54:25 +00:00
|
|
|
Ui::PrintOptions ui;
|
2014-11-13 22:57:42 +00:00
|
|
|
struct print_options *printOptions;
|
2013-07-10 07:54:25 +00:00
|
|
|
bool hasSetupSlots;
|
2013-07-09 20:43:21 +00:00
|
|
|
|
2014-02-28 04:09:57 +00:00
|
|
|
private
|
|
|
|
slots:
|
2013-07-10 07:54:25 +00:00
|
|
|
void printInColorClicked(bool check);
|
|
|
|
void printSelectedClicked(bool check);
|
2015-05-30 11:10:31 +00:00
|
|
|
void on_radioStatisticsPrint_clicked(bool check);
|
|
|
|
void on_radioTablePrint_clicked(bool check);
|
|
|
|
void on_radioDiveListPrint_clicked(bool check);
|
2015-06-11 18:13:10 +00:00
|
|
|
void on_printTemplate_currentIndexChanged(int index);
|
2013-07-09 12:37:53 +00:00
|
|
|
};
|
|
|
|
|
2014-02-11 18:14:46 +00:00
|
|
|
#endif // PRINTOPTIONS_H
|