]> git.sesse.net Git - kdenlive/blob - src/mainwindow.h
made effectLists static
[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     static EffectsList videoEffects;
63     static EffectsList audioEffects;
64     static EffectsList customEffects;
65     static EffectsList transitions;
66 protected:
67     virtual bool queryClose();
68     virtual void customEvent(QEvent * e);
69
70 private:
71     KTabWidget* m_timelineArea;
72     QProgressBar *statusProgressBar;
73     QLabel* statusLabel;
74     void setupActions();
75     KdenliveDoc *m_activeDocument;
76     TrackView *m_activeTimeline;
77     MonitorManager *m_monitorManager;
78
79     QDockWidget *projectListDock;
80     ProjectList *m_projectList;
81
82     QDockWidget *effectListDock;
83     EffectsListView *m_effectList;
84     //KListWidget *m_effectList;
85
86     QDockWidget *effectStackDock;
87     EffectStackView *effectStack;
88
89     QDockWidget *transitionConfigDock;
90     TransitionSettings *transitionConfig;
91
92     QDockWidget *clipMonitorDock;
93     Monitor *m_clipMonitor;
94
95     QDockWidget *projectMonitorDock;
96     Monitor *m_projectMonitor;
97
98     QDockWidget *recMonitorDock;
99     RecMonitor *m_recMonitor;
100
101     QDockWidget *undoViewDock;
102     QUndoView *m_undoView;
103     QUndoGroup *m_commandStack;
104
105     KComboBox *m_timecodeFormat;
106
107     QDockWidget *overviewDock;
108     CustomTrackView *m_overView;
109
110     QMenu *m_timelineContextMenu;
111     QMenu *m_timelineContextClipMenu;
112     QMenu *m_timelineContextTransitionMenu;
113
114     RenderWidget *m_renderWidget;
115     Ui::TimelineButtons_UI timeline_buttons_ui;
116
117     JogShuttle *m_jogProcess;
118
119     KRecentFilesAction *m_fileOpenRecent;
120     void readOptions();
121     void saveOptions();
122     void activateShuttleDevice();
123     void slotShuttleAction(int code);
124
125 public slots:
126     void openFile(const KUrl &url);
127
128 private slots:
129     void newFile();
130     void undo();
131     void redo();
132     void queryQuit();
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     void slotShowClipProperties(DocClipBase *clip);
167 };
168
169 #endif