Commit 2237e7f4 authored by WINTZ Julien's avatar WINTZ Julien

Improve wrapping.

To be used tomorrow ...
parent 71aea6ef
...@@ -453,6 +453,9 @@ public: ...@@ -453,6 +453,9 @@ public:
dtkGraphicsEffect(QObject *parent = nullptr); dtkGraphicsEffect(QObject *parent = nullptr);
virtual ~dtkGraphicsEffect(void); virtual ~dtkGraphicsEffect(void);
public:
void setGraphicsEffectSource(dtkGraphicsEffectSource *newSource);
public: public:
virtual QRectF boundingRectFor(const QRectF &sourceRect) const; virtual QRectF boundingRectFor(const QRectF &sourceRect) const;
QRectF boundingRect(void) const; QRectF boundingRect(void) const;
...@@ -1905,7 +1908,7 @@ dtkGraphicsEffectPrivate::~dtkGraphicsEffectPrivate(void) ...@@ -1905,7 +1908,7 @@ dtkGraphicsEffectPrivate::~dtkGraphicsEffectPrivate(void)
dtkGraphicsEffectSource::dtkGraphicsEffectSource(dtkGraphicsEffectSourcePrivate &dd, QObject *parent) : QObject(parent) dtkGraphicsEffectSource::dtkGraphicsEffectSource(dtkGraphicsEffectSourcePrivate &dd, QObject *parent) : QObject(parent)
{ {
d = ⅆ
} }
dtkGraphicsEffectSource::~dtkGraphicsEffectSource(void) dtkGraphicsEffectSource::~dtkGraphicsEffectSource(void)
...@@ -1926,24 +1929,24 @@ QRectF dtkGraphicsEffect::sourceBoundingRect(Qt::CoordinateSystem system) const ...@@ -1926,24 +1929,24 @@ QRectF dtkGraphicsEffect::sourceBoundingRect(Qt::CoordinateSystem system) const
return QRectF(); return QRectF();
} }
// void dtkGraphicsEffect::setGraphicsEffectSource(dtkGraphicsEffectSource *newSource) void dtkGraphicsEffect::setGraphicsEffectSource(dtkGraphicsEffectSource *newSource)
// { {
// dtkGraphicsEffect::ChangeFlags flags; dtkGraphicsEffect::ChangeFlags flags;
// if (source) { if (d->source) {
// flags |= dtkGraphicsEffect::SourceDetached; flags |= dtkGraphicsEffect::SourceDetached;
// source->d->invalidateCache(); d->source->d->invalidateCache();
// source->d->detach(); d->source->d->detach();
// delete source; delete d->source;
// } }
// source = newSource; d->source = newSource;
// if (newSource) if (newSource)
// flags |= dtkGraphicsEffect::SourceAttached; flags |= dtkGraphicsEffect::SourceAttached;
// q->sourceChanged(flags); this->sourceChanged(flags);
// } }
// /////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////
// //
...@@ -2048,6 +2051,10 @@ void dtkGraphicsEffectSourcePrivate::invalidateCache(InvalidateReason reason) co ...@@ -2048,6 +2051,10 @@ void dtkGraphicsEffectSourcePrivate::invalidateCache(InvalidateReason reason) co
QPixmapCache::remove(m_cacheKey); QPixmapCache::remove(m_cacheKey);
} }
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
dtkGraphicsEffect::dtkGraphicsEffect(QObject *parent) : QObject(parent) dtkGraphicsEffect::dtkGraphicsEffect(QObject *parent) : QObject(parent)
{ {
d = new dtkGraphicsEffectPrivate; d = new dtkGraphicsEffectPrivate;
...@@ -2120,6 +2127,10 @@ void dtkGraphicsEffect::sourceChanged(ChangeFlags flags) ...@@ -2120,6 +2127,10 @@ void dtkGraphicsEffect::sourceChanged(ChangeFlags flags)
Q_UNUSED(flags); Q_UNUSED(flags);
} }
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
dtkGraphicsColorizeEffect::dtkGraphicsColorizeEffect(QObject *parent) : dtkGraphicsEffect(*new dtkGraphicsColorizeEffectPrivate, parent) dtkGraphicsColorizeEffect::dtkGraphicsColorizeEffect(QObject *parent) : dtkGraphicsEffect(*new dtkGraphicsColorizeEffectPrivate, parent)
{ {
......
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