summaryrefslogtreecommitdiffstats
path: root/qt-ui/printlayout.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-11-30 14:38:54 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-11-30 15:32:14 +0200
commit3b7500fd33693da6c353600674166ca5098895e4 (patch)
tree395f26900f89f8cfbc3d21cc5c27e19907818074 /qt-ui/printlayout.cpp
parentd668f5dc8e0121d4000c7b2c340d7a0cd86efc49 (diff)
downloadsubsurface-3b7500fd33693da6c353600674166ca5098895e4.tar.gz
Print: setup for a new profile table layout
- Adjust the new rows and column count - Set new row and column spans Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'qt-ui/printlayout.cpp')
-rw-r--r--qt-ui/printlayout.cpp35
1 files changed, 13 insertions, 22 deletions
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index f539c89b3..24d3492a5 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -36,14 +36,12 @@ PrintLayout::PrintLayout(PrintDialog *dialogPtr, QPrinter *printerPtr, struct op
tablePrintColumnWidths.append(15);
tablePrintColumnWidths.append(33);
// profile print settings
- const int dw = 15; // base percentage
+ const int dw = 20; // base percentage
profilePrintColumnWidths.append(dw);
profilePrintColumnWidths.append(dw);
profilePrintColumnWidths.append(dw);
profilePrintColumnWidths.append(dw);
- profilePrintColumnWidths.append(dw - 5);
- profilePrintColumnWidths.append(dw + 5);
- profilePrintColumnWidths.append(dw - 5); // fit to 100%
+ profilePrintColumnWidths.append(dw); // fit to 100%
const int sr = 9; // smallest row height in pixels
profilePrintRowHeights.append(sr + 2);
profilePrintRowHeights.append(sr + 7);
@@ -55,7 +53,8 @@ PrintLayout::PrintLayout(PrintDialog *dialogPtr, QPrinter *printerPtr, struct op
profilePrintRowHeights.append(sr);
profilePrintRowHeights.append(sr);
profilePrintRowHeights.append(sr);
- profilePrintRowHeights.append(sr + 12);
+ profilePrintRowHeights.append(sr);
+ profilePrintRowHeights.append(sr);
}
void PrintLayout::print()
@@ -211,23 +210,15 @@ QTableView *PrintLayout::createProfileTable(ProfilePrintModel *model, const int
* changes made here reflect on ProfilePrintModel::data(). */
const int cols = model->columnCount();
const int rows = model->rowCount();
- // top section
- table->setSpan(0, 0, 1, cols - 2);
- table->setSpan(1, 0, 1, cols - 2);
- table->setSpan(10, 0, 1, cols);
- table->setSpan(0, 5, 1, 2);
- table->setSpan(1, 5, 1, 12);
- // sac, cns, otu
- table->setSpan(2, 3, 2, 1);
- table->setSpan(4, 3, 2, 1);
- table->setSpan(6, 3, 2, 1);
- table->setSpan(8, 3, 2, 1);
- table->setSpan(2, 4, 2, 1);
- table->setSpan(4, 4, 2, 1);
- table->setSpan(6, 4, 2, 1);
- table->setSpan(8, 4, 2, 1);
- // weights
- table->setSpan(2, 5, 1, 2);
+ // info on top
+ table->setSpan(0, 0, 1, 4);
+ table->setSpan(1, 0, 1, 4);
+ // gas used
+ table->setSpan(2, 0, 1, 2);
+ table->setSpan(3, 0, 1, 2);
+ // notes
+ table->setSpan(6, 0, 1, 5);
+ table->setSpan(7, 0, 5, 5);
/* resize row heights to the 'profilePrintRowHeights' indexes.
* profilePrintTableMaxH will then hold the table height. */