Krita Source Code Documentation
Loading...
Searching...
No Matches
KisRepaintDebugger.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022 Alvin Wong <alvin@alvinhc.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7#ifndef KIS_REPAINT_DEBUGGER_H
8#define KIS_REPAINT_DEBUGGER_H
9
10#include <QtGlobal>
11
12#include <kritawidgetutils_export.h>
13
14class QPaintDevice;
15class QPaintEvent;
16class QRect;
17
36class KRITAWIDGETUTILS_EXPORT KisRepaintDebugger
37{
38public:
43 static bool enabled();
44
45 KisRepaintDebugger() = default;
47
48 void paint(QPaintDevice *paintDevice, const QRect &widgetRect);
49 void paint(QPaintDevice *paintDevice, const QVector<QRect> &widgetRects);
50 void paint(QPaintDevice *paintDevice, const QPaintEvent *event);
51 void paintFull(QPaintDevice *paintDevice);
52
53private:
54 void paint(QPaintDevice *paintDevice, const QRect *widgetRects, size_t count);
55
56private:
57 unsigned int m_colorIndex {0};
58};
59
60#endif // KIS_REPAINT_DEBUGGER_H
~KisRepaintDebugger()=default
KisRepaintDebugger()=default