TimeController.h
42 lines
| 1002 B
| text/x-c
|
CLexer
r190 | #ifndef SCIQLOP_TIMECONTROLLER_H | |||
#define SCIQLOP_TIMECONTROLLER_H | ||||
Alexandre Leroux
|
r461 | #include "CoreGlobal.h" | ||
r512 | #include <Data/SqpRange.h> | |||
r190 | ||||
#include <QLoggingCategory> | ||||
#include <QObject> | ||||
#include <Common/spimpl.h> | ||||
Q_DECLARE_LOGGING_CATEGORY(LOG_TimeController) | ||||
/** | ||||
* @brief The TimeController class aims to handle the Time parameters notification in SciQlop. | ||||
*/ | ||||
Alexandre Leroux
|
r461 | class SCIQLOP_CORE_EXPORT TimeController : public QObject { | ||
r190 | Q_OBJECT | |||
public: | ||||
explicit TimeController(QObject *parent = 0); | ||||
r512 | SqpRange dateTime() const noexcept; | |||
r190 | ||||
signals: | ||||
/// Signal emitted to notify that time parameters has beed updated | ||||
r512 | void timeUpdated(SqpRange time); | |||
r190 | ||||
public slots: | ||||
r302 | /// Slot called when a new dateTime has been defined. | |||
r512 | void onTimeToUpdate(SqpRange dateTime); | |||
r190 | ||||
r302 | /// Slot called when the dateTime has to be notified. Call timeUpdated signal | |||
void onTimeNotify(); | ||||
r190 | private: | |||
class TimeControllerPrivate; | ||||
spimpl::unique_impl_ptr<TimeControllerPrivate> impl; | ||||
}; | ||||
#endif // SCIQLOP_TIMECONTROLLER_H | ||||