OpenHantek
viewsettings.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0+
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
14 const QString defaultFont = "Arial";
15 const int defaultFontSize = 10;
16 const 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;
49  bool zoomImage = true;
50  bool zoom = false;
51  Qt::ToolBarArea cursorGridPosition = Qt::RightToolBarArea;
52  bool cursorsVisible = false;
55  bool styleFusion = false;
56  int theme = 0;
57  unsigned screenHeight = 0;
58  unsigned screenWidth = 0;
59 
60  unsigned digitalPhosphorDraws() const { return digitalPhosphor ? digitalPhosphorDepth : 1; }
61 };
Sample dots connected by straight lines.
Definition: enums.h:56
unsigned digitalPhosphorDraws() const
Definition: viewsettings.h:60
QColor grid
The color of the grid.
Definition: viewsettings.h:25
InterpolationMode
The different interpolation modes for the graphs.
Definition: enums.h:54
unsigned digitalPhosphorDepth
Number of channels shown at one time.
Definition: viewsettings.h:46
bool antialiasing
Antialiasing for the graphs.
Definition: viewsettings.h:44
bool zoom
true if the magnified scope is enabled
Definition: viewsettings.h:50
bool styleFusion
Definition: viewsettings.h:55
unsigned screenWidth
Definition: viewsettings.h:58
unsigned screenHeight
Definition: viewsettings.h:57
QColor markers
The color of the markers.
Definition: viewsettings.h:26
DsoSettingsColorValues * colors
Definition: viewsettings.h:53
bool printerColorImages
Exports images with screen colors.
Definition: viewsettings.h:48
DsoSettingsColorValues print
Definition: viewsettings.h:40
const QString defaultFont
Definition: viewsettings.h:14
QColor axes
X- and Y-axis and subdiv lines on them.
Definition: viewsettings.h:22
const int defaultFontSize
Definition: viewsettings.h:15
int theme
Definition: viewsettings.h:56
QColor border
The border of the scope screen.
Definition: viewsettings.h:24
Dso::InterpolationMode interpolation
Interpolation mode for the graph.
Definition: viewsettings.h:47
Holds all view settings.
Definition: viewsettings.h:35
const int defaultCondensed
Definition: viewsettings.h:16
bool zoomImage
Export zoomed images with double height.
Definition: viewsettings.h:49
QColor text
The default text color.
Definition: viewsettings.h:27
Holds the color values for the oscilloscope screen.
Definition: viewsettings.h:21
QColor background
The scope background.
Definition: viewsettings.h:23
bool digitalPhosphor
true slowly fades out the previous graphs
Definition: viewsettings.h:45
int fontSize
Definition: viewsettings.h:54
Qt::ToolBarArea cursorGridPosition
Definition: viewsettings.h:51
bool cursorsVisible
Definition: viewsettings.h:52
std::vector< QColor > voltage
The colors of the voltage graphs.
Definition: viewsettings.h:29
std::vector< QColor > spectrum
The colors of the spectrum graphs.
Definition: viewsettings.h:28
DsoSettingsColorValues screen
Definition: viewsettings.h:36