Fix typo.
This commit is contained in:
parent
7e9222dabe
commit
51134ac9f2
|
@ -293,7 +293,7 @@ void DialogMDataBase::InitDataBase(const QStringList &usedMeasurements)
|
||||||
VKnownMeasurementsDatabase *db = MApplication::VApp()->KnownMeasurementsDatabase();
|
VKnownMeasurementsDatabase *db = MApplication::VApp()->KnownMeasurementsDatabase();
|
||||||
VKnownMeasurements knownDB = db->KnownMeasurements(m_knownId);
|
VKnownMeasurements knownDB = db->KnownMeasurements(m_knownId);
|
||||||
|
|
||||||
QMap<int, VKnownMeasurement> measurements = knownDB.OrderedGroupMeasurments(QString());
|
QMap<int, VKnownMeasurement> measurements = knownDB.OrderedGroupMeasurements(QString());
|
||||||
if (!measurements.isEmpty())
|
if (!measurements.isEmpty())
|
||||||
{
|
{
|
||||||
m_generalGroup = InitGroup(tr("General", "Measurement section"), measurements, usedMeasurements);
|
m_generalGroup = InitGroup(tr("General", "Measurement section"), measurements, usedMeasurements);
|
||||||
|
@ -303,7 +303,7 @@ void DialogMDataBase::InitDataBase(const QStringList &usedMeasurements)
|
||||||
QStringList groups = knownDB.Groups();
|
QStringList groups = knownDB.Groups();
|
||||||
for (auto &group : groups)
|
for (auto &group : groups)
|
||||||
{
|
{
|
||||||
QMap<int, VKnownMeasurement> groupMeasurements = knownDB.OrderedGroupMeasurments(group);
|
QMap<int, VKnownMeasurement> groupMeasurements = knownDB.OrderedGroupMeasurements(group);
|
||||||
m_groups.append(InitGroup(group, groupMeasurements, usedMeasurements));
|
m_groups.append(InitGroup(group, groupMeasurements, usedMeasurements));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -485,7 +485,7 @@ void TKMMainWindow::ExportToCSVData(const QString &fileName, bool withHeader, in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const QMap<int, VKnownMeasurement> orderedTable = m_known.OrderedMeasurments();
|
const QMap<int, VKnownMeasurement> orderedTable = m_known.OrderedMeasurements();
|
||||||
int row = 0;
|
int row = 0;
|
||||||
for (auto iMap = orderedTable.constBegin(); iMap != orderedTable.constEnd(); ++iMap)
|
for (auto iMap = orderedTable.constBegin(); iMap != orderedTable.constEnd(); ++iMap)
|
||||||
{
|
{
|
||||||
|
@ -1256,7 +1256,7 @@ void TKMMainWindow::SaveMName()
|
||||||
|
|
||||||
QString newName = ui->lineEditName->text().isEmpty() ? GenerateMeasurementName() : ui->lineEditName->text();
|
QString newName = ui->lineEditName->text().isEmpty() ? GenerateMeasurementName() : ui->lineEditName->text();
|
||||||
|
|
||||||
QHash<QString, VKnownMeasurement> m = m_known.Measurments();
|
QHash<QString, VKnownMeasurement> m = m_known.Measurements();
|
||||||
if (m.contains(newName))
|
if (m.contains(newName))
|
||||||
{
|
{
|
||||||
qint32 num = 2;
|
qint32 num = 2;
|
||||||
|
@ -2167,7 +2167,7 @@ void TKMMainWindow::RefreshTable()
|
||||||
m_known = m_m->KnownMeasurements();
|
m_known = m_m->KnownMeasurements();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QMap<int, VKnownMeasurement> orderedTable = m_known.OrderedMeasurments();
|
const QMap<int, VKnownMeasurement> orderedTable = m_known.OrderedMeasurements();
|
||||||
qint32 currentRow = -1;
|
qint32 currentRow = -1;
|
||||||
ui->tableWidget->setRowCount(static_cast<int>(orderedTable.size()));
|
ui->tableWidget->setRowCount(static_cast<int>(orderedTable.size()));
|
||||||
for (auto iMap = orderedTable.constBegin(); iMap != orderedTable.constEnd(); ++iMap)
|
for (auto iMap = orderedTable.constBegin(); iMap != orderedTable.constEnd(); ++iMap)
|
||||||
|
@ -2400,7 +2400,7 @@ void TKMMainWindow::ImageFields(bool enabled)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto TKMMainWindow::GenerateMeasurementName() const -> QString
|
auto TKMMainWindow::GenerateMeasurementName() const -> QString
|
||||||
{
|
{
|
||||||
QHash<QString, VKnownMeasurement> m = m_known.Measurments();
|
QHash<QString, VKnownMeasurement> m = m_known.Measurements();
|
||||||
qint32 num = 1;
|
qint32 num = 1;
|
||||||
QString name;
|
QString name;
|
||||||
do
|
do
|
||||||
|
@ -2502,7 +2502,7 @@ auto TKMMainWindow::CheckMName(const QString &name, const QSet<QString> &importe
|
||||||
throw VException(tr("Measurement '%1' doesn't match regex pattern.").arg(name));
|
throw VException(tr("Measurement '%1' doesn't match regex pattern.").arg(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_known.Measurments().contains(name))
|
if (m_known.Measurements().contains(name))
|
||||||
{
|
{
|
||||||
throw VException(tr("Measurement '%1' already used in the file.").arg(name));
|
throw VException(tr("Measurement '%1' already used in the file.").arg(name));
|
||||||
}
|
}
|
||||||
|
|
|
@ -963,9 +963,9 @@
|
||||||
<addaction name="actionAboutQt"/>
|
<addaction name="actionAboutQt"/>
|
||||||
<addaction name="actionAboutTape"/>
|
<addaction name="actionAboutTape"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuMeasurments">
|
<widget class="QMenu" name="menuMeasurements">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&Measurments</string>
|
<string>&Measurements</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionAddKnown"/>
|
<addaction name="actionAddKnown"/>
|
||||||
<addaction name="actionMeasurementDiagram"/>
|
<addaction name="actionMeasurementDiagram"/>
|
||||||
|
@ -976,7 +976,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menuFile"/>
|
<addaction name="menuFile"/>
|
||||||
<addaction name="menuMeasurments"/>
|
<addaction name="menuMeasurements"/>
|
||||||
<addaction name="menuWindow"/>
|
<addaction name="menuWindow"/>
|
||||||
<addaction name="menuHelp"/>
|
<addaction name="menuHelp"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -915,7 +915,7 @@ void TMainWindow::ExportToCSVData(const QString &fileName, bool withHeader, int
|
||||||
VKnownMeasurementsDatabase *db = MApplication::VApp()->KnownMeasurementsDatabase();
|
VKnownMeasurementsDatabase *db = MApplication::VApp()->KnownMeasurementsDatabase();
|
||||||
VKnownMeasurements knownDB = db->KnownMeasurements(m_m->KnownMeasurements());
|
VKnownMeasurements knownDB = db->KnownMeasurements(m_m->KnownMeasurements());
|
||||||
|
|
||||||
const QMap<int, QSharedPointer<VMeasurement>> orderedTable = OrderedMeasurments();
|
const QMap<int, QSharedPointer<VMeasurement>> orderedTable = OrderedMeasurements();
|
||||||
int row = 0;
|
int row = 0;
|
||||||
for (auto iMap = orderedTable.constBegin(); iMap != orderedTable.constEnd(); ++iMap)
|
for (auto iMap = orderedTable.constBegin(); iMap != orderedTable.constEnd(); ++iMap)
|
||||||
{
|
{
|
||||||
|
@ -2657,7 +2657,7 @@ void TMainWindow::ExportToIndividual()
|
||||||
|
|
||||||
VMeasurements individualMeasurements(m_mUnit, tmpData.data());
|
VMeasurements individualMeasurements(m_mUnit, tmpData.data());
|
||||||
|
|
||||||
const QMap<int, QSharedPointer<VMeasurement>> orderedTable = OrderedMeasurments();
|
const QMap<int, QSharedPointer<VMeasurement>> orderedTable = OrderedMeasurements();
|
||||||
QMap<int, QSharedPointer<VMeasurement>>::const_iterator iMap;
|
QMap<int, QSharedPointer<VMeasurement>>::const_iterator iMap;
|
||||||
for (iMap = orderedTable.constBegin(); iMap != orderedTable.constEnd(); ++iMap)
|
for (iMap = orderedTable.constBegin(); iMap != orderedTable.constEnd(); ++iMap)
|
||||||
{
|
{
|
||||||
|
@ -3583,7 +3583,7 @@ void TMainWindow::RefreshTable(bool freshCall)
|
||||||
|
|
||||||
ShowUnits();
|
ShowUnits();
|
||||||
|
|
||||||
const QMap<int, QSharedPointer<VMeasurement>> orderedTable = OrderedMeasurments();
|
const QMap<int, QSharedPointer<VMeasurement>> orderedTable = OrderedMeasurements();
|
||||||
qint32 currentRow = -1;
|
qint32 currentRow = -1;
|
||||||
ui->tableWidget->setRowCount(static_cast<int>(orderedTable.size()));
|
ui->tableWidget->setRowCount(static_cast<int>(orderedTable.size()));
|
||||||
for (auto iMap = orderedTable.constBegin(); iMap != orderedTable.constEnd(); ++iMap)
|
for (auto iMap = orderedTable.constBegin(); iMap != orderedTable.constEnd(); ++iMap)
|
||||||
|
@ -4723,7 +4723,7 @@ auto TMainWindow::DimensionRestrictedValues(int index, const MeasurementDimensio
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto TMainWindow::OrderedMeasurments() const -> QMap<int, QSharedPointer<VMeasurement>>
|
auto TMainWindow::OrderedMeasurements() const -> QMap<int, QSharedPointer<VMeasurement>>
|
||||||
{
|
{
|
||||||
const QMap<QString, QSharedPointer<VMeasurement>> table = m_data->DataMeasurementsWithSeparators();
|
const QMap<QString, QSharedPointer<VMeasurement>> table = m_data->DataMeasurementsWithSeparators();
|
||||||
QMap<int, QSharedPointer<VMeasurement>> orderedTable;
|
QMap<int, QSharedPointer<VMeasurement>> orderedTable;
|
||||||
|
|
|
@ -295,8 +295,8 @@ private:
|
||||||
void SetCurrentDimensionValues();
|
void SetCurrentDimensionValues();
|
||||||
|
|
||||||
auto DimensionRestrictedValues(int index, const MeasurementDimension_p &dimension) -> QVector<double>;
|
auto DimensionRestrictedValues(int index, const MeasurementDimension_p &dimension) -> QVector<double>;
|
||||||
|
|
||||||
auto OrderedMeasurments() const -> QMap<int, QSharedPointer<VMeasurement>>;
|
auto OrderedMeasurements() const -> QMap<int, QSharedPointer<VMeasurement>>;
|
||||||
|
|
||||||
void InitIcons();
|
void InitIcons();
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPathsTemplates, ("paths/template
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingDataBaseGeometry, ("database/geometry"_L1)) // NOLINT
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingDataBaseGeometry, ("database/geometry"_L1)) // NOLINT
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingSearchHistoryTape, ("searchHistory/tape"_L1)) // NOLINT
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingSearchHistoryTape, ("searchHistory/tape"_L1)) // NOLINT
|
||||||
// NOLINTNEXTLINE
|
// NOLINTNEXTLINE
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingSearchHistoryKnownMeasurments, ("searchHistory/knownMeasurements"_L1))
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingSearchHistoryKnownMeasurements, ("searchHistory/knownMeasurements"_L1))
|
||||||
|
|
||||||
// NOLINTNEXTLINE
|
// NOLINTNEXTLINE
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingSearchOptionsTapeUseUnicodeProperties,
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingSearchOptionsTapeUseUnicodeProperties,
|
||||||
|
@ -119,13 +119,13 @@ void VTapeSettings::SetTapeSearchHistory(const QStringList &history)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VTapeSettings::GetKMSearchHistory() const -> QStringList
|
auto VTapeSettings::GetKMSearchHistory() const -> QStringList
|
||||||
{
|
{
|
||||||
return value(*settingSearchHistoryKnownMeasurments).toStringList();
|
return value(*settingSearchHistoryKnownMeasurements).toStringList();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VTapeSettings::SetKMSearchHistory(const QStringList &history)
|
void VTapeSettings::SetKMSearchHistory(const QStringList &history)
|
||||||
{
|
{
|
||||||
setValue(*settingSearchHistoryKnownMeasurments, history);
|
setValue(*settingSearchHistoryKnownMeasurements, history);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -128,13 +128,13 @@ void VKnownMeasurements::SetReadOnly(bool ro)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VKnownMeasurements::Measurments() const -> QHash<QString, VKnownMeasurement>
|
auto VKnownMeasurements::Measurements() const -> QHash<QString, VKnownMeasurement>
|
||||||
{
|
{
|
||||||
return d->m_measurements;
|
return d->m_measurements;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VKnownMeasurements::OrderedMeasurments() const -> QMap<int, VKnownMeasurement>
|
auto VKnownMeasurements::OrderedMeasurements() const -> QMap<int, VKnownMeasurement>
|
||||||
{
|
{
|
||||||
QMap<int, VKnownMeasurement> ordered;
|
QMap<int, VKnownMeasurement> ordered;
|
||||||
auto i = d->m_measurements.constBegin();
|
auto i = d->m_measurements.constBegin();
|
||||||
|
@ -148,7 +148,7 @@ auto VKnownMeasurements::OrderedMeasurments() const -> QMap<int, VKnownMeasureme
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VKnownMeasurements::OrderedGroupMeasurments(const QString &group) const -> QMap<int, VKnownMeasurement>
|
auto VKnownMeasurements::OrderedGroupMeasurements(const QString &group) const -> QMap<int, VKnownMeasurement>
|
||||||
{
|
{
|
||||||
QMap<int, VKnownMeasurement> ordered;
|
QMap<int, VKnownMeasurement> ordered;
|
||||||
auto i = d->m_measurements.constBegin();
|
auto i = d->m_measurements.constBegin();
|
||||||
|
|
|
@ -63,10 +63,10 @@ public:
|
||||||
|
|
||||||
auto IsReadOnly() const -> bool;
|
auto IsReadOnly() const -> bool;
|
||||||
void SetReadOnly(bool ro);
|
void SetReadOnly(bool ro);
|
||||||
|
|
||||||
auto Measurments() const -> QHash<QString, VKnownMeasurement>;
|
auto Measurements() const -> QHash<QString, VKnownMeasurement>;
|
||||||
auto OrderedMeasurments() const -> QMap<int, VKnownMeasurement>;
|
auto OrderedMeasurements() const -> QMap<int, VKnownMeasurement>;
|
||||||
auto OrderedGroupMeasurments(const QString &group) const -> QMap<int, VKnownMeasurement>;
|
auto OrderedGroupMeasurements(const QString &group) const -> QMap<int, VKnownMeasurement>;
|
||||||
auto Images() const -> QMap<QUuid, VPatternImage>;
|
auto Images() const -> QMap<QUuid, VPatternImage>;
|
||||||
auto Groups() const -> QStringList;
|
auto Groups() const -> QStringList;
|
||||||
|
|
||||||
|
|
|
@ -561,7 +561,7 @@ void DialogEditLabel::InitPlaceholders()
|
||||||
m_placeholders.insert(pl_pFileName, qMakePair(tr("Pattern file name"), patternFilePath));
|
m_placeholders.insert(pl_pFileName, qMakePair(tr("Pattern file name"), patternFilePath));
|
||||||
|
|
||||||
const QString measurementsFilePath = QFileInfo(m_doc->MPath()).baseName();
|
const QString measurementsFilePath = QFileInfo(m_doc->MPath()).baseName();
|
||||||
m_placeholders.insert(pl_mFileName, qMakePair(tr("Measurments file name"), measurementsFilePath));
|
m_placeholders.insert(pl_mFileName, qMakePair(tr("Measurements file name"), measurementsFilePath));
|
||||||
|
|
||||||
QString heightValue = QString::number(VAbstractValApplication::VApp()->GetDimensionHeight());
|
QString heightValue = QString::number(VAbstractValApplication::VApp()->GetDimensionHeight());
|
||||||
m_placeholders.insert(pl_height, qMakePair(tr("Height", "dimension"), heightValue));
|
m_placeholders.insert(pl_height, qMakePair(tr("Height", "dimension"), heightValue));
|
||||||
|
@ -606,7 +606,7 @@ void DialogEditLabel::InitPlaceholders()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_placeholders.insert(
|
m_placeholders.insert(
|
||||||
pl_mExt, qMakePair(tr("Measurments extension"),
|
pl_mExt, qMakePair(tr("Measurements extension"),
|
||||||
VAbstractValApplication::VApp()->GetMeasurementsType() == MeasurementsType::Multisize
|
VAbstractValApplication::VApp()->GetMeasurementsType() == MeasurementsType::Multisize
|
||||||
? QStringLiteral("vst")
|
? QStringLiteral("vst")
|
||||||
: QStringLiteral("vit")));
|
: QStringLiteral("vit")));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user