]> git.sesse.net Git - kdenlive/blob - src/mainwindow.h
e2627d6e11913e5815ac8143a60b173cf29ae65a
[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 "ui_timelinebuttons_ui.h"
39 #include "effectslist.h"
40 #include "gentime.h"
41 class KdenliveDoc;
42 class TrackView;
43 class MonitorManager;
44 class ProjectList;
45 class EffectsListView;
46 class EffectStackView;
47 class TransitionSettings;
48 class Monitor;
49 class RecMonitor;
50 class CustomTrackView;
51 class RenderWidget;
52 class JogShuttle;
53
54 class MainWindow : public KXmlGuiWindow {
55     Q_OBJECT
56
57 public:
58     MainWindow(QWidget *parent = 0);
59
60     void parseProfiles();
61
62 protected:
63     virtual bool queryClose();
64     virtual void customEvent(QEvent * e);
65
66 private:
67     KTabWidget* m_timelineArea;
68     QProgressBar *statusProgressBar;
69     QLabel* statusLabel;
70     void setupActions();
71     KdenliveDoc *m_activeDocument;
72     TrackView *m_activeTimeline;
73     MonitorManager *m_monitorManager;
74
75     QDockWidget *projectListDock;
76     ProjectList *m_projectList;
77
78     QDockWidget *effectListDock;
79     EffectsListView *m_effectList;
80     //KListWidget *m_effectList;
81
82     QDockWidget *effectStackDock;
83     EffectStackView *effectStack;
84
85     QDockWidget *transitionConfigDock;
86     TransitionSettings *transitionConfig;
87
88     QDockWidget *clipMonitorDock;
89     Monitor *m_clipMonitor;
90
91     QDockWidget *projectMonitorDock;
92     Monitor *m_projectMonitor;
93
94     QDockWidget *recMonitorDock;
95     RecMonitor *m_recMonitor;
96
97     QDockWidget *undoViewDock;
98     QUndoView *m_undoView;
99     QUndoGroup *m_commandStack;
100
101     KComboBox *m_timecodeFormat;
102
103     QDockWidget *overviewDock;
104     CustomTrackView *m_overView;
105
106     EffectsList m_videoEffects;
107     EffectsList m_audioEffects;
108     EffectsList m_customEffects;
109     EffectsList m_transitions;
110
111     QMenu *m_timelineContextMenu;
112     QMenu *m_timelineContextClipMenu;
113     QMenu *m_timelineContextTransitionMenu;
114
115     RenderWidget *m_renderWidget;
116     Ui::TimelineButtons_UI timeline_buttons_ui;
117
118     JogShuttle *m_jogProcess;
119
120     KRecentFilesAction *m_fileOpenRecent;
121     void readOptions();
122     void saveOptions();
123     void activateShuttleDevice();
124     void slotShuttleAction(int code);
125
126 public slots:
127     void openFile(const KUrl &url);
128
129 private slots:
130     void newFile();
131     void undo();
132     void redo();
133     void activateDocument();
134     void connectDocument(TrackView*, KdenliveDoc*);
135     void openFile();
136     void saveFile();
137     void saveFileAs();
138     void saveFileAs(const QString &outputFileName);
139     void slotPreferences();
140     void updateConfiguration();
141     void slotConnectMonitors();
142     void slotRaiseMonitor(bool clipMonitor);
143     void slotSetClipDuration(int id, int duration);
144     void slotUpdateMousePosition(int pos);
145     void slotAddEffect(QDomElement effect, GenTime pos = GenTime(), int track = -1);
146     void slotEditProfiles();
147     void slotEditProjectSettings();
148     void slotDisplayActionMessage(QAction *a);
149     void slotGotProgressInfo(KUrl url, int progress);
150     void slotSwitchVideoThumbs();
151     void slotSwitchAudioThumbs();
152     void slotRenderProject();
153     void slotDoRender(const QString &dest, const QString &render, const QStringList &avformat_args, bool zoneOnly, bool playAfter);
154     void slotFullScreen();
155     void slotUpdateDocumentState(bool modified);
156     void slotZoomIn();
157     void slotZoomOut();
158     void slotFitZoom();
159     void slotRemoveTab();
160     void slotDeleteTimelineClip();
161     void slotAddVideoEffect(QAction *result);
162     void slotAddAudioEffect(QAction *result);
163     void slotAddCustomEffect(QAction *result);
164     void slotAddProjectClip(KUrl url);
165     void slotShuttleButton(int code);
166 };
167
168 #endif