mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Search and replace : improve the search for elements.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5662 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
#include "qetapp.h"
|
||||
#include "replaceconductordialog.h"
|
||||
#include "replaceadvanceddialog.h"
|
||||
#include "dynamicelementtextitem.h"
|
||||
#include "elementtextitemgroup.h"
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
@@ -761,6 +763,23 @@ QStringList SearchAndReplaceWidget::searchTerms(Element *element)
|
||||
}
|
||||
}
|
||||
|
||||
for (DynamicElementTextItem *deti : element->dynamicTextItems())
|
||||
{
|
||||
if (deti->textFrom() == DynamicElementTextItem::UserText || deti->textFrom() == DynamicElementTextItem::CompositeText) {
|
||||
list.append(deti->toPlainText());
|
||||
}
|
||||
}
|
||||
for (ElementTextItemGroup *group : element->textGroups())
|
||||
{
|
||||
list.append(group->name());
|
||||
|
||||
for (DynamicElementTextItem *deti : group->texts()) {
|
||||
if (deti->textFrom() == DynamicElementTextItem::UserText || deti->textFrom() == DynamicElementTextItem::CompositeText) {
|
||||
list.append(deti->toPlainText());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -1181,7 +1181,9 @@ void Element::removeDynamicTextItem(DynamicElementTextItem *deti)
|
||||
|
||||
/**
|
||||
* @brief Element::dynamicTextItems
|
||||
* @return all dynamic text items of this element
|
||||
* @return all dynamic text items of this element directly child of this element.
|
||||
* Texts in text-groups belonging to this element are not returned by this function.
|
||||
* @see ElementTextItemGroup::texts
|
||||
*/
|
||||
QList<DynamicElementTextItem *> Element::dynamicTextItems() const {
|
||||
return m_dynamic_text_list;
|
||||
|
||||
Reference in New Issue
Block a user