Get Source action

This commit is contained in:
Jakub Melka 2021-05-03 18:37:27 +02:00
parent 9618c3cf62
commit 2c03d0b4f3
6 changed files with 25 additions and 0 deletions

View File

@ -499,6 +499,10 @@ void PDFProgramController::initialize(Features features,
{
connect(action, &QAction::triggered, this, &PDFProgramController::onActionDeveloperCreateInstaller);
}
if (QAction* action = m_actionManager->getAction(PDFActionManager::GetSource))
{
connect(action, &QAction::triggered, this, &PDFProgramController::onActionGetSource);
}
if (m_recentFileManager)
{
@ -2071,6 +2075,11 @@ void PDFProgramController::onActionDeveloperCreateInstaller()
}
}
void PDFProgramController::onActionGetSource()
{
QDesktopServices::openUrl(QUrl("https://github.com/JakubMelka/PdfForQt"));
}
void PDFProgramController::onPageRenderingErrorsChanged(pdf::PDFInteger pageIndex, int errorsCount)
{
if (errorsCount > 0)

View File

@ -98,6 +98,7 @@ public:
SaveAs,
Properties,
Options,
GetSource,
About,
SendByMail,
RenderToImages,
@ -331,6 +332,7 @@ private:
void onActionOpenTriggered();
void onActionCloseTriggered();
void onActionDeveloperCreateInstaller();
void onActionGetSource();
void onDrawSpaceChanged();
void onPageLayoutChanged();

View File

@ -158,6 +158,7 @@ PDFViewerMainWindow::PDFViewerMainWindow(QWidget* parent) :
m_actionManager->setAction(PDFActionManager::RenderOptionShowTextLines, ui->actionShow_Text_Lines);
m_actionManager->setAction(PDFActionManager::Properties, ui->actionProperties);
m_actionManager->setAction(PDFActionManager::Options, ui->actionOptions);
m_actionManager->setAction(PDFActionManager::GetSource, ui->actionGetSource);
m_actionManager->setAction(PDFActionManager::About, ui->actionAbout);
m_actionManager->setAction(PDFActionManager::SendByMail, ui->actionSend_by_E_Mail);
m_actionManager->setAction(PDFActionManager::RenderToImages, ui->actionRender_to_Images);

View File

@ -108,6 +108,7 @@
<property name="title">
<string>Help</string>
</property>
<addaction name="actionGetSource"/>
<addaction name="actionAbout"/>
</widget>
<widget class="QMenu" name="menuDeveloper">
@ -821,6 +822,11 @@
<string>Create Installer</string>
</property>
</action>
<action name="actionGetSource">
<property name="text">
<string>Get Source</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>

View File

@ -126,6 +126,7 @@ PDFViewerMainWindowLite::PDFViewerMainWindowLite(QWidget* parent) :
m_actionManager->setAction(PDFActionManager::RenderOptionInvertColors, ui->actionInvertColors);
m_actionManager->setAction(PDFActionManager::Properties, ui->actionProperties);
m_actionManager->setAction(PDFActionManager::Options, ui->actionOptions);
m_actionManager->setAction(PDFActionManager::GetSource, ui->actionGetSource);
m_actionManager->setAction(PDFActionManager::About, ui->actionAbout);
m_actionManager->setAction(PDFActionManager::SendByMail, ui->actionSend_by_E_Mail);
m_actionManager->setAction(PDFActionManager::FitPage, ui->actionFitPage);

View File

@ -102,6 +102,7 @@
<property name="title">
<string>Help</string>
</property>
<addaction name="actionGetSource"/>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuFile"/>
@ -428,6 +429,11 @@
<string>Go to previous line</string>
</property>
</action>
<action name="actionGetSource">
<property name="text">
<string>Get Source</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>