OpenHantek
Loading...
Searching...
No Matches
viewsettings.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#pragma once
4
5#include <QColor>
6#include <QObject>
7#include <QPoint>
8#include <QString>
9#include <QVector>
10
11#include "hantekdso/enums.h"
12
13// These values allow a quite narrow but readable display
14const QString defaultFont = "Arial";
15const int defaultFontSize = 10;
16const int defaultCondensed = 87; // SemiCondensed = 87%
17
22 QColor axes;
23 QColor background;
24 QColor border;
25 QColor grid;
26 QColor markers;
27 QColor text;
28 std::vector< QColor > spectrum;
29 std::vector< QColor > voltage;
30};
31
36 DsoSettingsColorValues screen = { QColor( 0x7f, 0x7f, 0x7f, 0xff ), QColor( 0x00, 0x00, 0x00, 0xff ), // axes, background
37 QColor( 0xff, 0xff, 0xff, 0xff ), QColor( 0xc0, 0xc0, 0xc0, 0xff ), // border, grid
38 QColor( 0xc0, 0xc0, 0xc0, 0xff ), QColor( 0xff, 0xff, 0xff, 0xff ), // markers, text
39 std::vector< QColor >(), std::vector< QColor >() }; // spectrum, voltage
40 DsoSettingsColorValues print = { QColor( 0x40, 0x40, 0x40, 0xff ), QColor( 0xff, 0xff, 0xff, 0xff ), // axes, background
41 QColor( 0x00, 0x00, 0x00, 0xff ), QColor( 0x40, 0x40, 0x40, 0xff ), // border, grid
42 QColor( 0x40, 0x40, 0x40, 0xff ), QColor( 0x00, 0x00, 0x00, 0xff ), // markers, text
43 std::vector< QColor >(), std::vector< QColor >() }; // spectrum, voltage
44 bool antialiasing = true;
45 bool digitalPhosphor = false;
46 unsigned digitalPhosphorDepth = 8;
48 bool printerColorImages = true;
50 bool zoomImage = true;
51 bool zoom = false;
53 Qt::ToolBarArea cursorGridPosition = Qt::RightToolBarArea;
54 bool cursorsVisible = false;
57 bool styleFusion = false;
58 int theme = 0;
59 unsigned screenHeight = 0;
60 unsigned screenWidth = 0;
61
63};
InterpolationMode
The different interpolation modes for the graphs.
Definition enums.h:54
@ INTERPOLATION_LINEAR
Sample dots connected by straight lines.
Definition enums.h:56
Holds the color values for the oscilloscope screen.
Definition viewsettings.h:21
QColor background
The scope background.
Definition viewsettings.h:23
std::vector< QColor > spectrum
The colors of the spectrum graphs.
Definition viewsettings.h:28
QColor grid
The color of the grid.
Definition viewsettings.h:25
std::vector< QColor > voltage
The colors of the voltage graphs.
Definition viewsettings.h:29
QColor axes
X- and Y-axis and subdiv lines on them.
Definition viewsettings.h:22
QColor markers
The color of the markers.
Definition viewsettings.h:26
QColor border
The border of the scope screen.
Definition viewsettings.h:24
QColor text
The default text color.
Definition viewsettings.h:27
Holds all view settings.
Definition viewsettings.h:35
bool digitalPhosphor
true slowly fades out the previous graphs
Definition viewsettings.h:45
unsigned screenHeight
Definition viewsettings.h:59
unsigned digitalPhosphorDepth
Number of channels shown at one time.
Definition viewsettings.h:46
unsigned digitalPhosphorDraws() const
Definition viewsettings.h:62
int theme
Definition viewsettings.h:58
bool zoomImage
Export zoomed images with double height.
Definition viewsettings.h:50
DsoSettingsColorValues screen
Definition viewsettings.h:36
bool cursorsVisible
Definition viewsettings.h:54
int exportScaleValue
Definition viewsettings.h:52
bool styleFusion
Definition viewsettings.h:57
DsoSettingsColorValues * colors
Definition viewsettings.h:55
unsigned screenWidth
Definition viewsettings.h:60
bool printerColorImages
Exports images with screen colors.
Definition viewsettings.h:48
Dso::InterpolationMode interpolation
Interpolation mode for the graph.
Definition viewsettings.h:47
int fontSize
Definition viewsettings.h:56
bool antialiasing
Antialiasing for the graphs.
Definition viewsettings.h:44
int zoomHeightIndex
Zoom scope window height.
Definition viewsettings.h:49
Qt::ToolBarArea cursorGridPosition
Definition viewsettings.h:53
bool zoom
true if the magnified scope is enabled
Definition viewsettings.h:51
DsoSettingsColorValues print
Definition viewsettings.h:40
const int defaultFontSize
Definition viewsettings.h:15
const int defaultCondensed
Definition viewsettings.h:16
const QString defaultFont
Definition viewsettings.h:14