#include <KApplication>
#include <KAction>
-#include <KLocale>
+#include <KLocalizedString>
#include <KGlobal>
#include <KActionCollection>
#include <KActionCategory>
#include <QInputDialog>
#include <QDesktopWidget>
#include <QBitmap>
+#include <QUndoGroup>
#include <stdlib.h>
#include <locale.h>
if (openBackup) slotOpenBackupDialog(url);
}
-void MainWindow::recoverFiles(QList<KAutoSaveFile *> staleFiles, const KUrl &originUrl)
+void MainWindow::recoverFiles(const QList<KAutoSaveFile *> &staleFiles, const KUrl &originUrl)
{
foreach(KAutoSaveFile * stale, staleFiles) {
/*if (!stale->open(QIODevice::QIODevice::ReadOnly)) {
m_activeTimeline->projectView()->editItemDuration();
}
-void MainWindow::slotAddProjectClip(KUrl url, stringMap data)
+void MainWindow::slotAddProjectClip(const KUrl &url, const stringMap &data)
{
if (m_activeDocument) {
m_activeDocument->slotAddClipFile(url, data);
}
}
-void MainWindow::slotAddProjectClipList(KUrl::List urls)
+void MainWindow::slotAddProjectClipList(const KUrl::List &urls)
{
if (m_activeDocument)
m_activeDocument->slotAddClipList(urls);
}
-void MainWindow::slotApplyNewClipProperties(const QString id, QMap <QString, QString> props, QMap <QString, QString> newprops, bool refresh, bool reload)
+void MainWindow::slotApplyNewClipProperties(const QString &id, const QMap <QString, QString> &props, const QMap <QString, QString> &newprops, bool refresh, bool reload)
{
- if (newprops.isEmpty()) return;
+ if (newprops.isEmpty())
+ return;
EditClipCommand *command = new EditClipCommand(m_projectList, id, props, newprops, true);
m_activeDocument->commandStack()->push(command);
m_activeDocument->setModified();
m_effectStack->raiseWindow(m_effectStackDock);
}
-void MainWindow::slotTrackSelected(int index, TrackInfo info, bool raise)
+void MainWindow::slotTrackSelected(int index, const TrackInfo &info, bool raise)
{
m_effectStack->slotTrackItemSelected(index, info);
if (raise)
QLabel *label1 = new QLabel(i18n("Save clip zone as:"), this);
if (path.isEmpty()) {
QString tmppath = m_activeDocument->projectFolder().path(KUrl::AddTrailingSlash);
- if (baseClip == NULL) tmppath.append("untitled.mlt");
- else {
+ if (baseClip == NULL) {
+ tmppath.append("untitled.mlt");
+ } else {
tmppath.append((baseClip->name().isEmpty() ? baseClip->fileURL().fileName() : baseClip->name()) + '-' + QString::number(zone.x()).rightJustified(4, '0') + ".mlt");
}
path = KUrl(tmppath);
QAction *action = qobject_cast<QAction *>(sender());
QStringList data = action->data().toStringList();
params = data.at(0);
- if (data.count() > 1) desc = data.at(1);
- if (data.count() > 3) condition = data.at(3);
+ if (data.count() > 1)
+ desc = data.at(1);
+ if (data.count() > 3)
+ condition = data.at(3);
m_projectList->slotTranscodeClipJob(condition, params, desc);
return;
}