mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-08 22:59:58 +01:00
Replace function by another one.
Replace function QETApp::elementInfoKeys() and QETApp::elementInfoToVar(const QString &info) by function provided by QETInformation.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "independenttextitem.h"
|
||||
#include "diagramcommands.h"
|
||||
#include "QPropertyUndoCommand/qpropertyundocommand.h"
|
||||
#include "qetinformation.h"
|
||||
|
||||
|
||||
SearchAndReplaceWorker::SearchAndReplaceWorker()
|
||||
@@ -126,7 +127,7 @@ void SearchAndReplaceWorker::replaceElement(QList<Element *> list)
|
||||
{
|
||||
DiagramContext old_context;
|
||||
DiagramContext new_context = old_context = elmt->elementInformations();
|
||||
for (QString key : QETApp::elementInfoKeys())
|
||||
for (QString key : QETInformation::elementInfoKeys())
|
||||
{
|
||||
new_context.addValue(key, applyChange(old_context.value(key).toString(),
|
||||
m_element_context.value(key).toString()));
|
||||
|
||||
@@ -99,7 +99,7 @@ void replaceAdvancedDialog::fillWhatComboBox(int index)
|
||||
}
|
||||
}
|
||||
else if (index == 1) {
|
||||
for (QString str : QETApp::elementInfoKeys()) {
|
||||
for (QString str : QETInformation::elementInfoKeys()) {
|
||||
ui->m_what_cb->addItem(QETInformation::translatedInfoKey(str), str);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ void ReplaceElementDialog::buildWidget()
|
||||
this->done(ui->m_button_box->buttonRole(button_));
|
||||
});
|
||||
|
||||
for (QString str : QETApp::elementInfoKeys())
|
||||
for (QString str : QETInformation::elementInfoKeys())
|
||||
{
|
||||
ElementInfoPartWidget *eipw = new ElementInfoPartWidget(str, QETInformation::translatedInfoKey(str), this);
|
||||
eipw->setEraseTextVisible(true);
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "dynamicelementtextitem.h"
|
||||
#include "elementtextitemgroup.h"
|
||||
#include "QWidgetAnimation/qwidgetanimation.h"
|
||||
#include "qetinformation.h"
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
@@ -798,7 +799,7 @@ QStringList SearchAndReplaceWidget::searchTerms(Element *element)
|
||||
{
|
||||
QStringList list;
|
||||
DiagramContext context = element->elementInformations();
|
||||
for (QString key : QETApp::elementInfoKeys())
|
||||
for (QString key : QETInformation::elementInfoKeys())
|
||||
{
|
||||
QString str = context.value(key).toString();
|
||||
if (!str.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user