wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
DolphinZoom.cpp File Reference
#include "App/BeWavedDolphin/DolphinZoom.h"
#include <algorithm>
#include <cmath>
#include <QAbstractItemModel>
#include <QApplication>
#include <QHeaderView>
#include <QScrollBar>
#include <QTableView>
Include dependency graph for DolphinZoom.cpp:

Go to the source code of this file.

Variables

static constexpr int kDefaultColumnWidth = 38
 Per-column pixel width at zoom 1.0 (matches the pre-refactor on-screen size).
static constexpr int kDefaultRowHeight = 30
 Per-row pixel height at zoom 1.0 (matches the pre-refactor on-screen size).
static constexpr double kFitEpsilon = 1e-3
 Fit Screen scale convergence threshold.
static constexpr int kFitIterations = 6
 Max passes to converge Fit Screen's fixed point.
static constexpr double kMaxFitScale = 20.0
 Largest allowed Fit Screen scale.
static constexpr int kMaxZoomLevel = 6
 Maximum discrete column-zoom step (baseline = 0).
static constexpr double kMinFitScale = 0.05
 Smallest allowed Fit Screen scale.
static constexpr double kZoomStep = 1.25
 Multiplicative factor per column-zoom step.

Variable Documentation

◆ kDefaultColumnWidth

int kDefaultColumnWidth = 38
staticconstexpr

Per-column pixel width at zoom 1.0 (matches the pre-refactor on-screen size).

Definition at line 15 of file DolphinZoom.cpp.

Referenced by DolphinZoom::apply(), and DolphinZoom::fitScreen().

◆ kDefaultRowHeight

int kDefaultRowHeight = 30
staticconstexpr

Per-row pixel height at zoom 1.0 (matches the pre-refactor on-screen size).

Definition at line 16 of file DolphinZoom.cpp.

Referenced by DolphinZoom::apply(), and DolphinZoom::fitScreen().

◆ kFitEpsilon

double kFitEpsilon = 1e-3
staticconstexpr

Fit Screen scale convergence threshold.

Definition at line 22 of file DolphinZoom.cpp.

Referenced by DolphinZoom::fitScreen().

◆ kFitIterations

int kFitIterations = 6
staticconstexpr

Max passes to converge Fit Screen's fixed point.

Definition at line 21 of file DolphinZoom.cpp.

Referenced by DolphinZoom::fitScreen().

◆ kMaxFitScale

double kMaxFitScale = 20.0
staticconstexpr

Largest allowed Fit Screen scale.

Definition at line 20 of file DolphinZoom.cpp.

Referenced by DolphinZoom::fitScreen().

◆ kMaxZoomLevel

int kMaxZoomLevel = 6
staticconstexpr

Maximum discrete column-zoom step (baseline = 0).

Definition at line 18 of file DolphinZoom.cpp.

Referenced by DolphinZoom::canZoomIn(), and DolphinZoom::zoomIn().

◆ kMinFitScale

double kMinFitScale = 0.05
staticconstexpr

Smallest allowed Fit Screen scale.

Definition at line 19 of file DolphinZoom.cpp.

Referenced by DolphinZoom::fitScreen().

◆ kZoomStep

double kZoomStep = 1.25
staticconstexpr

Multiplicative factor per column-zoom step.

Definition at line 17 of file DolphinZoom.cpp.

Referenced by DolphinZoom::apply().