diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2015-05-24 13:10:13 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-24 09:37:23 -0700 |
commit | 4eeecf73156c5d15058b4570dcbe905494604e5e (patch) | |
tree | ddee6ee2c5e12b266f0e6d4fe9d2b73faf9c30e4 /qt-ui | |
parent | f88fb74b5bf04f98205d96d360ebd25125c0b90d (diff) | |
download | subsurface-4eeecf73156c5d15058b4570dcbe905494604e5e.tar.gz |
Remove support for Qt4 (part 5)
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/printlayout.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp index 4be5fef73..8123ba07a 100644 --- a/qt-ui/printlayout.cpp +++ b/qt-ui/printlayout.cpp @@ -248,13 +248,8 @@ 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) - hHeader->setResizeMode(QHeaderView::Fixed); - vHeader->setResizeMode(QHeaderView::Fixed); -#else hHeader->setSectionResizeMode(QHeaderView::Fixed); vHeader->setSectionResizeMode(QHeaderView::Fixed); -#endif // set the model table->setModel(model); @@ -322,13 +317,8 @@ void PrintLayout::printTable() table.setFocusPolicy(Qt::NoFocus); table.horizontalHeader()->setVisible(false); table.verticalHeader()->setVisible(false); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - table.horizontalHeader()->setResizeMode(QHeaderView::Fixed); - table.verticalHeader()->setResizeMode(QHeaderView::ResizeToContents); -#else table.horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed); table.verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); -#endif table.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); table.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); // fit table to one page initially @@ -428,13 +418,7 @@ void PrintLayout::printTable() for (i = 0; i < total; i++) { if (i > 0) printer->newPage(); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - (void)headingRowHeightD2; - QRegion region(0, pageIndexes.at(i) - 1, - table.width(), - pageIndexes.at(i + 1) - pageIndexes.at(i) + 1); - table.render(&painter, QPoint(0, 0), region); -#else + QRegion region(0, pageIndexes.at(i) + headingRowHeightD2 - 1, table.width(), pageIndexes.at(i + 1) - (pageIndexes.at(i) + headingRowHeightD2) + 1); @@ -445,7 +429,7 @@ void PrintLayout::printTable() table.render(&picPainter, QPoint(0, 0), region); picPainter.end(); painter.drawPicture(QPoint(0, headingRowHeightD2), pic); -#endif + progress++; emit signalProgress(done + (progress * 10) / total); } |