~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to libs/dimg/filters/dimgthreadedfilter.h

  • Committer: Bazaar Package Importer
  • Author(s): Christian Mangold
  • Date: 2010-04-09 21:30:01 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100409213001-4bfyibrd359rn7o3
Tags: 2:1.2.0-0ubuntu1
* New upstream release (LP: #560576)
* Remove all patches, fixed upstream
  - Remove quilt build-depend

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * Date        : 2005-05-25
7
7
 * Description : threaded image filter class.
8
8
 *
9
 
 * Copyright (C) 2005-2009 by Gilles Caulier <caulier dot gilles at gmail dot com>
10
 
 * Copyright (C) 2007-2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
 
9
 * Copyright (C) 2005-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
10
 * Copyright (C) 2007-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
11
11
 *
12
12
 * This program is free software; you can redistribute it
13
13
 * and/or modify it under the terms of the GNU General
56
56
        to start the threaded computation.
57
57
        To run filter without to use multithreading, call startFilterDirectly().
58
58
    */
59
 
    DImgThreadedFilter(QObject *parent=0);
 
59
    DImgThreadedFilter(QObject* parent=0);
60
60
 
61
61
    /** Constructs a filter with all arguments (ready to use).
62
62
        You need to call startFilter() to start the threaded computation.
63
63
        To run filter without to use multithreading, call startFilterDirectly().
64
64
    */
65
 
    DImgThreadedFilter(DImg *orgImage, QObject *parent,
 
65
    DImgThreadedFilter(DImg* orgImage, QObject* parent,
66
66
                       const QString& name = QString());
67
67
 
68
68
    ~DImgThreadedFilter();
69
69
 
70
70
    void setOriginalImage(const DImg& orgImage);
71
71
    void setFilterName(const QString& name);
72
 
    void setParent(QObject *parent);
 
72
    void setParent(QObject* parent);
73
73
 
74
74
    DImg getTargetImage()       { return m_destImage; };
75
75
    const QString& filterName() { return m_name; };
130
130
      Any derived filter class that is publicly available to other filters
131
131
      should implement an additional constructor using this constructor.
132
132
      */
133
 
    DImgThreadedFilter(DImgThreadedFilter *master, const DImg& orgImage, const DImg& destImage,
 
133
    DImgThreadedFilter(DImgThreadedFilter* master, const DImg& orgImage, const DImg& destImage,
134
134
                       int progressBegin=0, int progressEnd=100, const QString& name=QString());
135
135
 
136
136
    /** Inform the master that there is currently a slave. At destruction of the slave, call with slave=0. */
137
 
    void setSlave(DImgThreadedFilter *slave);
 
137
    void setSlave(DImgThreadedFilter* slave);
138
138
 
139
139
    /** This method modulates the progress value from the 0..100 span to the span of this slave.
140
140
        Called by postProgress if master is not null. */
148
148
    /** The progress span that a slave filter uses in the parent filter's progress. */
149
149
    int                 m_progressBegin;
150
150
    int                 m_progressSpan;
 
151
    int                 m_progressCurrent;  // To prevent signals bombarding with progress indicator value in postProgress().
151
152
 
152
153
    /** To post event from thread to parent. */
153
 
    QObject            *m_parent;
 
154
    QObject*            m_parent;
154
155
 
155
156
    /** Filter name.*/
156
157
    QString             m_name;
162
163
    DImg                m_destImage;
163
164
 
164
165
    /** The current slave. Any filter might want to use another filter while processing. */
165
 
    DImgThreadedFilter *m_slave;
 
166
    DImgThreadedFilter* m_slave;
166
167
 
167
168
    /** The master of this slave filter. Progress info will be routed to this one. */
168
 
    DImgThreadedFilter *m_master;
 
169
    DImgThreadedFilter* m_master;
169
170
};
170
171
 
171
172
}  // namespace Digikam