Commit d1320d02 authored by Simon Eugster's avatar Simon Eugster

Levels: Can be displayed unscaled.

svn path=/trunk/kdenlive/; revision=4626
parent 110cea8f
......@@ -8,6 +8,7 @@
* (at your option) any later version. *
***************************************************************************/
#include <QMenu>
#include <QTime>
#include "levelsgenerator.h"
#include "levels.h"
......@@ -24,17 +25,26 @@ Levels::Levels(Monitor *projMonitor, Monitor *clipMonitor, QWidget *parent) :
ui->cbG->setChecked(true);
ui->cbB->setChecked(true);
m_aUnscaled = new QAction(i18n("Unscaled"), this);
m_aUnscaled->setCheckable(true);
m_menu->addSeparator();
m_menu->addAction(m_aUnscaled);
bool b = true;
b &= connect(ui->cbY, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
b &= connect(ui->cbR, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
b &= connect(ui->cbG, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
b &= connect(ui->cbB, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
b &= connect(m_aUnscaled, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
Q_ASSERT(b);
}
Levels::~Levels()
{
delete ui;
delete m_aUnscaled;
}
QString Levels::widgetName() const { return QString("Levels"); }
......@@ -66,9 +76,9 @@ QImage Levels::renderScope(uint accelFactor)
| (ui->cbB->isChecked() ? 1 : 0) * LevelsGenerator::ComponentB;
QImage levels = m_levelsGenerator->calculateLevels(m_scopeRect.size(), m_activeRender->extractFrame(m_activeRender->seekFramePosition()),
componentFlags, false, accelFactor);
componentFlags, m_aUnscaled->isChecked(), accelFactor);
emit signalScopeRenderingFinished(0, 1);
emit signalScopeRenderingFinished(start.elapsed(), accelFactor);
return levels;
}
QImage Levels::renderBackground(uint)
......
......@@ -27,6 +27,7 @@ public:
private:
LevelsGenerator *m_levelsGenerator;
QAction *m_aUnscaled;
QRect scopeRect();
bool isHUDDependingOnInput() const;
......
......@@ -14,35 +14,35 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<item row="0" column="1">
<widget class="QCheckBox" name="cbY">
<property name="text">
<string>Y</string>
</property>
</widget>
</item>
<item row="0" column="1">
<item row="0" column="2">
<widget class="QCheckBox" name="cbR">
<property name="text">
<string>R</string>
</property>
</widget>
</item>
<item row="0" column="2">
<item row="0" column="3">
<widget class="QCheckBox" name="cbG">
<property name="text">
<string>G</string>
</property>
</widget>
</item>
<item row="0" column="3">
<item row="0" column="4">
<widget class="QCheckBox" name="cbB">
<property name="text">
<string>B</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="4">
<item row="1" column="1" colspan="4">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -55,6 +55,13 @@
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblComponents">
<property name="text">
<string>Components</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment