1 /***************************************************************************
2 * Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
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. *
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. *
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 ***************************************************************************/
24 #include <QDockWidget>
27 #include <QProgressBar>
30 #include <KXmlGuiWindow>
32 #include <KListWidget>
35 #include <KRecentFilesAction>
38 #include "ui_timelinebuttons_ui.h"
39 #include "effectslist.h"
45 class EffectsListView;
46 class EffectStackView;
47 class TransitionSettings;
50 class CustomTrackView;
55 class MainWindow : public KXmlGuiWindow {
59 MainWindow(QWidget *parent = 0);
63 virtual bool queryClose();
64 virtual void customEvent(QEvent * e);
67 KTabWidget* m_timelineArea;
68 QProgressBar *statusProgressBar;
71 KdenliveDoc *m_activeDocument;
72 TrackView *m_activeTimeline;
73 MonitorManager *m_monitorManager;
75 QDockWidget *projectListDock;
76 ProjectList *m_projectList;
78 QDockWidget *effectListDock;
79 EffectsListView *m_effectList;
80 //KListWidget *m_effectList;
82 QDockWidget *effectStackDock;
83 EffectStackView *effectStack;
85 QDockWidget *transitionConfigDock;
86 TransitionSettings *transitionConfig;
88 QDockWidget *clipMonitorDock;
89 Monitor *m_clipMonitor;
91 QDockWidget *projectMonitorDock;
92 Monitor *m_projectMonitor;
94 QDockWidget *recMonitorDock;
95 RecMonitor *m_recMonitor;
97 QDockWidget *undoViewDock;
98 QUndoView *m_undoView;
99 QUndoGroup *m_commandStack;
101 KComboBox *m_timecodeFormat;
103 QDockWidget *overviewDock;
104 CustomTrackView *m_overView;
106 EffectsList m_videoEffects;
107 EffectsList m_audioEffects;
108 EffectsList m_customEffects;
109 EffectsList m_transitions;
111 QMenu *m_timelineContextMenu;
112 QMenu *m_timelineContextClipMenu;
113 QMenu *m_timelineContextTransitionMenu;
115 RenderWidget *m_renderWidget;
116 Ui::TimelineButtons_UI timeline_buttons_ui;
118 JogShuttle *m_jogProcess;
120 KRecentFilesAction *m_fileOpenRecent;
123 void activateShuttleDevice();
124 void slotShuttleAction(int code);
127 void openFile(const KUrl &url);
134 void activateDocument();
135 void connectDocument(TrackView*, KdenliveDoc*);
139 void saveFileAs(const QString &outputFileName);
140 void slotPreferences();
141 void updateConfiguration();
142 void slotConnectMonitors();
143 void slotRaiseMonitor(bool clipMonitor);
144 void slotSetClipDuration(int id, int duration);
145 void slotUpdateMousePosition(int pos);
146 void slotAddEffect(QDomElement effect, GenTime pos = GenTime(), int track = -1);
147 void slotEditProfiles();
148 void slotEditProjectSettings();
149 void slotDisplayActionMessage(QAction *a);
150 void slotGotProgressInfo(KUrl url, int progress);
151 void slotSwitchVideoThumbs();
152 void slotSwitchAudioThumbs();
153 void slotRenderProject();
154 void slotDoRender(const QString &dest, const QString &render, const QStringList &avformat_args, bool zoneOnly, bool playAfter);
155 void slotFullScreen();
156 void slotUpdateDocumentState(bool modified);
160 void slotRemoveTab();
161 void slotDeleteTimelineClip();
162 void slotAddVideoEffect(QAction *result);
163 void slotAddAudioEffect(QAction *result);
164 void slotAddCustomEffect(QAction *result);
165 void slotAddProjectClip(KUrl url);
166 void slotShuttleButton(int code);
167 void slotShowClipProperties(DocClipBase *clip);