aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-pdf/mainUI.h
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-11-14 10:25:43 -0500
committerKen Moore <ken@ixsystems.com>2017-11-14 10:25:43 -0500
commita9c8fd84a62b6e8d67ac0dd93235f094a481ee05 (patch)
tree5f14a2889c7d85246a0254b0bbe333c2a9de92b9 /src-qt5/desktop-utils/lumina-pdf/mainUI.h
parentSome more README updates. (diff)
downloadlumina-a9c8fd84a62b6e8d67ac0dd93235f094a481ee05.tar.gz
lumina-a9c8fd84a62b6e8d67ac0dd93235f094a481ee05.tar.bz2
lumina-a9c8fd84a62b6e8d67ac0dd93235f094a481ee05.zip
Clean up the keyboard shortcut handling in lumina-pdf.
Now the page changes can be controlled by arrows/page[up/down] whether a presentation is running or not. Also unify the page that is shown between the presentation window and the main viewer - makes it easier when giving a presentation on a screen that might be behind the presentor.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/mainUI.h')
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/mainUI.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.h b/src-qt5/desktop-utils/lumina-pdf/mainUI.h
index c1fc7c7c..c43d0ada 100644
--- a/src-qt5/desktop-utils/lumina-pdf/mainUI.h
+++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.h
@@ -75,19 +75,16 @@ signals:
protected:
void keyPressEvent(QKeyEvent *event){
//See if this is one of the special hotkeys and act appropriately
- // NOTE: Some of this is duplicated with the QShortcut definitions (for non-presentation mode)
- // This routine does not always work for the main window viewer due to differing widget focus policies
- if(presentationLabel!=0 && presentationLabel->isVisible()){
//qDebug() << "Got Key Press:";
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){
+ }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";
- ShowPage( CurrentPage+1 );
- }else if(event->key()==Qt::Key_Left || event->key()==Qt::Key_Up){
+ 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";
- ShowPage( CurrentPage-1 );
+ ShowPage( WIDGET->currentPage()-2 ); //currentPage() starts at 1 rather than 0
}else if(event->key()==Qt::Key_Home){
//qDebug() << " - Home";
ShowPage(0); //go to the first page
@@ -100,9 +97,6 @@ protected:
}else{
QMainWindow::keyPressEvent(event);
}
- }else{
- QMainWindow::keyPressEvent(event);
- }
}
};
#endif
bgstack15