}
QImage RGBParadeGenerator::calculateRGBParade(const QSize ¶deSize, const QImage &image,
- const RGBParadeGenerator::PaintMode paintMode, const bool &drawAxis, const uint &accelFactor)
+ const RGBParadeGenerator::PaintMode paintMode, const bool &drawAxis,
+ const bool &drawGradientRef, const uint &accelFactor)
{
Q_ASSERT(accelFactor >= 1);
}
}
}
+
+ if (drawGradientRef) {
+ davinci.setPen(colLight);
+ davinci.drawLine(0 ,partH, partW, 0);
+ davinci.drawLine( partW + offset,partH, 2*partW + offset,0);
+ davinci.drawLine(2*partW + 2*offset,partH, 3*partW + 2*offset,0);
+ }
const int d = 50;
* (at your option) any later version. *
***************************************************************************/
+#include <QMenu>
#include <QRect>
#include <QTime>
#include "renderer.h"
ui->paintMode->addItem(i18n("RGB 2"), QVariant(RGBParadeGenerator::PaintMode_RGB2));
bool b = true;
+
+ m_menu->addSeparator();
+ m_aAxis = new QAction(i18n("Draw axis"), this);
+ m_aAxis->setCheckable(true);
+ m_menu->addAction(m_aAxis);
+ b &= connect(m_aAxis, SIGNAL(changed()), this, SLOT(forceUpdateScope()));
+
+ m_aGradRef = new QAction(i18n("Gradient reference line"), this);
+ m_aGradRef->setCheckable(true);
+ m_menu->addAction(m_aGradRef);
+ b &= connect(m_aGradRef, SIGNAL(changed()), this, SLOT(forceUpdateScope()));
+
b &= connect(ui->paintMode, SIGNAL(currentIndexChanged(int)), this, SLOT(forceUpdateScope()));
+
Q_ASSERT(b);
m_rgbParadeGenerator = new RGBParadeGenerator();
delete ui;
delete m_rgbParadeGenerator;
+ delete m_aAxis;
+ delete m_aGradRef;
}
void RGBParade::readConfig()
KSharedConfigPtr config = KGlobal::config();
KConfigGroup scopeConfig(config, configName());
ui->paintMode->setCurrentIndex(scopeConfig.readEntry("paintmode", 0));
+ m_aAxis->setChecked(scopeConfig.readEntry("axis", true));
+ m_aGradRef->setChecked(scopeConfig.readEntry("gradref", false));
}
void RGBParade::writeConfig()
KSharedConfigPtr config = KGlobal::config();
KConfigGroup scopeConfig(config, configName());
scopeConfig.writeEntry("paintmode", ui->paintMode->currentIndex());
+ scopeConfig.writeEntry("axis", m_aAxis->isChecked());
+ scopeConfig.writeEntry("gradref", m_aGradRef->isChecked());
scopeConfig.sync();
}
int paintmode = ui->paintMode->itemData(ui->paintMode->currentIndex()).toInt();
QImage parade = m_rgbParadeGenerator->calculateRGBParade(m_scopeRect.size(), qimage, (RGBParadeGenerator::PaintMode) paintmode,
- true, accelerationFactor);
+ m_aAxis->isChecked(), m_aGradRef->isChecked(), accelerationFactor);
emit signalScopeRenderingFinished(start.elapsed(), accelerationFactor);
return parade;
}
m_a75PBox = new QAction(i18n("75% box"), this);
m_a75PBox->setCheckable(true);
- m_a75PBox->setChecked(false);
m_menu->addAction(m_a75PBox);
b &= connect(m_a75PBox, SIGNAL(changed()), this, SLOT(forceUpdateBackground()));
m_aAxisEnabled = new QAction(i18n("Draw axis"), this);
m_aAxisEnabled->setCheckable(true);
- m_aAxisEnabled->setChecked(false);
m_menu->addAction(m_aAxisEnabled);
b &= connect(m_aAxisEnabled, SIGNAL(changed()), this, SLOT(forceUpdateBackground()));