qTox
Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
src
video
videomode.h
Go to the documentation of this file.
1
/*
2
Copyright © 2015-2019 by The qTox Project Contributors
3
4
This file is part of qTox, a Qt-based graphical interface for Tox.
5
6
qTox is libre software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
qTox is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with qTox. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include <QRect>
23
#include <cstdint>
24
25
struct
VideoMode
26
{
27
int
width
,
height
;
28
int
x
,
y
;
29
float
FPS
= -1.0f;
30
uint32_t
pixel_format
= 0;
31
32
VideoMode
(
int
width
= 0,
int
height
= 0,
int
x
= 0,
int
y
= 0,
float
FPS
= -1.0f);
33
34
explicit
VideoMode
(QRect rect);
35
36
QRect
toRect
()
const
;
37
38
operator
bool()
const
;
39
bool
operator==
(
const
VideoMode
& other)
const
;
40
uint32_t
norm
(
const
VideoMode
& other)
const
;
41
uint32_t
tolerance
()
const
;
42
};
VideoMode::x
int x
Definition:
videomode.h:28
VideoMode::tolerance
uint32_t tolerance() const
Definition:
videomode.cpp:70
VideoMode::pixel_format
uint32_t pixel_format
Definition:
videomode.h:30
VideoMode::height
int height
Displayed video resolution (NOT frame resolution).
Definition:
videomode.h:27
VideoMode::norm
uint32_t norm(const VideoMode &other) const
Definition:
videomode.cpp:65
VideoMode::operator==
bool operator==(const VideoMode &other) const
Definition:
videomode.cpp:59
VideoMode::toRect
QRect toRect() const
Definition:
videomode.cpp:54
VideoMode::width
int width
Definition:
videomode.h:27
VideoMode::y
int y
Coordinates of upper-left corner.
Definition:
videomode.h:28
VideoMode::VideoMode
VideoMode(int width=0, int height=0, int x=0, int y=0, float FPS=-1.0f)
Definition:
videomode.cpp:37
VideoMode
Describes a video mode supported by a device.
Definition:
videomode.h:25
VideoMode::FPS
float FPS
Frames per second supported by the device at this resolution.
Definition:
videomode.h:29
Generated by
1.8.17