From: Montel Laurent Date: Fri, 31 May 2013 07:51:55 +0000 (+0200) Subject: Fix indent. Use const'ref X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=5de022b429612561bb4ede27676c5fccadbe0431;p=kdenlive Fix indent. Use const'ref --- diff --git a/src/managecapturesdialog.cpp b/src/managecapturesdialog.cpp index d5d8dfeb..bc2e3cb7 100644 --- a/src/managecapturesdialog.cpp +++ b/src/managecapturesdialog.cpp @@ -34,8 +34,8 @@ #include -ManageCapturesDialog::ManageCapturesDialog(const KUrl::List &files, QWidget * parent) : - QDialog(parent) +ManageCapturesDialog::ManageCapturesDialog(const KUrl::List &files, QWidget * parent) + : QDialog(parent) { setFont(KGlobalSettings::toolBarFont()); m_view.setupUi(this); @@ -122,8 +122,10 @@ void ManageCapturesDialog::slotToggle() for (int i = 0; i < count; ++i) { QTreeWidgetItem *item = m_view.treeWidget->topLevelItem(i); if (item) { - if (item->checkState(0) == Qt::Checked) item->setCheckState(0, Qt::Unchecked); - else item->setCheckState(0, Qt::Checked); + if (item->checkState(0) == Qt::Checked) + item->setCheckState(0, Qt::Unchecked); + else + item->setCheckState(0, Qt::Checked); } } } diff --git a/src/managecapturesdialog.h b/src/managecapturesdialog.h index 55fea362..0e9f80b7 100644 --- a/src/managecapturesdialog.h +++ b/src/managecapturesdialog.h @@ -49,9 +49,6 @@ protected: private: Ui::ManageCaptures_UI m_view; QPushButton *m_importButton; - -signals: - //void updateThumb(); }; diff --git a/src/markerdialog.cpp b/src/markerdialog.cpp index 1dc8356b..f86de6a7 100644 --- a/src/markerdialog.cpp +++ b/src/markerdialog.cpp @@ -26,12 +26,12 @@ #include -MarkerDialog::MarkerDialog(DocClipBase *clip, const CommentedTime &t, const Timecode &tc, const QString &caption, QWidget * parent) : - QDialog(parent) - , m_producer(NULL) - , m_profile(NULL) - , m_clip(clip) - , m_dar(4.0 / 3.0) +MarkerDialog::MarkerDialog(DocClipBase *clip, const CommentedTime &t, const Timecode &tc, const QString &caption, QWidget * parent) + : QDialog(parent) + , m_producer(NULL) + , m_profile(NULL) + , m_clip(clip) + , m_dar(4.0 / 3.0) { setFont(KGlobalSettings::toolBarFont()); setupUi(this); @@ -39,9 +39,9 @@ MarkerDialog::MarkerDialog(DocClipBase *clip, const CommentedTime &t, const Time // Set up categories for (int i = 0; i < 5; ++i) { - marker_type->insertItem(i, i18n("Category %1", i)); - marker_type->setItemData(i, CommentedTime::markerColor(i), Qt::DecorationRole); - } + marker_type->insertItem(i, i18n("Category %1", i)); + marker_type->setItemData(i, CommentedTime::markerColor(i), Qt::DecorationRole); + } marker_type->setCurrentIndex(t.markerType()); m_in = new TimecodeDisplay(tc, this); @@ -79,7 +79,7 @@ MarkerDialog::MarkerDialog(DocClipBase *clip, const CommentedTime &t, const Time connect(this, SIGNAL(updateThumb()), m_previewTimer, SLOT(start())); case IMAGE: case TEXT: - m_image = KThumb::getFrame(m_producer, m_in->getValue(), swidth, width, Kdenlive::DefaultThumbHeight); + m_image = KThumb::getFrame(m_producer, m_in->getValue(), swidth, width, Kdenlive::DefaultThumbHeight); p = QPixmap::fromImage(m_image); break; case COLOR: @@ -98,8 +98,8 @@ MarkerDialog::MarkerDialog(DocClipBase *clip, const CommentedTime &t, const Time connect(m_in, SIGNAL(timeCodeEditingFinished()), this, SIGNAL(updateThumb())); } else { clip_thumb->setHidden(true); - label_category->setHidden(true); - marker_type->setHidden(true); + label_category->setHidden(true); + marker_type->setHidden(true); } marker_comment->setText(t.comment()); @@ -122,9 +122,11 @@ void MarkerDialog::slotUpdateThumb() int pos = m_in->getValue(); int width = 100.0 * m_dar; int swidth = (int) (100.0 * m_profile->width() / m_profile->height() + 0.5); - if (width % 2 == 1) width++; + if (width % 2 == 1) + width++; + m_image = KThumb::getFrame(m_producer, pos, swidth, width, 100); - QPixmap p = QPixmap::fromImage(m_image); + const QPixmap p = QPixmap::fromImage(m_image); if (!p.isNull()) clip_thumb->setPixmap(p); else diff --git a/src/markerdialog.h b/src/markerdialog.h index 59278687..a15c70fa 100644 --- a/src/markerdialog.h +++ b/src/markerdialog.h @@ -31,7 +31,7 @@ namespace Mlt { class Producer; class Profile; -}; +} /** * @class MarkerDialog @@ -44,8 +44,9 @@ class MarkerDialog : public QDialog, public Ui::MarkerDialog_UI Q_OBJECT public: - MarkerDialog(DocClipBase *clip, const CommentedTime &t, const Timecode &tc, const QString &caption, QWidget * parent = 0); + explicit MarkerDialog(DocClipBase *clip, const CommentedTime &t, const Timecode &tc, const QString &caption, QWidget * parent = 0); ~MarkerDialog(); + CommentedTime newMarker(); QImage markerImage() const;