]> git.sesse.net Git - kdenlive/blob - src/mainwindow.h
a5faed00141c928d0ae686a9c20cf68f4c9d59de
[kdenlive] / src / mainwindow.h
1 /***************************************************************************
2  *   Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
3  *                                                                         *
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.                                   *
8  *                                                                         *
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.                          *
13  *                                                                         *
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  ***************************************************************************/
19
20
21 #ifndef MAINWINDOW_H
22 #define MAINWINDOW_H
23
24 #include <QDockWidget>
25 #include <QUndoView>
26 #include <QLabel>
27 #include <QProgressBar>
28 #include <QEvent>
29
30 #include <KXmlGuiWindow>
31 #include <KTextEdit>
32 #include <KListWidget>
33 #include <KTabWidget>
34 #include <KUndoStack>
35 #include <KRecentFilesAction>
36 #include <KComboBox>
37
38 #include "effectslist.h"
39 #include "gentime.h"
40 #include "definitions.h"
41
42 class KdenliveDoc;
43 class TrackView;
44 class MonitorManager;
45 class ProjectList;
46 class EffectsListView;
47 class EffectStackView;
48 class TransitionSettings;
49 class Monitor;
50 class RecMonitor;
51 class CustomTrackView;
52 class RenderWidget;
53 class JogShuttle;
54 class DocClipBase;
55
56 class MainWindow : public KXmlGuiWindow {
57     Q_OBJECT
58
59 public:
60     MainWindow(QWidget *parent = 0);
61     void parseProfiles();
62
63     static EffectsList videoEffects;
64     static EffectsList audioEffects;
65     static EffectsList customEffects;
66     static EffectsList transitions;
67 protected:
68     virtual bool queryClose();
69     virtual void customEvent(QEvent * e);
70
71 private:
72     KTabWidget* m_timelineArea;
73     QProgressBar *statusProgressBar;
74     QLabel* statusLabel;
75     void setupActions();
76     KdenliveDoc *m_activeDocument;
77     TrackView *m_activeTimeline;
78     MonitorManager *m_monitorManager;
79
80     QDockWidget *projectListDock;
81     ProjectList *m_projectList;
82
83     QDockWidget *effectListDock;
84     EffectsListView *m_effectList;
85     //KListWidget *m_effectList;
86
87     QDockWidget *effectStackDock;
88     EffectStackView *effectStack;
89
90     QDockWidget *transitionConfigDock;
91     TransitionSettings *transitionConfig;
92
93     QDockWidget *clipMonitorDock;
94     Monitor *m_clipMonitor;
95
96     QDockWidget *projectMonitorDock;
97     Monitor *m_projectMonitor;
98
99     QDockWidget *recMonitorDock;
100     RecMonitor *m_recMonitor;
101
102     QDockWidget *undoViewDock;
103     QUndoView *m_undoView;
104     QUndoGroup *m_commandStack;
105
106     KComboBox *m_timecodeFormat;
107
108     QDockWidget *overviewDock;
109     CustomTrackView *m_overView;
110
111     QMenu *m_timelineContextMenu;
112     QMenu *m_timelineContextClipMenu;
113     QMenu *m_timelineContextTransitionMenu;
114
115     RenderWidget *m_renderWidget;
116
117     JogShuttle *m_jogProcess;
118
119     KRecentFilesAction *m_fileOpenRecent;
120
121     QAction *m_buttonAudioThumbs;
122     QAction *m_buttonVideoThumbs;
123     QAction *m_buttonFitZoom;
124     QAction *m_buttonSelectTool;
125     QAction *m_buttonRazorTool;
126     QActionGroup *m_toolGroup;
127     QSlider *m_zoomSlider;
128
129     void readOptions();
130     void saveOptions();
131     void activateShuttleDevice();
132     void slotShuttleAction(int code);
133
134 public slots:
135     void openFile(const KUrl &url);
136
137 private slots:
138     void newFile();
139     void undo();
140     void redo();
141     void queryQuit();
142     void activateDocument();
143     void connectDocument(TrackView*, KdenliveDoc*);
144     void openFile();
145     void saveFile();
146     void saveFileAs();
147     void saveFileAs(const QString &outputFileName);
148     void slotPreferences();
149     void updateConfiguration();
150     void slotConnectMonitors();
151     void slotRaiseMonitor(bool clipMonitor);
152     void slotSetClipDuration(int id, int duration);
153     void slotUpdateMousePosition(int pos);
154     void slotAddEffect(QDomElement effect, GenTime pos = GenTime(), int track = -1);
155     void slotEditProfiles();
156     void slotEditProjectSettings();
157     void slotDisplayActionMessage(QAction *a);
158     void slotGotProgressInfo(KUrl url, int progress);
159     void slotSwitchVideoThumbs();
160     void slotSwitchAudioThumbs();
161     void slotRenderProject();
162     void slotDoRender(const QString &dest, const QString &render, const QStringList &avformat_args, bool zoneOnly, bool playAfter);
163     void slotFullScreen();
164     void slotUpdateDocumentState(bool modified);
165     void slotZoomIn();
166     void slotZoomOut();
167     void slotFitZoom();
168     void slotRemoveTab();
169     void slotDeleteTimelineClip();
170     void slotCutTimelineClip();
171     void slotAddVideoEffect(QAction *result);
172     void slotAddAudioEffect(QAction *result);
173     void slotAddCustomEffect(QAction *result);
174     void slotAddProjectClip(KUrl url);
175     void slotShuttleButton(int code);
176     void slotShowClipProperties(DocClipBase *clip);
177     void slotActivateEffectStackView();
178     void slotActivateTransitionView();
179     void slotChangeTool(QAction * action);
180     void slotSetTool(PROJECTTOOL tool);
181 };
182
183 #endif