]> git.sesse.net Git - kdenlive/commitdiff
Fix indent. Use const'ref
authorMontel Laurent <montel@kde.org>
Fri, 31 May 2013 07:51:55 +0000 (09:51 +0200)
committerMontel Laurent <montel@kde.org>
Fri, 31 May 2013 07:51:55 +0000 (09:51 +0200)
src/managecapturesdialog.cpp
src/managecapturesdialog.h
src/markerdialog.cpp
src/markerdialog.h

index d5d8dfeba233cab6e162a926fb0398a8ee5e1b1e..bc2e3cb71949cd1a8dcbbe5b07455ff02c33b796 100644 (file)
@@ -34,8 +34,8 @@
 #include <QTimer>
 
 
-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);
         }
     }
 }
index 55fea3620a735997c04813e6a0500748102b1fda..0e9f80b7815126f58cf6627ff8b3cb6983903c55 100644 (file)
@@ -49,9 +49,6 @@ protected:
 private:
     Ui::ManageCaptures_UI m_view;
     QPushButton *m_importButton;
-
-signals:
-    //void updateThumb();
 };
 
 
index 1dc8356bb2c1046c323e20a069f0654b9877a226..f86de6a7eb7dd1f891f554046e7899d173ca93fa 100644 (file)
 #include <KDebug>
 
 
-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
index 5927868755bfe327027348c718dc61fb31397f60..a15c70faef6831891ff8a1154d4c596db016e2bd 100644 (file)
@@ -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;