85 lines
2.4 KiB
C++
Executable File
85 lines
2.4 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* ScriptChooser Payload UI
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*
|
|
* Created by Mike Wille, SLSE, 2017-03-21
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Plugins/PresentationManagement/Gui/Script/Common/preguiscriptcommon_export.h>
|
|
#include <Plugins/PresentationManagement/pre_data_plugin_interface.h>
|
|
#include <Services/OperatorManagement/opm_dtc.h>
|
|
#include <LtsWidgets/lts_frameless_dialog.h>
|
|
#include <LtsUtilsGuiDds/request_helper.h>
|
|
#include <Services/PresentationManagement/pre_ftc.h>
|
|
#include <QDialog>
|
|
|
|
|
|
namespace Ui { class ScriptChooser; }
|
|
|
|
|
|
namespace PresentationManagement
|
|
{
|
|
|
|
class PresentationManagementDialogModel;
|
|
class PresentationManagementDialogProxyModel;
|
|
|
|
|
|
class PREGUISCRIPTCOMMON_EXPORT ScriptChooser : public LtsWidgets::LtsFramelessDialog
|
|
, protected Interface::Ftc::PresentationRemoveReplyHandler
|
|
, protected Interface::Ftc::PresentationChangeStatusReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ScriptChooser(const std::shared_ptr<Interface::Dtc> &dtc,
|
|
const std::shared_ptr<PresentationManagement::Interface::Ftc> &ftc,
|
|
const std::shared_ptr<OperatorManagement::Interface::Dtc> &opmDtc,
|
|
bool isPlayerMode,
|
|
bool isImportDialog = false,
|
|
QWidget *parent = nullptr);
|
|
~ScriptChooser();
|
|
|
|
protected:
|
|
void closeEvent(QCloseEvent *event) override;
|
|
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 setSelectorMode(bool isPlayer);
|
|
|
|
private slots:
|
|
void reject() override;
|
|
|
|
void onDeleteScript();
|
|
void onScriptSelected();
|
|
void onImportScript();
|
|
void onEnaDisa();
|
|
|
|
signals:
|
|
void signalQuit();
|
|
void signalSelectScript(int scriptId);
|
|
void signalNewScript();
|
|
void signalEditQuit();
|
|
|
|
private:
|
|
PresentationManagementDialogModel *m_model { nullptr };
|
|
PresentationManagementDialogProxyModel *m_proxy { nullptr };
|
|
bool m_selected;
|
|
bool m_close { false };
|
|
bool m_isImportDialog;
|
|
|
|
Ui::ScriptChooser *m_ui { nullptr };
|
|
NGL::INGLLogger &m_logger;
|
|
|
|
std::shared_ptr<PresentationManagement::Interface::Ftc> m_ftc;
|
|
LtsUtils::RequestHelper *m_requestHelper;
|
|
|
|
};
|
|
|
|
} // namespace PresentationManagement
|