]> git.sesse.net Git - kdenlive/blob - src/monitormanager.h
* Cleanup transode stabilize GUI: http://kdenlive.org/mantis/view.php?id=2930
[kdenlive] / src / monitormanager.h
1 /***************************************************************************
2  *   Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
3  *                                                                         *
4  *   This program is free software; you can redistribute it and/or modify  *
5  *   it under the terms of the GNU General Public License as published by  *
6  *   the Free Software Foundation; either version 2 of the License, or     *
7  *   (at your option) any later version.                                   *
8  *                                                                         *
9  *   This program is distributed in the hope that it will be useful,       *
10  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12  *   GNU General Public License for more details.                          *
13  *                                                                         *
14  *   You should have received a copy of the GNU General Public License     *
15  *   along with this program; if not, write to the                         *
16  *   Free Software Foundation, Inc.,                                       *
17  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
18  ***************************************************************************/
19
20
21 #ifndef MONITORMANAGER_H
22 #define MONITORMANAGER_H
23
24 #include "monitor.h"
25 #include "recmonitor.h"
26 #include "timecode.h"
27
28 class KdenliveDoc;
29
30 class MonitorManager : public QObject
31 {
32     Q_OBJECT
33
34 public:
35     MonitorManager(QWidget *parent = 0);
36     void initMonitors(Monitor *clipMonitor, Monitor *projectMonitor, RecMonitor *recMonitor);
37     void appendMonitor(AbstractMonitor *monitor);
38     void removeMonitor(AbstractMonitor *monitor);
39     Timecode timecode();
40     void resetProfiles(Timecode tc);
41     void stopActiveMonitor();
42     AbstractRender *activeRenderer();
43     /** Searches for a monitor with the given name.
44         @return NULL, if no monitor could be found, or the monitor otherwise.
45     */
46     AbstractMonitor *monitor(Kdenlive::MONITORID monitorName);
47     void updateScopeSource();
48     void clearScopeSource();
49     /** @brief Returns current project's folder. */
50     QString getProjectFolder() const;
51     /** @brief Sets current document for later reference. */
52     void setDocument(KdenliveDoc *doc);
53
54 public slots:
55
56     /** @brief Activates a monitor.
57      * @param name name of the monitor to activate */
58     bool activateMonitor(Kdenlive::MONITORID, bool forceRefresh = false);
59     bool isActive(Kdenlive::MONITORID id) const;
60     void slotPlay();
61     void slotPause();
62     void slotPlayZone();
63     void slotLoopZone();
64     void slotRewind(double speed = 0);
65     void slotForward(double speed = 0);
66     void slotRewindOneFrame();
67     void slotForwardOneFrame();
68     void slotRewindOneSecond();
69     void slotForwardOneSecond();
70     void slotStart();
71     void slotEnd();
72     void slotResetProfiles();
73     
74     /** @brief Switch current monitor to fullscreen. */
75     void slotSwitchFullscreen();
76
77     /** @brief Switches between project and clip monitor.
78      * @ref activateMonitor
79      * @param activateClip whether to activate the clip monitor */
80     void slotSwitchMonitors(bool activateClip);
81     void slotUpdateAudioMonitoring();
82
83 private slots:
84     void slotRefreshCurrentMonitor(const QString &id);
85
86 private:
87     KdenliveDoc *m_document;
88     Monitor *m_clipMonitor;
89     Monitor *m_projectMonitor;
90     Timecode m_timecode;
91     AbstractMonitor *m_activeMonitor;
92     QList <AbstractMonitor *>m_monitorsList;
93
94 signals:
95     /** @brief When the monitor changed, update the visible color scopes */
96     void checkColorScopes();
97     /** @brief When the active monitor renderer was deleted, reset color scopes */
98     void clearScopes();
99
100 };
101
102 #endif