Krita Source Code Documentation
Loading...
Searching...
No Matches
KoZoomMode.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 SPDX-FileCopyrightText: 2005 Johannes Schaub <litb_devel@web.de>
3 SPDX-FileCopyrightText: 2011 Arjen Hiemstra <ahiemstra@heimr.nl>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef _KOZOOMMODE_H_
9#define _KOZOOMMODE_H_
10
11#include <QFlags>
12#include "kritaflake_export.h"
13
14class QDebug;
15
19class KRITAFLAKE_EXPORT KoZoomMode
20{
21public:
22 enum Mode
23 {
24 ZOOM_CONSTANT = 0,
25 ZOOM_PAGE = 1,
26 ZOOM_WIDTH = 2,
27 ZOOM_HEIGHT = 16,
28 };
29
30 Q_DECLARE_FLAGS(Modes, Mode)
31
32
33 static QString toString(Mode mode);
34
39 static QVector<qreal> generateStandardZoomLevels(qreal minZoom, qreal maxZoom);
40
44 static qreal findNextZoom(qreal currentZoom, const QVector<qreal> &zoomLevels);
45
49 static qreal findPrevZoom(qreal currentZoom, const QVector<qreal> &zoomLevels);
50
51private:
52 static const char * const modes[];
53};
54
55Q_DECLARE_OPERATORS_FOR_FLAGS(KoZoomMode::Modes)
56
57KRITAFLAKE_EXPORT
58QDebug operator<<(QDebug dbg, const KoZoomMode::Mode &mode);
59
60#endif
Q_DECLARE_FLAGS(KisUpdaterContextSnapshotEx, KisUpdaterContextSnapshotExTag)
KRITAFLAKE_EXPORT QDebug operator<<(QDebug dbg, const KoZoomMode::Mode &mode)
Q_DECLARE_OPERATORS_FOR_FLAGS(KisBaseRectsWalker::SubtreeVisitFlags)