Show translated measurements name in table.

--HG--
branch : feature
This commit is contained in:
dismine 2014-05-26 16:36:45 +03:00
parent 51a420bbdd
commit 063bacc444
2 changed files with 10 additions and 6 deletions

View File

@ -146,7 +146,7 @@ void DialogIncrements::FillMeasurements()
while (i.hasNext()) while (i.hasNext())
{ {
i.next(); i.next();
map.insert(i.key(), i.value()); map.insert(qApp->VarToUser(i.key()), i.value());
} }
qint32 currentRow = -1; qint32 currentRow = -1;
QMapIterator<QString, VMeasurement> iMap(map); QMapIterator<QString, VMeasurement> iMap(map);
@ -165,6 +165,7 @@ void DialogIncrements::FillMeasurements()
Qt::ItemFlags flags = item->flags(); Qt::ItemFlags flags = item->flags();
flags &= ~(Qt::ItemIsSelectable | Qt::ItemIsEditable); // reset/clear the flag flags &= ~(Qt::ItemIsSelectable | Qt::ItemIsEditable); // reset/clear the flag
item->setFlags(flags); item->setFlags(flags);
item->setTextAlignment(Qt::AlignLeft);
ui->tableWidgetMeasurements->setItem(currentRow, 0, item); ui->tableWidgetMeasurements->setItem(currentRow, 0, item);
if (qApp->patternType() == Pattern::Standard) if (qApp->patternType() == Pattern::Standard)
@ -292,7 +293,7 @@ void DialogIncrements::FillLengthLines()
while (iHash.hasNext()) while (iHash.hasNext())
{ {
iHash.next(); iHash.next();
map.insert(iHash.key(), iHash.value()); map.insert(qApp->VarToUser(iHash.key()), iHash.value());
} }
qint32 currentRow = -1; qint32 currentRow = -1;
@ -328,7 +329,7 @@ void DialogIncrements::FillLengthSplines()
while (iHash.hasNext()) while (iHash.hasNext())
{ {
iHash.next(); iHash.next();
map.insert(iHash.key(), iHash.value()); map.insert(qApp->VarToUser(iHash.key()), iHash.value());
} }
qint32 currentRow = -1; qint32 currentRow = -1;
@ -364,7 +365,7 @@ void DialogIncrements::FillLengthArcs()
while (iHash.hasNext()) while (iHash.hasNext())
{ {
iHash.next(); iHash.next();
map.insert(iHash.key(), iHash.value()); map.insert(qApp->VarToUser(iHash.key()), iHash.value());
} }
qint32 currentRow = -1; qint32 currentRow = -1;
@ -721,7 +722,7 @@ void DialogIncrements::MeasurementChanged(qint32 row, qint32 column)
const QTableWidgetItem *itemName = ui->tableWidgetMeasurements->item(row, 0); const QTableWidgetItem *itemName = ui->tableWidgetMeasurements->item(row, 0);
QTableWidgetItem *item = ui->tableWidgetMeasurements->item(row, 2); QTableWidgetItem *item = ui->tableWidgetMeasurements->item(row, 2);
VMeasurement measur = data->GetMeasurement(itemName->text()); VMeasurement measur = data->GetMeasurement(qApp->VarFromUser(itemName->text()));
const QString tag = measur.TagName(); const QString tag = measur.TagName();
QDomNodeList list = m->elementsByTagName(tag); QDomNodeList list = m->elementsByTagName(tag);
QDomElement domElement = list.at(0).toElement(); QDomElement domElement = list.at(0).toElement();

View File

@ -105,7 +105,7 @@
</size> </size>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="pagePersonalInformation"> <widget class="QWidget" name="pagePersonalInformation">
<property name="enabled"> <property name="enabled">
@ -284,6 +284,9 @@
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="editTriggers"> <property name="editTriggers">
<set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed</set> <set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed</set>
</property> </property>