Commit 7d8c9c5a authored by WINTZ Julien's avatar WINTZ Julien

WTF ????

parent 2237e7f4
......@@ -561,8 +561,17 @@ signals:
void blurRadiusChanged(qreal blurRadius);
void blurHintsChanged(BlurHints hints);
protected:
// ///////////////////////////////////////////////////////////////////
// TODO:
// ///////////////////////////////////////////////////////////////////
// Was:
// ///////////////////////////////////////////////////////////////////
// protected:
// ///////////////////////////////////////////////////////////////////
public:
// ///////////////////////////////////////////////////////////////////
void draw(QPainter *painter) override;
// ///////////////////////////////////////////////////////////////////
private:
Q_DISABLE_COPY(dtkGraphicsBlurEffect);
......@@ -918,14 +927,14 @@ public:
//
// ///////////////////////////////////////////////////////////////////
dtkPixmapBlurFilter::dtkPixmapBlurFilter(QObject *parent) : dtkPixmapFilter(*new dtkPixmapBlurFilterPrivate, BlurFilter, parent)
dtkPixmapBlurFilter::dtkPixmapBlurFilter(QObject *parent) : dtkPixmapFilter(BlurFilter, parent)
{
d = new dtkPixmapBlurFilterPrivate;
}
dtkPixmapBlurFilter::~dtkPixmapBlurFilter(void)
{
delete d;
}
void dtkPixmapBlurFilter::setRadius(qreal radius)
......@@ -940,6 +949,8 @@ qreal dtkPixmapBlurFilter::radius(void) const
void dtkPixmapBlurFilter::setBlurHints(dtkGraphicsBlurEffect::BlurHints hints)
{
qDebug() << Q_FUNC_INFO << hints;
d->hints = hints;
}
......@@ -1921,6 +1932,10 @@ QRectF dtkGraphicsEffectSource::boundingRect(Qt::CoordinateSystem system) const
return d->boundingRect(system);
}
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
QRectF dtkGraphicsEffect::sourceBoundingRect(Qt::CoordinateSystem system) const
{
if (d->source)
......@@ -2067,7 +2082,7 @@ dtkGraphicsEffect::dtkGraphicsEffect(dtkGraphicsEffectPrivate &dd, QObject *pare
dtkGraphicsEffect::~dtkGraphicsEffect(void)
{
delete d;
}
QRectF dtkGraphicsEffect::boundingRect(void) const
......@@ -2210,14 +2225,18 @@ void dtkGraphicsColorizeEffect::draw(QPainter *painter)
//
// ///////////////////////////////////////////////////////////////////
dtkGraphicsBlurEffect::dtkGraphicsBlurEffect(QObject *parent) : dtkGraphicsEffect(*new dtkGraphicsBlurEffectPrivate, parent)
dtkGraphicsBlurEffect::dtkGraphicsBlurEffect(QObject *parent) : dtkGraphicsEffect(parent)
{
qDebug() << Q_FUNC_INFO << 0;
d = new dtkGraphicsBlurEffectPrivate;
qDebug() << Q_FUNC_INFO << 1 << d;
d->filter->setBlurHints(dtkGraphicsBlurEffect::PerformanceHint);
qDebug() << Q_FUNC_INFO << 2;
}
dtkGraphicsBlurEffect::~dtkGraphicsBlurEffect(void)
{
delete d;
}
qreal dtkGraphicsBlurEffect::blurRadius(void) const
......@@ -2577,7 +2596,17 @@ void dtkWidgetsPassThrough::paintEvent(QPaintEvent *event)
QPainter painter(this);
if(!this->dirty) {
painter.drawPixmap(event->rect(), buffer);
// ///////////////////////////////////////////////////////////////////
// Aiming at goal
// ///////////////////////////////////////////////////////////////////
dtkGraphicsBlurEffect effect(this);
effect.draw(&painter);
// ///////////////////////////////////////////////////////////////////
// painter.drawPixmap(event->rect(), buffer);
// ///////////////////////////////////////////////////////////////////
painter.fillRect(event->rect(), QColor(64, 0, 64, 128));
painter.setPen(QPen(Qt::yellow, 50));
painter.drawLine(event->rect().topLeft(), event->rect().topRight());
......
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