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