Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
*@RDE_HEADER@
|
||||
* GUI Plugin for Building- Info
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by hjl, SLSE, 2017-04-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// Buildings
|
||||
#include "info_dialog_base.h"
|
||||
|
||||
// DDS
|
||||
#include <InfrastructureManagement/ism.hpp>
|
||||
#include <LtsUtilsCore/data_modification_enum.h>
|
||||
|
||||
// HTTP Request
|
||||
#include <QNetworkAccessManager>
|
||||
|
||||
class QTimer;
|
||||
class QUrl;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class EgcuOperationalDialog;
|
||||
}
|
||||
|
||||
namespace Buildings
|
||||
{
|
||||
|
||||
// --------------------------------------------------------
|
||||
// BuildingInfoDialog
|
||||
// --------------------------------------------------------
|
||||
class EgcuOperationalDialog : public InfoDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit EgcuOperationalDialog(int mountPointId, const QString &menuGroup, QWidget *parent = nullptr);
|
||||
~EgcuOperationalDialog();
|
||||
|
||||
bool init(LtsSession::LtsSession *session) override;
|
||||
|
||||
QString egcuName() const { return m_egcuName; }
|
||||
QString buildingDisplayName() const override { return egcuName(); }
|
||||
|
||||
private:
|
||||
void retranslate() override;
|
||||
void showBuildingInfos() override;
|
||||
void startRequest(const QUrl &requestedUrl);
|
||||
void showEgcuInfos();
|
||||
|
||||
private slots:
|
||||
bool apply() override;
|
||||
void onUpdateState();
|
||||
void httpFinished();
|
||||
void onInstrumentationAssetChanged(const InfrastructureManagement::InstrumentationAsset &data, DataModification modType);
|
||||
void onMountPointAssetChanged(const InfrastructureManagement::MountingPointAsset &data, DataModification modType);
|
||||
|
||||
private:
|
||||
Ui::EgcuOperationalDialog *m_ui = nullptr;
|
||||
QHash <int, InfrastructureManagement::InstrumentationAsset> m_instrumentationAssets; // key = assetId
|
||||
int m_assetId = 0;
|
||||
int m_mountPointId = 0;
|
||||
QNetworkAccessManager m_qnam;
|
||||
bool m_httpRequestAborted = false;
|
||||
QString m_host;
|
||||
QString m_user;
|
||||
QString m_passwd;
|
||||
QString m_egcuName;
|
||||
QTimer *m_stateTimer = nullptr;
|
||||
};
|
||||
} // namespace Buildings
|
||||
Reference in new issue
Block a user