ToolX
1.11.1 [e3f477f]
A GUI debug tool chain for diagnosing GVA systems
Loading...
Searching...
No Matches
player_fullscreen.h
Go to the documentation of this file.
1
//
2
// Copyright (c) 2026, Astute Systems PTY LTD
3
//
4
// This file is part of the VivoeX project developed by Astute Systems.
5
//
6
// License. See the LICENSE file in the project root for full license details.
7
//
12
13
#ifndef STREAMS_PLAYER_FULLSCREEN_H
14
#define STREAMS_PLAYER_FULLSCREEN_H
15
16
#include <QDialog>
17
#include <QGraphicsOpacityEffect>
18
#include <QLabel>
19
#include <QList>
20
#include <QMargins>
21
#include <QObject>
22
#include <QPointer>
23
#include <QPropertyAnimation>
24
#include <QPushButton>
25
#include <QRect>
26
#include <QShortcut>
27
#include <QString>
28
#include <QWidget>
29
30
namespace
toolx::streams {
31
34
class
PlayerFullscreen
:
public
QObject
35
{
36
Q_OBJECT
37
38
public
:
45
explicit
PlayerFullscreen
(QDialog *dialog, QPushButton *button);
46
47
~PlayerFullscreen
()
final
=
default
;
48
49
PlayerFullscreen
(
const
PlayerFullscreen
&) =
delete
;
50
PlayerFullscreen
&operator=(
const
PlayerFullscreen
&) =
delete
;
51
55
void
toggle
();
56
57
private
:
59
QDialog *
m_dialog
;
61
QPushButton *
m_button
;
63
QRect
m_normal_geometry
;
65
bool
m_was_maximized
=
false
;
67
QShortcut *
m_escape
=
nullptr
;
69
QList<QPointer<QWidget>>
m_hidden_widgets
;
71
QMargins
m_margins
;
73
int
m_spacing
= 0;
75
QString
m_style_sheet
;
77
QLabel *
m_hint
=
nullptr
;
79
QGraphicsOpacityEffect *
m_hint_effect
=
nullptr
;
81
QPropertyAnimation *
m_hint_animation
=
nullptr
;
82
84
void
showHint
();
85
87
void
hideHint
();
88
90
void
setChromeHidden
(
bool
hidden);
91
93
void
updateButton
();
94
};
95
96
}
// namespace toolx::streams
97
98
#endif
// STREAMS_PLAYER_FULLSCREEN_H
toolx::streams::PlayerFullscreen::PlayerFullscreen
PlayerFullscreen(QDialog *dialog, QPushButton *button)
Attach fullscreen handling to a player dialog.
Definition
player_fullscreen.cpp:26
toolx::streams::PlayerFullscreen::m_style_sheet
QString m_style_sheet
The dialog style sheet before entering fullscreen.
Definition
player_fullscreen.h:75
toolx::streams::PlayerFullscreen::m_hint_effect
QGraphicsOpacityEffect * m_hint_effect
Opacity effect of the hint.
Definition
player_fullscreen.h:79
toolx::streams::PlayerFullscreen::setChromeHidden
void setChromeHidden(bool hidden)
Hide (or restore) everything except the video view, so the video fills the screen.
Definition
player_fullscreen.cpp:115
toolx::streams::PlayerFullscreen::m_normal_geometry
QRect m_normal_geometry
The geometry before entering fullscreen.
Definition
player_fullscreen.h:63
toolx::streams::PlayerFullscreen::m_spacing
int m_spacing
The layout spacing before entering fullscreen.
Definition
player_fullscreen.h:73
toolx::streams::PlayerFullscreen::toggle
void toggle()
Toggle fullscreen on / off.
Definition
player_fullscreen.cpp:45
toolx::streams::PlayerFullscreen::m_margins
QMargins m_margins
The layout margins before entering fullscreen.
Definition
player_fullscreen.h:71
toolx::streams::PlayerFullscreen::showHint
void showHint()
Show the hint at the top centre, then fade it out.
Definition
player_fullscreen.cpp:80
toolx::streams::PlayerFullscreen::m_hint
QLabel * m_hint
The "exit fullscreen" hint overlay.
Definition
player_fullscreen.h:77
toolx::streams::PlayerFullscreen::hideHint
void hideHint()
Hide the hint immediately.
Definition
player_fullscreen.cpp:70
toolx::streams::PlayerFullscreen::m_escape
QShortcut * m_escape
Esc shortcut, enabled only while fullscreen.
Definition
player_fullscreen.h:67
toolx::streams::PlayerFullscreen::m_hidden_widgets
QList< QPointer< QWidget > > m_hidden_widgets
Widgets hidden while fullscreen (status bar, buttons).
Definition
player_fullscreen.h:69
toolx::streams::PlayerFullscreen::m_dialog
QDialog * m_dialog
The player dialog.
Definition
player_fullscreen.h:59
toolx::streams::PlayerFullscreen::updateButton
void updateButton()
Update the button text and tooltip for the current state.
Definition
player_fullscreen.cpp:150
toolx::streams::PlayerFullscreen::m_was_maximized
bool m_was_maximized
Whether the window was maximised before entering fullscreen.
Definition
player_fullscreen.h:65
toolx::streams::PlayerFullscreen::m_hint_animation
QPropertyAnimation * m_hint_animation
Fade out animation of the hint.
Definition
player_fullscreen.h:81
toolx::streams::PlayerFullscreen::m_button
QPushButton * m_button
The toggle button.
Definition
player_fullscreen.h:61
src
streams
player_fullscreen.h
Generated by
1.15.0