diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 20:09:57 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 20:09:57 -0800 |
commit | 76e6420f6b3503b76bd3eec00ab0e53d6ea17a20 (patch) | |
tree | 8b50298f41bd29d55bbd6f4301f36ad31dc0b008 /qt-ui/printlayout.cpp | |
parent | 006265d7a088cff4fea665159dbb454956c2cd76 (diff) | |
download | subsurface-76e6420f6b3503b76bd3eec00ab0e53d6ea17a20.tar.gz |
Massive automated whitespace cleanup
I know everyone will hate it.
Go ahead. Complain. Call me names.
At least now things are consistent and reproducible.
If you want changes, have your complaint come with a patch to
scripts/whitespace.pl so that we can automate it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/printlayout.cpp')
-rw-r--r-- | qt-ui/printlayout.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp index d9a5a5c27..cf566e604 100644 --- a/qt-ui/printlayout.cpp +++ b/qt-ui/printlayout.cpp @@ -43,7 +43,7 @@ PrintLayout::PrintLayout(PrintDialog *dialogPtr, QPrinter *printerPtr, struct op profilePrintColumnWidths.append(dw - 3); profilePrintColumnWidths.append(dw - 3); profilePrintColumnWidths.append(dw + 6); // fit to 100% - const int sr = 12; // smallest row height in pixels + const int sr = 12; // smallest row height in pixels profilePrintRowHeights.append(sr); profilePrintRowHeights.append(sr + 4); profilePrintRowHeights.append(sr); @@ -84,8 +84,8 @@ void PrintLayout::setup() printerDpi = printer->resolution(); pageRect = printer->pageRect(); - scaleX = (qreal)printerDpi/(qreal)screenDpiX; - scaleY = (qreal)printerDpi/(qreal)screenDpiY; + scaleX = (qreal)printerDpi / (qreal)screenDpiX; + scaleY = (qreal)printerDpi / (qreal)screenDpiY; // a printer page scalled to screen DPI scaledPageW = pageRect.width() / scaleX; @@ -114,7 +114,7 @@ int PrintLayout::estimateTotalDives() const * p is the padding between elements */ #define ESTIMATE_DIVE_DIM(S, n, p) \ - ((S) - ((n) - 1) * (p)) / (n); + ((S) - ((n) - 1) * (p)) / (n); void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn) { @@ -220,7 +220,7 @@ QTableView *PrintLayout::createProfileTable(ProfilePrintModel *model, const int table->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); hHeader->setVisible(false); vHeader->setVisible(false); -#if QT_VERSION < QT_VERSION_CHECK(5,0,0) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) hHeader->setResizeMode(QHeaderView::Fixed); vHeader->setResizeMode(QHeaderView::Fixed); #else @@ -269,8 +269,7 @@ QTableView *PrintLayout::createProfileTable(ProfilePrintModel *model, const int table->setShowGrid(false); table->setStyleSheet( "QTableView { border: none }" - "QTableView::item { border: 0px; padding-left: 2px; padding-right: 2px; }" - ); + "QTableView::item { border: 0px; padding-left: 2px; padding-right: 2px; }"); // return return table; } @@ -290,7 +289,7 @@ void PrintLayout::printTable() table.setFocusPolicy(Qt::NoFocus); table.horizontalHeader()->setVisible(false); table.verticalHeader()->setVisible(false); -#if QT_VERSION < QT_VERSION_CHECK(5,0,0) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) table.horizontalHeader()->setResizeMode(QHeaderView::Fixed); table.verticalHeader()->setResizeMode(QHeaderView::ResizeToContents); #else @@ -300,12 +299,11 @@ void PrintLayout::printTable() table.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); table.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); // fit table to one page initially - table.resize(scaledPageW, scaledPageH); + table.resize(scaledPageW, scaledPageH); // don't show border table.setStyleSheet( - "QTableView { border: none }" - ); + "QTableView { border: none }"); // create and fill a table model TablePrintModel model; |