Pool Video Switch v2
Software video switch for distributed remote display in a lecture environment
Public Member Functions | Private Slots | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Toolbar Class Reference

#include "toolbar.h"

+ Inheritance diagram for Toolbar:
+ Collaboration diagram for Toolbar:

Public Member Functions

 Toolbar (QWidget *parent=nullptr)
 Constructor of the Toolbar. More...
 
 Toolbar (const QByteArray &sessionName, QWidget *parent=nullptr)
 Does exact teh same as Toolbar::Toolbar(QWidget *parent) but additionally instantly tries to connect to a pvsmgr with the given sessionName. More...
 
 Toolbar (bool autoConnect, QWidget *parent=nullptr)
 Constructor of the Toolbar. More...
 
 ~Toolbar () override
 Destructor of the Toolbar. More...
 

Private Slots

void onVncServerIsRunning (int port)
 A slot for the VncServerIsRunning signal. More...
 
void onDisconnected (ServerConnection *connection)
 A slot for the onDisconnected signal of the ConnectWindow. More...
 
void onConnected (ServerConnection *connection)
 A slot for the onConnected signal of the ConnectWindow. More...
 
void onServerAttentionChanged (bool on)
 
void onDoDisconnect ()
 
void onBtnAttention ()
 
void exit ()
 
void cameraBlink ()
 A slot for changing the camera icon. More...
 
void showBar ()
 This slot shows the toolbar. More...
 
void hideBar ()
 This slot hides the toolbar. More...
 
void delayedShowBar ()
 
void delayedHideBar ()
 
void showAboutDialog ()
 Toolbar::showAboutDialog. More...
 
void showInformationDialog ()
 
void setToolbarPosition (const QRect &geometry)
 

Private Member Functions

void enterEvent (QEvent *e) override
 This event is reimplemented to receive widget enter events. More...
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseMoveEvent (QMouseEvent *event) override
 
void init ()
 
void initButtonsAndMenus ()
 This function should be called once from the main init() function which in turn should only be called by the constructor. More...
 

Static Private Member Functions

static QList< RoommyRooms ()
 
static QString identifyMgrIP ()
 Identifies the responsible manager for this client by searching through the configuration file. More...
 

Private Attributes

Ui::Toolbar * _ui {}
 
QMenu * _menu {}
 
QAction * _acnDisconnect {}
 
QAction * _acnConnect {}
 
QAction * _acnInformation {}
 
QAction * _acnAbout {}
 
QAction * _acnQuit {}
 
QTimer _showTimer
 
QTimer _hideTimer
 
int _hideCountdown
 
QTimer _blinkTimer
 
VncWindow_vnc {}
 
const QPixmap _cam32
 
const QPixmap _beWatchedEye
 
QPoint _lastDragPos
 
int _yPos {}
 
int _yPosHidden {}
 

Detailed Description

Definition at line 32 of file toolbar.h.

Constructor & Destructor Documentation

Toolbar::Toolbar ( QWidget parent = nullptr)
explicit

Constructor of the Toolbar.

Constructs a widget which is a child of parent. Initialize the GUI and sets up the menu, sets window properties, create the VNC- and connect-window, connects the necessary signals, sets the UI's position and configuires the timer for the UI to be hidden.

Parameters
parentIf parent is 0, the new widget becomes a window. If parent is another widget, this widget becomes a child window inside parent. The new widget is deleted when its parent is deleted.

Definition at line 83 of file toolbar.cpp.

+ Here is the call graph for this function:

Toolbar::Toolbar ( const QByteArray &  sessionName,
QWidget parent = nullptr 
)
explicit

Does exact teh same as Toolbar::Toolbar(QWidget *parent) but additionally instantly tries to connect to a pvsmgr with the given sessionName.

Parameters
sessionNameThe session to connect to.
parentIf parent is 0, the new widget becomes a window. If parent is another widget, this widget becomes a child window inside parent. The new widget is deleted when its parent is deleted.

Definition at line 28 of file toolbar.cpp.

+ Here is the call graph for this function:

Toolbar::Toolbar ( bool  autoConnect,
QWidget parent = nullptr 
)
explicit

Constructor of the Toolbar.

Does exact the same as Toolbar::Toolbar(QWidget *parent) but additionally instantly tries to connect to the pvsmgr in its room without sessionName.

Parameters
autoConnect
parentIf parent is 0, the new widget becomes a window. If parent is another widget, this widget becomes a child window inside parent. The new widget is deleted when its parent is deleted.

Definition at line 52 of file toolbar.cpp.

+ Here is the call graph for this function:

Toolbar::~Toolbar ( )
override

Destructor of the Toolbar.

Destroys the widget. All this widget's children are deleted first.

Definition at line 222 of file toolbar.cpp.

+ Here is the call graph for this function:

Member Function Documentation

void Toolbar::cameraBlink ( )
privateslot

A slot for changing the camera icon.

This slot should be called permanently if the vnc server is recording the screen.

Definition at line 337 of file toolbar.cpp.

+ Here is the caller graph for this function:

void Toolbar::delayedHideBar ( )
privateslot

Definition at line 456 of file toolbar.cpp.

