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