1 /***************************************************************************
2 * Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
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. *
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. *
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 ***************************************************************************/
22 #include <QTextStream>
28 #include <KApplication>
31 #include <KActionCollection>
32 #include <KStandardAction>
33 #include <KFileDialog>
34 #include <KMessageBox>
36 #include <KIO/NetAccess>
39 #include <KConfigDialog>
40 #include <KXMLGUIFactory>
42 #include <kstandarddirs.h>
43 #include <KUrlRequesterDialog>
45 #include <mlt++/Mlt.h>
47 #include "mainwindow.h"
48 #include "kdenlivesettings.h"
49 #include "kdenlivesettingsdialog.h"
50 #include "initeffects.h"
51 #include "profilesdialog.h"
52 #include "projectsettings.h"
55 #define ID_STATUS_MSG 1
56 #define ID_EDITMODE_MSG 2
57 #define ID_TIMELINE_MSG 3
58 #define ID_TIMELINE_POS 4
59 #define ID_TIMELINE_FORMAT 5
61 MainWindow::MainWindow(QWidget *parent)
62 : KXmlGuiWindow(parent),
63 fileName(QString()), m_activeDocument(NULL), m_activeTimeline(NULL), m_commandStack(NULL) {
65 m_timelineArea = new KTabWidget(this);
66 m_timelineArea->setHoverCloseButton(true);
67 m_timelineArea->setTabReorderingEnabled(true);
68 m_timelineArea->setTabBarHidden(true);
69 connect(m_timelineArea, SIGNAL(currentChanged(int)), this, SLOT(activateDocument()));
70 connect(m_timelineArea, SIGNAL(closeRequest(QWidget *)), this, SLOT(closeDocument(QWidget *)));
73 initEffects::parseEffectFiles(&m_audioEffects, &m_videoEffects);
74 m_monitorManager = new MonitorManager();
76 projectListDock = new QDockWidget(i18n("Project Tree"), this);
77 projectListDock->setObjectName("project_tree");
78 m_projectList = new ProjectList(this);
79 projectListDock->setWidget(m_projectList);
80 addDockWidget(Qt::TopDockWidgetArea, projectListDock);
82 effectListDock = new QDockWidget(i18n("Effect List"), this);
83 effectListDock->setObjectName("effect_list");
84 m_effectList = new EffectsListView(&m_audioEffects, &m_videoEffects, &m_customEffects);
86 //m_effectList = new KListWidget(this);
87 effectListDock->setWidget(m_effectList);
88 addDockWidget(Qt::TopDockWidgetArea, effectListDock);
90 effectStackDock = new QDockWidget(i18n("Effect Stack"), this);
91 effectStackDock->setObjectName("effect_stack");
92 effectStack = new EffectStackView(&m_audioEffects, &m_videoEffects, &m_customEffects, this);
93 effectStackDock->setWidget(effectStack);
94 addDockWidget(Qt::TopDockWidgetArea, effectStackDock);
96 transitionConfigDock = new QDockWidget(i18n("Transition"), this);
97 transitionConfigDock->setObjectName("transition");
98 transitionConfig = new KListWidget(this);
99 transitionConfigDock->setWidget(transitionConfig);
100 addDockWidget(Qt::TopDockWidgetArea, transitionConfigDock);
103 clipMonitorDock = new QDockWidget(i18n("Clip Monitor"), this);
104 clipMonitorDock->setObjectName("clip_monitor");
105 m_clipMonitor = new Monitor("clip", m_monitorManager, this);
106 clipMonitorDock->setWidget(m_clipMonitor);
107 addDockWidget(Qt::TopDockWidgetArea, clipMonitorDock);
108 //m_clipMonitor->stop();
110 projectMonitorDock = new QDockWidget(i18n("Project Monitor"), this);
111 projectMonitorDock->setObjectName("project_monitor");
112 m_projectMonitor = new Monitor("project", m_monitorManager, this);
113 projectMonitorDock->setWidget(m_projectMonitor);
114 addDockWidget(Qt::TopDockWidgetArea, projectMonitorDock);
116 undoViewDock = new QDockWidget(i18n("Undo History"), this);
117 undoViewDock->setObjectName("undo_history");
118 m_undoView = new QUndoView(this);
119 undoViewDock->setWidget(m_undoView);
120 m_undoView->setStack(m_commandStack);
121 addDockWidget(Qt::TopDockWidgetArea, undoViewDock);
123 overviewDock = new QDockWidget(i18n("Project Overview"), this);
124 overviewDock->setObjectName("project_overview");
125 m_overView = new CustomTrackView(NULL, NULL, this);
126 overviewDock->setWidget(m_overView);
127 addDockWidget(Qt::TopDockWidgetArea, overviewDock);
130 tabifyDockWidget(projectListDock, effectListDock);
131 tabifyDockWidget(projectListDock, effectStackDock);
132 tabifyDockWidget(projectListDock, transitionConfigDock);
133 tabifyDockWidget(projectListDock, undoViewDock);
134 projectListDock->raise();
136 tabifyDockWidget(clipMonitorDock, projectMonitorDock);
137 setCentralWidget(m_timelineArea);
139 m_timecodeFormat = new KComboBox(this);
140 m_timecodeFormat->addItem(i18n("hh:mm:ss::ff"));
141 m_timecodeFormat->addItem(i18n("Frames"));
143 statusProgressBar = new QProgressBar(this);
144 statusProgressBar->setMinimum(0);
145 statusProgressBar->setMaximum(100);
146 statusProgressBar->setMaximumWidth(150);
147 statusProgressBar->setVisible(false);
148 statusLabel = new QLabel(this);
150 statusBar()->insertPermanentWidget(0, statusProgressBar, 1);
151 statusBar()->insertPermanentWidget(1, statusLabel, 1);
152 statusBar()->insertPermanentFixedItem("00:00:00:00", ID_TIMELINE_POS);
153 statusBar()->insertPermanentWidget(ID_TIMELINE_FORMAT, m_timecodeFormat);
155 setupGUI(Default, "kdenliveui.rc");
157 connect(projectMonitorDock, SIGNAL(visibilityChanged(bool)), m_projectMonitor, SLOT(refreshMonitor(bool)));
158 connect(clipMonitorDock, SIGNAL(visibilityChanged(bool)), m_clipMonitor, SLOT(refreshMonitor(bool)));
159 connect(m_monitorManager, SIGNAL(connectMonitors()), this, SLOT(slotConnectMonitors()));
160 connect(m_monitorManager, SIGNAL(raiseClipMonitor(bool)), this, SLOT(slotRaiseMonitor(bool)));
161 connect(m_effectList, SIGNAL(addEffect(QDomElement)), this, SLOT(slotAddEffect(QDomElement)));
162 m_monitorManager->initMonitors(m_clipMonitor, m_projectMonitor);
164 setAutoSaveSettings();
169 bool MainWindow::queryClose() {
171 switch (KMessageBox::warningYesNoCancel(this, i18n("Save changes to document ?"))) {
172 case KMessageBox::Yes :
173 // save document here. If saving fails, return false;
175 case KMessageBox::No :
182 void MainWindow::slotAddEffect(QDomElement effect, GenTime pos, int track) {
183 if (!m_activeDocument) return;
184 if (effect.isNull()) {
185 kDebug() << "--- ERROR, TRYING TO APPEND NULL EFFECT";
188 TrackView *currentTimeLine = (TrackView *) m_timelineArea->currentWidget();
189 currentTimeLine->projectView()->slotAddEffect(effect, pos, track);
192 void MainWindow::slotRaiseMonitor(bool clipMonitor) {
193 if (clipMonitor) clipMonitorDock->raise();
194 else projectMonitorDock->raise();
197 void MainWindow::slotSetClipDuration(int id, int duration) {
198 if (!m_activeDocument) return;
199 m_activeDocument->setProducerDuration(id, duration);
202 void MainWindow::slotConnectMonitors() {
204 m_projectList->setRenderer(m_clipMonitor->render);
206 connect(m_projectList, SIGNAL(clipSelected(const QDomElement &)), m_clipMonitor, SLOT(slotSetXml(const QDomElement &)));
208 connect(m_projectList, SIGNAL(receivedClipDuration(int, int)), this, SLOT(slotSetClipDuration(int, int)));
210 connect(m_projectList, SIGNAL(getFileProperties(const QDomElement &, int)), m_clipMonitor->render, SLOT(getFileProperties(const QDomElement &, int)));
212 connect(m_clipMonitor->render, SIGNAL(replyGetImage(int, int, const QPixmap &, int, int)), m_projectList, SLOT(slotReplyGetImage(int, int, const QPixmap &, int, int)));
214 connect(m_clipMonitor->render, SIGNAL(replyGetFileProperties(int, const QMap < QString, QString > &, const QMap < QString, QString > &)), m_projectList, SLOT(slotReplyGetFileProperties(int, const QMap < QString, QString > &, const QMap < QString, QString > &)));
218 void MainWindow::setupActions() {
219 KAction* clearAction = new KAction(this);
220 clearAction->setText(i18n("Clear"));
221 clearAction->setIcon(KIcon("document-new"));
222 clearAction->setShortcut(Qt::CTRL + Qt::Key_W);
223 actionCollection()->addAction("clear", clearAction);
224 /*connect(clearAction, SIGNAL(triggered(bool)),
225 textArea, SLOT(clear()));*/
227 KAction* profilesAction = new KAction(this);
228 profilesAction->setText(i18n("Manage Profiles"));
229 profilesAction->setIcon(KIcon("document-new"));
230 actionCollection()->addAction("manage_profiles", profilesAction);
231 connect(profilesAction, SIGNAL(triggered(bool)), this, SLOT(slotEditProfiles()));
233 KAction* projectAction = new KAction(this);
234 projectAction->setText(i18n("Project Settings"));
235 projectAction->setIcon(KIcon("document-new"));
236 actionCollection()->addAction("project_settings", projectAction);
237 connect(projectAction, SIGNAL(triggered(bool)), this, SLOT(slotEditProjectSettings()));
239 KAction* monitorPlay = new KAction(this);
240 monitorPlay->setText(i18n("Play"));
241 monitorPlay->setIcon(KIcon("media-playback-start"));
242 monitorPlay->setShortcut(Qt::Key_Space);
243 actionCollection()->addAction("monitor_play", monitorPlay);
244 connect(monitorPlay, SIGNAL(triggered(bool)), m_monitorManager, SLOT(slotPlay()));
246 KStandardAction::quit(kapp, SLOT(quit()),
249 KStandardAction::open(this, SLOT(openFile()),
252 m_fileOpenRecent = KStandardAction::openRecent(this, SLOT(openFile(const KUrl &)),
255 KStandardAction::save(this, SLOT(saveFile()),
258 KStandardAction::saveAs(this, SLOT(saveFileAs()),
261 KStandardAction::openNew(this, SLOT(newFile()),
264 KStandardAction::preferences(this, SLOT(slotPreferences()),
267 /*KStandardAction::undo(this, SLOT(undo()),
270 KStandardAction::redo(this, SLOT(redo()),
271 actionCollection());*/
273 connect(actionCollection(), SIGNAL(actionHighlighted(QAction*)),
274 this, SLOT(slotDisplayActionMessage(QAction*)));
275 //connect(actionCollection(), SIGNAL( clearStatusText() ),
276 //statusBar(), SLOT( clear() ) );
280 /*m_redo = m_commandStack->createRedoAction(actionCollection());
281 m_undo = m_commandStack->createUndoAction(actionCollection());*/
284 void MainWindow::slotDisplayActionMessage(QAction *a) {
285 statusBar()->showMessage(a->data().toString(), 3000);
288 void MainWindow::saveOptions() {
289 KSharedConfigPtr config = KGlobal::config();
290 m_fileOpenRecent->saveEntries(KConfigGroup(config, "Recent Files"));
294 void MainWindow::readOptions() {
295 KSharedConfigPtr config = KGlobal::config();
296 m_fileOpenRecent->loadEntries(KConfigGroup(config, "Recent Files"));
299 void MainWindow::newFile() {
300 MltVideoProfile prof = ProfilesDialog::getVideoProfile(KdenliveSettings::default_profile());
301 if (prof.width == 0) prof = ProfilesDialog::getVideoProfile("dv_pal");
302 KdenliveDoc *doc = new KdenliveDoc(KUrl(), prof);
303 TrackView *trackView = new TrackView(doc);
304 m_timelineArea->addTab(trackView, KIcon("kdenlive"), i18n("Untitled") + " / " + prof.description);
305 if (m_timelineArea->count() == 1)
306 connectDocument(trackView, doc);
307 else m_timelineArea->setTabBarHidden(false);
310 void MainWindow::activateDocument() {
311 TrackView *currentTab = (TrackView *) m_timelineArea->currentWidget();
312 KdenliveDoc *currentDoc = currentTab->document();
313 connectDocument(currentTab, currentDoc);
316 void MainWindow::closeDocument(QWidget *w) {
317 if (w == m_timelineArea->currentWidget()) {
318 // closing current document
319 int ix = m_timelineArea->currentIndex() + 1;
320 if (ix == m_timelineArea->count()) ix = 0;
321 m_timelineArea->setCurrentIndex(ix);
324 TrackView *tabToClose = (TrackView *) w;
325 KdenliveDoc *docToClose = tabToClose->document();
326 m_timelineArea->removeTab(m_timelineArea->indexOf(w));
331 void MainWindow::saveFileAs(const QString &outputFileName) {
332 KSaveFile file(outputFileName);
335 QByteArray outputByteArray;
336 //outputByteArray.append(textArea->toPlainText());
337 file.write(outputByteArray);
341 fileName = outputFileName;
344 void MainWindow::saveFileAs() {
345 saveFileAs(KFileDialog::getSaveFileName());
348 void MainWindow::saveFile() {
349 if (!fileName.isEmpty()) {
350 saveFileAs(fileName);
356 void MainWindow::openFile() { //changed
357 KUrl url = KFileDialog::getOpenUrl(KUrl(), "application/vnd.kde.kdenlive;*.kdenlive");
358 if (url.isEmpty()) return;
359 m_fileOpenRecent->addUrl(url);
363 void MainWindow::openFile(const KUrl &url) { //new
364 //TODO: get video profile from url before opening it
365 MltVideoProfile prof = ProfilesDialog::getVideoProfile(KdenliveSettings::default_profile());
366 if (prof.width == 0) prof = ProfilesDialog::getVideoProfile("dv_pal");
367 KdenliveDoc *doc = new KdenliveDoc(url, prof);
368 TrackView *trackView = new TrackView(doc);
369 m_timelineArea->setCurrentIndex(m_timelineArea->addTab(trackView, KIcon("kdenlive"), doc->description()));
370 m_timelineArea->setTabToolTip(m_timelineArea->currentIndex(), doc->url().path());
371 if (m_timelineArea->count() > 1) m_timelineArea->setTabBarHidden(false);
372 //connectDocument(trackView, doc);
376 void MainWindow::parseProfiles() {
377 //kdDebug()<<" + + YOUR MLT INSTALL WAS FOUND IN: "<< MLT_PREFIX <<endl;
378 if (KdenliveSettings::mltpath().isEmpty()) {
379 KdenliveSettings::setMltpath(QString(MLT_PREFIX) + QString("/share/mlt/profiles/"));
381 if (KdenliveSettings::rendererpath().isEmpty()) {
382 KdenliveSettings::setRendererpath(KStandardDirs::findExe("inigo"));
384 QStringList profilesFilter;
385 profilesFilter << "*";
386 QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
388 if (profilesList.isEmpty()) {
389 // Cannot find MLT path, try finding inigo
390 QString profilePath = KdenliveSettings::rendererpath();
391 if (!profilePath.isEmpty()) {
392 profilePath = profilePath.section('/', 0, -3);
393 KdenliveSettings::setMltpath(profilePath + "/share/mlt/profiles/");
394 QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
397 if (profilesList.isEmpty()) {
398 // Cannot find the MLT profiles, ask for location
399 KUrlRequesterDialog *getUrl = new KUrlRequesterDialog(KdenliveSettings::mltpath(), i18n("Cannot find your Mlt profiles, please give the path"), this);
400 getUrl->fileDialog()->setMode(KFile::Directory);
402 KUrl mltPath = getUrl->selectedUrl();
404 if (mltPath.isEmpty()) exit(1);
405 KdenliveSettings::setMltpath(mltPath.path());
406 QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
410 if (KdenliveSettings::rendererpath().isEmpty()) {
411 // Cannot find the MLT inigo renderer, ask for location
412 KUrlRequesterDialog *getUrl = new KUrlRequesterDialog(KdenliveSettings::mltpath(), i18n("Cannot find the inigo program required for rendering (part of Mlt)"), this);
414 KUrl rendererPath = getUrl->selectedUrl();
416 if (rendererPath.isEmpty()) exit(1);
417 KdenliveSettings::setRendererpath(rendererPath.path());
420 kDebug() << "RESULTING MLT PATH: " << KdenliveSettings::mltpath();
422 // Parse MLT profiles to build a list of available video formats
423 if (profilesList.isEmpty()) parseProfiles();
427 void MainWindow::slotEditProfiles() {
428 ProfilesDialog *w = new ProfilesDialog;
433 void MainWindow::slotEditProjectSettings() {
434 ProjectSettings *w = new ProjectSettings;
440 void MainWindow::slotUpdateMousePosition(int pos) {
441 if (m_activeDocument)
442 switch (m_timecodeFormat->currentIndex()) {
444 statusBar()->changeItem(m_activeDocument->timecode().getTimecodeFromFrames(pos), ID_TIMELINE_POS);
447 statusBar()->changeItem(QString::number(pos), ID_TIMELINE_POS);
451 void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) { //changed
452 //m_projectMonitor->stop();
453 kDebug() << "/////////////////// CONNECTING DOC TO PROJECT VIEW ////////////////";
454 if (m_activeDocument) {
455 if (m_activeDocument == doc) return;
456 m_activeDocument->backupMltPlaylist();
457 if (m_activeTimeline) {
458 disconnect(m_projectMonitor, SIGNAL(renderPosition(int)), m_activeTimeline, SLOT(moveCursorPos(int)));
459 disconnect(m_projectMonitor, SIGNAL(durationChanged(int)), m_activeTimeline->projectView(), SLOT(setDuration(int)));
460 disconnect(m_activeDocument, SIGNAL(addProjectClip(DocClipBase *)), m_projectList, SLOT(slotAddClip(DocClipBase *)));
461 disconnect(m_activeDocument, SIGNAL(signalDeleteProjectClip(int)), m_projectList, SLOT(slotDeleteClip(int)));
462 disconnect(m_activeDocument, SIGNAL(updateClipDisplay(int)), m_projectList, SLOT(slotUpdateClip(int)));
463 disconnect(m_activeDocument, SIGNAL(deletTimelineClip(int)), m_activeTimeline, SLOT(slotDeleteClip(int)));
464 disconnect(m_activeDocument, SIGNAL(thumbsProgress(KUrl, int)), this, SLOT(slotGotProgressInfo(KUrl, int)));
465 disconnect(m_activeTimeline, SIGNAL(clipItemSelected(ClipItem*)), effectStack, SLOT(slotClipItemSelected(ClipItem*)));
466 disconnect(effectStack, SIGNAL(updateClipEffect(ClipItem*, QDomElement, QDomElement)), m_activeTimeline->projectView(), SLOT(slotUpdateClipEffect(ClipItem*, QDomElement, QDomElement)));
467 disconnect(effectStack, SIGNAL(removeEffect(ClipItem*, QDomElement)), m_activeTimeline->projectView(), SLOT(slotDeleteEffect(ClipItem*, QDomElement)));
468 disconnect(effectStack, SIGNAL(changeEffectState(ClipItem*, QDomElement, bool)), m_activeTimeline->projectView(), SLOT(slotChangeEffectState(ClipItem*, QDomElement, bool)));
469 disconnect(effectStack, SIGNAL(refreshEffectStack(ClipItem*)), m_activeTimeline->projectView(), SLOT(slotRefreshEffects(ClipItem*)));
471 m_activeDocument->setRenderer(NULL);
473 m_monitorManager->resetProfiles(doc->profilePath());
474 m_projectList->setDocument(doc);
476 connect(trackView, SIGNAL(cursorMoved()), m_projectMonitor, SLOT(activateMonitor()));
477 connect(trackView, SIGNAL(mousePosition(int)), this, SLOT(slotUpdateMousePosition(int)));
478 connect(m_projectMonitor, SIGNAL(renderPosition(int)), trackView, SLOT(moveCursorPos(int)));
479 connect(m_projectMonitor, SIGNAL(durationChanged(int)), trackView->projectView(), SLOT(setDuration(int)));
480 connect(doc, SIGNAL(addProjectClip(DocClipBase *)), m_projectList, SLOT(slotAddClip(DocClipBase *)));
481 connect(doc, SIGNAL(signalDeleteProjectClip(int)), m_projectList, SLOT(slotDeleteClip(int)));
482 connect(doc, SIGNAL(updateClipDisplay(int)), m_projectList, SLOT(slotUpdateClip(int)));
483 connect(doc, SIGNAL(deletTimelineClip(int)), trackView, SLOT(slotDeleteClip(int)));
484 connect(doc, SIGNAL(thumbsProgress(KUrl, int)), this, SLOT(slotGotProgressInfo(KUrl, int)));
486 connect(trackView, SIGNAL(clipItemSelected(ClipItem*)), effectStack, SLOT(slotClipItemSelected(ClipItem*)));
487 connect(effectStack, SIGNAL(updateClipEffect(ClipItem*, QDomElement, QDomElement)), trackView->projectView(), SLOT(slotUpdateClipEffect(ClipItem*, QDomElement, QDomElement)));
488 connect(effectStack, SIGNAL(removeEffect(ClipItem*, QDomElement)), trackView->projectView(), SLOT(slotDeleteEffect(ClipItem*, QDomElement)));
489 connect(effectStack, SIGNAL(changeEffectState(ClipItem*, QDomElement, bool)), trackView->projectView(), SLOT(slotChangeEffectState(ClipItem*, QDomElement, bool)));
490 connect(effectStack, SIGNAL(refreshEffectStack(ClipItem*)), trackView->projectView(), SLOT(slotRefreshEffects(ClipItem*)));
491 m_activeTimeline = trackView;
493 m_monitorManager->setTimecode(doc->timecode());
494 doc->setRenderer(m_projectMonitor->render);
495 //m_undoView->setStack(0);
496 m_commandStack = doc->commandStack();
498 m_overView->setScene(trackView->projectScene());
499 m_overView->scale(m_overView->width() / trackView->duration(), m_overView->height() / (50 * trackView->tracksNumber()));
500 //m_overView->fitInView(m_overView->itemAt(0, 50), Qt::KeepAspectRatio);
501 QAction *redo = m_commandStack->createRedoAction(actionCollection());
502 QAction *undo = m_commandStack->createUndoAction(actionCollection());
504 QWidget* w = factory()->container("mainToolBar", this);
506 if (actionCollection()->action("undo"))
507 delete actionCollection()->action("undo");
508 if (actionCollection()->action("redo"))
509 delete actionCollection()->action("redo");
511 actionCollection()->addAction("undo", undo);
512 actionCollection()->addAction("redo", redo);
516 m_undoView->setStack(doc->commandStack());
517 setCaption(doc->description());
518 m_activeDocument = doc;
521 void MainWindow::slotPreferences() {
522 //An instance of your dialog could be already created and could be
523 // cached, in which case you want to display the cached dialog
524 // instead of creating another one
525 if (KConfigDialog::showDialog("settings"))
528 // KConfigDialog didn't find an instance of this dialog, so lets
530 KdenliveSettingsDialog* dialog = new KdenliveSettingsDialog(this);
531 connect(dialog, SIGNAL(settingsChanged(const QString&)), this, SLOT(updateConfiguration()));
535 void MainWindow::updateConfiguration() {
536 //TODO: we should apply settings to all projects, not only the current one
537 TrackView *currentTab = (TrackView *) m_timelineArea->currentWidget();
539 currentTab->refresh();
540 currentTab->projectView()->checkAutoScroll();
541 if (m_activeDocument) m_activeDocument->clipManager()->checkAudioThumbs();
545 void MainWindow::slotGotProgressInfo(KUrl url, int progress) {
546 statusProgressBar->setValue(progress);
548 statusLabel->setText(tr("Creating Audio Thumbs"));
549 statusProgressBar->setVisible(true);
551 statusLabel->setText("");
552 statusProgressBar->setVisible(false);
556 #include "mainwindow.moc"