mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Signature plugin: style settings
This commit is contained in:
@ -33,7 +33,8 @@ PDFPageContentEditorWidget::PDFPageContentEditorWidget(QWidget* parent) :
|
||||
ui(new Ui::PDFPageContentEditorWidget),
|
||||
m_toolBoxColumnCount(6),
|
||||
m_scene(nullptr),
|
||||
m_selectionChangeEnabled(true)
|
||||
m_selectionChangeEnabled(true),
|
||||
m_updatesEnabled(true)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@ -81,6 +82,12 @@ PDFPageContentEditorWidget::PDFPageContentEditorWidget(QWidget* parent) :
|
||||
connect(&m_actionMapper, &QSignalMapper::mappedObject, this, &PDFPageContentEditorWidget::onActionTriggerRequest);
|
||||
connect(&m_operationMapper, &QSignalMapper::mappedInt, this, &PDFPageContentEditorWidget::operationTriggered);
|
||||
connect(ui->itemsListWidget->selectionModel(), &QItemSelectionModel::selectionChanged, this, &PDFPageContentEditorWidget::onItemSelectionChanged);
|
||||
|
||||
connect(ui->appearanceSettingsWidget, &PDFPageContentEditorStyleSettings::penChanged, this, &PDFPageContentEditorWidget::penChanged);
|
||||
connect(ui->appearanceSettingsWidget, &PDFPageContentEditorStyleSettings::brushChanged, this, &PDFPageContentEditorWidget::brushChanged);
|
||||
connect(ui->appearanceSettingsWidget, &PDFPageContentEditorStyleSettings::fontChanged, this, &PDFPageContentEditorWidget::fontChanged);
|
||||
connect(ui->appearanceSettingsWidget, &PDFPageContentEditorStyleSettings::alignmentChanged, this, &PDFPageContentEditorWidget::alignmentChanged);
|
||||
connect(ui->appearanceSettingsWidget, &PDFPageContentEditorStyleSettings::textAngleChanged, this, &PDFPageContentEditorWidget::textAngleChanged);
|
||||
}
|
||||
|
||||
PDFPageContentEditorWidget::~PDFPageContentEditorWidget()
|
||||
@ -133,6 +140,12 @@ QToolButton* PDFPageContentEditorWidget::getToolButtonForOperation(int operation
|
||||
|
||||
void PDFPageContentEditorWidget::updateItemsInListWidget()
|
||||
{
|
||||
if (!m_updatesEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pdf::PDFTemporaryValueChange guard(&m_updatesEnabled, false);
|
||||
ui->itemsListWidget->setUpdatesEnabled(false);
|
||||
|
||||
if (m_scene)
|
||||
@ -252,4 +265,9 @@ void PDFPageContentEditorWidget::setSelection(const std::set<PDFInteger>& select
|
||||
}
|
||||
}
|
||||
|
||||
void PDFPageContentEditorWidget::loadStyleFromElement(const PDFPageContentElement* element)
|
||||
{
|
||||
ui->appearanceSettingsWidget->loadFromElement(element, false);
|
||||
}
|
||||
|
||||
} // namespace pdf
|
||||
|
Reference in New Issue
Block a user