implement currentParts() for every elementItemEditor so the editor can be extended to multi part edit in a later step

This commit is contained in:
Martin Marmsoler
2020-06-01 20:45:01 +02:00
committed by Laurent Trinques
parent 1ccffda93b
commit e36a4ddd0a
19 changed files with 62 additions and 3 deletions

View File

@@ -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