mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Sidebar widget refactoring
This commit is contained in:
@ -149,6 +149,7 @@ PDFViewerMainWindow::PDFViewerMainWindow(QWidget *parent) :
|
||||
m_sidebarDockWidget->setWidget(m_sidebarWidget);
|
||||
addDockWidget(Qt::LeftDockWidgetArea, m_sidebarDockWidget);
|
||||
m_sidebarDockWidget->hide();
|
||||
connect(m_sidebarWidget, &PDFSidebarWidget::actionTriggered, this, &PDFViewerMainWindow::onActionTriggered);
|
||||
|
||||
ui->actionRenderOptionAntialiasing->setData(pdf::PDFRenderer::Antialiasing);
|
||||
ui->actionRenderOptionTextAntialiasing->setData(pdf::PDFRenderer::TextAntialiasing);
|
||||
@ -248,6 +249,11 @@ void PDFViewerMainWindow::onPageZoomSpinboxEditingFinished()
|
||||
m_pdfWidget->getDrawWidgetProxy()->zoom(m_pageZoomSpinBox->value() / 100.0);
|
||||
}
|
||||
|
||||
void PDFViewerMainWindow::onActionTriggered(const pdf::PDFAction* action)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void PDFViewerMainWindow::onProgressStarted()
|
||||
{
|
||||
m_progressTaskbarIndicator->setRange(0, 100);
|
||||
@ -486,6 +492,18 @@ void PDFViewerMainWindow::setDocument(const pdf::PDFDocument* document)
|
||||
|
||||
updateTitle();
|
||||
updateUI(true);
|
||||
|
||||
if (m_pdfDocument)
|
||||
{
|
||||
const pdf::PDFCatalog* catalog = m_pdfDocument->getCatalog();
|
||||
setPageLayout(catalog->getPageLayout());
|
||||
updatePageLayoutActions();
|
||||
|
||||
if (const pdf::PDFAction* action = catalog->getOpenAction())
|
||||
{
|
||||
onActionTriggered(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PDFViewerMainWindow::closeDocument()
|
||||
|
Reference in New Issue
Block a user