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) {
66 m_commandStack = new QUndoGroup;
67 m_timelineArea = new KTabWidget(this);
68 m_timelineArea->setHoverCloseButton(true);
69 m_timelineArea->setTabReorderingEnabled(true);
70 m_timelineArea->setTabBarHidden(true);
71 connect(m_timelineArea, SIGNAL(currentChanged(int)), this, SLOT(activateDocument()));
72 connect(m_timelineArea, SIGNAL(closeRequest(QWidget *)), this, SLOT(closeDocument(QWidget *)));
75 initEffects::parseEffectFiles(&m_audioEffects, &m_videoEffects);
76 m_monitorManager = new MonitorManager();
78 projectListDock = new QDockWidget(i18n("Project Tree"), this);
79 projectListDock->setObjectName("project_tree");
80 m_projectList = new ProjectList(this);
81 projectListDock->setWidget(m_projectList);
82 addDockWidget(Qt::TopDockWidgetArea, projectListDock);
84 effectListDock = new QDockWidget(i18n("Effect List"), this);
85 effectListDock->setObjectName("effect_list");
86 m_effectList = new EffectsListView(&m_audioEffects, &m_videoEffects, &m_customEffects);
88 //m_effectList = new KListWidget(this);
89 effectListDock->setWidget(m_effectList);
90 addDockWidget(Qt::TopDockWidgetArea, effectListDock);
92 effectStackDock = new QDockWidget(i18n("Effect Stack"), this);
93 effectStackDock->setObjectName("effect_stack");
94 effectStack = new EffectStackView(&m_audioEffects, &m_videoEffects, &m_customEffects, this);
95 effectStackDock->setWidget(effectStack);
96 addDockWidget(Qt::TopDockWidgetArea, effectStackDock);
98 transitionConfigDock = new QDockWidget(i18n("Transition"), this);
99 transitionConfigDock->setObjectName("transition");
100 transitionConfig = new KListWidget(this);
101 transitionConfigDock->setWidget(transitionConfig);
102 addDockWidget(Qt::TopDockWidgetArea, transitionConfigDock);
105 clipMonitorDock = new QDockWidget(i18n("Clip Monitor"), this);
106 clipMonitorDock->setObjectName("clip_monitor");
107 m_clipMonitor = new Monitor("clip", m_monitorManager, this);
108 clipMonitorDock->setWidget(m_clipMonitor);
109 addDockWidget(Qt::TopDockWidgetArea, clipMonitorDock);
110 //m_clipMonitor->stop();
112 projectMonitorDock = new QDockWidget(i18n("Project Monitor"), this);
113 projectMonitorDock->setObjectName("project_monitor");
114 m_projectMonitor = new Monitor("project", m_monitorManager, this);
115 projectMonitorDock->setWidget(m_projectMonitor);
116 addDockWidget(Qt::TopDockWidgetArea, projectMonitorDock);
118 undoViewDock = new QDockWidget(i18n("Undo History"), this);
119 undoViewDock->setObjectName("undo_history");
120 m_undoView = new QUndoView(this);
121 m_undoView->setCleanIcon(KIcon("edit-clear"));
122 m_undoView->setEmptyLabel(i18n("Clean"));
123 undoViewDock->setWidget(m_undoView);
124 m_undoView->setGroup(m_commandStack);
125 addDockWidget(Qt::TopDockWidgetArea, undoViewDock);
127 overviewDock = new QDockWidget(i18n("Project Overview"), this);
128 overviewDock->setObjectName("project_overview");
129 m_overView = new CustomTrackView(NULL, NULL, this);
130 overviewDock->setWidget(m_overView);
131 addDockWidget(Qt::TopDockWidgetArea, overviewDock);
134 tabifyDockWidget(projectListDock, effectListDock);
135 tabifyDockWidget(projectListDock, effectStackDock);
136 tabifyDockWidget(projectListDock, transitionConfigDock);
137 tabifyDockWidget(projectListDock, undoViewDock);
138 projectListDock->raise();
140 tabifyDockWidget(clipMonitorDock, projectMonitorDock);
141 setCentralWidget(m_timelineArea);
143 m_timecodeFormat = new KComboBox(this);
144 m_timecodeFormat->addItem(i18n("hh:mm:ss::ff"));
145 m_timecodeFormat->addItem(i18n("Frames"));
147 statusProgressBar = new QProgressBar(this);
148 statusProgressBar->setMinimum(0);
149 statusProgressBar->setMaximum(100);
150 statusProgressBar->setMaximumWidth(150);
151 statusProgressBar->setVisible(false);
152 statusLabel = new QLabel(this);
154 statusBar()->insertPermanentWidget(0, statusProgressBar, 1);
155 statusBar()->insertPermanentWidget(1, statusLabel, 1);
156 statusBar()->insertPermanentFixedItem("00:00:00:00", ID_TIMELINE_POS);
157 statusBar()->insertPermanentWidget(ID_TIMELINE_FORMAT, m_timecodeFormat);
159 setupGUI(Default, "kdenliveui.rc");
161 connect(projectMonitorDock, SIGNAL(visibilityChanged(bool)), m_projectMonitor, SLOT(refreshMonitor(bool)));
162 connect(clipMonitorDock, SIGNAL(visibilityChanged(bool)), m_clipMonitor, SLOT(refreshMonitor(bool)));
163 connect(m_monitorManager, SIGNAL(connectMonitors()), this, SLOT(slotConnectMonitors()));
164 connect(m_monitorManager, SIGNAL(raiseClipMonitor(bool)), this, SLOT(slotRaiseMonitor(bool)));
165 connect(m_effectList, SIGNAL(addEffect(QDomElement)), this, SLOT(slotAddEffect(QDomElement)));
166 m_monitorManager->initMonitors(m_clipMonitor, m_projectMonitor);
168 setAutoSaveSettings();
173 bool MainWindow::queryClose() {
175 switch (KMessageBox::warningYesNoCancel(this, i18n("Save changes to document ?"))) {
176 case KMessageBox::Yes :
177 // save document here. If saving fails, return false;
179 case KMessageBox::No :
186 void MainWindow::slotAddEffect(QDomElement effect, GenTime pos, int track) {
187 if (!m_activeDocument) return;
188 if (effect.isNull()) {
189 kDebug() << "--- ERROR, TRYING TO APPEND NULL EFFECT";
192 TrackView *currentTimeLine = (TrackView *) m_timelineArea->currentWidget();
193 currentTimeLine->projectView()->slotAddEffect(effect, pos, track);
196 void MainWindow::slotRaiseMonitor(bool clipMonitor) {
197 if (clipMonitor) clipMonitorDock->raise();
198 else projectMonitorDock->raise();
201 void MainWindow::slotSetClipDuration(int id, int duration) {
202 if (!m_activeDocument) return;
203 m_activeDocument->setProducerDuration(id, duration);
206 void MainWindow::slotConnectMonitors() {
208 m_projectList->setRenderer(m_clipMonitor->render);
210 connect(m_projectList, SIGNAL(clipSelected(const QDomElement &)), m_clipMonitor, SLOT(slotSetXml(const QDomElement &)));
212 connect(m_projectList, SIGNAL(receivedClipDuration(int, int)), this, SLOT(slotSetClipDuration(int, int)));
214 connect(m_projectList, SIGNAL(getFileProperties(const QDomElement &, int)), m_clipMonitor->render, SLOT(getFileProperties(const QDomElement &, int)));
216 connect(m_clipMonitor->render, SIGNAL(replyGetImage(int, int, const QPixmap &, int, int)), m_projectList, SLOT(slotReplyGetImage(int, int, const QPixmap &, int, int)));
218 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 > &)));
222 void MainWindow::setupActions() {
223 KAction* clearAction = new KAction(this);
224 clearAction->setText(i18n("Clear"));
225 clearAction->setIcon(KIcon("document-new"));
226 clearAction->setShortcut(Qt::CTRL + Qt::Key_W);
227 actionCollection()->addAction("clear", clearAction);
228 /*connect(clearAction, SIGNAL(triggered(bool)),
229 textArea, SLOT(clear()));*/
231 KAction* profilesAction = new KAction(this);
232 profilesAction->setText(i18n("Manage Profiles"));
233 profilesAction->setIcon(KIcon("document-new"));
234 actionCollection()->addAction("manage_profiles", profilesAction);
235 connect(profilesAction, SIGNAL(triggered(bool)), this, SLOT(slotEditProfiles()));
237 KAction* projectAction = new KAction(this);
238 projectAction->setText(i18n("Project Settings"));
239 projectAction->setIcon(KIcon("document-new"));
240 actionCollection()->addAction("project_settings", projectAction);
241 connect(projectAction, SIGNAL(triggered(bool)), this, SLOT(slotEditProjectSettings()));
243 KAction* monitorPlay = new KAction(this);
244 monitorPlay->setText(i18n("Play"));
245 monitorPlay->setIcon(KIcon("media-playback-start"));
246 monitorPlay->setShortcut(Qt::Key_Space);
247 actionCollection()->addAction("monitor_play", monitorPlay);
248 connect(monitorPlay, SIGNAL(triggered(bool)), m_monitorManager, SLOT(slotPlay()));
250 KStandardAction::quit(kapp, SLOT(quit()),
253 KStandardAction::open(this, SLOT(openFile()),
256 m_fileOpenRecent = KStandardAction::openRecent(this, SLOT(openFile(const KUrl &)),
259 KStandardAction::save(this, SLOT(saveFile()),
262 KStandardAction::saveAs(this, SLOT(saveFileAs()),
265 KStandardAction::openNew(this, SLOT(newFile()),
268 KStandardAction::preferences(this, SLOT(slotPreferences()),
271 KStandardAction::undo(this, SLOT(undo()),
274 KStandardAction::redo(this, SLOT(redo()),
277 connect(actionCollection(), SIGNAL(actionHighlighted(QAction*)),
278 this, SLOT(slotDisplayActionMessage(QAction*)));
279 //connect(actionCollection(), SIGNAL( clearStatusText() ),
280 //statusBar(), SLOT( clear() ) );
285 void MainWindow::undo() {
286 m_commandStack->undo();
289 void MainWindow::redo() {
290 m_commandStack->redo();
293 void MainWindow::slotDisplayActionMessage(QAction *a) {
294 statusBar()->showMessage(a->data().toString(), 3000);
297 void MainWindow::saveOptions() {
298 KSharedConfigPtr config = KGlobal::config();
299 m_fileOpenRecent->saveEntries(KConfigGroup(config, "Recent Files"));
303 void MainWindow::readOptions() {
304 KSharedConfigPtr config = KGlobal::config();
305 m_fileOpenRecent->loadEntries(KConfigGroup(config, "Recent Files"));
308 void MainWindow::newFile() {
309 MltVideoProfile prof = ProfilesDialog::getVideoProfile(KdenliveSettings::default_profile());
310 if (prof.width == 0) prof = ProfilesDialog::getVideoProfile("dv_pal");
311 KdenliveDoc *doc = new KdenliveDoc(KUrl(), prof, m_commandStack);
312 TrackView *trackView = new TrackView(doc);
313 m_timelineArea->addTab(trackView, KIcon("kdenlive"), i18n("Untitled") + " / " + prof.description);
314 if (m_timelineArea->count() == 1)
315 connectDocument(trackView, doc);
316 else m_timelineArea->setTabBarHidden(false);
319 void MainWindow::activateDocument() {
320 TrackView *currentTab = (TrackView *) m_timelineArea->currentWidget();
321 KdenliveDoc *currentDoc = currentTab->document();
322 connectDocument(currentTab, currentDoc);
325 void MainWindow::closeDocument(QWidget *w) {
326 if (w == m_timelineArea->currentWidget()) {
327 // closing current document
328 int ix = m_timelineArea->currentIndex() + 1;
329 if (ix == m_timelineArea->count()) ix = 0;
330 m_timelineArea->setCurrentIndex(ix);
333 TrackView *tabToClose = (TrackView *) w;
334 KdenliveDoc *docToClose = tabToClose->document();
335 m_timelineArea->removeTab(m_timelineArea->indexOf(w));
340 void MainWindow::saveFileAs(const QString &outputFileName) {
341 KSaveFile file(outputFileName);
344 QByteArray outputByteArray;
345 //outputByteArray.append(textArea->toPlainText());
346 file.write(outputByteArray);
350 fileName = outputFileName;
353 void MainWindow::saveFileAs() {
354 saveFileAs(KFileDialog::getSaveFileName());
357 void MainWindow::saveFile() {
358 if (!fileName.isEmpty()) {
359 saveFileAs(fileName);
365 void MainWindow::openFile() { //changed
366 KUrl url = KFileDialog::getOpenUrl(KUrl(), "application/vnd.kde.kdenlive;*.kdenlive");
367 if (url.isEmpty()) return;
368 m_fileOpenRecent->addUrl(url);
372 void MainWindow::openFile(const KUrl &url) { //new
373 //TODO: get video profile from url before opening it
374 MltVideoProfile prof = ProfilesDialog::getVideoProfile(KdenliveSettings::default_profile());
375 if (prof.width == 0) prof = ProfilesDialog::getVideoProfile("dv_pal");
376 KdenliveDoc *doc = new KdenliveDoc(url, prof, m_commandStack);
377 TrackView *trackView = new TrackView(doc);
378 m_timelineArea->setCurrentIndex(m_timelineArea->addTab(trackView, KIcon("kdenlive"), doc->description()));
379 m_timelineArea->setTabToolTip(m_timelineArea->currentIndex(), doc->url().path());
380 if (m_timelineArea->count() > 1) m_timelineArea->setTabBarHidden(false);
381 //connectDocument(trackView, doc);
385 void MainWindow::parseProfiles() {
386 //kdDebug()<<" + + YOUR MLT INSTALL WAS FOUND IN: "<< MLT_PREFIX <<endl;
387 if (KdenliveSettings::mltpath().isEmpty()) {
388 KdenliveSettings::setMltpath(QString(MLT_PREFIX) + QString("/share/mlt/profiles/"));
390 if (KdenliveSettings::rendererpath().isEmpty()) {
391 KdenliveSettings::setRendererpath(KStandardDirs::findExe("inigo"));
393 QStringList profilesFilter;
394 profilesFilter << "*";
395 QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
397 if (profilesList.isEmpty()) {
398 // Cannot find MLT path, try finding inigo
399 QString profilePath = KdenliveSettings::rendererpath();
400 if (!profilePath.isEmpty()) {
401 profilePath = profilePath.section('/', 0, -3);
402 KdenliveSettings::setMltpath(profilePath + "/share/mlt/profiles/");
403 QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
406 if (profilesList.isEmpty()) {
407 // Cannot find the MLT profiles, ask for location
408 KUrlRequesterDialog *getUrl = new KUrlRequesterDialog(KdenliveSettings::mltpath(), i18n("Cannot find your Mlt profiles, please give the path"), this);
409 getUrl->fileDialog()->setMode(KFile::Directory);
411 KUrl mltPath = getUrl->selectedUrl();
413 if (mltPath.isEmpty()) exit(1);
414 KdenliveSettings::setMltpath(mltPath.path());
415 QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files);
419 if (KdenliveSettings::rendererpath().isEmpty()) {
420 // Cannot find the MLT inigo renderer, ask for location
421 KUrlRequesterDialog *getUrl = new KUrlRequesterDialog(KdenliveSettings::mltpath(), i18n("Cannot find the inigo program required for rendering (part of Mlt)"), this);
423 KUrl rendererPath = getUrl->selectedUrl();
425 if (rendererPath.isEmpty()) exit(1);
426 KdenliveSettings::setRendererpath(rendererPath.path());
429 kDebug() << "RESULTING MLT PATH: " << KdenliveSettings::mltpath();
431 // Parse MLT profiles to build a list of available video formats
432 if (profilesList.isEmpty()) parseProfiles();
436 void MainWindow::slotEditProfiles() {
437 ProfilesDialog *w = new ProfilesDialog;
442 void MainWindow::slotEditProjectSettings() {
443 ProjectSettings *w = new ProjectSettings;
449 void MainWindow::slotUpdateMousePosition(int pos) {
450 if (m_activeDocument)
451 switch (m_timecodeFormat->currentIndex()) {
453 statusBar()->changeItem(m_activeDocument->timecode().getTimecodeFromFrames(pos), ID_TIMELINE_POS);
456 statusBar()->changeItem(QString::number(pos), ID_TIMELINE_POS);
460 void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) { //changed
461 //m_projectMonitor->stop();
462 kDebug() << "/////////////////// CONNECTING DOC TO PROJECT VIEW ////////////////";
463 if (m_activeDocument) {
464 if (m_activeDocument == doc) return;
465 m_activeDocument->backupMltPlaylist();
466 if (m_activeTimeline) {
467 disconnect(m_projectMonitor, SIGNAL(renderPosition(int)), m_activeTimeline, SLOT(moveCursorPos(int)));
468 disconnect(m_projectMonitor, SIGNAL(durationChanged(int)), m_activeTimeline->projectView(), SLOT(setDuration(int)));
469 disconnect(m_activeDocument, SIGNAL(addProjectClip(DocClipBase *)), m_projectList, SLOT(slotAddClip(DocClipBase *)));
470 disconnect(m_activeDocument, SIGNAL(signalDeleteProjectClip(int)), m_projectList, SLOT(slotDeleteClip(int)));
471 disconnect(m_activeDocument, SIGNAL(updateClipDisplay(int)), m_projectList, SLOT(slotUpdateClip(int)));
472 disconnect(m_activeDocument, SIGNAL(deletTimelineClip(int)), m_activeTimeline, SLOT(slotDeleteClip(int)));
473 disconnect(m_activeDocument, SIGNAL(thumbsProgress(KUrl, int)), this, SLOT(slotGotProgressInfo(KUrl, int)));
474 disconnect(m_activeTimeline, SIGNAL(clipItemSelected(ClipItem*)), effectStack, SLOT(slotClipItemSelected(ClipItem*)));
475 disconnect(effectStack, SIGNAL(updateClipEffect(ClipItem*, QDomElement, QDomElement)), m_activeTimeline->projectView(), SLOT(slotUpdateClipEffect(ClipItem*, QDomElement, QDomElement)));
476 disconnect(effectStack, SIGNAL(removeEffect(ClipItem*, QDomElement)), m_activeTimeline->projectView(), SLOT(slotDeleteEffect(ClipItem*, QDomElement)));
477 disconnect(effectStack, SIGNAL(changeEffectState(ClipItem*, QDomElement, bool)), m_activeTimeline->projectView(), SLOT(slotChangeEffectState(ClipItem*, QDomElement, bool)));
478 disconnect(effectStack, SIGNAL(refreshEffectStack(ClipItem*)), m_activeTimeline->projectView(), SLOT(slotRefreshEffects(ClipItem*)));
480 m_activeDocument->setRenderer(NULL);
482 m_monitorManager->resetProfiles(doc->profilePath());
483 m_projectList->setDocument(doc);
485 connect(trackView, SIGNAL(cursorMoved()), m_projectMonitor, SLOT(activateMonitor()));
486 connect(trackView, SIGNAL(mousePosition(int)), this, SLOT(slotUpdateMousePosition(int)));
487 connect(m_projectMonitor, SIGNAL(renderPosition(int)), trackView, SLOT(moveCursorPos(int)));
488 connect(m_projectMonitor, SIGNAL(durationChanged(int)), trackView->projectView(), SLOT(setDuration(int)));
489 connect(doc, SIGNAL(addProjectClip(DocClipBase *)), m_projectList, SLOT(slotAddClip(DocClipBase *)));
490 connect(doc, SIGNAL(signalDeleteProjectClip(int)), m_projectList, SLOT(slotDeleteClip(int)));
491 connect(doc, SIGNAL(updateClipDisplay(int)), m_projectList, SLOT(slotUpdateClip(int)));
492 connect(doc, SIGNAL(deletTimelineClip(int)), trackView, SLOT(slotDeleteClip(int)));
493 connect(doc, SIGNAL(thumbsProgress(KUrl, int)), this, SLOT(slotGotProgressInfo(KUrl, int)));
495 connect(trackView, SIGNAL(clipItemSelected(ClipItem*)), effectStack, SLOT(slotClipItemSelected(ClipItem*)));
496 connect(effectStack, SIGNAL(updateClipEffect(ClipItem*, QDomElement, QDomElement)), trackView->projectView(), SLOT(slotUpdateClipEffect(ClipItem*, QDomElement, QDomElement)));
497 connect(effectStack, SIGNAL(removeEffect(ClipItem*, QDomElement)), trackView->projectView(), SLOT(slotDeleteEffect(ClipItem*, QDomElement)));
498 connect(effectStack, SIGNAL(changeEffectState(ClipItem*, QDomElement, bool)), trackView->projectView(), SLOT(slotChangeEffectState(ClipItem*, QDomElement, bool)));
499 connect(effectStack, SIGNAL(refreshEffectStack(ClipItem*)), trackView->projectView(), SLOT(slotRefreshEffects(ClipItem*)));
500 m_activeTimeline = trackView;
502 m_monitorManager->setTimecode(doc->timecode());
503 doc->setRenderer(m_projectMonitor->render);
504 m_commandStack->setActiveStack(doc->commandStack());
506 m_overView->setScene(trackView->projectScene());
507 m_overView->scale(m_overView->width() / trackView->duration(), m_overView->height() / (50 * trackView->tracksNumber()));
508 //m_overView->fitInView(m_overView->itemAt(0, 50), Qt::KeepAspectRatio);
510 setCaption(doc->description());
511 m_activeDocument = doc;
514 void MainWindow::slotPreferences() {
515 //An instance of your dialog could be already created and could be
516 // cached, in which case you want to display the cached dialog
517 // instead of creating another one
518 if (KConfigDialog::showDialog("settings"))
521 // KConfigDialog didn't find an instance of this dialog, so lets
523 KdenliveSettingsDialog* dialog = new KdenliveSettingsDialog(this);
524 connect(dialog, SIGNAL(settingsChanged(const QString&)), this, SLOT(updateConfiguration()));
528 void MainWindow::updateConfiguration() {
529 //TODO: we should apply settings to all projects, not only the current one
530 TrackView *currentTab = (TrackView *) m_timelineArea->currentWidget();
532 currentTab->refresh();
533 currentTab->projectView()->checkAutoScroll();
534 if (m_activeDocument) m_activeDocument->clipManager()->checkAudioThumbs();
538 void MainWindow::slotGotProgressInfo(KUrl url, int progress) {
539 statusProgressBar->setValue(progress);
541 statusLabel->setText(tr("Creating Audio Thumbs"));
542 statusProgressBar->setVisible(true);
544 statusLabel->setText("");
545 statusProgressBar->setVisible(false);
549 #include "mainwindow.moc"