[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/graphics/digikam/utilities/queuemanager
From: Gilles Caulier <caulier.gilles () gmail ! com>
Date: 2010-09-13 13:20:26
Message-ID: 20100913132026.E9AFBAC887 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1174875 by cgilles:
use an internal signal/slot connection to assign bat tool settings when it updated \
using setSettings()
BUGS: 249029
M +7 -6 batchtool.cpp
M +6 -5 batchtool.h
--- trunk/extragear/graphics/digikam/utilities/queuemanager/batchtool.cpp \
#1174874:1174875 @@ -120,7 +120,7 @@
// NOTE: see B.K.O #209225 : signal/slot connection used internally to prevent \
crash when settings // are assigned to settings widget by main thread to tool \
thread.
- connect(this, SIGNAL(signalSettingsChanged(const BatchToolSettings&)),
+ connect(this, SIGNAL(signalAssignSettings2Widget()),
this, SLOT(slotAssignSettings2Widget()));
}
@@ -199,6 +199,7 @@
void BatchTool::setSettings(const BatchToolSettings& settings)
{
d->settings = settings;
+ emit signalAssignSettings2Widget();
}
void BatchTool::setInputUrl(const KUrl& inputUrl)
@@ -281,12 +282,12 @@
d->cancel = true;
}
-bool BatchTool::isCancelled()
+bool BatchTool::isCancelled() const
{
return d->cancel;
}
-BatchToolSettings BatchTool::settings()
+BatchToolSettings BatchTool::settings() const
{
return d->settings;
}
@@ -326,14 +327,14 @@
}
}
-bool BatchTool::loadToDImg()
+bool BatchTool::loadToDImg() const
{
if (!d->image.isNull()) return true;
return d->image.load(inputUrl().toLocalFile(), d->observer, \
getRawDecodingSettings()); }
-bool BatchTool::savefromDImg()
+bool BatchTool::savefromDImg() const
{
if (!isLastChainedTool() && outputSuffix().isEmpty()) return true;
@@ -359,7 +360,7 @@
return d->image;
}
-bool BatchTool::apply()
+bool BatchTool::apply() const
{
d->cancel = false;
--- trunk/extragear/graphics/digikam/utilities/queuemanager/batchtool.h \
#1174874:1174875 @@ -109,7 +109,7 @@
/** Manage settings values to tool. See BatchToolSettings container for details.
*/
void setSettings(const BatchToolSettings& settings);
- BatchToolSettings settings();
+ BatchToolSettings settings() const;
/** Manage current input url processed by this tool.
*/
@@ -145,14 +145,14 @@
/** Load image data using input Url set by setInputUrl() to instance of internal
DImg container.
*/
- bool loadToDImg();
+ bool loadToDImg() const;
/** Save image data from instance of internal DImg container using :
- output Url set by setOutputUrl() or setOutputUrlFromInputUrl()
- output file format set by outputSuffix(). If this one is empty,
format of original image is used instead.
*/
- bool savefromDImg();
+ bool savefromDImg() const;
/** Set that the Exif orientation flag is allowed be reset to NORMAL after tool \
operation
*/
@@ -180,7 +180,7 @@
/** Apply all change to perform by this tool. This method call customized \
toolOperations().
*/
- bool apply();
+ bool apply() const;
/** Re-implement this method is you want customize cancelization of tool, for \
ex. to call
a dedicated method to kill sub-threads parented to this tool instance.
@@ -201,6 +201,7 @@
Q_SIGNALS:
void signalSettingsChanged(const BatchToolSettings&);
+ void signalAssignSettings2Widget();
public Q_SLOTS:
@@ -215,7 +216,7 @@
/** Return true if cancel() have been called. Use this method to stop loop in \
your toolOperations() implementation.
*/
- bool isCancelled();
+ bool isCancelled() const;
/** Re-implement this method to customize all batch operations done by this \
tool. This method is called by apply().
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic