Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+58
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* @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;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user