qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Public Member Functions | Public Attributes | List of all members
VideoMode Struct Reference

Describes a video mode supported by a device. More...

#include <videomode.h>

Collaboration diagram for VideoMode:
Collaboration graph

Public Member Functions

 VideoMode (int width=0, int height=0, int x=0, int y=0, float FPS=-1.0f)
 
 VideoMode (QRect rect)
 
QRect toRect () const
 
 operator bool () const
 All zeros means a default/unspecified mode. More...
 
bool operator== (const VideoMode &other) const
 
uint32_t norm (const VideoMode &other) const
 
uint32_t tolerance () const
 

Public Attributes

int width
 
int height
 Displayed video resolution (NOT frame resolution). More...
 
int x
 
int y
 Coordinates of upper-left corner. More...
 
float FPS = -1.0f
 Frames per second supported by the device at this resolution. More...
 
uint32_t pixel_format = 0
 

Detailed Description

Describes a video mode supported by a device.

Definition at line 25 of file videomode.h.

Constructor & Destructor Documentation

◆ VideoMode() [1/2]

VideoMode::VideoMode ( int  width = 0,
int  height = 0,
int  x = 0,
int  y = 0,
float  FPS = -1.0f 
)

Definition at line 37 of file videomode.cpp.

◆ VideoMode() [2/2]

VideoMode::VideoMode ( QRect  rect)
explicit

Definition at line 46 of file videomode.cpp.

Member Function Documentation

◆ norm()

uint32_t VideoMode::norm ( const VideoMode other) const

Definition at line 65 of file videomode.cpp.

Here is the caller graph for this function:

◆ operator bool()

VideoMode::operator bool ( ) const

All zeros means a default/unspecified mode.

Definition at line 80 of file videomode.cpp.

◆ operator==()

bool VideoMode::operator== ( const VideoMode other) const

Definition at line 59 of file videomode.cpp.

◆ tolerance()

uint32_t VideoMode::tolerance ( ) const

Definition at line 70 of file videomode.cpp.

Here is the caller graph for this function:

◆ toRect()

QRect VideoMode::toRect ( ) const

Definition at line 54 of file videomode.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ FPS

float VideoMode::FPS = -1.0f

Frames per second supported by the device at this resolution.

Note
a value < 0 indicates an invalid value

Definition at line 29 of file videomode.h.

◆ height

unsigned short VideoMode::width VideoMode::height

Displayed video resolution (NOT frame resolution).

Definition at line 27 of file videomode.h.

◆ pixel_format

uint32_t VideoMode::pixel_format = 0

Definition at line 30 of file videomode.h.

◆ width

int VideoMode::width

Definition at line 27 of file videomode.h.

◆ x

int VideoMode::x

Definition at line 28 of file videomode.h.

◆ y

unsigned short VideoMode::x VideoMode::y

Coordinates of upper-left corner.

Definition at line 28 of file videomode.h.


The documentation for this struct was generated from the following files: