From 60eb0e9f40020df7ce4eccf88eed6c697aa8bc82 Mon Sep 17 00:00:00 2001 From: Rtch90 Date: Mon, 15 Dec 2014 22:33:40 +0000 Subject: [PATCH] [Add] For some reason my work earlier wasn't saved. This should bring it back to it's previous state though. --- bin/hpdf.pro | 13 +++++++++---- src/pdf_factory.cpp | 10 ++++++++++ src/pdf_factory.h | 3 +-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/bin/hpdf.pro b/bin/hpdf.pro index 2b6fc48..dd71b8c 100644 --- a/bin/hpdf.pro +++ b/bin/hpdf.pro @@ -2,15 +2,20 @@ QT += widgets TEMPLATE = app TARGET = hpdf -DEPENDPATH += . -INCLUDEPATH += . +DEPENDPATH += . +INCLUDEPATH += /usr/include/poppler/qt5 +LIBS += -L/usr/lib -lpoppler-qt5 HEADERS += \ - ../src/pdf_factory.h + ../src/pdf_factory.h \ + ../src/pdf_file.h \ + ../src/pdf_page_widget.h SOURCES += \ ../src/main.cpp \ - ../src/pdf_factory.cpp + ../src/pdf_factory.cpp \ + ../src/pdf_file.cpp \ + ../src/pdf_page_widget.cpp RESOURCES += hpdf.qrc diff --git a/src/pdf_factory.cpp b/src/pdf_factory.cpp index 25f99db..283e2b7 100644 --- a/src/pdf_factory.cpp +++ b/src/pdf_factory.cpp @@ -1,5 +1,8 @@ #include +#include #include "pdf_factory.h" +#include "pdf_file.h" +#include "pdf_page_widget.h" PDFFactory::PDFFactory(void) { createWidgets(); @@ -31,12 +34,19 @@ void PDFFactory::createWidgets(void) { /* Create main area (table). */ pdfTableView = new QWidget(); pdfTableView->setLayout(new QVBoxLayout()); + /*pdfTableView->setMinimumSize(1000, 1000);*/ pdfTableView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); scrollArea = new QScrollArea(); scrollArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); layout->addWidget(scrollArea); + /*PDFFile* pdfFile = new PDFFile("/home/docs/loa.pdf"); + PDFPageWidget* pdfPage = new PDFPageWidget(); + pdfPage->setPageImage(pdfFile->getPageImage(0)); + pdfTableView->layout()->addWidget(pdfPage);*/ + setWindowIcon(QIcon(":/img/hpdf.png")); + setWindowTitle(tr("HPDF")); setGeometry(0, 0, 550, 650); } diff --git a/src/pdf_factory.h b/src/pdf_factory.h index 421a56a..efacb54 100644 --- a/src/pdf_factory.h +++ b/src/pdf_factory.h @@ -2,9 +2,8 @@ #include class QAction; -class QToolBar; -class QTabWidget; class QWidget; +class QTabWidget; class QScrollArea; class PDFFactory : public QMainWindow {