New feature: rotating pages in viewer

This commit is contained in:
Jakub Melka
2020-02-01 17:28:02 +01:00
parent af83f99f51
commit efca4a3cde
10 changed files with 356 additions and 34 deletions

View File

@ -107,6 +107,8 @@ PDFViewerMainWindow::PDFViewerMainWindow(QWidget* parent) :
ui->actionSelectTextAll->setShortcut(QKeySequence::SelectAll);
ui->actionDeselectText->setShortcut(QKeySequence::Deselect);
ui->actionCopyText->setShortcut(QKeySequence::Copy);
ui->actionRotateRight->setShortcut(QKeySequence("Ctrl+Shift++"));
ui->actionRotateLeft->setShortcut(QKeySequence("Ctrl+Shift+-"));
for (QAction* action : m_recentFileManager->getActions())
{
@ -1146,4 +1148,14 @@ void PDFViewerMainWindow::on_actionSend_by_E_Mail_triggered()
}
}
void PDFViewerMainWindow::on_actionRotateRight_triggered()
{
m_pdfWidget->getDrawWidgetProxy()->performOperation(pdf::PDFDrawWidgetProxy::RotateRight);
}
void PDFViewerMainWindow::on_actionRotateLeft_triggered()
{
m_pdfWidget->getDrawWidgetProxy()->performOperation(pdf::PDFDrawWidgetProxy::RotateLeft);
}
} // namespace pdfviewer