aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-pdf
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-11-14 11:41:20 -0500
committerKen Moore <ken@ixsystems.com>2017-11-14 11:41:20 -0500
commit94589dd957bf5b7792d69a6825643e4cc2fa66c7 (patch)
tree7702510d5cba6bc6d37dbd0ce2cddf4842c6639e /src-qt5/desktop-utils/lumina-pdf
parentClean up the keyboard shortcut handling in lumina-pdf. (diff)
downloadlumina-94589dd957bf5b7792d69a6825643e4cc2fa66c7.tar.gz
lumina-94589dd957bf5b7792d69a6825643e4cc2fa66c7.tar.bz2
lumina-94589dd957bf5b7792d69a6825643e4cc2fa66c7.zip
Finish up a bit more cleanup of keyboard events in lumina-pdf
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf')
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/mainUI.cpp2
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/mainUI.h18
2 files changed, 18 insertions, 2 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp
index 5cfc5da9..07680dcf 100644
--- a/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.cpp
@@ -131,7 +131,7 @@ void MainUI::loadFile(QString path){
Printer->setOrientation(QPrinter::Portrait);
}
delete PAGE;
- qDebug() << " - Document Setup : start loading pages now";
+ //qDebug() << " - Document Setup : start loading pages now";
QTimer::singleShot(10, WIDGET, SLOT(updatePreview())); //start loading the file preview
}
diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.h b/src-qt5/desktop-utils/lumina-pdf/mainUI.h
index c43d0ada..3609db13 100644
--- a/src-qt5/desktop-utils/lumina-pdf/mainUI.h
+++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.h
@@ -15,6 +15,8 @@
#include <QLabel>
#include <QKeyEvent>
#include <QDebug>
+#include <QWheelEvent>
+#include <QApplication>
#include <poppler-qt5.h>
@@ -76,11 +78,25 @@ protected:
void keyPressEvent(QKeyEvent *event){
//See if this is one of the special hotkeys and act appropriately
//qDebug() << "Got Key Press:";
+ bool inPresentation = (presentationLabel!=0);
+ if(!inPresentation){
+ //Alternate functionality when **not** in presentation mode
+ /*if(event->key()==Qt::Key_Down){
+ qDebug() << "Send Wheel Event";
+ QWheelEvent event( WIDGET->mapFromGlobal(QCursor::pos()), QCursor::pos(),QPoint(0,0), QPoint(0,30), 0, Qt::Vertical, Qt::LeftButton, Qt::NoModifier);
+ QApplication::sendEvent(WIDGET, &event);
+ //WIDGET->scrollDown();
+ return;
+ }else if(event->key()==Qt::Key_Up){
+ return;
+ }*/
+ }
+
if( event->key()==Qt::Key_Escape || event->key()==Qt::Key_Backspace){
//qDebug() << " - Escape/Backspace";
endPresentation();
}else if(event->key()==Qt::Key_Right || event->key()==Qt::Key_Down || event->key()==Qt::Key_Space || event->key()==Qt::Key_PageDown){
- //qDebug() << " - Right/Down/Spacebar";
+ //qDebug() << " - Right/Down/Spacebar" << inPresentation;
ShowPage( WIDGET->currentPage() ); //currentPage() starts at 1 rather than 0
}else if(event->key()==Qt::Key_Left || event->key()==Qt::Key_Up || event->key()==Qt::Key_PageUp){
//qDebug() << " - Left/Up";
bgstack15