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);
62 static EffectsList videoEffects;
63 static EffectsList audioEffects;
64 static EffectsList customEffects;
65 static EffectsList transitions;
67 virtual bool queryClose();
68 virtual void customEvent(QEvent * e);
71 KTabWidget* m_timelineArea;
72 QProgressBar *statusProgressBar;
75 KdenliveDoc *m_activeDocument;
76 TrackView *m_activeTimeline;
77 MonitorManager *m_monitorManager;
79 QDockWidget *projectListDock;
80 ProjectList *m_projectList;
82 QDockWidget *effectListDock;
83 EffectsListView *m_effectList;
84 //KListWidget *m_effectList;
86 QDockWidget *effectStackDock;
87 EffectStackView *effectStack;
89 QDockWidget *transitionConfigDock;
90 TransitionSettings *transitionConfig;
92 QDockWidget *clipMonitorDock;
93 Monitor *m_clipMonitor;
95 QDockWidget *projectMonitorDock;
96 Monitor *m_projectMonitor;
98 QDockWidget *recMonitorDock;
99 RecMonitor *m_recMonitor;
101 QDockWidget *undoViewDock;
102 QUndoView *m_undoView;
103 QUndoGroup *m_commandStack;
105 KComboBox *m_timecodeFormat;
107 QDockWidget *overviewDock;
108 CustomTrackView *m_overView;
110 QMenu *m_timelineContextMenu;
111 QMenu *m_timelineContextClipMenu;
112 QMenu *m_timelineContextTransitionMenu;
114 RenderWidget *m_renderWidget;
115 Ui::TimelineButtons_UI timeline_buttons_ui;
117 JogShuttle *m_jogProcess;
119 KRecentFilesAction *m_fileOpenRecent;
122 void activateShuttleDevice();
123 void slotShuttleAction(int code);
126 void openFile(const KUrl &url);
133 void activateDocument();
134 void connectDocument(TrackView*, KdenliveDoc*);
138 void saveFileAs(const QString &outputFileName);
139 void slotPreferences();
140 void updateConfiguration();
141 void slotConnectMonitors();
142 void slotRaiseMonitor(bool clipMonitor);
143 void slotSetClipDuration(int id, int duration);
144 void slotUpdateMousePosition(int pos);
145 void slotAddEffect(QDomElement effect, GenTime pos = GenTime(), int track = -1);
146 void slotEditProfiles();
147 void slotEditProjectSettings();
148 void slotDisplayActionMessage(QAction *a);
149 void slotGotProgressInfo(KUrl url, int progress);
150 void slotSwitchVideoThumbs();
151 void slotSwitchAudioThumbs();
152 void slotRenderProject();
153 void slotDoRender(const QString &dest, const QString &render, const QStringList &avformat_args, bool zoneOnly, bool playAfter);
154 void slotFullScreen();
155 void slotUpdateDocumentState(bool modified);
159 void slotRemoveTab();
160 void slotDeleteTimelineClip();
161 void slotAddVideoEffect(QAction *result);
162 void slotAddAudioEffect(QAction *result);
163 void slotAddCustomEffect(QAction *result);
164 void slotAddProjectClip(KUrl url);
165 void slotShuttleButton(int code);
166 void slotShowClipProperties(DocClipBase *clip);
167 void slotActivateEffectStackView();
168 void slotActivateTransitionView();