00001 #ifndef MAINWINDOW_H 00002 #define MAINWINDOW_H 00003 00004 #include "pdfpager.h" 00005 #include "thumbnailscene.h" 00006 #include "pdfscene.h" 00007 00008 #include <QMainWindow> 00009 #include <QLineEdit> 00010 00011 namespace Ui 00012 { 00013 class MainWindow; 00014 } 00015 00025 class MainWindow : public QMainWindow 00026 { 00027 Q_OBJECT 00028 00029 public: // construction & init 00030 MainWindow(QWidget *parent = 0); 00031 ~MainWindow(); 00032 void open(QString path); 00033 00034 private slots: // action handlers 00035 void on_actionViewPageText_toggled(bool ); 00036 void on_actionViewPageImage_toggled(bool ); 00037 void on_actionZoom_Width_triggered(); 00038 void on_actionZoom_to_Fit_triggered(); 00039 void on_actionZoom_25_triggered(); 00040 void on_actionZoom_100_triggered(); 00041 void on_actionZoom_Out_triggered(); 00042 void on_actionZoom_In_triggered(); 00043 void on_actionExport_triggered(); 00044 void on_actionBox_toggled(bool ); 00045 void on_actionSelect_toggled(bool ); 00046 void on_actionPan_toggled(bool ); 00047 void on_actionSave_triggered(); 00048 void on_actionNext_Page_triggered(); 00049 void on_actionPrevious_Page_triggered(); 00050 void on_actionOpen_PDF_triggered(); 00051 00052 private slots: // notifications from other components 00053 void renderPage(); 00054 void selectionChanged(); 00055 void cursorMoved(QPointF pos); 00056 void zoomChanged(); 00057 00058 private: // variables 00059 Ui::MainWindow *ui; 00060 PDFPager doc; 00061 QLineEdit* pageNum; 00062 QLineEdit* zoomPercent; 00063 ThumbnailScene thumbnailScene; 00064 PDFScene pdfScene; 00065 }; 00066 00067 #endif // MAINWINDOW_H
1.5.8