Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

@@ -0,0 +1,90 @@
/**
* @RDE_HEADER@
* HMI Plugin for AlarmManagement (Interface for access from other Plugins)
* $Id$
* $HeadURL$
* $Author$
* Created by Steve Kemayou, SLSE, 2023-05-26
*/
#pragma once
#include <AlarmManagement/alm_dtc.h>
#include <AlarmManagement/logger.h>
#include <LtsWidgets/lts_abstract_table_model.h>
#include <LtsWidgets/lts_column_filter_proxy_model.h>
#include <Plugins/OperatorManagement/opm_data_plugin_interface.h>
#include <QObject>
namespace AlarmManagement
{
class EmergencyCallModel : public LtsWidgets::LtsAbstractTableModel<AlarmManagement::AlmEmergencyCall>
{
Q_OBJECT
public:
enum Columns
{
ID,
SAMPLE_TIME,
INCOMING_TIME,
NAME,
ISSI,
POSITION,
EXPIRED,
OPERATION_ID,
DELETED_TIMESTAMP,
COMMENT
};
explicit EmergencyCallModel(QObject *parent = nullptr);
QVariant data(const QModelIndex &index, int role) const override final;
bool initModel(const std::shared_ptr<Interface::Dtc> &dtc,
const std::shared_ptr<OperatorManagement::Interface::Dtc> &opmDtc);
private slots:
void onAlarmEmergencyCallChanged(const AlarmManagement::AlmEmergencyCall &data, const DataModification modType);
private:
std::shared_ptr<AlarmManagement::Interface::Dtc> m_dtc;
std::shared_ptr<OperatorManagement::Interface::Dtc> m_opmDtc;
LOGGER_T m_logger;
friend class EmergencyCallProxyModel;
};
///**************************
/// EmergencyCallProxyModel
///**************************
/*!
* \brief The EmergencyCallProxyModel class
*/
class EmergencyCallProxyModel : public LtsWidgets::LtsColumnFilterProxyModel
{
Q_OBJECT
public:
using LtsWidgets::LtsColumnFilterProxyModel::LtsColumnFilterProxyModel;
bool showExpired() const { return m_showExpired; }
bool exerciseStopped()const {return m_hideByExerciseStopped;}
void setSourceModel(QAbstractItemModel *sourceModel) override;
void hideByExerciseStopped(bool show);
public slots:
void setShowExpired(bool show);
protected:
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override final;
private:
bool checkFilter(int source_row) const;
private:
bool m_showExpired{false};
bool m_hideByExerciseStopped{false};
EmergencyCallModel *m_sourceModel{nullptr};
};
}