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 "projectlist.h"
40 #include "recmonitor.h"
41 #include "monitormanager.h"
42 #include "kdenlivedoc.h"
43 #include "trackview.h"
44 #include "customtrackview.h"
45 #include "effectslist.h"
46 #include "effectslistview.h"
47 #include "effectstackview.h"
48 #include "transitionsettings.h"
49 #include "ui_timelinebuttons_ui.h"
50 #include "renderwidget.h"
51 #include "jogshuttle.h"
53 class MainWindow : public KXmlGuiWindow {
57 MainWindow(QWidget *parent = 0);
62 virtual bool queryClose();
63 virtual void customEvent(QEvent * e);
66 KTabWidget* m_timelineArea;
67 QProgressBar *statusProgressBar;
70 KdenliveDoc *m_activeDocument;
71 TrackView *m_activeTimeline;
72 MonitorManager *m_monitorManager;
74 QDockWidget *projectListDock;
75 ProjectList *m_projectList;
77 QDockWidget *effectListDock;
78 EffectsListView *m_effectList;
79 //KListWidget *m_effectList;
81 QDockWidget *effectStackDock;
82 EffectStackView *effectStack;
84 QDockWidget *transitionConfigDock;
85 TransitionSettings *transitionConfig;
87 QDockWidget *clipMonitorDock;
88 Monitor *m_clipMonitor;
90 QDockWidget *projectMonitorDock;
91 Monitor *m_projectMonitor;
93 QDockWidget *recMonitorDock;
94 RecMonitor *m_recMonitor;
96 QDockWidget *undoViewDock;
97 QUndoView *m_undoView;
98 QUndoGroup *m_commandStack;
100 KComboBox *m_timecodeFormat;
102 QDockWidget *overviewDock;
103 CustomTrackView *m_overView;
105 EffectsList m_videoEffects;
106 EffectsList m_audioEffects;
107 EffectsList m_customEffects;
108 EffectsList m_transitions;
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);
132 void activateDocument();
133 void connectDocument(TrackView*, KdenliveDoc*);
137 void saveFileAs(const QString &outputFileName);
138 void slotPreferences();
139 void updateConfiguration();
140 void slotConnectMonitors();
141 void slotRaiseMonitor(bool clipMonitor);
142 void slotSetClipDuration(int id, int duration);
143 void slotUpdateMousePosition(int pos);
144 void slotAddEffect(QDomElement effect, GenTime pos = GenTime(), int track = -1);
145 void slotEditProfiles();
146 void slotEditProjectSettings();
147 void slotDisplayActionMessage(QAction *a);
148 void slotGotProgressInfo(KUrl url, int progress);
149 void slotSwitchVideoThumbs();
150 void slotSwitchAudioThumbs();
151 void slotRenderProject();
152 void slotDoRender(const QString &dest, const QString &render, const QStringList &avformat_args, bool zoneOnly, bool playAfter);
153 void slotFullScreen();
154 void slotUpdateDocumentState(bool modified);
158 void slotRemoveTab();
159 void slotDeleteTimelineClip();
160 void slotAddVideoEffect(QAction *result);
161 void slotAddAudioEffect(QAction *result);
162 void slotAddCustomEffect(QAction *result);
163 void slotAddProjectClip(KUrl url);
164 void slotShuttleButton(int code);