summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2015-05-30 13:27:14 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-04 10:07:59 -0700
commitb4e1563d10ff1d610fdcd622871620e50b0c5bd5 (patch)
tree53fe13e31bede0465fef4b1cac510ea7a3a06cd1
parent1cff998f8412218fd2447f390eadf05b2ea9ae34 (diff)
downloadsubsurface-b4e1563d10ff1d610fdcd622871620e50b0c5bd5.tar.gz
Printing: remove the print_options struct from display.h
Move print_options struct to printoptions.h, its more relevant to be placed here. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--display.h11
-rw-r--r--qt-ui/printdialog.h2
-rw-r--r--qt-ui/printoptions.cpp1
-rw-r--r--qt-ui/printoptions.h11
4 files changed, 12 insertions, 13 deletions
diff --git a/display.h b/display.h
index 53131e043..3ce0d4f29 100644
--- a/display.h
+++ b/display.h
@@ -35,17 +35,6 @@ typedef enum {
extern struct divecomputer *select_dc(struct dive *);
-struct print_options {
- enum print_type {
- DIVELIST,
- TABLE,
- STATISTICS
- } type;
- bool print_selected;
- bool color_selected;
- bool landscape;
-};
-
extern unsigned int dc_number;
extern unsigned int amount_selected;
diff --git a/qt-ui/printdialog.h b/qt-ui/printdialog.h
index aaba7645b..bdcfbf733 100644
--- a/qt-ui/printdialog.h
+++ b/qt-ui/printdialog.h
@@ -3,7 +3,7 @@
#include <QDialog>
#include <QPrinter>
-#include "../display.h"
+#include "printoptions.h"
class QProgressBar;
class PrintOptions;
diff --git a/qt-ui/printoptions.cpp b/qt-ui/printoptions.cpp
index 03f9d19e2..50ca8b7c2 100644
--- a/qt-ui/printoptions.cpp
+++ b/qt-ui/printoptions.cpp
@@ -1,5 +1,4 @@
#include "printoptions.h"
-#include "display.h"
PrintOptions::PrintOptions(QWidget *parent, struct print_options *printOpt)
{
diff --git a/qt-ui/printoptions.h b/qt-ui/printoptions.h
index af845cb19..1e12efae7 100644
--- a/qt-ui/printoptions.h
+++ b/qt-ui/printoptions.h
@@ -5,6 +5,17 @@
#include "ui_printoptions.h"
+struct print_options {
+ enum print_type {
+ DIVELIST,
+ TABLE,
+ STATISTICS
+ } type;
+ bool print_selected;
+ bool color_selected;
+ bool landscape;
+};
+
// should be based on a custom QPrintDialog class
class PrintOptions : public QWidget {
Q_OBJECT