]> git.sesse.net Git - kdenlive/blob - src/mainwindow.h
d8cf446c41d059d042ace86f13d06f0c26b63d61
[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
29 #include <KXmlGuiWindow>
30 #include <KTextEdit>
31 #include <KListWidget>
32 #include <KTabWidget>
33 #include <KUndoStack>
34 #include <KRecentFilesAction>
35 #include <KComboBox>
36
37 #include "projectlist.h"
38 #include "monitor.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"
50
51 class MainWindow : public KXmlGuiWindow {
52     Q_OBJECT
53
54 public:
55     MainWindow(QWidget *parent = 0);
56
57     void parseProfiles();
58
59 protected:
60     virtual bool queryClose();
61
62 private:
63     KTabWidget* m_timelineArea;
64     QProgressBar *statusProgressBar;
65     QLabel* statusLabel;
66     void setupActions();
67     KdenliveDoc *m_activeDocument;
68     TrackView *m_activeTimeline;
69     MonitorManager *m_monitorManager;
70
71     QDockWidget *projectListDock;
72     ProjectList *m_projectList;
73
74     QDockWidget *effectListDock;
75     EffectsListView *m_effectList;
76     //KListWidget *m_effectList;
77
78     QDockWidget *effectStackDock;
79     EffectStackView *effectStack;
80
81     QDockWidget *transitionConfigDock;
82     TransitionSettings *transitionConfig;
83
84     QDockWidget *clipMonitorDock;
85     Monitor *m_clipMonitor;
86
87     QDockWidget *projectMonitorDock;
88     Monitor *m_projectMonitor;
89
90     QDockWidget *recMonitorDock;
91     RecMonitor *m_recMonitor;
92
93     QDockWidget *undoViewDock;
94     QUndoView *m_undoView;
95     QUndoGroup *m_commandStack;
96
97     KComboBox *m_timecodeFormat;
98
99     QDockWidget *overviewDock;
100     CustomTrackView *m_overView;
101
102     EffectsList m_videoEffects;
103     EffectsList m_audioEffects;
104     EffectsList m_customEffects;
105
106     QMenu *m_timelineContextMenu;
107     QMenu *m_timelineContextClipMenu;
108     QMenu *m_timelineContextTransitionMenu;
109
110     RenderWidget *m_renderWidget;
111     Ui::TimelineButtons_UI timeline_buttons_ui;
112
113     KRecentFilesAction *m_fileOpenRecent;
114     void readOptions();
115     void saveOptions();
116
117 public slots:
118     void openFile(const KUrl &url);
119
120 private slots:
121     void newFile();
122     void undo();
123     void redo();
124     void activateDocument();
125     void connectDocument(TrackView*, KdenliveDoc*);
126     void openFile();
127     void saveFile();
128     void saveFileAs();
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);
147     void slotZoomIn();
148     void slotZoomOut();
149     void slotFitZoom();
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);
156 };
157
158 #endif