#define MONITORMANAGER_H
#include "monitor.h"
+#include "recmonitor.h"
#include "timecode.h"
-class Monitor;
+class KdenliveDoc;
class MonitorManager : public QObject
{
Q_OBJECT
public:
- MonitorManager(QWidget *parent = 0);
- void initMonitors(Monitor *clipMonitor, Monitor *projectMonitor);
- Timecode timecode();
- void resetProfiles(Timecode tc);
+ explicit MonitorManager(QWidget *parent = 0);
+ void initMonitors(Monitor *clipMonitor, Monitor *projectMonitor, RecMonitor *recMonitor);
+ void appendMonitor(AbstractMonitor *monitor);
+ void removeMonitor(AbstractMonitor *monitor);
+ Timecode timecode() const;
+ void resetProfiles(const Timecode &tc);
void stopActiveMonitor();
+ AbstractRender *activeRenderer();
+ /** Searches for a monitor with the given name.
+ @return NULL, if no monitor could be found, or the monitor otherwise.
+ */
+ AbstractMonitor *monitor(Kdenlive::MonitorId monitorName);
+ void updateScopeSource();
+ void clearScopeSource();
+ /** @brief Returns current project's folder. */
+ QString getProjectFolder() const;
+ /** @brief Sets current document for later reference. */
+ void setDocument(KdenliveDoc *doc);
+ /** @brief Change an MLT consumer property for both monitors. */
+ void setConsumerProperty(const QString &name, const QString &value);
public slots:
/** @brief Activates a monitor.
* @param name name of the monitor to activate */
- void activateMonitor(QString name = QString());
+ bool activateMonitor(Kdenlive::MonitorId, bool forceRefresh = false);
+ bool isActive(Kdenlive::MonitorId id) const;
void slotPlay();
+ void slotPause();
void slotPlayZone();
void slotLoopZone();
void slotRewind(double speed = 0);
void slotStart();
void slotEnd();
void slotResetProfiles();
+
+ /** @brief Switch current monitor to fullscreen. */
+ void slotSwitchFullscreen();
/** @brief Switches between project and clip monitor.
* @ref activateMonitor
* @param activateClip whether to activate the clip monitor */
void slotSwitchMonitors(bool activateClip);
+ void slotUpdateAudioMonitoring();
+
+private slots:
+ void slotRefreshCurrentMonitor(const QString &id);
private:
+ KdenliveDoc *m_document;
Monitor *m_clipMonitor;
Monitor *m_projectMonitor;
- QString m_activeMonitor;
Timecode m_timecode;
- bool m_blocked;
+ AbstractMonitor *m_activeMonitor;
+ QList <AbstractMonitor *>m_monitorsList;
signals:
- /** @brief Emitted when the active monitor changes */
- void raiseClipMonitor(bool);
/** @brief When the monitor changed, update the visible color scopes */
void checkColorScopes();
+ /** @brief When the active monitor renderer was deleted, reset color scopes */
+ void clearScopes();
};