Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Plugins/Timeline/Gui/EventTimelineClassic/tln_legend.h
T

52 lines
1.2 KiB
C++
Executable File

#pragma once
#include <LtsWidgets/lts_dialog.h>
#include <ProjectDataManagement/pdm_enums.hpp>
#include "logger.h"
namespace Ui
{
class TimelineLegendDialog;
}
namespace Timeline
{
class DDSTimelineModel;
class TimelineLegendDialog : public LtsWidgets::LtsDialog
{
Q_OBJECT
public:
explicit TimelineLegendDialog(QWidget *parent = nullptr);
~TimelineLegendDialog();
bool apply() override;
bool init(DDSTimelineModel *model, const QSet<int> &activeEventTypeIds);
void setActiveEventTypeIds(const QSet<int> &activeEventTypeIds);
static QVector<ProjectDataManagement::EventType> possibleEvents();
signals:
void signalEventTypesChanged(const QSet<int> &activeEventTypeIds);
private:
NGL::INGLLogger &m_logger;
void retranslate() override;
static QString checkBoxName(int eventTypeId) { return QStringLiteral("CheckBoxEvent%1").arg(eventTypeId); }
static QString checkBoxName(ProjectDataManagement::EventType eventType) { return checkBoxName(eventType.underlying()); }
QCheckBox *checkBox(int eventTypeId) { return findChild<QCheckBox *>(checkBoxName(eventTypeId)); }
QCheckBox *checkBox(ProjectDataManagement::EventType eventType) { return checkBox(eventType.underlying()); }
private:
Ui::TimelineLegendDialog *m_ui;
};
}