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>
29 #include <KXmlGuiWindow>
31 #include <KListWidget>
34 #include <KRecentFilesAction>
37 #include "projectlist.h"
39 #include "monitormanager.h"
40 #include "kdenlivedoc.h"
41 #include "trackview.h"
42 #include "customtrackview.h"
43 #include "effectslist.h"
44 #include "effectslistview.h"
45 #include "effectstackview.h"
46 #include "ui_timelinebuttons_ui.h"
47 #include "renderwidget.h"
49 class MainWindow : public KXmlGuiWindow {
53 MainWindow(QWidget *parent = 0);
58 virtual bool queryClose();
61 KTabWidget* m_timelineArea;
62 QProgressBar *statusProgressBar;
66 KdenliveDoc *m_activeDocument;
67 TrackView *m_activeTimeline;
68 MonitorManager *m_monitorManager;
70 QDockWidget *projectListDock;
71 ProjectList *m_projectList;
73 QDockWidget *effectListDock;
74 EffectsListView *m_effectList;
75 //KListWidget *m_effectList;
77 QDockWidget *effectStackDock;
78 EffectStackView *effectStack;
80 QDockWidget *transitionConfigDock;
81 KListWidget *transitionConfig;
83 QDockWidget *clipMonitorDock;
84 Monitor *m_clipMonitor;
86 QDockWidget *projectMonitorDock;
87 Monitor *m_projectMonitor;
89 QDockWidget *undoViewDock;
90 QUndoView *m_undoView;
91 QUndoGroup *m_commandStack;
93 KComboBox *m_timecodeFormat;
95 QDockWidget *overviewDock;
96 CustomTrackView *m_overView;
98 EffectsList m_videoEffects;
99 EffectsList m_audioEffects;
100 EffectsList m_customEffects;
102 RenderWidget *m_renderWidget;
103 Ui::TimelineButtons_UI timeline_buttons_ui;
105 KRecentFilesAction *m_fileOpenRecent;
110 void openFile(const KUrl &url);
116 void activateDocument();
117 void closeDocument(QWidget *w);
118 void connectDocument(TrackView*, KdenliveDoc*);
122 void saveFileAs(const QString &outputFileName);
123 void slotPreferences();
124 void updateConfiguration();
125 void slotConnectMonitors();
126 void slotRaiseMonitor(bool clipMonitor);
127 void slotSetClipDuration(int id, int duration);
128 void slotUpdateMousePosition(int pos);
129 void slotAddEffect(QDomElement effect, GenTime pos = GenTime(), int track = -1);
130 void slotEditProfiles();
131 void slotEditProjectSettings();
132 void slotDisplayActionMessage(QAction *a);
133 void slotGotProgressInfo(KUrl url, int progress);
134 void slotSwitchVideoThumbs();
135 void slotSwitchAudioThumbs();
136 void slotRenderProject();
137 void slotDoRender(const QString &dest, const QStringList &avformat_args, bool zoneOnly, bool playAfter);