Commit 072d51ab authored by Laurent Montel's avatar Laurent Montel

Astyle kdelibs

parent ce495944
......@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "sampleplugin.h"
#include "ui_countdown_ui.h"
......@@ -30,18 +29,23 @@
QStringList SamplePlugin::generators(const QStringList &producers) const
{
QStringList result;
if (producers.contains(QLatin1String("pango"))) result << i18n("Countdown");
if (producers.contains(QLatin1String("noise"))) result << i18n("Noise");
if (producers.contains(QLatin1String("pango"))) {
result << i18n("Countdown");
}
if (producers.contains(QLatin1String("noise"))) {
result << i18n("Noise");
}
return result;
}
QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generator, const QUrl &projectFolder, const QStringList &/*lumaNames*/, const QStringList &/*lumaFiles*/, const double fps, const int /*width*/, const int height)
{
QString prePath;
if (generator == i18n("Noise")) {
prePath = projectFolder.path() + QLatin1String("/noise");
} else prePath = projectFolder.path() + QLatin1String("/counter");
} else {
prePath = projectFolder.path() + QLatin1String("/counter");
}
int ct = 0;
QString counter = QString::number(ct).rightJustified(5, QLatin1Char('0'), false);
while (QFile::exists(prePath + counter + QLatin1String(".mlt"))) {
......@@ -66,7 +70,7 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat
QString clipFile = prePath + counter + QLatin1String(".mlt");
view.path->setUrl(QUrl(clipFile));
QUrl result;
if (d->exec() == QDialog::Accepted) {
QProcess generatorProcess;
......@@ -77,8 +81,7 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat
QStringList args;
if (generator == i18n("Noise")) {
args << QLatin1String("noise:") << QLatin1String("in=0") << QLatin1String("out=") + QString::number((int) fps * view.duration->value());
}
else {
} else {
// Countdown producer
for (int i = 0; i < view.duration->value(); ++i) {
// Create the producers
......@@ -88,15 +91,14 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat
}
}
args << QLatin1String("-consumer")<<QString::fromLatin1("xml:%1").arg(view.path->url().path());
args << QLatin1String("-consumer") << QString::fromLatin1("xml:%1").arg(view.path->url().path());
generatorProcess.start(renderer, args);
if (generatorProcess.waitForFinished()) {
if (generatorProcess.exitStatus() == QProcess::CrashExit) {
//qDebug() << "/// Generator failed: ";
QString error = QString::fromLocal8Bit(generatorProcess.readAllStandardError());
KMessageBox::sorry(QApplication::activeWindow(), i18n("Failed to generate clip:\n%1", error), i18n("Generator Failed"));
}
else {
} else {
result = view.path->url();
}
} else {
......@@ -111,4 +113,3 @@ QUrl SamplePlugin::generatedClip(const QString &renderer, const QString &generat
Q_EXPORT_PLUGIN2(kdenlive_sampleplugin, SamplePlugin)
......@@ -17,7 +17,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#ifndef SAMPLEPLUGIN_H
#define SAMPLEPLUGIN_H
......@@ -38,6 +37,5 @@ public:
QUrl generatedClip(const QString &renderer, const QString &generator, const QUrl &projectFolder, const QStringList &lumaNames, const QStringList &lumaFiles, const double fps, const int width, const int height);
};
#endif
......@@ -373,14 +373,14 @@ Bin::Bin(QWidget *parent) :
// Connect models
m_proxyModel->setSourceModel(m_itemModel);
connect(m_itemModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), m_proxyModel, SLOT(slotDataChanged(const QModelIndex &, const
connect(m_itemModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), m_proxyModel, SLOT(slotDataChanged(const QModelIndex &, const
QModelIndex &)));
connect(m_itemModel, &QAbstractItemModel::rowsInserted, this, &Bin::rowsInserted);
connect(m_itemModel, &QAbstractItemModel::rowsRemoved, this, &Bin::rowsRemoved);
connect(m_proxyModel, &ProjectSortProxyModel::selectModel, this, &Bin::selectProxyModel);
connect(m_itemModel, SIGNAL(itemDropped(QStringList,QModelIndex)), this, SLOT(slotItemDropped(QStringList,QModelIndex)));
connect(m_itemModel, SIGNAL(itemDropped(QList<QUrl>,QModelIndex)), this, SLOT(slotItemDropped(QList<QUrl>,QModelIndex)));
connect(m_itemModel, SIGNAL(effectDropped(QString,QModelIndex)), this, SLOT(slotEffectDropped(QString,QModelIndex)));
connect(m_itemModel, SIGNAL(itemDropped(QStringList, QModelIndex)), this, SLOT(slotItemDropped(QStringList, QModelIndex)));
connect(m_itemModel, SIGNAL(itemDropped(QList<QUrl>, QModelIndex)), this, SLOT(slotItemDropped(QList<QUrl>, QModelIndex)));
connect(m_itemModel, SIGNAL(effectDropped(QString, QModelIndex)), this, SLOT(slotEffectDropped(QString, QModelIndex)));
connect(m_itemModel, &QAbstractItemModel::dataChanged, this, &Bin::slotItemEdited);
connect(m_itemModel, &ProjectItemModel::addClipCut, this, &Bin::slotAddClipCut);
connect(this, &Bin::refreshPanel, this, &Bin::doRefreshPanel);
......@@ -427,7 +427,7 @@ Bin::Bin(QWidget *parent) :
pCore->window()->actionCollection()->addAction(QStringLiteral("rename_folder"), m_renameFolderAction);
listType->setToolBarMode(KSelectAction::MenuMode);
connect(listType, SIGNAL(triggered(QAction*)), this, SLOT(slotInitView(QAction*)));
connect(listType, SIGNAL(triggered(QAction *)), this, SLOT(slotInitView(QAction *)));
// Settings menu
QMenu *settingsMenu = new QMenu(i18n("Settings"), this);
......@@ -493,9 +493,9 @@ Bin::Bin(QWidget *parent) :
connect(m_infoMessage, &BinMessageWidget::messageClosing, this, &Bin::slotResetInfoMessage);
//m_infoMessage->setWordWrap(true);
m_infoMessage->hide();
connect(this, SIGNAL(requesteInvalidRemoval(QString,QUrl,QString)), this, SLOT(slotQueryRemoval(QString,QUrl,QString)));
connect(this, SIGNAL(requesteInvalidRemoval(QString, QUrl, QString)), this, SLOT(slotQueryRemoval(QString, QUrl, QString)));
connect(this, &Bin::refreshAudioThumbs, this, &Bin::doRefreshAudioThumbs);
connect(this, SIGNAL(displayBinMessage(QString,KMessageWidget::MessageType)), this, SLOT(doDisplayMessage(QString,KMessageWidget::MessageType)));
connect(this, SIGNAL(displayBinMessage(QString, KMessageWidget::MessageType)), this, SLOT(doDisplayMessage(QString, KMessageWidget::MessageType)));
}
Bin::~Bin()
......@@ -1008,7 +1008,7 @@ void Bin::setMonitor(Monitor *monitor)
connect(m_monitor, SIGNAL(addClipToProject(QUrl)), this, SLOT(slotAddClipToProject(QUrl)));
connect(m_monitor, SIGNAL(requestAudioThumb(QString)), this, SLOT(slotSendAudioThumb(QString)));
connect(m_monitor, &Monitor::refreshCurrentClip, this, &Bin::slotOpenCurrent);
connect(m_monitor, SIGNAL(updateClipMarker(QString,QList<CommentedTime>)), this, SLOT(slotAddClipMarker(QString,QList<CommentedTime>)));
connect(m_monitor, SIGNAL(updateClipMarker(QString, QList<CommentedTime>)), this, SLOT(slotAddClipMarker(QString, QList<CommentedTime>)));
connect(this, &Bin::openClip, m_monitor, &Monitor::slotOpenClip);
}
......@@ -1060,7 +1060,7 @@ void Bin::setDocument(KdenliveDoc *project)
setEnabled(true);
blockSignals(false);
m_proxyModel->selectionModel()->blockSignals(false);
connect(m_jobManager, SIGNAL(addClip(QString,int)), this, SLOT(slotAddUrl(QString,int)));
connect(m_jobManager, SIGNAL(addClip(QString, int)), this, SLOT(slotAddUrl(QString, int)));
connect(m_proxyAction, SIGNAL(toggled(bool)), m_doc, SLOT(slotProxyCurrentItem(bool)));
connect(m_jobManager, &JobManager::jobCount, m_infoLabel, &SmallJobLabel::slotSetJobCount);
connect(m_discardCurrentClipJobs, &QAction::triggered, m_jobManager, &JobManager::slotDiscardClipJobs);
......@@ -1068,7 +1068,7 @@ void Bin::setDocument(KdenliveDoc *project)
connect(m_discardPendingJobs, &QAction::triggered, m_jobManager, &JobManager::slotCancelPendingJobs);
connect(m_jobManager, &JobManager::updateJobStatus, this, &Bin::slotUpdateJobStatus);
connect(m_jobManager, SIGNAL(gotFilterJobResults(QString,int,int,stringMap,stringMap)), this, SLOT(slotGotFilterJobResults(QString,int,int,stringMap,stringMap)));
connect(m_jobManager, SIGNAL(gotFilterJobResults(QString, int, int, stringMap, stringMap)), this, SLOT(slotGotFilterJobResults(QString, int, int, stringMap, stringMap)));
//connect(m_itemModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), m_itemView
//connect(m_itemModel, SIGNAL(updateCurrentItem()), this, SLOT(autoSelect()));
......@@ -1863,11 +1863,11 @@ void Bin::showClipProperties(ProjectClip *clip, bool forceRefresh)
ClipPropertiesController *panel = clip->buildProperties(m_propertiesPanel);
connect(this, &Bin::refreshTimeCode, panel, &ClipPropertiesController::slotRefreshTimeCode);
connect(this, &Bin::refreshPanelMarkers, panel, &ClipPropertiesController::slotFillMarkers);
connect(panel, SIGNAL(updateClipProperties(QString,QMap<QString,QString>,QMap<QString,QString>)), this, SLOT(slotEditClipCommand(QString,QMap<QString,QString>,QMap<QString,QString>)));
connect(panel, SIGNAL(updateClipProperties(QString, QMap<QString, QString>, QMap<QString, QString>)), this, SLOT(slotEditClipCommand(QString, QMap<QString, QString>, QMap<QString, QString>)));
connect(panel, SIGNAL(seekToFrame(int)), m_monitor, SLOT(slotSeek(int)));
connect(panel, SIGNAL(addMarkers(QString,QList<CommentedTime>)), this, SLOT(slotAddClipMarker(QString,QList<CommentedTime>)));
connect(panel, SIGNAL(addMarkers(QString, QList<CommentedTime>)), this, SLOT(slotAddClipMarker(QString, QList<CommentedTime>)));
connect(panel, &ClipPropertiesController::editClip, this, &Bin::slotEditClip);
connect(panel, SIGNAL(editAnalysis(QString,QString,QString)), this, SLOT(slotAddClipExtraData(QString,QString,QString)));
connect(panel, SIGNAL(editAnalysis(QString, QString, QString)), this, SLOT(slotAddClipExtraData(QString, QString, QString)));
connect(panel, &ClipPropertiesController::loadMarkers, this, &Bin::slotLoadClipMarkers);
connect(panel, &ClipPropertiesController::saveMarkers, this, &Bin::slotSaveClipMarkers);
......
......@@ -63,19 +63,19 @@ void Core::initialize()
m_library = new LibraryWidget(m_projectManager);
connect(m_library, SIGNAL(addProjectClips(QList<QUrl>)), m_binWidget, SLOT(droppedUrls(QList<QUrl>)));
connect(this, &Core::updateLibraryPath, m_library, &LibraryWidget::slotUpdateLibraryPath);
connect(m_binWidget, SIGNAL(storeFolder(QString,QString,QString,QString)), m_binController, SLOT(slotStoreFolder(QString,QString,QString,QString)));
connect(m_binController, SIGNAL(loadFolders(QMap<QString,QString>)), m_binWidget, SLOT(slotLoadFolders(QMap<QString,QString>)));
connect(m_binWidget, SIGNAL(storeFolder(QString, QString, QString, QString)), m_binController, SLOT(slotStoreFolder(QString, QString, QString, QString)));
connect(m_binController, SIGNAL(loadFolders(QMap<QString, QString>)), m_binWidget, SLOT(slotLoadFolders(QMap<QString, QString>)));
connect(m_binController, &BinController::requestAudioThumb, m_binWidget, &Bin::slotCreateAudioThumb);
connect(m_binController, &BinController::abortAudioThumbs, m_binWidget, &Bin::abortAudioThumbs);
connect(m_binController, SIGNAL(loadThumb(QString,QImage,bool)), m_binWidget, SLOT(slotThumbnailReady(QString,QImage,bool)));
connect(m_binController, SIGNAL(loadThumb(QString, QImage, bool)), m_binWidget, SLOT(slotThumbnailReady(QString, QImage, bool)));
m_monitorManager = new MonitorManager(this);
// Producer queue, creating MLT::Producers on request
m_producerQueue = new ProducerQueue(m_binController);
connect(m_producerQueue, SIGNAL(gotFileProperties(requestClipInfo,ClipController*)), m_binWidget, SLOT(slotProducerReady(requestClipInfo,ClipController*)), Qt::DirectConnection);
connect(m_producerQueue, SIGNAL(gotFileProperties(requestClipInfo, ClipController *)), m_binWidget, SLOT(slotProducerReady(requestClipInfo, ClipController *)), Qt::DirectConnection);
connect(m_producerQueue, &ProducerQueue::replyGetImage, m_binWidget, &Bin::slotThumbnailReady);
connect(m_producerQueue, &ProducerQueue::removeInvalidClip, m_binWidget, &Bin::slotRemoveInvalidClip, Qt::DirectConnection);
connect(m_producerQueue, SIGNAL(addClip(QString,QMap<QString,QString>)), m_binWidget, SLOT(slotAddUrl(QString,QMap<QString,QString>)));
connect(m_binController, SIGNAL(createThumb(QDomElement,QString,int)), m_producerQueue, SLOT(getFileProperties(QDomElement,QString,int)));
connect(m_producerQueue, SIGNAL(addClip(QString, QMap<QString, QString>)), m_binWidget, SLOT(slotAddUrl(QString, QMap<QString, QString>)));
connect(m_binController, SIGNAL(createThumb(QDomElement, QString, int)), m_producerQueue, SLOT(getFileProperties(QDomElement, QString, int)));
connect(m_binWidget, &Bin::producerReady, m_producerQueue, &ProducerQueue::slotProcessingDone, Qt::DirectConnection);
//TODO
......
......@@ -106,7 +106,7 @@ KdenliveDoc::KdenliveDoc(const QUrl &url, const QString &projectFolder, QUndoGro
m_profile.display_aspect_den = 0;
m_profile.colorspace = 0;
m_clipManager = new ClipManager(this);
connect(m_clipManager, SIGNAL(displayMessage(QString,int)), parent, SLOT(slotGotProgressInfo(QString,int)));
connect(m_clipManager, SIGNAL(displayMessage(QString, int)), parent, SLOT(slotGotProgressInfo(QString, int)));
connect(this, SIGNAL(updateCompositionMode(int)), parent, SLOT(slotUpdateCompositeAction(int)));
bool success = false;
connect(m_commandStack, &QUndoStack::indexChanged, this, &KdenliveDoc::slotModified);
......
......@@ -246,7 +246,7 @@ void DvdWizard::generateDvd()
m_pageMenu->createButtonImages(m_selectedImage.fileName(), m_highlightedImage.fileName(), false);
m_pageMenu->createBackgroundImage(m_menuImageBackground.fileName(), false);
images->setIcon(QIcon::fromTheme(QStringLiteral("dialog-ok")));
connect(&m_menuJob, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotProcessMenuStatus(int,QProcess::ExitStatus)));
connect(&m_menuJob, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotProcessMenuStatus(int, QProcess::ExitStatus)));
////qCDebug(KDENLIVE_LOG) << "/// STARTING MLT VOB CREATION: "<<m_selectedImage.fileName()<<m_menuImageBackground.fileName();
if (!m_pageMenu->menuMovie()) {
// create menu vob file
......@@ -689,7 +689,7 @@ void DvdWizard::processDvdauthor(const QString &menuMovieUrl, const QMap<QString
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert(QStringLiteral("VIDEO_FORMAT"), m_pageVob->dvdFormat() == PAL || m_pageVob->dvdFormat() == PAL_WIDE ? "PAL" : "NTSC");
m_dvdauthor->setProcessEnvironment(env);
connect(m_dvdauthor, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotRenderFinished(int,QProcess::ExitStatus)));
connect(m_dvdauthor, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotRenderFinished(int, QProcess::ExitStatus)));
connect(m_dvdauthor, &QProcess::readyReadStandardOutput, this, &DvdWizard::slotShowRenderInfo);
m_dvdauthor->setProcessChannelMode(QProcess::MergedChannels);
m_dvdauthor->start(QStringLiteral("dvdauthor"), args);
......@@ -795,7 +795,7 @@ void DvdWizard::slotRenderFinished(int exitCode, QProcess::ExitStatus status)
m_mkiso = Q_NULLPTR;
}
m_mkiso = new QProcess(this);
connect(m_mkiso, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotIsoFinished(int,QProcess::ExitStatus)));
connect(m_mkiso, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotIsoFinished(int, QProcess::ExitStatus)));
connect(m_mkiso, &QProcess::readyReadStandardOutput, this, &DvdWizard::slotShowIsoInfo);
m_mkiso->setProcessChannelMode(QProcess::MergedChannels);
QListWidgetItem *isoitem = m_status.job_progress->item(4);
......
......@@ -102,7 +102,7 @@ DragValue::DragValue(const QString &label, double defaultValue, int decimals, do
connect(m_doubleEdit, SIGNAL(valueChanged(double)), this, SLOT(slotSetValue(double)));
connect(m_doubleEdit, &QAbstractSpinBox::editingFinished, this, &DragValue::slotEditingFinished);
}
connect(m_label, SIGNAL(valueChanged(double,bool)), this, SLOT(setValueFromProgress(double,bool)));
connect(m_label, SIGNAL(valueChanged(double, bool)), this, SLOT(setValueFromProgress(double, bool)));
connect(m_label, &CustomLabel::resetValue, this, &DragValue::slotReset);
setLayout(l);
if (m_intEdit) {
......
......@@ -63,7 +63,7 @@ EffectStackView2::EffectStackView2(Monitor *projectMonitor, QWidget *parent) :
m_effect = new EffectSettings(this);
m_transition = new TransitionSettings(projectMonitor, this);
connect(m_transition, SIGNAL(importClipKeyframes(GraphicsRectItem,ItemInfo,QDomElement,QMap<QString,QString>)), this, SIGNAL(importClipKeyframes(GraphicsRectItem,ItemInfo,QDomElement,QMap<QString,QString>)));
connect(m_transition, SIGNAL(importClipKeyframes(GraphicsRectItem, ItemInfo, QDomElement, QMap<QString, QString>)), this, SIGNAL(importClipKeyframes(GraphicsRectItem, ItemInfo, QDomElement, QMap<QString, QString>)));
connect(m_effect->checkAll, &QCheckBox::stateChanged, this, &EffectStackView2::slotCheckAll);
connect(m_effect->effectCompare, &QToolButton::toggled, this, &EffectStackView2::slotSwitchCompare);
......@@ -479,7 +479,7 @@ void EffectStackView2::connectEffect(CollapsibleEffect *currentEffect)
connect(currentEffect, &AbstractCollapsibleWidget::addEffect, this, &EffectStackView2::slotAddEffect);
connect(currentEffect, &CollapsibleEffect::createRegion, this, &EffectStackView2::slotCreateRegion);
connect(currentEffect, &CollapsibleEffect::deleteGroup, this, &EffectStackView2::slotDeleteGroup);
connect(currentEffect, SIGNAL(importClipKeyframes(GraphicsRectItem,ItemInfo,QDomElement,QMap<QString,QString>)), this, SIGNAL(importClipKeyframes(GraphicsRectItem,ItemInfo,QDomElement,QMap<QString,QString>)));
connect(currentEffect, SIGNAL(importClipKeyframes(GraphicsRectItem, ItemInfo, QDomElement, QMap<QString, QString>)), this, SIGNAL(importClipKeyframes(GraphicsRectItem, ItemInfo, QDomElement, QMap<QString, QString>)));
}
void EffectStackView2::slotCheckWheelEventFilter()
......
......@@ -74,8 +74,8 @@ MyTextItem::MyTextItem(const QString &txt, QGraphicsItem *parent) :
m_shadowEffect->setEnabled(false);
setGraphicsEffect(m_shadowEffect);
updateGeometry();
connect(document(), SIGNAL(contentsChange(int,int,int)),
this, SLOT(updateGeometry(int,int,int)));
connect(document(), SIGNAL(contentsChange(int, int, int)),
this, SLOT(updateGeometry(int, int, int)));
}
Qt::Alignment MyTextItem::alignment() const
......
......@@ -495,7 +495,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
}
PositionEdit *posedit = new PositionEdit(paramName, pos, 0, m_out - m_in, m_metaInfo->monitor->timecode());
posedit->setToolTip(comment);
connect(this, SIGNAL(updateRange(int,int)), posedit, SLOT(setRange(int,int)));
connect(this, SIGNAL(updateRange(int, int)), posedit, SLOT(setRange(int, int)));
if (m_conditionParameter && pa.hasAttribute(QStringLiteral("conditional"))) {
posedit->setEnabled(false);
m_conditionalWidgets << posedit;
......
......@@ -123,7 +123,7 @@ AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int
curve->setCheckable(true);
m_selectType->addAction(curve);
m_selectType->setCurrentAction(linear);
connect(m_selectType, SIGNAL(triggered(QAction*)), this, SLOT(slotEditKeyframeType(QAction*)));
connect(m_selectType, SIGNAL(triggered(QAction *)), this, SLOT(slotEditKeyframeType(QAction *)));
KSelectAction *defaultInterp = new KSelectAction(KoIconUtils::themedIcon(QStringLiteral("keyframes")), i18n("Default interpolation"), this);
discrete = new QAction(KoIconUtils::themedIcon(QStringLiteral("discrete")), i18n("Discrete"), this);
......@@ -149,7 +149,7 @@ AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int
defaultInterp->setCurrentAction(linear);
break;
}
connect(defaultInterp, SIGNAL(triggered(QAction*)), this, SLOT(slotSetDefaultInterp(QAction*)));
connect(defaultInterp, SIGNAL(triggered(QAction *)), this, SLOT(slotSetDefaultInterp(QAction *)));
m_selectType->setToolBarMode(KSelectAction::ComboBoxMode);
m_endAttach = new QAction(i18n("Attach keyframe to end"), this);
......@@ -900,16 +900,16 @@ void AnimationWidget::slotAdjustKeyframeValue(double value)
// This is a keyframe
type = m_animController.keyframe_type(pos);
m_animProperties.anim_set(m_inTimeline.toUtf8().constData(), value / slider->factor, pos, m_outPoint, type);
emit parameterChanged();
emit parameterChanged();
} else if (m_animController.key_count() <= 1) {
pos = m_animController.key_get_frame(0);
if (pos >= 0) {
if (m_animController.is_key(pos)) {
type = m_animController.keyframe_type(pos);
}
m_animProperties.anim_set(m_inTimeline.toUtf8().constData(), value / slider->factor, pos, m_outPoint, type);
emit parameterChanged();
}
pos = m_animController.key_get_frame(0);
if (pos >= 0) {
if (m_animController.is_key(pos)) {
type = m_animController.keyframe_type(pos);
}
m_animProperties.anim_set(m_inTimeline.toUtf8().constData(), value / slider->factor, pos, m_outPoint, type);
emit parameterChanged();
}
}
}
......
......@@ -37,7 +37,7 @@ LayoutManagement::LayoutManagement(QObject *parent) :
}
// Required to enable user to add the load layout action to toolbar
layoutActions->addAction(QStringLiteral("load_layouts"), m_loadLayout);
connect(m_loadLayout, SIGNAL(triggered(QAction*)), SLOT(slotLoadLayout(QAction*)));
connect(m_loadLayout, SIGNAL(triggered(QAction *)), SLOT(slotLoadLayout(QAction *)));
connect(pCore->window(), &MainWindow::GUISetupDone, this, &LayoutManagement::slotOnGUISetupDone);
}
......
......@@ -214,7 +214,7 @@ LibraryWidget::LibraryWidget(ProjectManager *manager, QWidget *parent) : QWidget
m_coreLister = new KCoreDirLister(this);
m_coreLister->setDelayedMimeTypes(false);
connect(m_coreLister, SIGNAL(itemsAdded(QUrl,KFileItemList)), this, SLOT(slotItemsAdded(QUrl,KFileItemList)));
connect(m_coreLister, SIGNAL(itemsAdded(QUrl, KFileItemList)), this, SLOT(slotItemsAdded(QUrl, KFileItemList)));
connect(m_coreLister, &KCoreDirLister::itemsDeleted, this, &LibraryWidget::slotItemsDeleted);
connect(m_coreLister, SIGNAL(clear()), this, SLOT(slotClearAll()));
m_coreLister->openUrl(QUrl::fromLocalFile(m_directory.absolutePath()));
......@@ -415,7 +415,7 @@ void LibraryWidget::slotMoveData(const QList<QUrl> &urls, QString dest)
// Dropped an external file, attempt to copy it to library
KIO::FileCopyJob *copyJob = KIO::file_copy(url, QUrl::fromLocalFile(dir.absoluteFilePath(url.fileName())));
connect(copyJob, &KJob::result, this, &LibraryWidget::slotDownloadFinished);
connect(copyJob, SIGNAL(percent(KJob*,ulong)), this, SLOT(slotDownloadProgress(KJob*,ulong)));
connect(copyJob, SIGNAL(percent(KJob *, ulong)), this, SLOT(slotDownloadProgress(KJob *, ulong)));
} else {
// Internal drag/drop
dir.rename(url.path(), url.fileName());
......
This diff is collapsed.
......@@ -48,10 +48,18 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
KdenliveSettings::setMltpath(basePath);
QString meltPath = QDir::cleanPath(basePath).section('/', 0, -3) + "/bin/melt";
if (!QFile::exists(meltPath)) meltPath = qgetenv("MLT_PREFIX") + "/bin/melt";
if (!QFile::exists(meltPath)) meltPath = KdenliveSettings::rendererpath();
if (!QFile::exists(meltPath)) meltPath = QStringLiteral(MLT_MELTBIN);
if (!QFile::exists(meltPath)) meltPath = QStandardPaths::findExecutable("melt");
if (!QFile::exists(meltPath)) {
meltPath = qgetenv("MLT_PREFIX") + "/bin/melt";
}
if (!QFile::exists(meltPath)) {
meltPath = KdenliveSettings::rendererpath();
}
if (!QFile::exists(meltPath)) {
meltPath = QStringLiteral(MLT_MELTBIN);
}
if (!QFile::exists(meltPath)) {
meltPath = QStandardPaths::findExecutable("melt");
}
KdenliveSettings::setRendererpath(meltPath);
if (KdenliveSettings::rendererpath().isEmpty()) {
......
......@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
ProducerQueue::ProducerQueue(BinController *controller) : QObject(controller)
, m_binController(controller)
{
connect(this, SIGNAL(multiStreamFound(QString,QList<int>,QList<int>,stringMap)), this, SLOT(slotMultiStreamProducerFound(QString,QList<int>,QList<int>,stringMap)));
connect(this, SIGNAL(multiStreamFound(QString, QList<int>, QList<int>, stringMap)), this, SLOT(slotMultiStreamProducerFound(QString, QList<int>, QList<int>, stringMap)));
connect(this, &ProducerQueue::refreshTimelineProducer, m_binController, &BinController::replaceTimelineProducer);
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -617,8 +617,8 @@ bool ArchiveWidget::slotStartArchiving(bool firstPass)
QUrl startJobDst = i.value();
m_duplicateFiles.remove(startJobSrc);
KIO::CopyJob *job = KIO::copyAs(startJobSrc, startJobDst, KIO::HideProgressInfo);
connect(job, SIGNAL(result(KJob*)), this, SLOT(slotArchivingFinished(KJob*)));
connect(job, SIGNAL(processedSize(KJob*,qulonglong)), this, SLOT(slotArchivingProgress(KJob*,qulonglong)));
connect(job, SIGNAL(result(KJob *)), this, SLOT(slotArchivingFinished(KJob *)));
connect(job, SIGNAL(processedSize(KJob *, qulonglong)), this, SLOT(slotArchivingProgress(KJob *, qulonglong)));
}
return true;
}
......@@ -637,8 +637,8 @@ bool ArchiveWidget::slotStartArchiving(bool firstPass)
KMessageBox::sorry(this, i18n("Cannot create directory %1", destUrl.path()));
}
m_copyJob = KIO::copy(files, destUrl, KIO::HideProgressInfo);
connect(m_copyJob, SIGNAL(result(KJob*)), this, SLOT(slotArchivingFinished(KJob*)));
connect(m_copyJob, SIGNAL(processedSize(KJob*,qulonglong)), this, SLOT(slotArchivingProgress(KJob*,qulonglong)));
connect(m_copyJob, SIGNAL(result(KJob *)), this, SLOT(slotArchivingFinished(KJob *)));
connect(m_copyJob, SIGNAL(processedSize(KJob *, qulonglong)), this, SLOT(slotArchivingProgress(KJob *, qulonglong)));
}
if (firstPass) {
progressBar->setValue(0);
......
......@@ -209,11 +209,11 @@ void JobManager::slotProcessJobs()
continue;
}
}
connect(job, SIGNAL(jobProgress(QString,int,int)), this, SIGNAL(processLog(QString,int,int)));
connect(job, SIGNAL(jobProgress(QString, int, int)), this, SIGNAL(processLog(QString, int, int)));
connect(job, &AbstractClipJob::cancelRunningJob, m_bin, &Bin::slotCancelRunningJob);
if (job->jobType == AbstractClipJob::MLTJOB || job->jobType == AbstractClipJob::ANALYSECLIPJOB) {
connect(job, SIGNAL(gotFilterJobResults(QString,int,int,stringMap,stringMap)), this, SIGNAL(gotFilterJobResults(QString,int,int,stringMap,stringMap)));
connect(job, SIGNAL(gotFilterJobResults(QString, int, int, stringMap, stringMap)), this, SIGNAL(gotFilterJobResults(QString, int, int, stringMap, stringMap)));
}
job->startJob();
if (job->status() == JobDone) {
......
......@@ -195,7 +195,7 @@ void ProjectManager::newFile(bool showProjectSettings, bool force)
// Set default target tracks to upper audio / lower video tracks
m_trackView->audioTarget = projectTracks.y() > 0 ? projectTracks.y() : -1;
m_trackView->videoTarget = projectTracks.x() > 0 ? projectTracks.y() + 1 : -1;
connect(m_trackView->projectView(), SIGNAL(importPlaylistClips(ItemInfo,QUrl,QUndoCommand*)), pCore->bin(), SLOT(slotExpandUrl(ItemInfo,QUrl,QUndoCommand*)), Qt::DirectConnection);
connect(m_trackView->projectView(), SIGNAL(importPlaylistClips(ItemInfo, QUrl, QUndoCommand *)), pCore->bin(), SLOT(slotExpandUrl(ItemInfo, QUrl, QUndoCommand *)), Qt::DirectConnection);
m_trackView->loadTimeline();
pCore->window()->m_timelineArea->addTab(m_trackView, QIcon::fromTheme(QStringLiteral("kdenlive")), doc->description());
......@@ -556,7 +556,7 @@ void ProjectManager::doOpenFile(const QUrl &url, KAutoSaveFile *stale)
m_trackView->videoTarget = doc->getDocumentProperty(QStringLiteral("videotargettrack"), QStringLiteral("-1")).toInt();
m_trackView->loadTimeline();
m_trackView->loadGuides(pCore->binController()->takeGuidesData());
connect(m_trackView->projectView(), SIGNAL(importPlaylistClips(ItemInfo,QUrl,QUndoCommand*)), pCore->bin(), SLOT(slotExpandUrl(ItemInfo,QUrl,QUndoCommand*)), Qt::DirectConnection);
connect(m_trackView->projectView(), SIGNAL(importPlaylistClips(ItemInfo, QUrl, QUndoCommand *)), pCore->bin(), SLOT(slotExpandUrl(ItemInfo, QUrl, QUndoCommand *)), Qt::DirectConnection);
pCore->window()->connectDocument();
bool disabled = m_project->getDocumentProperty(QStringLiteral("disabletimelineeffects")) == QLatin1String("1");
QAction *disableEffects = pCore->window()->actionCollection()->action(QStringLiteral("disable_timeline_effects"));
......@@ -790,7 +790,7 @@ void ProjectManager::moveProjectData(const QString &src, const QString &dest)
// Move tmp folder (thumbnails, timeline preview)
KIO::CopyJob *copyJob = KIO::move(QUrl::fromLocalFile(src), QUrl::fromLocalFile(dest));
connect(copyJob, &KJob::result, this, &ProjectManager::slotMoveFinished);
connect(copyJob, SIGNAL(percent(KJob*,ulong)), this, SLOT(slotMoveProgress(KJob*,ulong)));
connect(copyJob, SIGNAL(percent(KJob *, ulong)), this, SLOT(slotMoveProgress(KJob *, ulong)));
m_project->moveProjectData(src, dest);
}
......
......@@ -91,7 +91,7 @@ ClipItem::ClipItem(ProjectClip *clip, const ItemInfo &info, double fps, double s
connect(&m_startThumbTimer, &QTimer::timeout, this, &ClipItem::slotGetStartThumb);
m_endThumbTimer.setSingleShot(true);
connect(&m_endThumbTimer, &QTimer::timeout, this, &ClipItem::slotGetEndThumb);
connect(m_binClip, SIGNAL(thumbReady(int,QImage)), this, SLOT(slotThumbReady(int,QImage)));
connect(m_binClip, SIGNAL(thumbReady(int, QImage)), this, SLOT(slotThumbReady(int, QImage)));
if (generateThumbs && KdenliveSettings::videothumbnails()) {
QTimer::singleShot(0, this, &ClipItem::slotFetchThumbs);
}
......
......@@ -1627,7 +1627,7 @@ void CustomTrackView::displayKeyframesMenu(QPoint pos, AbstractClipItem *clip)
m_attachKeyframeToEnd = new QAction(i18n("Attach keyframe to end"), this);
m_attachKeyframeToEnd->setCheckable(true);
m_timelineContextKeyframeMenu->addAction(m_attachKeyframeToEnd);
connect(m_selectKeyframeType, SIGNAL(triggered(QAction*)), this, SLOT(slotEditKeyframeType(QAction*)));
connect(m_selectKeyframeType, SIGNAL(triggered(QAction *)), this, SLOT(slotEditKeyframeType(QAction *)));
connect(m_attachKeyframeToEnd, &QAction::triggered, this, &CustomTrackView::slotAttachKeyframeToEnd);
}
m_attachKeyframeToEnd->setChecked(clip->isAttachedToEnd());
......
......@@ -160,7 +160,7 @@ Timeline::Timeline(KdenliveDoc *doc, const QList<QAction *> &actions, const QLis
connect(m_trackview->verticalScrollBar(), &QAbstractSlider::valueChanged, headers_area->verticalScrollBar(), &QAbstractSlider::setValue);
connect(m_trackview, &CustomTrackView::tracksChanged, this, &Timeline::slotReloadTracks);
connect(m_trackview, &CustomTrackView::updateTrackHeaders, this, &Timeline::slotRepaintTracks);
connect(m_trackview, SIGNAL(showTrackEffects(int,TrackInfo)), this, SIGNAL(showTrackEffects(int,TrackInfo)));
connect(m_trackview, SIGNAL(showTrackEffects(int, TrackInfo)), this, SIGNAL(showTrackEffects(int, TrackInfo)));
connect(m_trackview, &CustomTrackView::updateTrackEffectState, this, &Timeline::slotUpdateTrackEffectState);
transitionHandler = new TransitionHandler(m_tractor);
connect(m_trackview, &CustomTrackView::cursorMoved, m_ruler, &CustomRuler::slotCursorMoved);
......@@ -350,17 +350,17 @@ int Timeline::getTracks()
tk->trackHeader->setSelectedIndex(m_trackview->selectedTrack());
connect(tk->trackHeader, &HeaderTrack::switchTrackVideo, this, &Timeline::switchTrackVideo);
connect(tk->trackHeader, &HeaderTrack::switchTrackAudio, this, &Timeline::switchTrackAudio);
connect(tk->trackHeader, SIGNAL(switchTrackLock(int,bool)), m_trackview, SLOT(slotSwitchTrackLock(int,bool)));
connect(tk->trackHeader, SIGNAL(switchTrackLock(int, bool)), m_trackview, SLOT(slotSwitchTrackLock(int, bool)));
connect(tk->trackHeader, &HeaderTrack::selectTrack, m_trackview, &CustomTrackView::slotSelectTrack);
connect(tk->trackHeader, SIGNAL(renameTrack(int,QString)), this, SLOT(slotRenameTrack(int,QString)));
connect(tk->trackHeader, SIGNAL(renameTrack(int, QString)), this, SLOT(slotRenameTrack(int, QString)));
connect(tk->trackHeader, &HeaderTrack::configTrack, this, &Timeline::configTrack);
connect(tk->trackHeader, SIGNAL(addTrackEffect(QDomElement,int)), m_trackview, SLOT(slotAddTrackEffect(QDomElement,int)));
connect(tk->trackHeader, SIGNAL(addTrackEffect(QDomElement, int)), m_trackview, SLOT(slotAddTrackEffect(QDomElement, int)));
if (playlist.filter_count()) {
getEffects(playlist, Q_NULLPTR, i);
slotUpdateTrackEffectState(i);
}
connect(tk, &Track::newTrackDuration, this, &Timeline::checkDuration, Qt::DirectConnection);
connect(tk, SIGNAL(storeSlowMotion(QString,Mlt::Producer*)), m_doc->renderer(), SLOT(storeSlowmotionProducer(QString,Mlt::Producer*)));
connect(tk, SIGNAL(storeSlowMotion(QString, Mlt::Producer *)), m_doc->renderer(), SLOT(storeSlowmotionProducer(QString, Mlt::Producer *)));
}
}
headers_area->setMinimumWidth(headerWidth);
......
......@@ -47,7 +47,7 @@ FreeSound::FreeSound(QListWidget *listWidget, QObject *parent) :
hasMetadata = true;
connect(m_previewProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(slotPreviewErrored(QProcess::ProcessError)));
connect(m_previewProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotPreviewFinished(int,QProcess::ExitStatus)));
connect(m_previewProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotPreviewFinished(int, QProcess::ExitStatus)));
}
FreeSound::~FreeSound()
......
......@@ -540,7 +540,7 @@ void ResourceWidget::slotChangeService()
}
connect(m_currentService, SIGNAL(gotMetaInfo(QString)), this, SLOT(slotSetMetadata(QString)));
connect(m_currentService, SIGNAL(gotMetaInfo(QMap<QString,QString>)), this, SLOT(slotDisplayMetaInfo(QMap<QString,QString>)));
connect(m_currentService, SIGNAL(gotMetaInfo(QMap<QString, QString>)), this, SLOT(slotDisplayMetaInfo(QMap<QString, QString>)));
connect(m_currentService, &AbstractService::maxPages, this, &ResourceWidget::slotSetMaximum);
connect(m_currentService, &AbstractService::searchInfo, search_info, &QLabel::setText);
connect(m_currentService, &AbstractService::gotThumb, this, &ResourceWidget::slotLoadThumb);
......
......@@ -35,7 +35,7 @@ void printUsage(const char *path)
<< "\t\tfaster for large data (several minutes)." << std::endl
<< "\t--profile=<profile>\n\t\tUse the given profile for calculation (run: melt -query profiles)" << std::endl
<< "\t--no-images\n\t\tDo not save envelope and correlation images" << std::endl
;
;
}
int main(int argc, char *argv[])
......@@ -77,17 +77,13 @@ int main(int argc, char *argv[])
return 1;
}
std::string fileMain(args.at(0).toStdString());
args.removeFirst();
std::string fileSub = args.at(0).toStdString();
args.removeFirst();
qDebug() << "Unused arguments: " << args;
if (argc > 2) {
fileMain = argv[1];
fileSub = argv[2];
......@@ -98,12 +94,11 @@ int main(int argc, char *argv[])
std::cout << "Trying to align (2)\n\t" << fileSub << "\nto fit on (1)\n\t" << fileMain
<< "\n, result will indicate by how much (2) has to be moved." << std::endl
<< "Profile used: " << profile << std::endl
;
;
if (useFFT) {
std::cout << "Will use FFT based correlation." << std::endl;
}
// Initialize MLT
Mlt::Factory::init(NULL);
......@@ -122,7 +117,6 @@ int main(int argc, char *argv[])
return 2;
}
// Build the audio envelopes for the correlation
AudioEnvelope *envelopeMain = new AudioEnvelope(fileMain.c_str(), &prodMain);
envelopeMain->loadEnvelope();
......@@ -144,35 +138,30 @@ int main(int argc, char *argv[])
<< "\trelative to " << fileMain << std::endl
<< "\tin a " << prodMain.get_fps() << " fps profile (" << profile << ")." << std::endl;
if (saveImages) {
QString outImg = QString::fromLatin1("envelope-main-%1.png")
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd-hh:mm:ss"));
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd-hh:mm:ss"));
envelopeMain->drawEnvelope().save(outImg);
std::cout << "Saved volume envelope as "
<< QFileInfo(outImg).absoluteFilePath().toStdString()
<< std::endl;
outImg = QString::fromLatin1("envelope-sub-%1.png")
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd-hh:mm:ss"));
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd-hh:mm:ss"));
envelopeSub->drawEnvelope().save(outImg);
std::cout << "Saved volume envelope as "
<< QFileInfo(outImg).absoluteFilePath().toStdString()
<< std::endl;
outImg = QString::fromLatin1("correlation-%1.png")
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd-hh:mm:ss"));
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd-hh:mm:ss"));
corr.info(index)->toImage().save(outImg);
std::cout << "Saved correlation image as "
<< QFileInfo(outImg).absoluteFilePath().toStdString()
<< std::endl;
}
// Mlt::Factory::close();
return 0;
}
......@@ -24,18 +24,17 @@
#include <QImage>
#include <QVarLengthArray>
#include <krandomsequence.h>
#include <QDebug>