Krita Source Code Documentation
Loading...
Searching...
No Matches
KoZoomState Class Reference

#include <KoZoomState.h>

+ Inheritance diagram for KoZoomState:

Public Member Functions

 KoZoomState ()=default
 
 KoZoomState (KoZoomMode::Mode mode, qreal zoom, qreal minZoom, qreal maxZoom)
 
bool operator== (const KoZoomState &other) const
 

Public Attributes

qreal maxZoom {90.0}
 
qreal minZoom {0.1}
 
KoZoomMode::Mode mode = KoZoomMode::ZOOM_CONSTANT
 
qreal zoom {1.0}
 

Detailed Description

A simple structure to represent the zoom state.

Definition at line 17 of file KoZoomState.h.

Constructor & Destructor Documentation

◆ KoZoomState() [1/2]

KoZoomState::KoZoomState ( )
default

◆ KoZoomState() [2/2]

KoZoomState::KoZoomState ( KoZoomMode::Mode mode,
qreal zoom,
qreal minZoom,
qreal maxZoom )
inline

Definition at line 21 of file KoZoomState.h.

KoZoomMode::Mode mode
Definition KoZoomState.h:24
qreal maxZoom
Definition KoZoomState.h:27
qreal minZoom
Definition KoZoomState.h:26

Member Function Documentation

◆ operator==()

bool KoZoomState::operator== ( const KoZoomState & other) const

Definition at line 9 of file KoZoomState.cpp.

9 {
10 return mode == other.mode &&
11 qFuzzyCompare(zoom, other.zoom) &&
14}
static bool qFuzzyCompare(half p1, half p2)

References maxZoom, minZoom, mode, qFuzzyCompare(), and zoom.

Member Data Documentation

◆ maxZoom

qreal KoZoomState::maxZoom {90.0}

Definition at line 27 of file KoZoomState.h.

27{90.0};

◆ minZoom

qreal KoZoomState::minZoom {0.1}

Definition at line 26 of file KoZoomState.h.

26{0.1};

◆ mode

Definition at line 24 of file KoZoomState.h.

◆ zoom

qreal KoZoomState::zoom {1.0}

Definition at line 25 of file KoZoomState.h.

25{1.0};

The documentation for this class was generated from the following files: