Migrates residual Lts sources to generated rtiddsgen API

Adds NmeaManagement tests, fixes codegen includes and Qt6 SerialPort CMake target.
This commit is contained in:
berrux-dev committed 2026-09-23 12:05:37 +02:00
1 parent 5485a90385
commit 881d44f4dd
512 files changed
+6887 -6426

No files matched your search

@@ -365,7 +365,7 @@ void ForeignInterfaceImpl::onMainScheduleChanged(const InfrastructureManagement:
if(mpp.structureElementId() != mp.data().id())
{
if (mp.aimState() == MountingPointState_def::Idle)
if (mp.aimState() == MountingPointState::Idle)
continue;
mp.setAimState(MountingPointState::Idle);
emit mountingPointChanged(mp, ParticipantManagement::DataModification::eModified);
@@ -110,8 +110,8 @@ void SetRecordingDialogModel::initData()
const QList<int> sections = m_dtc->getSections();
QMap<int, NGLTreeItem*> mapGroup;
const int defaultSectionId = static_cast<int>(InfrastructureManagement::BuildingGroup_def::UnknownGroup);
NGLTreeItem *defaultSectionRoot = new NGLTreeItem(InfrastructureManagement::toString(static_cast<InfrastructureManagement::BuildingGroup_def::type>(defaultSectionId)));
const int defaultSectionId = static_cast<int>(InfrastructureManagement::BuildingGroup::UnknownGroup);
NGLTreeItem *defaultSectionRoot = new NGLTreeItem(InfrastructureManagement::toString(static_cast<InfrastructureManagement::BuildingGroup>(defaultSectionId)));
mapGroup.insert(defaultSectionId, defaultSectionRoot);
m_rootItem->appendChild(mapGroup.value(defaultSectionId));
@@ -120,7 +120,7 @@ void SetRecordingDialogModel::initData()
{
if(mapGroup.contains(groupId))
continue;
const QString sectionText = InfrastructureManagement::toString(static_cast<InfrastructureManagement::BuildingGroup_def::type>(groupId));
const QString sectionText = InfrastructureManagement::toString(static_cast<InfrastructureManagement::BuildingGroup>(groupId));
DEBUG_LOG(m_logger)<<" >> Adding section >> "<<sectionText;
NGLTreeItem *sectionRoot = new NGLTreeItem(sectionText);
mapGroup.insert(groupId, sectionRoot);
@@ -28,9 +28,9 @@ static QHash<int, QString> &INSTRUMENTATION_ASSET_STATES()
{
static QHash<int, QString> s_ret
{
{InstrumentationAssetState_def::Unmounted, QLatin1String("Unmounted")},
{InstrumentationAssetState_def::Mounted, QLatin1String("Mounted")},
{InstrumentationAssetState_def::Defect, QLatin1String("Defect")}
{InstrumentationAssetState::Unmounted, QLatin1String("Unmounted")},
{InstrumentationAssetState::Mounted, QLatin1String("Mounted")},
{InstrumentationAssetState::Defect, QLatin1String("Defect")}
};
return s_ret;
}
@@ -248,19 +248,19 @@ InstrumentationAsset AssetListDialog::importData(const QVector<QStringRef> &segm
InstrumentationAsset asset;
asset.barcode() = unquote(dmc);
asset.name() = snrStd.empty() ? tkzStd : std::string(tkzStd + '_' + snrStd);
asset.assetStateId(static_cast<InstrumentationAssetState_def::type>(INSTRUMENTATION_ASSET_STATES().key(status.toString())));
asset.assetStateId(static_cast<InstrumentationAssetState>(INSTRUMENTATION_ASSET_STATES().key(status.toString())));
asset.properties() = QJsonDocument(obj).toJson(QJsonDocument::Compact).constData();
if (dmc.startsWith(QLatin1String("GSM")))
asset.mountingPointTypeId(MountingPointType::BuildingSensorModule);
else if (dmc.startsWith(QLatin1String("KAA")))
asset.mountingPointTypeId(MountingPointType_def::OutdoorCamera);
asset.mountingPointTypeId(MountingPointType::OutdoorCamera);
else if (dmc.startsWith(QLatin1String("KAI")))
asset.mountingPointTypeId(MountingPointType_def::IndoorCamera);
asset.mountingPointTypeId(MountingPointType::IndoorCamera);
else if (dmc.startsWith(QLatin1String("OPS")))
asset.mountingPointTypeId(MountingPointType_def::IndoorIPS);
asset.mountingPointTypeId(MountingPointType::IndoorIPS);
else if (dmc.startsWith(QLatin1String("WD_")))
asset.mountingPointTypeId(MountingPointType_def::EffectGenerationControlUnit);
asset.mountingPointTypeId(MountingPointType::EffectGenerationControlUnit);
else
{
if (bOk)
@@ -111,8 +111,8 @@ QVariant AssetListDialogModel::data(const QModelIndex &index, int role) const
return QString::fromStdString(currentAsset.properties());
case STATE:
{
const InstrumentationAssetState_def::type &currAssetState = currentAsset.assetStateId().underlying();
if(currAssetState == InstrumentationAssetState_def::Unmounted || currAssetState == InstrumentationAssetState_def::Mounted)
const InstrumentationAssetState &currAssetState = currentAsset.assetStateId().underlying();
if(currAssetState == InstrumentationAssetState::Unmounted || currAssetState == InstrumentationAssetState::Mounted)
{
return m_intactStr;
}
@@ -198,12 +198,12 @@ QVariant AssetListDialogModel::data(const QModelIndex &index, int role) const
return QVariant();
}
inline bool isMptRelevant(MountingPointType_def::type type)
inline bool isMptRelevant(MountingPointType type)
{
return ((type == MountingPointType_def::IndoorCamera) ||
(type == MountingPointType_def::OutdoorCamera) ||
(type == MountingPointType_def::EffectGenerationControlUnit) ||
(type == MountingPointType_def::BuildingSensorModule)
return ((type == MountingPointType::IndoorCamera) ||
(type == MountingPointType::OutdoorCamera) ||
(type == MountingPointType::EffectGenerationControlUnit) ||
(type == MountingPointType::BuildingSensorModule)
);
}
@@ -215,7 +215,7 @@ bool AssetListDialogModel::getReachable(const InstrumentationAsset &currentAsset
const bool bIsRelevant = isMptRelevant(currentAsset.mountingPointTypeId().underlying());
if (bIsRelevant)
{
const bool bIsMounted = currentAsset.assetStateId().underlying() == InfrastructureManagement::InstrumentationAssetState_def::Mounted;
const bool bIsMounted = currentAsset.assetStateId().underlying() == InfrastructureManagement::InstrumentationAssetState::Mounted;
if (bIsMounted)
{
if (m_cmoDtc)
@@ -223,15 +223,15 @@ bool AssetListDialogModel::getReachable(const InstrumentationAsset &currentAsset
const ComponentMonitor::ComponentStatus &cs = m_cmoDtc->componentStatus(currentAsset.id());
const ComponentMonitor::ComponentState state = cs.state();
switch (state.underlying()) {
case ComponentMonitor::ComponentState_def::Undefined:
case ComponentMonitor::ComponentState::Undefined:
iconOut = m_reachabilityOrange;
stringOut = tr("Undefined");
break;
case ComponentMonitor::ComponentState_def::Reachable:
case ComponentMonitor::ComponentState::Reachable:
iconOut = m_reachabilityGreen;
stringOut = tr("Reachable");
break;
case ComponentMonitor::ComponentState_def::Unreachable:
case ComponentMonitor::ComponentState::Unreachable:
iconOut = m_reachabilityRed;
stringOut = tr("Unreachable");
break;
@@ -40,7 +40,7 @@ EditAssetDialog::~EditAssetDialog()
void EditAssetDialog::slotSetAssetToIntact()
{
const InstrumentationAssetState newState = InstrumentationAssetState::type::Unmounted;
const InstrumentationAssetState newState = InstrumentationAssetState::Unmounted;
apply(newState);
slotClose();
}
@@ -48,7 +48,7 @@ void EditAssetDialog::slotSetAssetToIntact()
void EditAssetDialog::slotSetAssetToDefect()
{
const InstrumentationAssetState newState = InstrumentationAssetState::type::Defect;
const InstrumentationAssetState newState = InstrumentationAssetState::Defect;
apply(newState);
slotClose();
@@ -64,10 +64,10 @@ ExerciseAssignmentDialog::ExerciseAssignmentDialog(LtsSession::LtsSession *sessi
switch(data.state().underlying())
{
case ExerciseManagement::ExerciseState_def::Created:
case ExerciseManagement::ExerciseState_def::Started:
case ExerciseManagement::ExerciseState_def::Paused:
case ExerciseManagement::ExerciseState_def::Stopped:
case ExerciseManagement::ExerciseState::Created:
case ExerciseManagement::ExerciseState::Started:
case ExerciseManagement::ExerciseState::Paused:
case ExerciseManagement::ExerciseState::Stopped:
{
m_exercises.insert(data.id(), data);
break;
@@ -19,11 +19,11 @@ ExerciseAssignmentDialogModel::ExerciseAssignmentDialogModel(const QMap<qint32,
, m_rootItem(new TreeItem(0, 0, tr("InvisibleRootItem"), -1))
, m_exercises(exercises)
{
for (int it = BuildingGroup_def::UnknownGroup;
it <= BuildingGroup_def::Salchau;
for (int it = BuildingGroup::UnknownGroup;
it <= BuildingGroup::Salchau;
++it)
{
m_rootItem->appendChild(new TreeItem(0, it, toString(static_cast<BuildingGroup_def::type>(it)), -1, m_rootItem));
m_rootItem->appendChild(new TreeItem(0, it, toString(static_cast<BuildingGroup>(it)), -1, m_rootItem));
}
}
@@ -360,7 +360,7 @@ void MountingPointListDialog::getMountingPointPlanData(const QModelIndex &index,
if (data.aimState != mppMap[data.id].mountingPointState())
modify.push_back(MountingPointPlan(data.id, data.aimState));
}
else if (data.aimState != MountingPointState_def::Idle)
else if (data.aimState != MountingPointState::Idle)
{
DEBUG_LOG(m_logger) << "Not available in Map. Desired: " << data.aimState;
modify.push_back(MountingPointPlan(data.id, data.aimState));
@@ -85,7 +85,7 @@ QString mpsToString(const int mps)
}
QString mpsToString(const MountingPointState_def::type mps)
QString mpsToString(const MountingPointState mps)
{
return mpsToString((int)mps);
}
@@ -118,16 +118,16 @@ bool CheckboxProxyModel::setData(const QModelIndex &index, const QVariant &value
switch (mps)
{
case -2:
newMps = (int)MountingPointState_def::Idle;
newMps = (int)MountingPointState::Idle;
break;
case (int)MountingPointState_def::Idle:
newMps = (int)MountingPointState_def::Equipped;
case (int)MountingPointState::Idle:
newMps = (int)MountingPointState::Equipped;
break;
case (int)MountingPointState_def::Equipped:
newMps = (int)MountingPointState_def::Empty;
case (int)MountingPointState::Equipped:
newMps = (int)MountingPointState::Empty;
break;
case (int)MountingPointState_def::Empty:
newMps = (int)MountingPointState_def::Idle;
case (int)MountingPointState::Empty:
newMps = (int)MountingPointState::Idle;
break;
default:
return false;
@@ -305,10 +305,10 @@ QSet<int> MountingPointListDialogModel::getAvailableFloors() const
StructureElement MountingPointListDialogModel::setBuildingGroup(int groupId)
{
StructureElement se{};
InfrastructureManagement::BuildingGroup_def::type buildingGroup = static_cast<InfrastructureManagement::BuildingGroup_def::type>(groupId);
InfrastructureManagement::BuildingGroup buildingGroup = static_cast<InfrastructureManagement::BuildingGroup>(groupId);
if(buildingGroup == 0)
{
buildingGroup = InfrastructureManagement::BuildingGroup_def::UnknownGroup;
buildingGroup = InfrastructureManagement::BuildingGroup::UnknownGroup;
}
se.id() = maxIntValue - static_cast<int>(buildingGroup);
@@ -353,7 +353,7 @@ bool MountingPointListDialogModel::setData(const QModelIndex &index, const QVari
}
SimpleMountingPointData smpd = item->data().value<SimpleMountingPointData>();
smpd.aimState = (MountingPointState::inner_enum)value.toInt();
smpd.aimState = (MountingPointState)value.toInt();
item->setData(QVariant::fromValue(smpd));
@@ -81,11 +81,11 @@ QVariant ConflictsDialogModel::data(const QModelIndex &index, int role) const
{
case AIM_STATE:
{
return itemData.aimState == MountingPointState_def::Equipped ? green : red;
return itemData.aimState == MountingPointState::Equipped ? green : red;
}
case CONFLICT_STATE:
{
return itemData.conflictState == MountingPointState_def::Equipped ? green : red;
return itemData.conflictState == MountingPointState::Equipped ? green : red;
}
default:
return QVariant();
@@ -135,12 +135,12 @@ bool ConflictsDialogModel::initModel(int scheduleId,
m_visibleTypes = { MountingPointType_def::BuildingSensorModule,
m_visibleTypes = { MountingPointType::BuildingSensorModule,
MountingPointType_def::IndoorCamera,
MountingPointType_def::OutdoorIPS,
MountingPointType_def::IndoorIPS,
MountingPointType_def::EffectGenerationControlUnit
MountingPointType::IndoorCamera,
MountingPointType::OutdoorIPS,
MountingPointType::IndoorIPS,
MountingPointType::EffectGenerationControlUnit
};
m_dtc = dtc;
@@ -158,12 +158,12 @@ bool ConflictsDialogModel::initModel(int scheduleId,
StructureElement ConflictsDialogModel::setBuildingGroup(int groupId)
{
StructureElement se;
BuildingGroup_def::type buildingGroup = static_cast<BuildingGroup_def::type>(groupId);
BuildingGroup buildingGroup = static_cast<BuildingGroup>(groupId);
se.id() = maxIntValue - static_cast<int>(buildingGroup);
se.name() = InfrastructureManagement::toString(buildingGroup).toStdString();
se.displayName() = InfrastructureManagement::toString(buildingGroup).toStdString();
se.structureElementTypeId() = StructureElementType_def::Section;
se.structureElementTypeId() = StructureElementType::Section;
return se;
}
@@ -116,7 +116,7 @@ void OverviewDialog::setCbComparePlan()
m_ui->cbComparePlan->addItem(tr("All active(*) plans"),0);
m_ui->cbComparePlan->insertSeparator(1);
for (auto ms : m_dtc->mainSchedules())
m_ui->cbComparePlan->addItem((ms.statusId() == ScheduleStatus_def::Active ? QLatin1Literal("* ") : QLatin1Literal(" ")) +
m_ui->cbComparePlan->addItem((ms.statusId() == ScheduleStatus::Active ? QLatin1Literal("* ") : QLatin1Literal(" ")) +
QString::fromStdString(ms.name()), ms.id());
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
}
@@ -48,10 +48,10 @@ OverviewDialogModel::OverviewDialogModel(QObject *parent)
RowData(MountingPointType::IndoorCamera),
RowData(MountingPointType::IndoorIPS)};
m_refMap[MountingPointType_def::BuildingSensorModule] = 0;
m_refMap[MountingPointType_def::EffectGenerationControlUnit] = 1;
m_refMap[MountingPointType_def::IndoorCamera] = 2;
m_refMap[MountingPointType_def::IndoorIPS] = 3;
m_refMap[MountingPointType::BuildingSensorModule] = 0;
m_refMap[MountingPointType::EffectGenerationControlUnit] = 1;
m_refMap[MountingPointType::IndoorCamera] = 2;
m_refMap[MountingPointType::IndoorIPS] = 3;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
}
@@ -186,10 +186,10 @@ MountingPointType OverviewDialogModel::getMountingPointTypeId(int structureEleme
StructureElement se;
if (!m_dtc->getStructureElementById(structureElementId, se))
return MountingPointType_def::get_default();
return MountingPointType::get_default();
const MountingPointType mpType = (se.mountingPointTypeId() == MountingPointType_def::OutdoorIPS) ? MountingPointType_def::IndoorIPS : se.mountingPointTypeId();
const MountingPointType mpType = (se.mountingPointTypeId() == MountingPointType::OutdoorIPS) ? MountingPointType::IndoorIPS : se.mountingPointTypeId();
m_availableMountingPointTypes.insert(structureElementId, mpType);
return mpType;
}
@@ -219,7 +219,7 @@ QHash<int, MountingPointPlan> OverviewDialogModel::mergePlans(const QHash<int, M
const auto msConst = m_dtc->mainSchedules();
for (const auto &schedule : msConst)
{
if (cmpPlanId == 0 && schedule.statusId() != ScheduleStatus_def::Active)
if (cmpPlanId == 0 && schedule.statusId() != ScheduleStatus::Active)
continue;
if (cmpPlanId != 0 && cmpPlanId != schedule.id())
continue;
@@ -251,13 +251,13 @@ QHash<int, MountingPointPlan> OverviewDialogModel::mergePlans(const QHash<int, M
{
switch(basePlanMpp.mountingPointState().underlying())
{
case MountingPointState_def::Empty:
case MountingPointState::Empty:
mergedPlan[currentMpp.structureElementId()].mountingPointState(MountingPointState::Empty);
break;
case MountingPointState_def::Equipped:
case MountingPointState::Equipped:
mergedPlan[currentMpp.structureElementId()].mountingPointState(MountingPointState::Equipped);
break;
case MountingPointState_def::Idle:
case MountingPointState::Idle:
mergedPlan[currentMpp.structureElementId()].mountingPointState(currentMpp.mountingPointState());
break;
default:
@@ -306,13 +306,13 @@ void OverviewDialogModel::setNewData()
++m_vecData[m_refMap[mpType]].assetCount;
if (asset.assetStateId() == InstrumentationAssetState_def::Defect)
if (asset.assetStateId() == InstrumentationAssetState::Defect)
++m_vecData[m_refMap[mpType]].assetsDefect;
if (asset.assetStateId() == InstrumentationAssetState_def::Unmounted)
if (asset.assetStateId() == InstrumentationAssetState::Unmounted)
++m_vecData[m_refMap[mpType]].assetsFree;
if (asset.assetStateId() == InstrumentationAssetState_def::Mounted)
if (asset.assetStateId() == InstrumentationAssetState::Mounted)
{
++m_vecData[m_refMap[mpType]].assetsMounted;
if (m_basePlanId == 0)
@@ -353,7 +353,7 @@ void OverviewDialogModel::setNewData()
for(const auto &mse : msesConst)
for (const auto &se : mse.elements())
if (hasMountedAsset(se.id()))
baseMountingPointPlans.insert(se.id(), MountingPointPlan(se.id(), MountingPointState_def::Equipped));
baseMountingPointPlans.insert(se.id(), MountingPointPlan(se.id(), MountingPointState::Equipped));
}
@@ -376,8 +376,8 @@ void OverviewDialogModel::setNewData()
for(const auto &bla: totalMPPs)
{
MountingPointPlan compareMpp = comparedMountingPointPlans.value(bla.structureElementId(), MountingPointPlan(bla.structureElementId(), MountingPointState_def::Idle));
MountingPointPlan baseMpp = baseMountingPointPlans.value(bla.structureElementId(), MountingPointPlan(bla.structureElementId(), MountingPointState_def::Idle));
MountingPointPlan compareMpp = comparedMountingPointPlans.value(bla.structureElementId(), MountingPointPlan(bla.structureElementId(), MountingPointState::Idle));
MountingPointPlan baseMpp = baseMountingPointPlans.value(bla.structureElementId(), MountingPointPlan(bla.structureElementId(), MountingPointState::Idle));
const MountingPointType mpType = getMountingPointTypeId(bla.structureElementId());
if (!m_refMap.contains(mpType))
@@ -386,16 +386,16 @@ void OverviewDialogModel::setNewData()
switch(baseMpp.mountingPointState().underlying())
{
case MountingPointState_def::Empty:
if (compareMpp.mountingPointState() == MountingPointState_def::Equipped)
case MountingPointState::Empty:
if (compareMpp.mountingPointState() == MountingPointState::Equipped)
++m_vecData[m_refMap[mpType]].totalDemand;
break;
case MountingPointState_def::Equipped:
if (compareMpp.mountingPointState() != MountingPointState_def::Equipped)
case MountingPointState::Equipped:
if (compareMpp.mountingPointState() != MountingPointState::Equipped)
--m_vecData[m_refMap[mpType]].totalDemand;
break;
case MountingPointState_def::Idle:
if (compareMpp.mountingPointState() == MountingPointState_def::Equipped)
case MountingPointState::Idle:
if (compareMpp.mountingPointState() == MountingPointState::Equipped)
++m_vecData[m_refMap[mpType]].totalDemand;
break;
default:
@@ -404,10 +404,10 @@ void OverviewDialogModel::setNewData()
switch(compareMpp.mountingPointState().underlying())
{
case MountingPointState_def::Equipped:
case MountingPointState::Equipped:
++m_vecData[m_refMap[mpType]].comparePlanDemand;
break;
case MountingPointState_def::Empty:
case MountingPointState::Empty:
++m_vecData[m_refMap[mpType]].comparePlanUnmount;
break;
default:
@@ -153,7 +153,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
types << MountingPointType::Unknown;
for (const QListWidgetItem *lwi : m_ui->lwMountingPointType->findItems(QLatin1String(""), Qt::MatchContains))
{
MountingPointType mpt = static_cast<MountingPointType::inner_enum>(lwi->data(Qt::UserRole).toInt());
MountingPointType mpt = static_cast<MountingPointType>(lwi->data(Qt::UserRole).toInt());
if (lwi->isSelected())
types << mpt;
m_mountedPointSortProxyModel->addToTypeFilter(mpt, lwi->isSelected());
@@ -351,7 +351,7 @@ QStringList OverviewMountingPointListDialog::getUsedFilterTypes()
QStringList filterList;
for (const QListWidgetItem *lwi : m_ui->lwMountingPointType->findItems(QLatin1String(""), Qt::MatchContains))
{
MountingPointType mpt = static_cast<MountingPointType::inner_enum>(lwi->data(Qt::UserRole).toInt());
MountingPointType mpt = static_cast<MountingPointType>(lwi->data(Qt::UserRole).toInt());
if (lwi->isSelected())
filterList<<toString(mpt);
}
@@ -67,7 +67,7 @@ QVariant ViewMountingPointListModel::data(const QModelIndex &index, int role) co
case TYPE:
if (itemData.seType == StructureElementType::MountingPoint)
{
const MountingPointType mpType = (itemData.mpType == MountingPointType_def::OutdoorIPS) ? MountingPointType_def::IndoorIPS : itemData.mpType;
const MountingPointType mpType = (itemData.mpType == MountingPointType::OutdoorIPS) ? MountingPointType::IndoorIPS : itemData.mpType;
return toString(mpType);
}
break;
@@ -151,10 +151,10 @@ QModelIndex ViewMountingPointListModel::getIndexOfVisableRootItem() const
inline StructureElement setBuildingGroup(int groupId)
{
StructureElement se;
InfrastructureManagement::BuildingGroup_def::type buildingGroup = static_cast<InfrastructureManagement::BuildingGroup_def::type>(groupId);
InfrastructureManagement::BuildingGroup buildingGroup = static_cast<InfrastructureManagement::BuildingGroup>(groupId);
if(buildingGroup == 0)
{
buildingGroup = InfrastructureManagement::BuildingGroup_def::UnknownGroup;
buildingGroup = InfrastructureManagement::BuildingGroup::UnknownGroup;
}
se.id() = maxIntValue - static_cast<int>(buildingGroup);
@@ -167,10 +167,10 @@ inline StructureElement setBuildingGroup(int groupId)
inline int getFakeBuildingGroupId(int seId)
{
InfrastructureManagement::BuildingGroup_def::type buildingGroup = static_cast<InfrastructureManagement::BuildingGroup_def::type>(seId);
InfrastructureManagement::BuildingGroup buildingGroup = static_cast<InfrastructureManagement::BuildingGroup>(seId);
if(buildingGroup == 0)
{
buildingGroup = InfrastructureManagement::BuildingGroup_def::UnknownGroup;
buildingGroup = InfrastructureManagement::BuildingGroup::UnknownGroup;
}
return (maxIntValue - static_cast<int>(buildingGroup));
}
@@ -286,7 +286,7 @@ void ViewMountingPointListModel::initData()
const MountingPointPlan &mpp = mountingPointPlanCont.value(mpId_StructEleId);
mpData.aimState = mpp.mountingPointState();
} else {
mpData.aimState = MountingPointState_def::Idle;
mpData.aimState = MountingPointState::Idle;
}
}
@@ -52,7 +52,7 @@ bool NewPlanDialog::getData(QString &name, qint64 &begin, qint64 &end, int &stat
name = m_ui->lePlanName->text();
begin = m_ui->dteBegin->msecsSinceEpoch();
end = m_ui->dteEnd->msecsSinceEpoch();
status = static_cast<ScheduleStatus::type>(m_ui->cbStatus->currentData().toInt());
status = static_cast<ScheduleStatus>(m_ui->cbStatus->currentData().toInt());
return true;
}
@@ -196,7 +196,7 @@ void PlanTimeLineDialog::onRemove()
asset.barcode(),
asset.hostname(),
asset.properties(),
InstrumentationAssetState_def::Unmounted,
InstrumentationAssetState::Unmounted,
asset.lastUpdated(),
asset.availableInExercise()
);
@@ -200,10 +200,10 @@ StructureElementTreeItem* BuildingMountPointModel::findItemByStructureElementId(
StructureElement BuildingMountPointModel::setBuildingGroup(int groupId)
{
StructureElement se;
InfrastructureManagement::BuildingGroup_def::type buildingGroup = static_cast<InfrastructureManagement::BuildingGroup_def::type>(groupId);
InfrastructureManagement::BuildingGroup buildingGroup = static_cast<InfrastructureManagement::BuildingGroup>(groupId);
if(buildingGroup == 0)
{
buildingGroup = InfrastructureManagement::BuildingGroup_def::UnknownGroup;
buildingGroup = InfrastructureManagement::BuildingGroup::UnknownGroup;
}
se.id() = maxIntValue - static_cast<int>(buildingGroup);
@@ -215,10 +215,10 @@ StructureElement BuildingMountPointModel::setBuildingGroup(int groupId)
int BuildingMountPointModel::getSectionId(int groupId)
{
InfrastructureManagement::BuildingGroup_def::type buildingGroup = static_cast<InfrastructureManagement::BuildingGroup_def::type>(groupId);
InfrastructureManagement::BuildingGroup buildingGroup = static_cast<InfrastructureManagement::BuildingGroup>(groupId);
if(buildingGroup == 0)
{
buildingGroup = InfrastructureManagement::BuildingGroup_def::UnknownGroup;
buildingGroup = InfrastructureManagement::BuildingGroup::UnknownGroup;
}
return (maxIntValue - static_cast<int>(buildingGroup));
}
@@ -300,7 +300,7 @@ void BuildingMountPointModel::addBuilding(const MainStructureElement &mse)
for (const StructureElement &se : mse.elements())
{
if (se.mountingPointTypeId() == InfrastructureManagement::MountingPointType_def::BuildingControlUnit)
if (se.mountingPointTypeId() == InfrastructureManagement::MountingPointType::BuildingControlUnit)
continue;
int parentId = getParent(se.path());
@@ -225,7 +225,7 @@ void PlanDialog::onRemove()
asset.barcode(),
asset.hostname(),
asset.properties(),
InstrumentationAssetState_def::Unmounted,
InstrumentationAssetState::Unmounted,
asset.lastUpdated(),
asset.availableInExercise()
);
@@ -118,7 +118,7 @@ bool PlanEditDialog::apply()
MainScheduleModifyRequest data;
data.name((m_ui->leName->text().toStdString()));
ScheduleStatus newStatus = static_cast<ScheduleStatus::type>(m_ui->cbStatus->currentData().toInt());
ScheduleStatus newStatus = static_cast<ScheduleStatus>(m_ui->cbStatus->currentData().toInt());
if (newStatus != m_currentState)
{
@@ -160,7 +160,7 @@ bool PlanEditDialog::apply()
else
data.timeEnd();
data.statusId(static_cast<ScheduleStatus::type>(m_ui->cbStatus->currentData().toInt()));
data.statusId(static_cast<ScheduleStatus>(m_ui->cbStatus->currentData().toInt()));
m_requestHelper->addRequest([data,this](){
return m_ftc->mainScheduleModifyRequest(data, this);
@@ -579,7 +579,7 @@ void InterfaceImpl::slotNewPlan()
req.id(0);
req.statusId(static_cast<ScheduleStatus::inner_enum>(status));
req.statusId(static_cast<ScheduleStatus>(status));
req.timeCreated(QDateTime::currentDateTime().toMSecsSinceEpoch());
if(tbegin > 0)
req.timeStart(tbegin);
@@ -2,6 +2,7 @@
#pragma once
#include <LtsUtils/LtsUtilsCore/data_modification_enum.h>
#include <InfrastructureManagement/ism.hpp>
#include <InfrastructureManagement/ism_mounting_point.h>
@@ -81,7 +82,7 @@ public:
Q_SIGNALS:
void mountingPointChanged(const InfrastructureManagement::MountingPoint &data, ParticipantManagement::DataModification modType);
void mountingPointChanged(const InfrastructureManagement::MountingPoint &data, DataModification modType);
void scheduleIdChanged(int32_t newScheduleId);
void buildingsInCurrentExerciseChanged();
};