- Merged 292 changed files from dlbo snapshot - Fixed IDL enum collisions (PortType, PdmEventType) - Fixed Grantlee template for C++11 scoped enums - Fixed CMake VERSION_GREATER syntax - Added missing directories (THP, LtsRestClient, etc.) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
59 lines
1.5 KiB
C++
Executable File
59 lines
1.5 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* GUI Plugin for SituationReplayManagement - Replay Partition Dialog Model
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Patric Karwat, SLSE, 2016-07-19
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <SituationReplayManagement/srm_dtc.h>
|
|
#include <DDS/Core/core_dtc.h>
|
|
#include <SituationReplayManagement/logger.h>
|
|
|
|
#include <LtsWidgets/lts_abstract_table_model.h>
|
|
|
|
namespace SituationReplayManagement
|
|
{
|
|
// --------------------------------------------------------
|
|
// ReplayPartitionDialogModel
|
|
// --------------------------------------------------------
|
|
class ReplayPartitionDialogModel final : public LtsWidgets::LtsAbstractTableModel<Core::ReplayPartition>
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum Columns
|
|
{
|
|
Id,
|
|
Name,
|
|
Exercise,
|
|
WorkstationId,
|
|
ConnectionString
|
|
};
|
|
|
|
explicit ReplayPartitionDialogModel(QObject *parent = nullptr);
|
|
~ReplayPartitionDialogModel();
|
|
|
|
bool initModel(int partitionId,
|
|
const std::shared_ptr<Core::Interface::Dtc> &dtc);
|
|
|
|
QVariant data(const QModelIndex &, int) const override final;
|
|
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override final;
|
|
|
|
protected:
|
|
bool isFiltered(const Core::ReplayPartition &data, DataModification modType) const override
|
|
{
|
|
if (data.exerciseId() != m_partitionid)
|
|
return true;
|
|
return LtsWidgets::LtsAbstractTableModel<Core::ReplayPartition>::isFiltered(data, modType);
|
|
}
|
|
private:
|
|
int m_partitionid;
|
|
std::shared_ptr<Core::Interface::Dtc> m_dtc;
|
|
LOGGER_T m_logger;
|
|
};
|
|
}
|