diff --git a/bin/hpdf.pro b/bin/hpdf.pro
index d83005e..8f52170 100644
--- a/bin/hpdf.pro
+++ b/bin/hpdf.pro
@@ -27,5 +27,23 @@ SOURCES += \
RESOURCES += hpdf.qrc
-CONFIG += console
+#CONFIG += console
+
+macx {
+ CONFIG(release, debug|release) {
+ DESTDIR = ../bin/
+ }
+}
+
+win32 {
+ CONFIG(release, debug|release) {
+ DESTDIR = ../bin/
+ }
+}
+
+linux {
+ CONFIG(release, debug|release) {
+ DESTDIR = ../bin/
+ }
+}
diff --git a/bin/hpdf.qrc b/bin/hpdf.qrc
index e263e67..da6679d 100644
--- a/bin/hpdf.qrc
+++ b/bin/hpdf.qrc
@@ -12,5 +12,6 @@
../img/collapse.png
../img/expand.png
../img/remove.png
+ ../img/rotate.png
diff --git a/img/delete.png b/img/delete.png
new file mode 100644
index 0000000..e02fa14
Binary files /dev/null and b/img/delete.png differ
diff --git a/img/rotate.png b/img/rotate.png
new file mode 100644
index 0000000..c60550b
Binary files /dev/null and b/img/rotate.png differ
diff --git a/src/pdf_factory.cpp b/src/pdf_factory.cpp
index 216e1a3..6f6af91 100644
--- a/src/pdf_factory.cpp
+++ b/src/pdf_factory.cpp
@@ -63,16 +63,16 @@ void PDFFactory::createActions(void) {
openAction->setStatusTip(tr("Open a PDF"));
connect(openAction, SIGNAL(triggered()), this, SLOT(openFile()));
- exportAction = new QAction(tr("&Export"), this);
+ exportAction = new QAction(tr("&Export a single file"), this);
exportAction->setIcon(QIcon(":/img/export.png"));
exportAction->setShortcut(tr("Ctrl+S"));
- exportAction->setStatusTip(tr("Export the selected frame to a new PDF"));
+ exportAction->setStatusTip(tr("Export the selected file to a new PDF"));
/*connect(saveAction, SIGNAL(triggered()), this, SLOT(save()))*/
- exportAllAction = new QAction(tr("Combine all and export"), this);
+ exportAllAction = new QAction(tr("Combine all"), this);
exportAllAction->setIcon(QIcon(":/img/exportall.png"));
exportAllAction->setShortcut(tr("Shift+Ctrl+S"));
- exportAllAction->setStatusTip(tr("Combine all and export as one PDF"));
+ exportAllAction->setStatusTip(tr("Export all to multiple PDF files"));
/*connect(saveAsAction, SIGNAL(triggered()), this, SLOT(saveAs()))*/
cutAction = new QAction(tr("C&ut"), this);
@@ -140,7 +140,7 @@ void PDFFactory::createStatusBar(void) {
statusBar()->showMessage(tr(""));
}
-void PDFFactory::openFile() {
+void PDFFactory::openFile(void) {
QStringList fileNames = QFileDialog::getOpenFileNames(this,
tr("Open PDF file"), ".",
tr("PDF file (*.pdf)"));
diff --git a/src/pdf_page_widget.cpp b/src/pdf_page_widget.cpp
index 62e68c7..3c73db3 100644
--- a/src/pdf_page_widget.cpp
+++ b/src/pdf_page_widget.cpp
@@ -17,24 +17,33 @@ PDFPageWidget::PDFPageWidget(QWidget* parent) :
this->setMouseTracking(true);
this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- QHBoxLayout* hbox = new QHBoxLayout();
+ QHBoxLayout* topHBox = new QHBoxLayout();
+ btnRotate = new QPushButton("", this);
+ btnRotate->setObjectName("rotate");
+ btnRotate->setIcon(QPixmap::fromImage(QImage("img/rotate.png")));
+ btnRotate->hide();
+ topHBox->addWidget(btnRotate, 0, Qt::AlignLeft);
+
+ QHBoxLayout* bottomHBox = new QHBoxLayout();
btnCut = new QPushButton("", this);
btnCut->setObjectName("cut");
+ btnCut->setIcon(QPixmap::fromImage(QImage("img/cut.png")));
+ btnCut->hide();
+
btnCopy = new QPushButton("", this);
btnCopy->setObjectName("copy");
- btnCut->setIcon(QPixmap::fromImage(QImage("img/cut.png")));
btnCopy->setIcon(QPixmap::fromImage(QImage("img/copy.png")));
- btnCut->hide();
btnCopy->hide();
- hbox->addWidget(btnCut, 0, Qt::AlignLeft);
- hbox->addWidget(btnCopy, 1, Qt::AlignRight);
+ bottomHBox->addWidget(btnCut, 0, Qt::AlignLeft);
+ bottomHBox->addWidget(btnCopy, 1, Qt::AlignRight);
QVBoxLayout* vbox = new QVBoxLayout();
+ vbox->addLayout(topHBox);
vbox->addStretch(1);
- vbox->addLayout(hbox);
+ vbox->addLayout(bottomHBox);
vbox->setContentsMargins(0, 3, 0, 3);
this->setLayout(vbox);
}
@@ -92,13 +101,15 @@ void PDFPageWidget::dropEvent(QDropEvent* event) {
}
void PDFPageWidget::leaveEvent(QEvent* event) {
- btnCut->hide();
- btnCopy->hide();
+ btnRotate->hide();
+ btnCut->hide();
+ btnCopy->hide();
this->setFrameStyle(QFrame::Plain);
}
void PDFPageWidget::enterEvent(QEvent* event) {
+ btnRotate->show();
btnCut->show();
btnCopy->show();
diff --git a/src/pdf_page_widget.h b/src/pdf_page_widget.h
index 02b4195..b38b0fc 100644
--- a/src/pdf_page_widget.h
+++ b/src/pdf_page_widget.h
@@ -44,7 +44,7 @@ private:
QImage image;
Poppler::Page* pPage;
QPixmap pixmap;
- QPushButton* btnCut, *btnCopy;
+ QPushButton* btnRotate, *btnCut, *btnCopy;
bool selected;