Krita Source Code Documentation
Loading...
Searching...
No Matches
KisStrokeEfficiencyMeasurer.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KISSTROKEEFFICIENCYMEASURER_H
8#define KISSTROKEEFFICIENCYMEASURER_H
9
10#include "kritaui_export.h"
11#include <QScopedPointer>
12
13#include <QtGlobal>
14
15class QPointF;
16
17class KRITAUI_EXPORT KisStrokeEfficiencyMeasurer
18{
19public:
22
23 void setEnabled(bool value);
24 bool isEnabled() const;
25
26 void addSample(const QPointF &pt);
27 void addSamples(const QVector<QPointF> &points);
28
29 qreal averageCursorSpeed() const;
30 qreal averageRenderingSpeed() const;
31 qreal averageFps() const;
32
33 void notifyRenderingStarted();
34 void notifyRenderingFinished();
35
36 void notifyCursorMoveStarted();
37 void notifyCursorMoveFinished();
38
39 void notifyFrameRenderingStarted();
40
41 void reset();
42
43private:
44 struct Private;
45 const QScopedPointer<Private> m_d;
46};
47
48#endif // KISSTROKEEFFICIENCYMEASURER_H
float value(const T *src, size_t ch)
const QScopedPointer< Private > m_d