88 lines
2.6 KiB
C++
Executable File
88 lines
2.6 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* The ElokaEditDialog adds or updates electronic warfare
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Astrid Mueller, SGAS, 2017-10-17
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
|
|
#include <AudioVideoManagement/logger.h>
|
|
#include <AudioVideoManagement/avm_dtc.h>
|
|
#include <LtsSession/lts_session.h>
|
|
|
|
#include "avm_eloka_model.h"
|
|
|
|
namespace Ui
|
|
{
|
|
class ElokaEditDialog;
|
|
}
|
|
|
|
namespace AudioVideoManagement
|
|
{
|
|
|
|
class AvaSession;
|
|
class AvaControl;
|
|
class StreamNameMapping;
|
|
|
|
|
|
class ElokaEditDialog : public LtsWidgets::LtsDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
ElokaEditDialog(LtsSession::LtsSession *session, AvaSession *avaSession, Interface::Dtc *avmDtc, StreamNameMapping *streamNameMapping,
|
|
const ElokaData &data, QWidget *parent = nullptr);
|
|
~ElokaEditDialog();
|
|
|
|
bool init(const std::vector<qint32> &usedCnr,
|
|
const std::vector<qint32> &usedTvc,
|
|
const std::vector<qint32> &usedAnnouncement);
|
|
signals:
|
|
void signalNewEloka(const ElokaData &data);
|
|
|
|
protected:
|
|
bool apply() override;
|
|
|
|
private slots:
|
|
void onCmbCircuitChanged(int index);
|
|
void onCbCnrToggled(bool checked);
|
|
void onCbAnnouncementToggled(bool checked);
|
|
void onCbTvcToggled(bool checked);
|
|
|
|
void onCnrConfigChanged(const CnrConfig &data, DataModification modType);
|
|
void onTvcConfigChanged(const TvcConfig &data, DataModification modType);
|
|
void onStreamChanged(const Stream &data, DataModification modType);
|
|
void onCnrTvcProfileChanged(const CnrTvcProfile &data, DataModification modType);
|
|
void onGetElokaListResponse(const QVector<QString> &actions);
|
|
|
|
private:
|
|
void retranslate() override;
|
|
|
|
void checkedRadioButtons(bool cnr, bool tvc, bool announcement);
|
|
void enabledRadioButtons(bool cnr, bool tvc, bool announcement);
|
|
void getUserProfile();
|
|
void getActiveCnrs();
|
|
void fillComboBoxCircuit(ElokaCircuitType type);
|
|
void setCurrentCircuit(const ElokaData &data);
|
|
|
|
private:
|
|
Ui::ElokaEditDialog *m_ui;
|
|
LtsSession::LtsSession *m_session;
|
|
StreamNameMapping *m_streamNameMapping;
|
|
AvaControl *m_avaCtrl;
|
|
Interface::Dtc *m_avmDtc;
|
|
ElokaData m_elokaData; //!< default-constructed in case we are creating a new Eloka
|
|
QMap<qint32, CnrConfig> m_cnrConfigMap;
|
|
QMap<qint32, TvcConfig> m_tvcConfigMap;
|
|
QMap<qint32, Stream> m_announcementMap;
|
|
QMultiMap<qint32, ElokaCircuitType> m_userProfile;
|
|
LOGGER_T m_logger;
|
|
};
|
|
|
|
} // namespace
|