Krita Source Code Documentation
Loading...
Searching...
No Matches
KoProgressUpdater.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 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6#ifndef KOPROGRESSUPDATER_H
7#define KOPROGRESSUPDATER_H
8
9#include "kritawidgetutils_export.h"
10
11#include <QString>
12#include <QObject>
13#include <QPointer>
14
15class KoUpdater;
16class KoProgressProxy;
17class QTextStream;
18class QTime;
19
53class KRITAWIDGETUTILS_EXPORT KoProgressUpdater : public QObject
54{
55 Q_OBJECT
56public:
57
58 enum Mode {
60 Unthreaded
61 };
62
67 explicit KoProgressUpdater(KoProgressProxy *progressProxy, Mode mode = Threaded);
68
76 explicit KoProgressUpdater(QPointer<KoUpdater> updater);
77
79 ~KoProgressUpdater() override;
80
93 void start(int range = 100, const QString &text = "");
94
105 QPointer<KoUpdater> startSubtask(int weight=1,
106 const QString &name = QString(), bool isPersistent = false);
107
108 void removePersistentSubtask(QPointer<KoUpdater> updater);
109
113 bool interrupted() const;
114
115 void setUpdateInterval(int ms);
116 int updateInterval() const;
117
118 void setAutoNestNames(bool value);
119 bool autoNestNames() const;
120
121public Q_SLOTS:
129 void cancel();
130
131private Q_SLOTS:
132
133 void update();
134 void updateUi();
135
136Q_SIGNALS:
138
139private:
140
141 class Private;
142 Private *const d;
143
144};
145
146
147
148
149#endif
150
float value(const T *src, size_t ch)
void triggerUpdateAsynchronously()
bool autoNestNames() const
int updateInterval() const