Adds initial intermediate qt6 porting state
This commit is contained in:
11247 files changed
+1891537
No files matched your search
@@ -0,0 +1,61 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LtsWidgets/lts_abstract_table_model.h>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <AssetManagement/asm_dtc.h>
|
||||
#include <LtsSession/lts_session.h>
|
||||
#include <SAAs/Common/logger.h>
|
||||
#include <SAAs/Common/saa_utils.h>
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
|
||||
namespace SAAInterfaceAdapterAdler
|
||||
{
|
||||
|
||||
using namespace SAAUtils;
|
||||
|
||||
class SaaDialogModel final : public LtsWidgets::LtsAbstractTableModel<AssetManagement::Asset>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SaaDialogModel(QObject *parent = nullptr);
|
||||
~SaaDialogModel();
|
||||
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override final;
|
||||
|
||||
bool initModel(LtsSession::LtsSession *session);
|
||||
enum Columns
|
||||
{
|
||||
Id,
|
||||
Name,
|
||||
Connected,
|
||||
IsUseByParty
|
||||
};
|
||||
|
||||
|
||||
|
||||
void pingAllSaa();
|
||||
void saaConnected(int assetId, bool state);
|
||||
protected:
|
||||
void stopPing();
|
||||
void updateView();
|
||||
void onPartyDataChanged(const ParticipantManagement::Party &data, DataModification modType);
|
||||
|
||||
void getPartyWithAssetId(int assetId, ParticipantManagement::Party &party)const;
|
||||
private:
|
||||
bool isFiltered(const AssetManagement::Asset &data, DataModification modType) const override;
|
||||
void slotAssetChanged(const AssetManagement::Asset &data, DataModification modType);
|
||||
|
||||
private:
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
||||
std::shared_ptr<AssetManagement::Interface::Dtc> m_asmDtc;
|
||||
QHash<int, PingItem> m_saaPingItems;
|
||||
LtsSession::LtsSession *m_session{nullptr};
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user