X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmonitormanager.h;h=b9f7de2c2da501f6953049eac5bfa142078c2121;hb=c3302003093710ee247ad84c0fe2ef3c579d417f;hp=7a7a42f090b611e96efd0dfbb2651a55d5ba17ec;hpb=ffbd98f8303b09f3fd4f7cf2c74c20080c7fd115;p=kdenlive diff --git a/src/monitormanager.h b/src/monitormanager.h index 7a7a42f0..b9f7de2c 100644 --- a/src/monitormanager.h +++ b/src/monitormanager.h @@ -22,24 +22,45 @@ #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: - void activateMonitor(QString name = QString()); + + /** @brief Activates a monitor. + * @param name name of the monitor to activate */ + 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); @@ -51,17 +72,32 @@ public slots: void slotStart(); void slotEnd(); void slotResetProfiles(); - void slotSwitchMonitors(); + + /** @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 m_monitorsList; signals: - 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(); };