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