]> git.sesse.net Git - kdenlive/blobdiff - src/abstractscopewidget.cpp
Editing a clip sometimes caused unnecessary clip reloads
[kdenlive] / src / abstractscopewidget.cpp
index 9c3bc416cc63b0f6c58f82f89b55b673a7418f99..0622bd97d72c0f325a3fc05b1ad50ead09dc6076 100644 (file)
@@ -8,18 +8,19 @@
  *   (at your option) any later version.                                   *
  ***************************************************************************/
 
-#include "qtconcurrentrun.h"
-
 #include "abstractscopewidget.h"
 #include "renderer.h"
 #include "monitor.h"
 
+#include <QtConcurrentRun>
 #include <QFuture>
 #include <QColor>
 #include <QMenu>
 #include <QMouseEvent>
 #include <QPainter>
 
+#include <KConfigGroup>
+
 // Uncomment for Scope debugging.
 //#define DEBUG_ASW
 
@@ -32,13 +33,18 @@ const int REALTIME_FPS = 30;
 const QColor light(250, 238, 226, 255);
 const QColor dark(40,  40,  39, 255);
 const QColor dark2(25,  25,  23, 255);
-
-const QPen AbstractScopeWidget::penThick(QBrush(QColor(250, 250, 250)),     2, Qt::SolidLine);
-const QPen AbstractScopeWidget::penThin(QBrush(QColor(250, 250, 250)),     1, Qt::SolidLine);
-const QPen AbstractScopeWidget::penLight(QBrush(QColor(200, 200, 250, 150)), 1, Qt::SolidLine);
-const QPen AbstractScopeWidget::penLightDots(QBrush(QColor(200, 200, 250, 150)), 1, Qt::DotLine);
-const QPen AbstractScopeWidget::penDark(QBrush(QColor(0, 0, 20, 250)),      1, Qt::SolidLine);
-const QPen AbstractScopeWidget::penDarkDots(QBrush(QColor(0, 0, 20, 250)),      1, Qt::DotLine);
+const QColor AbstractScopeWidget::colHighlightLight(18, 130, 255, 255);
+const QColor AbstractScopeWidget::colHighlightDark(255, 64, 19, 255);
+const QColor AbstractScopeWidget::colDarkWhite(250, 250, 250);
+
+const QPen AbstractScopeWidget::penThick(QBrush(AbstractScopeWidget::colDarkWhite.rgb()),           2, Qt::SolidLine);
+const QPen AbstractScopeWidget::penThin(QBrush(AbstractScopeWidget::colDarkWhite.rgb()),            1, Qt::SolidLine);
+const QPen AbstractScopeWidget::penLight(QBrush(QColor(200, 200, 250, 150)),                        1, Qt::SolidLine);
+const QPen AbstractScopeWidget::penLightDots(QBrush(QColor(200, 200, 250, 150)),                    1, Qt::DotLine);
+const QPen AbstractScopeWidget::penLighter(QBrush(QColor(225, 225, 250, 225)),                      1, Qt::SolidLine);
+const QPen AbstractScopeWidget::penDark(QBrush(QColor(0, 0, 20, 250)),                              1, Qt::SolidLine);
+const QPen AbstractScopeWidget::penDarkDots(QBrush(QColor(0, 0, 20, 250)),                          1, Qt::DotLine);
+const QPen AbstractScopeWidget::penBackground(QBrush(dark2),                                        1, Qt::SolidLine);
 
 const QString AbstractScopeWidget::directions[] =  {"North", "Northeast", "East", "Southeast"};
 
@@ -499,7 +505,7 @@ void AbstractScopeWidget::slotRenderZoneUpdated()
     m_newBackgroundFrames.fetchAndAddRelaxed(1);
 
 #ifdef DEBUG_ASW
-    qDebug() << "Monitor incoming at " << widgetName() << ". New frames total HUD/Scope/Background: " << m_newHUDFrames
+    qDebug() << "Data incoming at " << widgetName() << ". New frames total HUD/Scope/Background: " << m_newHUDFrames
             << "/" << m_newScopeFrames << "/" << m_newBackgroundFrames;
 #endif
 
@@ -547,7 +553,7 @@ void AbstractScopeWidget::slotAutoRefreshToggled(bool autoRefresh)
     }
 }
 
-void AbstractScopeWidget::handleMouseDrag(const QPoint, const RescaleDirection, const Qt::KeyboardModifiers) { }
+void AbstractScopeWidget::handleMouseDrag(const QPoint &, const RescaleDirection, const Qt::KeyboardModifiers) { }
 
 
 #ifdef DEBUG_ASW