diff options
author | Ken Moore <ken@ixsystems.com> | 2017-12-21 09:47:39 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-12-21 09:47:39 -0500 |
commit | 6fa4f14708a67c57d7b6753c4e933df2e6b2f583 (patch) | |
tree | e867e7fc3c61535b1c74d956556cc31c630a5ead /src-qt5/desktop-utils/lumina-pdf/mainUI.h | |
parent | Turn of some stdout messages within the Qt theme plugin. (diff) | |
parent | Merge branch 'master' of https://github.com/trueos/lumina (diff) | |
download | lumina-6fa4f14708a67c57d7b6753c4e933df2e6b2f583.tar.gz lumina-6fa4f14708a67c57d7b6753c4e933df2e6b2f583.tar.bz2 lumina-6fa4f14708a67c57d7b6753c4e933df2e6b2f583.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/mainUI.h')
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/mainUI.h | 55 |
1 files changed, 8 insertions, 47 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.h b/src-qt5/desktop-utils/lumina-pdf/mainUI.h index 527bcb2a..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 <poppler/qt5/poppler-qt5.h> #include "PresentationLabel.h" +#include "propDialog.h" namespace Ui{ class MainUI; @@ -34,16 +35,13 @@ public: void loadFile(QString path); - private: Poppler::Document *DOC; QPrintPreviewWidget *WIDGET; Ui::MainUI *ui; + PropDialog *PROPDIALOG; QPrinter* Printer; QPrintDialog *PrintDLG; - - int ccw; - QString lastdir; //Other Interface elements @@ -72,7 +70,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 @@ -82,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); @@ -96,51 +95,13 @@ private slots: void updateContextMenu(); void setScroll(bool); - void rotate(QPrinter*, bool); + void rotate(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*); + void wheelEvent(QWheelEvent*); }; #endif |