/** * @RDE_HEADER@ * HMI Plugin for OpeartorManagement - Operator/User Overview Dialog * $Id$ * $HeadURL$ * $Author$ * Created by Christian Ehrlicher, SLSE, 2016-02-29 */ #pragma once #include "charge_table_model.h" #include #include #include #include #include namespace Ui { class ChargeTableDialog; } namespace LtsSession { class LtsSession; } namespace LtsUtils { class RequestHelper; } namespace FileManagement { class ForeignGuiInterface; } namespace ProjectDataManagement { class ChargeTableDialog : public LtsWidgets::LtsDialog , protected ProjectDataManagement::Interface::Ftc::UpdateChargeTypeReplyHandler { Q_OBJECT public: explicit ChargeTableDialog(QWidget *parent = nullptr, bool organiser = false); ~ChargeTableDialog(); bool init(LtsSession::LtsSession *session, bool showDetails = false, const QSet &gearClasses = {GearClass::DuelSim}); bool apply() override; public slots: void setValues(const std::vector &values, bool includeChildren = false); void setValues(const QSet &values, bool includeChildren = false); private: void retranslate() override; void onUpdateChargeTypeReply(const Core::FunctionReplyObject &replyObject) override final; void tableColumnOrganiserSetting() override; Ui::ChargeTableDialog *m_ui; LtsSession::LtsSession *m_session; std::shared_ptr m_ftc; std::shared_ptr m_flmGui; LtsUtils::RequestHelper *m_requestHelper; ChargeTableDialogModel *m_model; bool m_isOrganiser; LOGGER_T m_logger; signals: void selectedUleisCodes(const QSet &codes); private slots: void enaDisa(); void showDetails(bool showThem); void onEditCharge(); void onPrint(); void enaDisaOk(bool hasChanges); void onImportButtonClicked(); void onExportButtonClicked(); }; } // namespace ProjectDataManagement