diff options
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp | 5 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/PrintWidget.h | 4 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/mainUI.cpp | 12 |
3 files changed, 18 insertions, 3 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp index 75b81547..19deabd9 100644 --- a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.cpp @@ -1,4 +1,5 @@ #include "PrintWidget.h" +#include <QTimer> PrintWidget::PrintWidget(QWidget *parent) : QGraphicsView(parent), scene(0), curPage(1), viewMode(SinglePageView), zoomMode(FitInView), zoomFactor(1), initialized(false), fitting(true) { @@ -186,7 +187,7 @@ void PrintWidget::populateScene() //qDebug() << "Image paperSize" << paperSize; //Changes the paper orientation if rotated by 90 or 270 degrees - if(degrees == 90 or degrees == 270) + if(degrees == 90 or degrees == 270) paperSize.transpose(); for (int i = 0; i < numPages; i++) { @@ -284,6 +285,8 @@ void PrintWidget::fit(bool doFitting) { void PrintWidget::setPictures(QHash<int, QImage> *hash) { pictures = hash; + setCurrentPage(1); + QTimer::singleShot(0,this, SLOT(updatePreview())); } void PrintWidget::receiveDocument(Poppler::Document *DOC) { diff --git a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.h b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.h index 455c86eb..a00200a3 100644 --- a/src-qt5/desktop-utils/lumina-pdf/PrintWidget.h +++ b/src-qt5/desktop-utils/lumina-pdf/PrintWidget.h @@ -73,7 +73,7 @@ public: QMatrix matrix; switch(degrees) { case 270: - matrix = QMatrix(0, -1, 1, 0, 0, 0); + matrix = QMatrix(0, -1, 1, 0, 0, 0); break; case 90: matrix = QMatrix(0, 1, -1, 0, 0, 0); @@ -82,7 +82,7 @@ public: matrix = QMatrix(-1, 0, 0, -1, 0, 0); break; default: - matrix = QMatrix(1, 0, 0, 1, 0 ,0); + matrix = QMatrix(1, 0, 0, 1, 0 ,0); } painter->setClipRect(paperRect & option->exposedRect); diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp index 53a126fb..51fbdf9d 100644 --- a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp +++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp @@ -23,6 +23,8 @@ #include <LuminaXDG.h> #include "PrintWidget.h" +#define TESTING false + MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()){ ui->setupUi(this); this->setWindowTitle(tr("Lumina PDF Viewer")); @@ -208,6 +210,16 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()){ ui->findGroup->setVisible(false); ui->bookmarksFrame->setVisible(false); + + // Disable/Hide all the things currently still being implemented + ui->menuSettings->setEnabled(TESTING); + ui->menuSettings->setVisible(TESTING); + + ui->actionBookmarks->setEnabled(TESTING); + ui->actionRotate_Counterclockwise->setEnabled(TESTING); + ui->actionRotate_Clockwise->setEnabled(TESTING); + ui->actionProperties->setEnabled(TESTING); + ui->actionProperties->setVisible(TESTING); } MainUI::~MainUI(){ |