Krita Source Code Documentation
Loading...
Searching...
No Matches
KoUpdaterPrivate_p.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2006-2007 Thomas Zander <zander@kde.org>
3 * SPDX-FileCopyrightText: 2009 Boudewijn Rempt <boud@valdyas.org>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8#ifndef KO_UPDATERPRIVATE__P_H
9#define KO_UPDATERPRIVATE__P_H
10
11#include <QObject>
12#include <QPointer>
13#include <QTime>
14
15class KoUpdater;
16
28class KoUpdaterPrivate : public QObject
29{
30
31 Q_OBJECT
32
33public:
34
35 KoUpdaterPrivate(int weight, const QString& name, bool isPersistent = false);
36
39 ~KoUpdaterPrivate() override;
40
41 bool interrupted() const { return m_interrupted; }
42
43 int progress() const { return m_progress; }
44
45 int weight() const { return m_weight; }
46
47 QString autoNestedName() const;
48 QString subTaskName() const;
49 QString mergedSubTaskName() const;
50
51 bool hasValidRange() const;
52 bool isPersistent() const;
53 bool isCompleted() const;
54
56
57public Q_SLOTS:
58
60 void cancel();
61
62 void setInterrupted(bool value = true);
63
65 void setProgress( int percent );
66
67 void setAutoNestedName(const QString &name);
68 void setHasValidRange(bool value);
69
70
71Q_SIGNALS:
72
74 void sigUpdated();
75
78
79private:
80 int m_progress; // always in percent
88};
89
90#endif
float value(const T *src, size_t ch)
QPointer< KoUpdater > m_connectedUpdater
void cancel()
Cancel comes from KoUpdater.
void sigCancelled()
Emitted whenever the operation is cancelled by the downstream updater.
void setInterrupted(bool value=true)
QString mergedSubTaskName() const
void setHasValidRange(bool value)
QPointer< KoUpdater > connectedUpdater() const
KoUpdaterPrivate(int weight, const QString &name, bool isPersistent=false)
bool interrupted() const
void setAutoNestedName(const QString &name)
void sigUpdated()
Emitted whenever the progress changed.
QString subTaskName() const
void setProgress(int percent)
progress comes from KoUpdater
QString autoNestedName() const