Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+93
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* ParticipantManagement - ParticipantBiteDialog
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2016-06-13
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
//Lts
|
||||
#include <LtsWidgets/lts_dialog.h>
|
||||
#include <LtsUtilsGuiDds/request_helper.h>
|
||||
|
||||
//ParticipantManagement
|
||||
#include <ParticipantManagement/logger.h>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <ParticipantManagement/ppm_ftc.h>
|
||||
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
|
||||
//Qt
|
||||
#include <QJsonObject>
|
||||
#include <QVector>
|
||||
#include <QGridLayout>
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class ParticipantBiteDialog;
|
||||
}
|
||||
|
||||
namespace ParticipantManagement
|
||||
{
|
||||
//enum class?
|
||||
enum LabelType
|
||||
{
|
||||
Normal = 1,
|
||||
Ok,
|
||||
Error
|
||||
};
|
||||
|
||||
// --------------------------------------------------------
|
||||
// ParticipantBiteDialog
|
||||
// --------------------------------------------------------
|
||||
class ParticipantBiteDialog : public LtsWidgets::LtsDialog
|
||||
, protected Interface::Ftc::CallBiteReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ParticipantBiteDialog(int ddsId, QWidget *parent = nullptr);
|
||||
~ParticipantBiteDialog();
|
||||
|
||||
bool init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
const std::shared_ptr<Interface::Ftc> &ftc,
|
||||
const std::shared_ptr<ProjectDataManagement::Interface::Dtc> &pdmDtc,
|
||||
bool bBiteWithSelfTest,
|
||||
const QJsonObject &detailData = QJsonObject());
|
||||
|
||||
void onCallBiteReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
|
||||
private:
|
||||
void retranslate() override;
|
||||
void addLabel(const QString &text, int row, int column, LabelType labelType = LabelType::Normal);
|
||||
int checkArguments(bool available, bool statusOk, qint64 bitValue, int i);
|
||||
int checkArgument(bool bError, const QString &name, int i);
|
||||
|
||||
private Q_SLOTS :
|
||||
void onBiteChanged(const ParticipantManagement::Bite &bite);
|
||||
|
||||
private:
|
||||
QString getErrorString(const ParticipantManagement::BiteError &error) const;
|
||||
QString getCanDeviceName(int id) const;
|
||||
QString getSubDeviceName(int id) const;
|
||||
|
||||
int m_ddsId;
|
||||
int m_eqipNr;
|
||||
bool m_fromDetailData;
|
||||
|
||||
std::shared_ptr<Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
QGridLayout *m_layout;
|
||||
QVector<QWidget *> m_internalWidgets;
|
||||
|
||||
Ui::ParticipantBiteDialog *m_ui;
|
||||
LOGGER_T m_logger;
|
||||
QMap<int, ProjectDataManagement::CanComponentString> m_ccsMap;
|
||||
QMap<int, ProjectDataManagement::BiteComponentText> m_bctMap;
|
||||
};
|
||||
} // namespace ParticipantInfo
|
||||
Reference in new issue
Block a user