Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,94 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* OperatorSettingsObserver
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Fröbel, NLSE, 2018-04-10
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AudioVideoManagement/ava_types.h>
|
||||
#include <boost/optional.hpp>
|
||||
#include <QChar>
|
||||
#include <QObject>
|
||||
#include <memory>
|
||||
|
||||
namespace OperatorManagement
|
||||
{
|
||||
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
}
|
||||
|
||||
class User;
|
||||
|
||||
} // namespace OperatorManagement
|
||||
|
||||
|
||||
namespace ExerciseManagement
|
||||
{
|
||||
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
}
|
||||
|
||||
class Exercise;
|
||||
|
||||
} // namespace ExerciseManagement
|
||||
|
||||
|
||||
namespace LtsUtils
|
||||
{
|
||||
class OperatorSettings;
|
||||
}
|
||||
|
||||
|
||||
enum class DataModification;
|
||||
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
|
||||
/**
|
||||
* Small helper class to observe the following parts of the Operator's settings:
|
||||
* - audio priority
|
||||
* - timezone
|
||||
*
|
||||
* @author Christian Fröbel
|
||||
*/
|
||||
class OperatorSettingsObserver : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
OperatorSettingsObserver(int exerciseId, int operatorId, OperatorManagement::Interface::Dtc *opmDtc, ExerciseManagement::Interface::Dtc *exmDtc);
|
||||
~OperatorSettingsObserver();
|
||||
|
||||
QChar timezone() const;
|
||||
|
||||
signals:
|
||||
void audioPrioChanged(AvaAudioPrio newPrio);
|
||||
void timezoneChanged(QChar newTimezone);
|
||||
|
||||
private slots:
|
||||
void onOperatorChanged(const OperatorManagement::User &operator_, DataModification modType);
|
||||
void onExerciseChanged(const ExerciseManagement::Exercise &exercise, DataModification modType);
|
||||
void onSettingsValueChanged(const QString &group, const QString &identifier, const QVariant &value);
|
||||
|
||||
private:
|
||||
class TimezoneCalculator;
|
||||
|
||||
int m_exerciseId;
|
||||
int m_operatorId;
|
||||
OperatorManagement::Interface::Dtc *m_opmDtc;
|
||||
ExerciseManagement::Interface::Dtc *m_exmDtc;
|
||||
LtsUtils::OperatorSettings *m_operatorSettings;
|
||||
std::unique_ptr<TimezoneCalculator> m_timezoneCalculator;
|
||||
boost::optional<AvaAudioPrio> m_currentPrio;
|
||||
};
|
||||
|
||||
} // namespace AudioVideoManagement
|
||||
Reference in new issue
Block a user