]> git.sesse.net Git - kdenlive/blob - src/mainwindow.h
activate monitor when clicking in timeline + small renderer update
[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     QString fileName;
66     KdenliveDoc *m_activeDocument;
67     TrackView *m_activeTimeline;
68     MonitorManager *m_monitorManager;
69
70     QDockWidget *projectListDock;
71     ProjectList *m_projectList;
72
73     QDockWidget *effectListDock;
74     EffectsListView *m_effectList;
75     //KListWidget *m_effectList;
76
77     QDockWidget *effectStackDock;
78     EffectStackView *effectStack;
79
80     QDockWidget *transitionConfigDock;
81     KListWidget *transitionConfig;
82
83     QDockWidget *clipMonitorDock;
84     Monitor *m_clipMonitor;
85
86     QDockWidget *projectMonitorDock;
87     Monitor *m_projectMonitor;
88
89     QDockWidget *undoViewDock;
90     QUndoView *m_undoView;
91     QUndoGroup *m_commandStack;
92
93     KComboBox *m_timecodeFormat;
94
95     QDockWidget *overviewDock;
96     CustomTrackView *m_overView;
97
98     EffectsList m_videoEffects;
99     EffectsList m_audioEffects;
100     EffectsList m_customEffects;
101
102     RenderWidget *m_renderWidget;
103     Ui::TimelineButtons_UI timeline_buttons_ui;
104
105     KRecentFilesAction *m_fileOpenRecent;
106     void readOptions();
107     void saveOptions();
108
109 public slots:
110     void openFile(const KUrl &url);
111
112 private slots:
113     void newFile();
114     void undo();
115     void redo();
116     void activateDocument();
117     void closeDocument(QWidget *w);
118     void connectDocument(TrackView*, KdenliveDoc*);
119     void openFile();
120     void saveFile();
121     void saveFileAs();
122     void saveFileAs(const QString &outputFileName);
123     void slotPreferences();
124     void updateConfiguration();
125     void slotConnectMonitors();
126     void slotRaiseMonitor(bool clipMonitor);
127     void slotSetClipDuration(int id, int duration);
128     void slotUpdateMousePosition(int pos);
129     void slotAddEffect(QDomElement effect, GenTime pos = GenTime(), int track = -1);
130     void slotEditProfiles();
131     void slotEditProjectSettings();
132     void slotDisplayActionMessage(QAction *a);
133     void slotGotProgressInfo(KUrl url, int progress);
134     void slotSwitchVideoThumbs();
135     void slotSwitchAudioThumbs();
136     void slotRenderProject();
137     void slotDoRender(const QString &dest, const QString &render, const QStringList &avformat_args, bool zoneOnly, bool playAfter);
138 };
139
140 #endif