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
0fb98fbdac
commit
d7b5ceece1
@@ -28,7 +28,7 @@
|
||||
* @param parent : the parent widget
|
||||
*/
|
||||
TextEditor::TextEditor(QETElementEditor *editor, PartText *text, QWidget *parent) :
|
||||
ElementItemEditor(editor, parent),
|
||||
ElementItemEditor(editor, parent),
|
||||
ui(new Ui::TextEditor)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -164,6 +164,14 @@ CustomElementPart *TextEditor::currentPart() const {
|
||||
return m_text;
|
||||
}
|
||||
|
||||
QList<CustomElementPart*> TextEditor::currentParts() const {
|
||||
QList<CustomElementPart*> parts;
|
||||
for (auto part: m_parts) {
|
||||
parts.append(static_cast<CustomElementPart*>(part));
|
||||
}
|
||||
return parts;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TextEditor::setUpEditConnection
|
||||
* Setup the connection between the widgets of this editor and the undo command
|
||||
|
||||
Reference in New Issue
Block a user