From 6c5a1d42db02985ed64ca744215bb23fca276143 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Mon, 18 Dec 2017 16:05:27 -0500 Subject: Finished rotation and working on changing keys in lumina-pdf --- src-qt5/desktop-utils/lumina-pdf/mainUI.h | 47 ++----------------------------- 1 file changed, 3 insertions(+), 44 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-pdf/mainUI.h') diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.h b/src-qt5/desktop-utils/lumina-pdf/mainUI.h index 527bcb2a..078caaca 100644 --- a/src-qt5/desktop-utils/lumina-pdf/mainUI.h +++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.h @@ -41,9 +41,6 @@ private: Ui::MainUI *ui; QPrinter* Printer; QPrintDialog *PrintDLG; - - int ccw; - QString lastdir; //Other Interface elements @@ -96,51 +93,13 @@ private slots: void updateContextMenu(); void setScroll(bool); - void rotate(QPrinter*, bool); + void rotate(bool); + //void rotate(QPrinter*, bool); signals: void PageLoaded(int); 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"; - if(inPresentation){ 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" << inPresentation; - nextPage(); - }else if(event->key()==Qt::Key_Left || event->key()==Qt::Key_Up || event->key()==Qt::Key_PageUp){ - //qDebug() << " - Left/Up"; - prevPage(); - }else if(event->key()==Qt::Key_Home){ - //qDebug() << " - Home"; - firstPage(); - }else if(event->key()==Qt::Key_End){ - //qDebug() << " - End"; - lastPage(); - }else if(event->key()==Qt::Key_F11){ - //qDebug() << " - F11"; - if(inPresentation){ endPresentation(); } - else{ startPresentationHere(); } - }else{ - QMainWindow::keyPressEvent(event); - } - } + void keyPressEvent(QKeyEvent*); }; #endif -- cgit From f4d3efca1f72dd152db2128568117445ada07789 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Mon, 18 Dec 2017 19:05:35 -0500 Subject: Added missing icons and created actions for later implemented functions --- src-qt5/desktop-utils/lumina-pdf/mainUI.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/desktop-utils/lumina-pdf/mainUI.h') diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.h b/src-qt5/desktop-utils/lumina-pdf/mainUI.h index 078caaca..9ed50ba0 100644 --- a/src-qt5/desktop-utils/lumina-pdf/mainUI.h +++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.h @@ -69,7 +69,7 @@ private: private slots: void startLoadingPages(QPrinter *printer); void slotPageLoaded(int); - void slotStartPresentation(QAction *act); + //void slotStartPresentation(QAction *act); //Simplification routines void nextPage(){ ShowPage( WIDGET->currentPage() ); } //currentPage() starts at 1 rather than 0 -- cgit From a774d58cd478a5473d8328b2a9689bc53a37dbc1 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Wed, 20 Dec 2017 14:41:12 -0500 Subject: Fixed keyboard focus and added an information dialog to lumina-pdf --- src-qt5/desktop-utils/lumina-pdf/mainUI.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-pdf/mainUI.h') diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.h b/src-qt5/desktop-utils/lumina-pdf/mainUI.h index 9ed50ba0..18b3d231 100644 --- a/src-qt5/desktop-utils/lumina-pdf/mainUI.h +++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.h @@ -21,6 +21,7 @@ #include #include "PresentationLabel.h" +#include "propDialog.h" namespace Ui{ class MainUI; @@ -34,11 +35,11 @@ public: void loadFile(QString path); - private: Poppler::Document *DOC; QPrintPreviewWidget *WIDGET; Ui::MainUI *ui; + PropDialog *PROPDIALOG; QPrinter* Printer; QPrintDialog *PrintDLG; QString lastdir; @@ -79,8 +80,9 @@ private slots: void startPresentationHere(){ startPresentation(false); } void startPresentationBeginning(){ startPresentation(true); } void closePresentation(){ endPresentation(); } + void showInformation(); - + void newFocus(QWidget*, QWidget*); void paintOnWidget(QPrinter *PRINTER); void paintToPrinter(QPrinter *PRINTER); @@ -94,12 +96,12 @@ private slots: void setScroll(bool); void rotate(bool); - //void rotate(QPrinter*, bool); signals: void PageLoaded(int); protected: void keyPressEvent(QKeyEvent*); + void wheelEvent(QWheelEvent*); }; #endif -- cgit