CCIMXDesktop
 
Loading...
Searching...
No Matches
settings_common.h
1#ifndef SETTINGS_COMMON_H
2#define SETTINGS_COMMON_H
3#include <QPair>
4#include <QPoint>
5
6namespace Settings {
7
11using SceneSize = QPair<unsigned short, unsigned short>;
12
16using FigureSize = QPair<unsigned short, unsigned short>;
17
23template <auto value>
24struct SZ {
28 static constexpr unsigned short width = value.first;
29
33 static constexpr unsigned short height = value.second;
34};
35
39using Position = QPair<unsigned short, unsigned short>;
40
46template <auto value>
47struct XY {
51 static constexpr unsigned short x = value.first;
52
56 static constexpr unsigned short y = value.second;
57};
58
59}
60
61#endif // SETTINGS_COMMON_H
Template struct to extract width and height from a QPair size value.
Definition settings_common.h:24
static constexpr unsigned short width
Width component of the size.
Definition settings_common.h:28
static constexpr unsigned short height
Height component of the size.
Definition settings_common.h:33
Template struct to extract x and y coordinates from a QPair position value.
Definition settings_common.h:47
static constexpr unsigned short y
Y coordinate.
Definition settings_common.h:56
static constexpr unsigned short x
X coordinate.
Definition settings_common.h:51