Krita Source Code Documentation
Loading...
Searching...
No Matches
KoZoomActionState.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KOZOOMACTIONSTATE_H
8#define KOZOOMACTIONSTATE_H
9
10#include "kritawidgets_export.h"
11
12#include <QVector>
13#include <tuple>
14#include "KoZoomState.h"
15
16
17class KRITAWIDGETS_EXPORT KoZoomActionState
18{
19public:
20 using ZoomItem = std::tuple<KoZoomMode::Mode, qreal, QString>;
21
26 int currentRealLevelIndex = 0;
28
29 KoZoomActionState(const KoZoomState &state);
30 void setZoomState(const KoZoomState &state);
31
32 int calcNearestStandardLevel(qreal zoom) const;
33 int calcNearestStandardLevel() const;
34};
35
36KRITAWIDGETS_EXPORT
37QDebug operator<<(QDebug dbg, const KoZoomActionState::ZoomItem &item);
38
39#endif // KOZOOMACTIONSTATE_H
KRITAWIDGETS_EXPORT QDebug operator<<(QDebug dbg, const KoZoomActionState::ZoomItem &item)
QVector< ZoomItem > realGuiLevels
QVector< ZoomItem > guiLevels
QVector< qreal > standardLevels
std::tuple< KoZoomMode::Mode, qreal, QString > ZoomItem