]> git.sesse.net Git - kdenlive/blob - src/mainwindow.h
Clip properties dialog
[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 class DocClipBase;
54
55 class MainWindow : public KXmlGuiWindow {
56     Q_OBJECT
57
58 public:
59     MainWindow(QWidget *parent = 0);
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 queryQuit();
134     void activateDocument();
135     void connectDocument(TrackView*, KdenliveDoc*);
136     void openFile();
137     void saveFile();
138     void saveFileAs();
139     void saveFileAs(const QString &outputFileName);
140     void slotPreferences();
141     void updateConfiguration();
142     void slotConnectMonitors();
143     void slotRaiseMonitor(bool clipMonitor);
144     void slotSetClipDuration(int id, int duration);
145     void slotUpdateMousePosition(int pos);
146     void slotAddEffect(QDomElement effect, GenTime pos = GenTime(), int track = -1);
147     void slotEditProfiles();
148     void slotEditProjectSettings();
149     void slotDisplayActionMessage(QAction *a);
150     void slotGotProgressInfo(KUrl url, int progress);
151     void slotSwitchVideoThumbs();
152     void slotSwitchAudioThumbs();
153     void slotRenderProject();
154     void slotDoRender(const QString &dest, const QString &render, const QStringList &avformat_args, bool zoneOnly, bool playAfter);
155     void slotFullScreen();
156     void slotUpdateDocumentState(bool modified);
157     void slotZoomIn();
158     void slotZoomOut();
159     void slotFitZoom();
160     void slotRemoveTab();
161     void slotDeleteTimelineClip();
162     void slotAddVideoEffect(QAction *result);
163     void slotAddAudioEffect(QAction *result);
164     void slotAddCustomEffect(QAction *result);
165     void slotAddProjectClip(KUrl url);
166     void slotShuttleButton(int code);
167     void slotShowClipProperties(DocClipBase *clip);
168 };
169
170 #endif