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 "recmonitor.h"
40 #include "monitormanager.h"
41 #include "kdenlivedoc.h"
42 #include "trackview.h"
43 #include "customtrackview.h"
44 #include "effectslist.h"
45 #include "effectslistview.h"
46 #include "effectstackview.h"
47 #include "transitionsettings.h"
48 #include "ui_timelinebuttons_ui.h"
49 #include "renderwidget.h"
51 class MainWindow : public KXmlGuiWindow {
55 MainWindow(QWidget *parent = 0);
60 virtual bool queryClose();
63 KTabWidget* m_timelineArea;
64 QProgressBar *statusProgressBar;
67 KdenliveDoc *m_activeDocument;
68 TrackView *m_activeTimeline;
69 MonitorManager *m_monitorManager;
71 QDockWidget *projectListDock;
72 ProjectList *m_projectList;
74 QDockWidget *effectListDock;
75 EffectsListView *m_effectList;
76 //KListWidget *m_effectList;
78 QDockWidget *effectStackDock;
79 EffectStackView *effectStack;
81 QDockWidget *transitionConfigDock;
82 TransitionSettings *transitionConfig;
84 QDockWidget *clipMonitorDock;
85 Monitor *m_clipMonitor;
87 QDockWidget *projectMonitorDock;
88 Monitor *m_projectMonitor;
90 QDockWidget *recMonitorDock;
91 RecMonitor *m_recMonitor;
93 QDockWidget *undoViewDock;
94 QUndoView *m_undoView;
95 QUndoGroup *m_commandStack;
97 KComboBox *m_timecodeFormat;
99 QDockWidget *overviewDock;
100 CustomTrackView *m_overView;
102 EffectsList m_videoEffects;
103 EffectsList m_audioEffects;
104 EffectsList m_customEffects;
106 QMenu *m_timelineContextMenu;
107 QMenu *m_timelineContextClipMenu;
108 QMenu *m_timelineContextTransitionMenu;
110 RenderWidget *m_renderWidget;
111 Ui::TimelineButtons_UI timeline_buttons_ui;
113 KRecentFilesAction *m_fileOpenRecent;
118 void openFile(const KUrl &url);
124 void activateDocument();
125 void connectDocument(TrackView*, KdenliveDoc*);
129 void saveFileAs(const QString &outputFileName);
130 void slotPreferences();
131 void updateConfiguration();
132 void slotConnectMonitors();
133 void slotRaiseMonitor(bool clipMonitor);
134 void slotSetClipDuration(int id, int duration);
135 void slotUpdateMousePosition(int pos);
136 void slotAddEffect(QDomElement effect, GenTime pos = GenTime(), int track = -1);
137 void slotEditProfiles();
138 void slotEditProjectSettings();
139 void slotDisplayActionMessage(QAction *a);
140 void slotGotProgressInfo(KUrl url, int progress);
141 void slotSwitchVideoThumbs();
142 void slotSwitchAudioThumbs();
143 void slotRenderProject();
144 void slotDoRender(const QString &dest, const QString &render, const QStringList &avformat_args, bool zoneOnly, bool playAfter);
145 void slotFullScreen();
146 void slotUpdateDocumentState(bool modified);
150 void slotRemoveTab();
151 void slotDeleteTimelineClip();
152 void slotAddVideoEffect(QAction *result);
153 void slotAddAudioEffect(QAction *result);
154 void slotAddCustomEffect(QAction *result);
155 void slotAddProjectClip(KUrl url);