[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: [calligra/calligra-resource_md5-rempt] krita/plugins/paintops/libbrush: Cleanup KisBrush impleme
From: Lukast dev <lukast.dev () gmail ! com>
Date: 2014-04-14 12:00:47
Message-ID: CAKdU0rOxV5H2-2ueXnDgmO4ncTm3J3heH6q=N30TZ7LRJawVjg () mail ! gmail ! com
[Download RAW message or body]
It was probably meant for gbr brush export?
2014-04-14 11:50 GMT+02:00 Boudewijn Rempt <boud@valdyas.org>:
> Git commit e2a4590fd15e5dcf493f5e5c78269579e74118c2 by Boudewijn Rempt.
> Committed on 14/04/2014 at 09:49.
> Pushed by rempt into branch 'calligra-resource_md5-rempt'.
>
> Cleanup KisBrush implementations
>
> The empty saveToDevice implementations aren't necessary at all, it's
> not part of the KisBrush api.
>
> M +0 -6 krita/plugins/paintops/libbrush/kis_abr_brush.cpp
> M +0 -5 krita/plugins/paintops/libbrush/kis_abr_brush.h
> M +0 -6 krita/plugins/paintops/libbrush/kis_abr_brush_collection.cpp
> M +0 -5 krita/plugins/paintops/libbrush/kis_abr_brush_collection.h
> M +0 -2 krita/plugins/paintops/libbrush/kis_brush.h
> M +5 -5 krita/plugins/paintops/libbrush/kis_gbr_brush.h
> M +3 -3 krita/plugins/paintops/libbrush/kis_imagepipe_brush.h
>
> http://commits.kde.org/calligra/e2a4590fd15e5dcf493f5e5c78269579e74118c2
>
> diff --git a/krita/plugins/paintops/libbrush/kis_abr_brush.cpp
> b/krita/plugins/paintops/libbrush/kis_abr_brush.cpp
> index a719127..66472b7 100644
> --- a/krita/plugins/paintops/libbrush/kis_abr_brush.cpp
> +++ b/krita/plugins/paintops/libbrush/kis_abr_brush.cpp
> @@ -57,12 +57,6 @@ bool KisAbrBrush::save()
> return true;
> }
>
> -bool KisAbrBrush::saveToDevice(QIODevice* dev) const
> -{
> - Q_UNUSED(dev);
> - return false;
> -}
> -
> void KisAbrBrush::setBrushTipImage(const QImage& image)
> {
> setValid(true);
> diff --git a/krita/plugins/paintops/libbrush/kis_abr_brush.h
> b/krita/plugins/paintops/libbrush/kis_abr_brush.h
> index 008e9cb..975e421 100644
> --- a/krita/plugins/paintops/libbrush/kis_abr_brush.h
> +++ b/krita/plugins/paintops/libbrush/kis_abr_brush.h
> @@ -51,11 +51,6 @@ public:
> virtual bool save();
>
> /**
> - * save the content of this brush to an IO device
> - */
> - virtual bool saveToDevice(QIODevice* dev) const;
> -
> - /**
> * @return default file extension for saving the brush
> */
> virtual QString defaultFileExtension() const;
> diff --git a/krita/plugins/paintops/libbrush/kis_abr_brush_collection.cpp
> b/krita/plugins/paintops/libbrush/kis_abr_brush_collection.cpp
> index f8c5532..d739b75 100644
> --- a/krita/plugins/paintops/libbrush/kis_abr_brush_collection.cpp
> +++ b/krita/plugins/paintops/libbrush/kis_abr_brush_collection.cpp
> @@ -540,12 +540,6 @@ bool KisAbrBrushCollection::save()
> return false;
> }
>
> -bool KisAbrBrushCollection::saveToDevice(QIODevice* dev) const
> -{
> - Q_UNUSED(dev);
> - return false;
> -}
> -
> QImage KisAbrBrushCollection::image() const
> {
> return QImage();
> diff --git a/krita/plugins/paintops/libbrush/kis_abr_brush_collection.h
> b/krita/plugins/paintops/libbrush/kis_abr_brush_collection.h
> index f851288..ff9bcdc 100644
> --- a/krita/plugins/paintops/libbrush/kis_abr_brush_collection.h
> +++ b/krita/plugins/paintops/libbrush/kis_abr_brush_collection.h
> @@ -63,11 +63,6 @@ public:
> virtual QImage image() const;
>
> /**
> - * save the content of this brush to an IO device
> - */
> - virtual bool saveToDevice(QIODevice* dev) const;
> -
> - /**
> * @return default file extension for saving the brush
> */
> virtual QString defaultFileExtension() const;
> diff --git a/krita/plugins/paintops/libbrush/kis_brush.h
> b/krita/plugins/paintops/libbrush/kis_brush.h
> index 43cbe27..7f788a2 100644
> --- a/krita/plugins/paintops/libbrush/kis_brush.h
> +++ b/krita/plugins/paintops/libbrush/kis_brush.h
> @@ -33,8 +33,6 @@ typedef KisSharedPtr<KisQImagemask> KisQImagemaskSP;
>
> class QString;
> class QPoint;
> -class QIODevice;
> -
> class KoColor;
> class KoColorSpace;
>
> diff --git a/krita/plugins/paintops/libbrush/kis_gbr_brush.h
> b/krita/plugins/paintops/libbrush/kis_gbr_brush.h
> index 72375fc..7345e59 100644
> --- a/krita/plugins/paintops/libbrush/kis_gbr_brush.h
> +++ b/krita/plugins/paintops/libbrush/kis_gbr_brush.h
> @@ -70,11 +70,6 @@ public:
> virtual QImage image() const;
>
> /**
> - * save the content of this brush to an IO device
> - */
> - virtual bool saveToDevice(QIODevice* dev) const;
> -
> - /**
> * If the brush image data are colorful (e.g. you created the brush
> from the canvas with custom brush)
> * and you want to paint with it as with masks, set to true.
> */
> @@ -102,6 +97,11 @@ public:
> virtual QString defaultFileExtension() const;
>
> protected:
> + /**
> + * save the content of this brush to an IO device
> + */
> + friend class KisImageBrushesPipe;
> + virtual bool saveToDevice(QIODevice* dev) const;
>
> KisGbrBrush(const KisGbrBrush& rhs);
>
> diff --git a/krita/plugins/paintops/libbrush/kis_imagepipe_brush.h
> b/krita/plugins/paintops/libbrush/kis_imagepipe_brush.h
> index 1541782..d1a39f9 100644
> --- a/krita/plugins/paintops/libbrush/kis_imagepipe_brush.h
> +++ b/krita/plugins/paintops/libbrush/kis_imagepipe_brush.h
> @@ -67,9 +67,6 @@ public:
> virtual bool load();
> virtual bool save();
>
> - /// Will call KisBrush's saveToDevice as well
> - virtual bool saveToDevice(QIODevice* dev) const;
> -
> /**
> * @return the next image in the pipe.
> */
> @@ -112,6 +109,9 @@ public:
> protected:
> void setBrushType(enumBrushType type);
> void setHasColor(bool hasColor);
> + /// Will call KisBrush's saveToDevice as well
> + virtual bool saveToDevice(QIODevice* dev) const;
> +
>
> KisImagePipeBrush(const KisImagePipeBrush& rhs);
>
>
[Attachment #3 (text/html)]
<div dir="ltr">It was probably meant for gbr brush export?</div><div \
class="gmail_extra"><br><br><div class="gmail_quote">2014-04-14 11:50 GMT+02:00 \
Boudewijn Rempt <span dir="ltr"><<a href="mailto:boud@valdyas.org" \
target="_blank">boud@valdyas.org</a>></span>:<br> <blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Git commit \
e2a4590fd15e5dcf493f5e5c78269579e74118c2 by Boudewijn Rempt.<br> Committed on \
14/04/2014 at 09:49.<br> Pushed by rempt into branch \
'calligra-resource_md5-rempt'.<br> <br>
Cleanup KisBrush implementations<br>
<br>
The empty saveToDevice implementations aren't necessary at all, it's<br>
not part of the KisBrush api.<br>
<br>
M +0 -6 krita/plugins/paintops/libbrush/kis_abr_brush.cpp<br>
M +0 -5 krita/plugins/paintops/libbrush/kis_abr_brush.h<br>
M +0 -6 krita/plugins/paintops/libbrush/kis_abr_brush_collection.cpp<br>
M +0 -5 krita/plugins/paintops/libbrush/kis_abr_brush_collection.h<br>
M +0 -2 krita/plugins/paintops/libbrush/kis_brush.h<br>
M +5 -5 krita/plugins/paintops/libbrush/kis_gbr_brush.h<br>
M +3 -3 krita/plugins/paintops/libbrush/kis_imagepipe_brush.h<br>
<br>
<a href="http://commits.kde.org/calligra/e2a4590fd15e5dcf493f5e5c78269579e74118c2" \
target="_blank">http://commits.kde.org/calligra/e2a4590fd15e5dcf493f5e5c78269579e74118c2</a><br>
<br>
diff --git a/krita/plugins/paintops/libbrush/kis_abr_brush.cpp \
b/krita/plugins/paintops/libbrush/kis_abr_brush.cpp<br> index a719127..66472b7 \
100644<br>
--- a/krita/plugins/paintops/libbrush/kis_abr_brush.cpp<br>
+++ b/krita/plugins/paintops/libbrush/kis_abr_brush.cpp<br>
@@ -57,12 +57,6 @@ bool KisAbrBrush::save()<br>
return true;<br>
}<br>
<br>
-bool KisAbrBrush::saveToDevice(QIODevice* dev) const<br>
-{<br>
- Q_UNUSED(dev);<br>
- return false;<br>
-}<br>
-<br>
void KisAbrBrush::setBrushTipImage(const QImage& image)<br>
{<br>
setValid(true);<br>
diff --git a/krita/plugins/paintops/libbrush/kis_abr_brush.h \
b/krita/plugins/paintops/libbrush/kis_abr_brush.h<br> index 008e9cb..975e421 \
100644<br>
--- a/krita/plugins/paintops/libbrush/kis_abr_brush.h<br>
+++ b/krita/plugins/paintops/libbrush/kis_abr_brush.h<br>
@@ -51,11 +51,6 @@ public:<br>
virtual bool save();<br>
<br>
/**<br>
- * save the content of this brush to an IO device<br>
- */<br>
- virtual bool saveToDevice(QIODevice* dev) const;<br>
-<br>
- /**<br>
* @return default file extension for saving the brush<br>
*/<br>
virtual QString defaultFileExtension() const;<br>
diff --git a/krita/plugins/paintops/libbrush/kis_abr_brush_collection.cpp \
b/krita/plugins/paintops/libbrush/kis_abr_brush_collection.cpp<br> index \
f8c5532..d739b75 100644<br>
--- a/krita/plugins/paintops/libbrush/kis_abr_brush_collection.cpp<br>
+++ b/krita/plugins/paintops/libbrush/kis_abr_brush_collection.cpp<br>
@@ -540,12 +540,6 @@ bool KisAbrBrushCollection::save()<br>
return false;<br>
}<br>
<br>
-bool KisAbrBrushCollection::saveToDevice(QIODevice* dev) const<br>
-{<br>
- Q_UNUSED(dev);<br>
- return false;<br>
-}<br>
-<br>
QImage KisAbrBrushCollection::image() const<br>
{<br>
return QImage();<br>
diff --git a/krita/plugins/paintops/libbrush/kis_abr_brush_collection.h \
b/krita/plugins/paintops/libbrush/kis_abr_brush_collection.h<br> index \
f851288..ff9bcdc 100644<br>
--- a/krita/plugins/paintops/libbrush/kis_abr_brush_collection.h<br>
+++ b/krita/plugins/paintops/libbrush/kis_abr_brush_collection.h<br>
@@ -63,11 +63,6 @@ public:<br>
virtual QImage image() const;<br>
<br>
/**<br>
- * save the content of this brush to an IO device<br>
- */<br>
- virtual bool saveToDevice(QIODevice* dev) const;<br>
-<br>
- /**<br>
* @return default file extension for saving the brush<br>
*/<br>
virtual QString defaultFileExtension() const;<br>
diff --git a/krita/plugins/paintops/libbrush/kis_brush.h \
b/krita/plugins/paintops/libbrush/kis_brush.h<br> index 43cbe27..7f788a2 100644<br>
--- a/krita/plugins/paintops/libbrush/kis_brush.h<br>
+++ b/krita/plugins/paintops/libbrush/kis_brush.h<br>
@@ -33,8 +33,6 @@ typedef KisSharedPtr<KisQImagemask> KisQImagemaskSP;<br>
<br>
class QString;<br>
class QPoint;<br>
-class QIODevice;<br>
-<br>
class KoColor;<br>
class KoColorSpace;<br>
<br>
diff --git a/krita/plugins/paintops/libbrush/kis_gbr_brush.h \
b/krita/plugins/paintops/libbrush/kis_gbr_brush.h<br> index 72375fc..7345e59 \
100644<br>
--- a/krita/plugins/paintops/libbrush/kis_gbr_brush.h<br>
+++ b/krita/plugins/paintops/libbrush/kis_gbr_brush.h<br>
@@ -70,11 +70,6 @@ public:<br>
virtual QImage image() const;<br>
<br>
/**<br>
- * save the content of this brush to an IO device<br>
- */<br>
- virtual bool saveToDevice(QIODevice* dev) const;<br>
-<br>
- /**<br>
* If the brush image data are colorful (e.g. you created the brush from the \
canvas with custom brush)<br>
* and you want to paint with it as with masks, set to true.<br>
*/<br>
@@ -102,6 +97,11 @@ public:<br>
virtual QString defaultFileExtension() const;<br>
<br>
protected:<br>
+ /**<br>
+ * save the content of this brush to an IO device<br>
+ */<br>
+ friend class KisImageBrushesPipe;<br>
+ virtual bool saveToDevice(QIODevice* dev) const;<br>
<br>
KisGbrBrush(const KisGbrBrush& rhs);<br>
<br>
diff --git a/krita/plugins/paintops/libbrush/kis_imagepipe_brush.h \
b/krita/plugins/paintops/libbrush/kis_imagepipe_brush.h<br> index 1541782..d1a39f9 \
100644<br>
--- a/krita/plugins/paintops/libbrush/kis_imagepipe_brush.h<br>
+++ b/krita/plugins/paintops/libbrush/kis_imagepipe_brush.h<br>
@@ -67,9 +67,6 @@ public:<br>
virtual bool load();<br>
virtual bool save();<br>
<br>
- /// Will call KisBrush's saveToDevice as well<br>
- virtual bool saveToDevice(QIODevice* dev) const;<br>
-<br>
/**<br>
* @return the next image in the pipe.<br>
*/<br>
@@ -112,6 +109,9 @@ public:<br>
protected:<br>
void setBrushType(enumBrushType type);<br>
void setHasColor(bool hasColor);<br>
+ /// Will call KisBrush's saveToDevice as well<br>
+ virtual bool saveToDevice(QIODevice* dev) const;<br>
+<br>
<br>
KisImagePipeBrush(const KisImagePipeBrush& rhs);<br>
<br>
</blockquote></div><br></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic