diff --git a/Pdf4QtDocDiff/mainwindow.cpp b/Pdf4QtDocDiff/mainwindow.cpp index 4f6a200..f14d2f0 100644 --- a/Pdf4QtDocDiff/mainwindow.cpp +++ b/Pdf4QtDocDiff/mainwindow.cpp @@ -90,6 +90,7 @@ MainWindow::MainWindow(QWidget* parent) : ui->menuView->addAction(m_differencesDockWidget->toggleViewAction()); ui->actionGet_Source->setData(int(Operation::GetSource)); + ui->actionBecomeASponsor->setData(int(Operation::BecomeSponsor)); ui->actionAbout->setData(int(Operation::About)); ui->actionOpen_Left->setData(int(Operation::OpenLeft)); ui->actionOpen_Right->setData(int(Operation::OpenRight)); @@ -383,6 +384,7 @@ bool MainWindow::canPerformOperation(Operation operation) const case Operation::Compare: case Operation::Close: case Operation::GetSource: + case Operation::BecomeSponsor: case Operation::About: return true; @@ -545,6 +547,12 @@ void MainWindow::performOperation(Operation operation) break; } + case Operation::BecomeSponsor: + { + QDesktopServices::openUrl(QUrl("https://github.com/sponsors/JakubMelka")); + break; + } + case Operation::About: { PDFAboutDialog aboutDialog(this); diff --git a/Pdf4QtDocDiff/mainwindow.h b/Pdf4QtDocDiff/mainwindow.h index cb0b411..4d315b0 100644 --- a/Pdf4QtDocDiff/mainwindow.h +++ b/Pdf4QtDocDiff/mainwindow.h @@ -61,6 +61,7 @@ public: Compare, Close, GetSource, + BecomeSponsor, About, PreviousDifference, NextDifference, diff --git a/Pdf4QtDocDiff/mainwindow.ui b/Pdf4QtDocDiff/mainwindow.ui index a54e871..7c57f5a 100644 --- a/Pdf4QtDocDiff/mainwindow.ui +++ b/Pdf4QtDocDiff/mainwindow.ui @@ -42,6 +42,7 @@ Help + @@ -362,6 +363,15 @@ Display Markers + + + + :/pdfdocdiff/resources/wallet.svg:/pdfdocdiff/resources/wallet.svg + + + Become a Sponsor + + diff --git a/Pdf4QtDocDiff/resources.qrc b/Pdf4QtDocDiff/resources.qrc index d77d0d1..9eabdbf 100644 --- a/Pdf4QtDocDiff/resources.qrc +++ b/Pdf4QtDocDiff/resources.qrc @@ -23,5 +23,6 @@ resources/view-right.svg resources/display-differences.svg resources/display-markers.svg + resources/wallet.svg diff --git a/Pdf4QtDocDiff/resources/wallet.svg b/Pdf4QtDocDiff/resources/wallet.svg new file mode 100644 index 0000000..3e95655 --- /dev/null +++ b/Pdf4QtDocDiff/resources/wallet.svg @@ -0,0 +1,78 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/Pdf4QtDocPageOrganizer/mainwindow.cpp b/Pdf4QtDocPageOrganizer/mainwindow.cpp index 75c1fc1..ea77ea4 100644 --- a/Pdf4QtDocPageOrganizer/mainwindow.cpp +++ b/Pdf4QtDocPageOrganizer/mainwindow.cpp @@ -89,6 +89,7 @@ MainWindow::MainWindow(QWidget* parent) : ui->actionInsert_Empty_Page->setData(int(Operation::InsertEmptyPage)); ui->actionInsert_PDF->setData(int(Operation::InsertPDF)); ui->actionGet_Source->setData(int(Operation::GetSource)); + ui->actionBecomeASponsor->setData(int(Operation::BecomeSponsor)); ui->actionAbout->setData(int(Operation::About)); ui->actionInvert_Selection->setData(int(Operation::InvertSelection)); ui->actionRegroup_Even_Odd->setData(int(Operation::RegroupEvenOdd)); @@ -121,6 +122,7 @@ MainWindow::MainWindow(QWidget* parent) : m_iconTheme.registerAction(ui->actionZoom_In, ":/pdfdocpage/resources/zoom-in.svg"); m_iconTheme.registerAction(ui->actionZoom_Out, ":/pdfdocpage/resources/zoom-out.svg"); m_iconTheme.registerAction(ui->actionGet_Source, ":/pdfdocpage/resources/get-source.svg"); + m_iconTheme.registerAction(ui->actionBecomeASponsor, ":/pdfdocpage/resources/wallet.svg"); m_iconTheme.registerAction(ui->actionAbout, ":/pdfdocpage/resources/about.svg"); m_iconTheme.registerAction(ui->actionUnited_Document, ":/pdfdocpage/resources/make-united-document.svg"); m_iconTheme.registerAction(ui->actionSeparate_to_Multiple_Documents, ":/pdfdocpage/resources/make-separated-document.svg"); @@ -458,6 +460,7 @@ bool MainWindow::canPerformOperation(Operation operation) const case Operation::InsertEmptyPage: case Operation::InsertPDF: case Operation::GetSource: + case Operation::BecomeSponsor: case Operation::About: case Operation::PrepareIconTheme: return true; @@ -650,6 +653,10 @@ void MainWindow::performOperation(Operation operation) QDesktopServices::openUrl(QUrl("https://github.com/JakubMelka/PDF4QT")); break; + case Operation::BecomeSponsor: + QDesktopServices::openUrl(QUrl("https://github.com/sponsors/JakubMelka")); + break; + case Operation::InsertEmptyPage: m_model->insertEmptyPage(ui->documentItemsView->selectionModel()->selection().indexes()); break; diff --git a/Pdf4QtDocPageOrganizer/mainwindow.h b/Pdf4QtDocPageOrganizer/mainwindow.h index 95ab66e..4404421 100644 --- a/Pdf4QtDocPageOrganizer/mainwindow.h +++ b/Pdf4QtDocPageOrganizer/mainwindow.h @@ -96,6 +96,7 @@ public: RegroupAlternatingPagesReversed, GetSource, + BecomeSponsor, About, PrepareIconTheme }; diff --git a/Pdf4QtDocPageOrganizer/mainwindow.ui b/Pdf4QtDocPageOrganizer/mainwindow.ui index 4df97d2..5461425 100644 --- a/Pdf4QtDocPageOrganizer/mainwindow.ui +++ b/Pdf4QtDocPageOrganizer/mainwindow.ui @@ -123,6 +123,7 @@ Help + @@ -597,6 +598,15 @@ Prepare Icon Theme + + + + :/pdfdocpage/resources/wallet.svg:/pdfdocpage/resources/wallet.svg + + + Become a Sponsor + + diff --git a/Pdf4QtDocPageOrganizer/resources.qrc b/Pdf4QtDocPageOrganizer/resources.qrc index dbb6655..ca37f56 100644 --- a/Pdf4QtDocPageOrganizer/resources.qrc +++ b/Pdf4QtDocPageOrganizer/resources.qrc @@ -39,5 +39,6 @@ resources/undo.svg resources/redo.svg resources/bookmark.svg + resources/wallet.svg diff --git a/Pdf4QtDocPageOrganizer/resources/wallet.svg b/Pdf4QtDocPageOrganizer/resources/wallet.svg new file mode 100644 index 0000000..3e95655 --- /dev/null +++ b/Pdf4QtDocPageOrganizer/resources/wallet.svg @@ -0,0 +1,78 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/Pdf4QtViewer/pdf4qtviewer.qrc b/Pdf4QtViewer/pdf4qtviewer.qrc index d37671e..2132b85 100644 --- a/Pdf4QtViewer/pdf4qtviewer.qrc +++ b/Pdf4QtViewer/pdf4qtviewer.qrc @@ -99,5 +99,8 @@ resources/sidebar-visibility.png resources/sidebar-attachment.png resources/annot-rectangle.svg + resources/book.svg + resources/wallet.svg + resources/web.svg diff --git a/Pdf4QtViewer/pdfprogramcontroller.cpp b/Pdf4QtViewer/pdfprogramcontroller.cpp index c24da2b..7e66eb8 100644 --- a/Pdf4QtViewer/pdfprogramcontroller.cpp +++ b/Pdf4QtViewer/pdfprogramcontroller.cpp @@ -530,6 +530,10 @@ void PDFProgramController::initialize(Features features, { connect(action, &QAction::triggered, this, &PDFProgramController::onActionGetSource); } + if (QAction* action = m_actionManager->getAction(PDFActionManager::BecomeSponsor)) + { + connect(action, &QAction::triggered, this, &PDFProgramController::onActionBecomeSponsor); + } if (QAction* action = m_actionManager->getAction(PDFActionManager::AutomaticDocumentRefresh)) { connect(action, &QAction::triggered, this, &PDFProgramController::onActionAutomaticDocumentRefresh); @@ -2460,6 +2464,11 @@ void PDFProgramController::onActionGetSource() QDesktopServices::openUrl(QUrl("https://github.com/JakubMelka/PDF4QT")); } +void PDFProgramController::onActionBecomeSponsor() +{ + QDesktopServices::openUrl(QUrl("https://github.com/sponsors/JakubMelka")); +} + void PDFProgramController::onActionAutomaticDocumentRefresh() { updateFileWatcher(); diff --git a/Pdf4QtViewer/pdfprogramcontroller.h b/Pdf4QtViewer/pdfprogramcontroller.h index d02e997..4a3fbdf 100644 --- a/Pdf4QtViewer/pdfprogramcontroller.h +++ b/Pdf4QtViewer/pdfprogramcontroller.h @@ -103,6 +103,7 @@ public: ResetToFactorySettings, CertificateManager, GetSource, + BecomeSponsor, About, SendByMail, RenderToImages, @@ -353,6 +354,7 @@ private: void onActionCloseTriggered(); void onActionDeveloperCreateInstaller(); void onActionGetSource(); + void onActionBecomeSponsor(); void onActionAutomaticDocumentRefresh(); void onDrawSpaceChanged(); diff --git a/Pdf4QtViewer/pdfviewermainwindow.cpp b/Pdf4QtViewer/pdfviewermainwindow.cpp index c87e606..16b0fe4 100644 --- a/Pdf4QtViewer/pdfviewermainwindow.cpp +++ b/Pdf4QtViewer/pdfviewermainwindow.cpp @@ -158,6 +158,7 @@ PDFViewerMainWindow::PDFViewerMainWindow(QWidget* parent) : m_actionManager->setAction(PDFActionManager::ResetToFactorySettings, ui->actionResetToFactorySettings); m_actionManager->setAction(PDFActionManager::CertificateManager, ui->actionCertificateManager); m_actionManager->setAction(PDFActionManager::GetSource, ui->actionGetSource); + m_actionManager->setAction(PDFActionManager::BecomeSponsor, ui->actionBecomeASponsor); 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); diff --git a/Pdf4QtViewer/pdfviewermainwindow.ui b/Pdf4QtViewer/pdfviewermainwindow.ui index 21e9af7..f1a0959 100644 --- a/Pdf4QtViewer/pdfviewermainwindow.ui +++ b/Pdf4QtViewer/pdfviewermainwindow.ui @@ -113,6 +113,7 @@ Help + @@ -372,6 +373,10 @@ + + + :/resources/book.svg:/resources/book.svg + About... @@ -920,6 +925,10 @@ + + + :/resources/web.svg:/resources/web.svg + Get Source @@ -961,6 +970,15 @@ Automatically reloads the document if a change made by an external program is detected. + + + + :/resources/wallet.svg:/resources/wallet.svg + + + Become a Sponsor + + diff --git a/Pdf4QtViewer/pdfviewermainwindowlite.cpp b/Pdf4QtViewer/pdfviewermainwindowlite.cpp index 23efb9a..a5d7a9e 100644 --- a/Pdf4QtViewer/pdfviewermainwindowlite.cpp +++ b/Pdf4QtViewer/pdfviewermainwindowlite.cpp @@ -126,6 +126,7 @@ PDFViewerMainWindowLite::PDFViewerMainWindowLite(QWidget* parent) : m_actionManager->setAction(PDFActionManager::ResetToFactorySettings, ui->actionResetToFactorySettings); m_actionManager->setAction(PDFActionManager::CertificateManager, ui->actionCertificateManager); m_actionManager->setAction(PDFActionManager::GetSource, ui->actionGetSource); + m_actionManager->setAction(PDFActionManager::BecomeSponsor, ui->actionBecomeASponsor); m_actionManager->setAction(PDFActionManager::About, ui->actionAbout); m_actionManager->setAction(PDFActionManager::SendByMail, ui->actionSend_by_E_Mail); m_actionManager->setAction(PDFActionManager::FitPage, ui->actionFitPage); diff --git a/Pdf4QtViewer/pdfviewermainwindowlite.ui b/Pdf4QtViewer/pdfviewermainwindowlite.ui index c8cfbb0..81860bf 100644 --- a/Pdf4QtViewer/pdfviewermainwindowlite.ui +++ b/Pdf4QtViewer/pdfviewermainwindowlite.ui @@ -29,7 +29,7 @@ - + @@ -106,6 +106,7 @@ Help + @@ -289,6 +290,10 @@ + + + :/resources/book.svg:/resources/book.svg + About... @@ -446,6 +451,10 @@ + + + :/resources/web.svg:/resources/web.svg + Get Source @@ -459,7 +468,7 @@ Certificates... - + true @@ -470,6 +479,18 @@ Automatically reloads the document if a change made by an external program is detected. + + + + :/resources/wallet.svg:/resources/wallet.svg + + + Become a Sponsor + + + Become a Sponsor + + diff --git a/Pdf4QtViewer/resources/book.svg b/Pdf4QtViewer/resources/book.svg new file mode 100644 index 0000000..8b6027a --- /dev/null +++ b/Pdf4QtViewer/resources/book.svg @@ -0,0 +1,58 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/Pdf4QtViewer/resources/wallet.svg b/Pdf4QtViewer/resources/wallet.svg new file mode 100644 index 0000000..3e95655 --- /dev/null +++ b/Pdf4QtViewer/resources/wallet.svg @@ -0,0 +1,78 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/Pdf4QtViewer/resources/web.svg b/Pdf4QtViewer/resources/web.svg new file mode 100644 index 0000000..17c5d53 --- /dev/null +++ b/Pdf4QtViewer/resources/web.svg @@ -0,0 +1,59 @@ + + + + + + + + image/svg+xml + + + + + + + + +