Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+58
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* ActiveExerciseWithRadioGroup
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Fröbel, NLSE, 2018-02-16
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
|
||||
class ExercisesHandler;
|
||||
class ExerciseContext;
|
||||
|
||||
/**
|
||||
* The ExercisesHandler emits a signal whenever an Exercise gets activated (or deactivated).
|
||||
* (See there for what "activated" means).
|
||||
*
|
||||
* @see TvcHandler
|
||||
* @see CnrHandler
|
||||
* @see ExercisesHandler
|
||||
* @author Christian Fröbel
|
||||
*/
|
||||
class ActiveExercises : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ActiveExercises(ExercisesHandler *exercisesHandler);
|
||||
~ActiveExercises() override;
|
||||
|
||||
/** Return all active Contexts. */
|
||||
const std::vector<ExerciseContext> &allContexts() const;
|
||||
int count() const { return m_activeExercises.size(); }
|
||||
|
||||
bool isActive(const ExerciseContext &context) const;
|
||||
|
||||
signals:
|
||||
/** Signalled when the Exercise is active. */
|
||||
void contextActivated(const ExerciseContext &context);
|
||||
void contextDeactivated(const ExerciseContext &context);
|
||||
|
||||
private slots:
|
||||
void onContextActivated(const ExerciseContext &context);
|
||||
void onContextDeactivated(const ExerciseContext &context);
|
||||
|
||||
private:
|
||||
std::vector<ExerciseContext> m_activeExercises;
|
||||
};
|
||||
|
||||
} // namespace AudioVideoManagement
|
||||
Reference in new issue
Block a user