Perceptual Color

asyncimageproviderbase.h
1// SPDX-FileCopyrightText: Lukas Sommer <sommerluk@gmail.com>
2// SPDX-License-Identifier: BSD-2-Clause OR MIT
3
4#ifndef ASYNCIMAGEPROVIDERBASE_H
5#define ASYNCIMAGEPROVIDERBASE_H
6
7#include <qglobal.h>
8#include <qobject.h>
9
10#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
11#include <qtmetamacros.h>
12#else
13#include <qobjectdefs.h>
14#include <qstring.h>
15#endif
16
17namespace PerceptualColor
18{
19/** @internal
20 *
21 * @brief Base class for @ref AsyncImageProvider.
22 *
23 * @internal
24 *
25 * @note <a href="https://stackoverflow.com/a/63021891">The <tt>Q_OBJECT</tt>
26 * macro and templates cannot be combined.</a> Therefore,
27 * @ref AsyncImageProviderBase serves as a base class to provide
28 * signals for @ref AsyncImageProvider. */
29class AsyncImageProviderBase : public QObject
30{
32
33public:
34 Q_INVOKABLE explicit AsyncImageProviderBase(QObject *parent = nullptr);
35 virtual ~AsyncImageProviderBase() noexcept override;
36
38 /** @brief Signals that the background rendering has completed an
39 * interlacing pass.
40 *
41 * New image data is available now at @ref AsyncImageProvider::getCache().
42 *
43 * @note Even after changing image parameters with
44 * @ref AsyncImageProvider::setImageParameters() a possibly
45 * running render process might not stop immediately and continue
46 * to deliver data, therefore also emitting this signal.
47 *
48 * @sa @ref AsyncImageProvider::refreshAsync() */
49 void interlacingPassCompleted();
50
51private:
52 Q_DISABLE_COPY(AsyncImageProviderBase)
53
54 /** @internal @brief Only for unit tests. */
55 friend class TestAsyncImageProviderBase;
56};
57
58} // namespace PerceptualColor
59
60#endif // ASYNCIMAGEPROVIDERBASE_H
The namespace of this library.
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.