mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #134: Add search bar for actions
This commit is contained in:
@ -43,6 +43,7 @@
|
||||
#include "pdfencryptionsettingsdialog.h"
|
||||
#include "pdfwidgetannotation.h"
|
||||
#include "pdfwidgetformmanager.h"
|
||||
#include "pdfactioncombobox.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QPrinter>
|
||||
@ -56,6 +57,8 @@
|
||||
#include <QMainWindow>
|
||||
#include <QToolBar>
|
||||
#include <QXmlStreamWriter>
|
||||
#include <QMenuBar>
|
||||
#include <QComboBox>
|
||||
|
||||
#include "pdfdbgheap.h"
|
||||
|
||||
@ -366,6 +369,7 @@ PDFProgramController::PDFProgramController(QObject* parent) :
|
||||
m_annotationManager(nullptr),
|
||||
m_formManager(nullptr),
|
||||
m_bookmarkManager(nullptr),
|
||||
m_actionComboBox(nullptr),
|
||||
m_isBusy(false),
|
||||
m_isFactorySettingsBeingRestored(false),
|
||||
m_progress(nullptr)
|
||||
@ -673,6 +677,24 @@ void PDFProgramController::initialize(Features features,
|
||||
}
|
||||
}
|
||||
|
||||
void PDFProgramController::initActionComboBox(PDFActionComboBox* comboBox)
|
||||
{
|
||||
m_actionComboBox = comboBox;
|
||||
|
||||
if (m_actionComboBox)
|
||||
{
|
||||
bool updatesEnabled = m_actionComboBox->updatesEnabled();
|
||||
m_actionComboBox->setUpdatesEnabled(false);
|
||||
|
||||
for (QAction* action : m_actionManager->getActions())
|
||||
{
|
||||
m_actionComboBox->addQuickFindAction(action);
|
||||
}
|
||||
|
||||
m_actionComboBox->setUpdatesEnabled(updatesEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
void PDFProgramController::finishInitialization()
|
||||
{
|
||||
readSettings(Settings(WindowSettings | ActionSettings));
|
||||
|
Reference in New Issue
Block a user