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 "effectslist.h"
40 #include "definitions.h"
46 class EffectsListView;
47 class EffectStackView;
48 class TransitionSettings;
51 class CustomTrackView;
56 class MainWindow : public KXmlGuiWindow {
60 MainWindow(QWidget *parent = 0);
63 static EffectsList videoEffects;
64 static EffectsList audioEffects;
65 static EffectsList customEffects;
66 static EffectsList transitions;
68 virtual bool queryClose();
69 virtual void customEvent(QEvent * e);
72 KTabWidget* m_timelineArea;
73 QProgressBar *statusProgressBar;
76 KdenliveDoc *m_activeDocument;
77 TrackView *m_activeTimeline;
78 MonitorManager *m_monitorManager;
80 QDockWidget *projectListDock;
81 ProjectList *m_projectList;
83 QDockWidget *effectListDock;
84 EffectsListView *m_effectList;
85 //KListWidget *m_effectList;
87 QDockWidget *effectStackDock;
88 EffectStackView *effectStack;
90 QDockWidget *transitionConfigDock;
91 TransitionSettings *transitionConfig;
93 QDockWidget *clipMonitorDock;
94 Monitor *m_clipMonitor;
96 QDockWidget *projectMonitorDock;
97 Monitor *m_projectMonitor;
99 QDockWidget *recMonitorDock;
100 RecMonitor *m_recMonitor;
102 QDockWidget *undoViewDock;
103 QUndoView *m_undoView;
104 QUndoGroup *m_commandStack;
106 KComboBox *m_timecodeFormat;
108 QDockWidget *overviewDock;
109 CustomTrackView *m_overView;
111 QMenu *m_timelineContextMenu;
112 QMenu *m_timelineContextClipMenu;
113 QMenu *m_timelineContextTransitionMenu;
115 RenderWidget *m_renderWidget;
117 JogShuttle *m_jogProcess;
119 KRecentFilesAction *m_fileOpenRecent;
121 QAction *m_buttonAudioThumbs;
122 QAction *m_buttonVideoThumbs;
123 QAction *m_buttonShowMarkers;
124 QAction *m_buttonFitZoom;
125 QAction *m_buttonSelectTool;
126 QAction *m_buttonRazorTool;
127 QActionGroup *m_toolGroup;
128 QSlider *m_zoomSlider;
132 void activateShuttleDevice();
133 void slotShuttleAction(int code);
134 void connectDocumentInfo(KdenliveDoc *doc);
137 void openFile(const KUrl &url);
138 void slotGotProgressInfo(const QString &message, int progress);
145 void activateDocument();
146 void connectDocument(TrackView*, KdenliveDoc*);
150 void saveFileAs(const QString &outputFileName);
151 void slotPreferences();
152 void updateConfiguration();
153 void slotConnectMonitors();
154 void slotRaiseMonitor(bool clipMonitor);
155 void slotSetClipDuration(int id, int duration);
156 void slotUpdateMousePosition(int pos);
157 void slotAddEffect(QDomElement effect, GenTime pos = GenTime(), int track = -1);
158 void slotEditProfiles();
159 void slotEditProjectSettings();
160 void slotDisplayActionMessage(QAction *a);
161 void slotSwitchVideoThumbs();
162 void slotSwitchAudioThumbs();
163 void slotSwitchMarkersComments();
164 void slotRenderProject();
165 void slotDoRender(const QString &dest, const QString &render, const QStringList &avformat_args, bool zoneOnly, bool playAfter);
166 void slotFullScreen();
167 void slotUpdateDocumentState(bool modified);
171 void slotRemoveTab();
172 void slotDeleteTimelineClip();
173 void slotAddClipMarker();
174 void slotCutTimelineClip();
175 void slotAddVideoEffect(QAction *result);
176 void slotAddAudioEffect(QAction *result);
177 void slotAddCustomEffect(QAction *result);
178 void slotAddProjectClip(KUrl url);
179 void slotShuttleButton(int code);
180 void slotShowClipProperties(DocClipBase *clip);
181 void slotActivateEffectStackView();
182 void slotActivateTransitionView();
183 void slotChangeTool(QAction * action);
184 void slotSetTool(PROJECTTOOL tool);
185 void slotSnapForward();
186 void slotSnapRewind();