90 lines
2.5 KiB
C++
Executable File
90 lines
2.5 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* PresentationManagement - Script Overview Dialog
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*
|
|
* Created by Mike Wille, SLSE, 2017-03-15
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Services/PresentationManagement/pre_dtc.h>
|
|
#include <Services/PresentationManagement/pre_ftc.h>
|
|
#include <Services/PresentationManagement/logger.h>
|
|
#include <Services/OperatorManagement/opm_dtc.h>
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
#include <LtsUtilsGuiDds/request_helper.h>
|
|
#include <LtsSession/lts_session.h>
|
|
|
|
namespace Ui
|
|
{
|
|
class PresentationManagementDialog;
|
|
}
|
|
|
|
namespace PresentationManagement
|
|
{
|
|
enum class ScriptsDialogMode
|
|
{
|
|
modeView = 0,
|
|
modeEdit = 1,
|
|
modeAdmin = 2
|
|
};
|
|
|
|
class PresentationManagementDialogModel;
|
|
class PresentationManagementDialogProxyModel;
|
|
|
|
class PresentationManagementDialog : public LtsWidgets::LtsDialog
|
|
, protected Interface::Ftc::PresentationRemoveReplyHandler
|
|
, protected Interface::Ftc::PresentationChangeStatusReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit PresentationManagementDialog(QWidget *parent = nullptr);
|
|
~PresentationManagementDialog();
|
|
|
|
bool init(const ScriptsDialogMode &dlgMode,
|
|
const std::shared_ptr<Interface::Dtc> &dtc,
|
|
const std::shared_ptr<Interface::Ftc> &ftc,
|
|
const std::shared_ptr<OperatorManagement::Interface::Dtc> &opmDtc,
|
|
LtsSession::LtsSession *session);
|
|
|
|
protected:
|
|
void onPresentationRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
void onPresentationChangeStatusReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
|
|
private:
|
|
void retranslate() override;
|
|
void changeStatus(const FileStatus &fs);
|
|
void tableColumnOrganiserSetting() override;
|
|
|
|
PresentationManagementDialogModel *m_model;
|
|
PresentationManagementDialogProxyModel *m_proxyModel;
|
|
Ui::PresentationManagementDialog *m_ui;
|
|
std::shared_ptr<PresentationManagement::Interface::Dtc> m_dtc;
|
|
std::shared_ptr<PresentationManagement::Interface::Ftc> m_ftc;
|
|
std::shared_ptr<OperatorManagement::Interface::Dtc> m_opmDtc;
|
|
LtsUtils::RequestHelper *m_requestHelper;
|
|
|
|
ScriptsDialogMode m_modeDialog;
|
|
LtsSession::LtsSession *m_session;
|
|
|
|
int m_loadedScriptId {-1};
|
|
|
|
LOGGER_T m_logger;
|
|
|
|
private slots:
|
|
void slotAdd();
|
|
void slotEdit();
|
|
void slotRemove();
|
|
void slotDelete();
|
|
void slotRestore();
|
|
void enaDisa();
|
|
void slotSetScriptName(int scriptId);
|
|
|
|
};
|
|
|
|
} // namespace PresentationManagement
|