+ Here is the caller graph for this function:

void Toolbar::delayedShowBar ( )
privateslot

Definition at line 474 of file toolbar.cpp.

+ Here is the caller graph for this function:

void Toolbar::enterEvent ( QEvent *  e)
overrideprivate

This event is reimplemented to receive widget enter events.

When the mouse cursor enters the widget, the timer which, when timed out, hides the Toolbar, gets stopped.

Parameters
eThe enter event (Mouse enters widget's boundaries.)

Definition at line 239 of file toolbar.cpp.

+ Here is the call graph for this function:

void Toolbar::exit ( )
privateslot

Definition at line 89 of file toolbar.cpp.

+ Here is the caller graph for this function:

void Toolbar::hideBar ( )
privateslot

This slot hides the toolbar.

Places the toolbar hidden behind the edge of the screen just showing 2 pixels.

Definition at line 439 of file toolbar.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QString Toolbar::identifyMgrIP ( )
staticprivate

Identifies the responsible manager for this client by searching through the configuration file.

The manager whose room has the highest priority is chosen.

Definition at line 319 of file toolbar.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Toolbar::init ( )
private

Definition at line 96 of file toolbar.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Toolbar::initButtonsAndMenus ( )
private

This function should be called once from the main init() function which in turn should only be called by the constructor.

Definition at line 163 of file toolbar.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Toolbar::mouseMoveEvent ( QMouseEvent *  event)
overrideprivate

Definition at line 250 of file toolbar.cpp.

void Toolbar::mousePressEvent ( QMouseEvent *  event)
overrideprivate

Definition at line 245 of file toolbar.cpp.

QList< Room > Toolbar::myRooms ( )
staticprivate

Definition at line 267 of file toolbar.cpp.

+ Here is the caller graph for this function:

void Toolbar::onBtnAttention ( )
privateslot

Definition at line 508 of file toolbar.cpp.

+ Here is the caller graph for this function:

void Toolbar::onConnected ( ServerConnection connection)
privateslot

A slot for the onConnected signal of the ConnectWindow.

This slot will change the UI according to the state of the connection and connect the relevant signals and slots.

Parameters
connectionPointer to the ServerConnection

Definition at line 396 of file toolbar.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Toolbar::onDisconnected ( ServerConnection connection)
privateslot

A slot for the onDisconnected signal of the ConnectWindow.

This slot will change the UI according to the state fo the connection.

Definition at line 374 of file toolbar.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Toolbar::onDoDisconnect ( )
privateslot

Definition at line 419 of file toolbar.cpp.

+ Here is the caller graph for this function:

void Toolbar::onServerAttentionChanged ( bool  on)
privateslot

Definition at line 425 of file toolbar.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Toolbar::onVncServerIsRunning ( int  port)
privateslot

A slot for the VncServerIsRunning signal.

This slot will change the UI according to the state fo the VncServer.

Parameters
[in]portIndicates the state of the VncServer.

Definition at line 354 of file toolbar.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Toolbar::setToolbarPosition ( const QRect &  geometry)
privateslot

Definition at line 520 of file toolbar.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Toolbar::showAboutDialog ( )
privateslot

Toolbar::showAboutDialog.

Definition at line 485 of file toolbar.cpp.

+ Here is the caller graph for this function:

void Toolbar::showBar ( )
privateslot

This slot shows the toolbar.

Used after a hideBar().

Definition at line 468 of file toolbar.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Toolbar::showInformationDialog ( )
privateslot

Definition at line 501 of file toolbar.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

QAction* Toolbar::_acnAbout {}
private

Definition at line 48 of file toolbar.h.

QAction* Toolbar::_acnConnect {}
private

Definition at line 46 of file toolbar.h.

QAction* Toolbar::_acnDisconnect {}
private

Definition at line 45 of file toolbar.h.

QAction* Toolbar::_acnInformation {}
private

Definition at line 47 of file toolbar.h.

QAction* Toolbar::_acnQuit {}
private

Definition at line 49 of file toolbar.h.

const QPixmap Toolbar::_beWatchedEye
private

Definition at line 55 of file toolbar.h.

QTimer Toolbar::_blinkTimer
private

Definition at line 53 of file toolbar.h.

const QPixmap Toolbar::_cam32
private

Definition at line 55 of file toolbar.h.

int Toolbar::_hideCountdown
private

Definition at line 52 of file toolbar.h.

QTimer Toolbar::_hideTimer
private

Definition at line 51 of file toolbar.h.

QPoint Toolbar::_lastDragPos
private

Definition at line 56 of file toolbar.h.

QMenu* Toolbar::_menu {}
private

Definition at line 44 of file toolbar.h.

QTimer Toolbar::_showTimer
private

Definition at line 50 of file toolbar.h.

Ui::Toolbar* Toolbar::_ui {}
private

Definition at line 43 of file toolbar.h.

VncWindow* Toolbar::_vnc {}
private

Definition at line 54 of file toolbar.h.

int Toolbar::_yPos {}
private

Definition at line 58 of file toolbar.h.

int Toolbar::_yPosHidden {}
private

Definition at line 59 of file toolbar.h.


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