59 lines
1.4 KiB
C++
Executable File
59 lines
1.4 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* ExerciseManangement - Exercise Overview Dialog
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*
|
|
* Created by Mike Wille, SLSE, 2017-02-10
|
|
*/
|
|
|
|
#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:
|
|
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;
|
|
NGL::INGLLogger &m_logger;
|
|
|
|
};
|
|
|
|
} // namespace Timeline
|