File indexing completed on 2024-05-12 16:02:30

0001 /*
0002  *  SPDX-FileCopyrightText: 2018 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KOFAKEPROGRESSPROXY_H
0008 #define KOFAKEPROGRESSPROXY_H
0009 
0010 #include <KoProgressProxy.h>
0011 
0012 
0013 /**
0014  * KoFakeProgressProxy is a simple class for using as a default sink of
0015  * progress for the algorithms for cases when the user is not interested
0016  * in progress reporting.
0017  *
0018  * Please note that KoFakeProgressProxy::instance() object can be used from
0019  * the context of multiple threads, so the class should have *no* state. If
0020  * you introduce any state, please make sure singleton object is removed from
0021  * the API.
0022  */
0023 class KRITAWIDGETUTILS_EXPORT KoFakeProgressProxy : public KoProgressProxy
0024 {
0025 public:
0026     int maximum() const override;
0027     void setValue(int value) override;
0028     void setRange(int minimum, int maximum) override;
0029     void setFormat(const QString &format) override;
0030     void setAutoNestedName(const QString &name) override;
0031 
0032     static KoProgressProxy* instance();
0033 };
0034 
0035 #endif // KOFAKEPROGRESSPROXY_H