diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-09-27 19:06:45 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-09-27 09:29:30 -0700 |
commit | df8107830e24ce3687d37ee245a4e38202deea5f (patch) | |
tree | f93b4db511039aa75ce07c1aecf3bfc771fb0fbd /qt-ui/printlayout.h | |
parent | e81bbc1dabc3601876bd7393c73b49d5ff87ee85 (diff) | |
download | subsurface-df8107830e24ce3687d37ee245a4e38202deea5f.tar.gz |
Print: provide means for profile layouting
printlayout.cpp(h):
This patch cleans some test code and adds the function
printProfileDives() that accepts a number of dives
per rows and columns. It can technically fit any number
of dives on a page given the page size allows it. Both
landscape and portrait layouts are supported.
It now replaces the old methods:
printTwoDives()
printSixDives()
Space is reserved for data tables that will be placed
bellow profiles on a later stage.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/printlayout.h')
-rw-r--r-- | qt-ui/printlayout.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/qt-ui/printlayout.h b/qt-ui/printlayout.h index ac363ab8d..79c1d658e 100644 --- a/qt-ui/printlayout.h +++ b/qt-ui/printlayout.h @@ -19,9 +19,9 @@ public: private: PrintDialog *dialog; QPrinter *printer; + QPainter *painter; struct options *printOptions; - QPainter *painter; int screenDpiX, screenDpiY, printerDpi, scaledPageW, scaledPageH; qreal scaleX, scaleY; QRect pageRect; @@ -31,8 +31,7 @@ private: unsigned int tablePrintHeadingBackground; void setup(); - void printSixDives() const; - void printTwoDives() const; + void printProfileDives(int divesPerRow, int divesPerColumn); void printTable(); void addTablePrintDataRow(TablePrintModel *model, int row, struct dive *dive) const; void addTablePrintHeadingRow(TablePrintModel *model, int row) const; |