mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
implement currentParts() for every elementItemEditor so the editor can be extended to multi part edit in a later step
This commit is contained in:
committed by
Laurent Trinques
parent
1ccffda93b
commit
e36a4ddd0a
@@ -30,7 +30,7 @@
|
||||
#include <QColorDialog>
|
||||
|
||||
DynamicTextFieldEditor::DynamicTextFieldEditor(QETElementEditor *editor, PartDynamicTextField *text_field, QWidget *parent) :
|
||||
ElementItemEditor(editor, parent),
|
||||
ElementItemEditor(editor, parent),
|
||||
ui(new Ui::DynamicTextFieldEditor)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -113,6 +113,14 @@ CustomElementPart *DynamicTextFieldEditor::currentPart() const {
|
||||
return m_text_field.data();
|
||||
}
|
||||
|
||||
QList<CustomElementPart*> DynamicTextFieldEditor::currentParts() const {
|
||||
QList<CustomElementPart*> parts;
|
||||
for (auto part: m_parts) {
|
||||
parts.append(static_cast<CustomElementPart*>(part));
|
||||
}
|
||||
return parts;
|
||||
}
|
||||
|
||||
void DynamicTextFieldEditor::updateForm()
|
||||
{
|
||||
if(m_text_field)
|
||||
|
||||
Reference in New Issue
Block a user