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

Class for representing the clients of current session, with a specific frame displaying username and hostname for each one. More...

#include "connectionframe.h"

+ Inheritance diagram for ConnectionFrame:
+ Collaboration diagram for ConnectionFrame:

Signals

void frameMoving (ConnectionFrame *frame)
 
void frameMoved (ConnectionFrame *frame)
 
void doubleClicked (ConnectionFrame *frame)
 
void clicked (ConnectionFrame *frame)
 

Public Member Functions

 ConnectionFrame (MainWindow *main, QWidget *parent, bool fromRoomplan=false)
 Initialize frame for connected client. More...
 
 ~ConnectionFrame () override
 
const QPoint & getGridPosition () const
 
void setGridPosition (int x, int y)
 
void setGridPosition (const QPoint &pos)
 
void updateGeometry ()
 
void assignClient (Client *client)
 Assign client to connectionFrame. More...
 
void setSelection (bool selected)
 Set frame as selected or not. More...
 
bool isSelected () const
 
const QString & computerId () const
 
void setComputerId (QString computerId)
 
Clientclient () const
 
bool isTutor () const
 
bool isFromRoomplan () const
 
void setTutor (bool b)
 Set tutor status of frame. More...
 

Static Public Attributes

static bool paintDisabled = false
 

Protected Member Functions

void resizeEvent (QResizeEvent *event) override
 
void mouseDoubleClickEvent (QMouseEvent *event) override
 Handle double click event on frame. More...
 
void mouseReleaseEvent (QMouseEvent *e) override
 Handle mouse release event on frame. More...
 
void enterEvent (QEvent *event) override
 Handle if mouse reaches frame. More...
 
void leaveEvent (QEvent *event) override
 Handle mouse leaves frame. More...
 
void mousePressEvent (QMouseEvent *event) override
 Handle mouse press on frame. More...
 
void mouseMoveEvent (QMouseEvent *event) override
 Hanle mouse movement over frame. More...
 
void paintEvent (QPaintEvent *event) override
 Draw remote screen in frame. More...
 
void timerEvent (QTimerEvent *event) override
 Handle timer event. More...
 

Private Slots

void onClientDisconnected ()
 Handle if client was disconnected. More...
 
void onThumbUpdated (Client *client, const QImage &thumb)
 Update thumb of specific client. More...
 
void updateAppearance ()
 Update appearence of frame. More...
 
void updateLabels ()
 

Private Member Functions

void showDefaultThumb ()
 Show default thumg instead of remote screen in connectionFrame. More...
 
void calcDesiredThumbSize (const QSize &frameSize)
 
QLabeladdIcon (const QIcon *icon)
 Add icon to connection frame. More...
 

Private Attributes

QString _computerId
 
QBoxLayout * _mainLayout
 
QBoxLayout * _iconLayout
 
QLabel_lblUserName
 
QLabel_lblHostName
 
QLabel_lblExamMode
 
QLabel_icoCam
 
QLabel_icoEye
 
QLabel_icoLock
 
QList< QLabel * > _icons
 
QImage _remoteScreen
 
QPoint _clickPoint
 
QPoint _previousPosition
 
QPoint _gridPosition
 
QSize _desiredThumbSize
 
Client_client {}
 
int _timerId {}
 
int _timerCounter {}
 
bool _isSelected {}
 
bool _isTutor {}
 
bool _isFromRoomplan
 
MainWindow_mainWindow
 

Detailed Description

Class for representing the clients of current session, with a specific frame displaying username and hostname for each one.

Definition at line 17 of file connectionframe.h.

Constructor & Destructor Documentation

ConnectionFrame::ConnectionFrame ( MainWindow main,
QWidget parent,
bool  fromRoomplan = false 
)

Initialize frame for connected client.

Parameters
parent
width
height

Definition at line 78 of file connectionframe.cpp.

+ Here is the call graph for this function:

ConnectionFrame::~ConnectionFrame ( )
override

Definition at line 133 of file connectionframe.cpp.

Member Function Documentation

QLabel * ConnectionFrame::addIcon ( const QIcon *  icon)
private

Add icon to connection frame.

Parameters
icon
Returns
Pointer to new Icon.

Definition at line 165 of file connectionframe.cpp.

+ Here is the caller graph for this function:

void ConnectionFrame::assignClient ( Client client)

Assign client to connectionFrame.

Set hostName, userName and tutor status to display.

Parameters
client

Definition at line 180 of file connectionframe.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ConnectionFrame::calcDesiredThumbSize ( const QSize &  frameSize)
private

Definition at line 207 of file connectionframe.cpp.

+ Here is the caller graph for this function:

void ConnectionFrame::clicked ( ConnectionFrame frame)
signal

+ Here is the caller graph for this function:

Client* ConnectionFrame::client ( ) const
inline

Definition at line 77 of file connectionframe.h.

+ Here is the caller graph for this function:

const QString& ConnectionFrame::computerId ( ) const
inline

Definition at line 71 of file connectionframe.h.

void ConnectionFrame::doubleClicked ( ConnectionFrame frame)
signal

+ Here is the caller graph for this function:

void ConnectionFrame::enterEvent ( QEvent *  event)
overrideprotected

Handle if mouse reaches frame.

Parameters
event

Definition at line 232 of file connectionframe.cpp.

void ConnectionFrame::frameMoved ( ConnectionFrame frame)
signal

+ Here is the caller graph for this function:

void ConnectionFrame::frameMoving ( ConnectionFrame frame)
signal

+ Here is the caller graph for this function:

const QPoint& ConnectionFrame::getGridPosition ( ) const
inline

Definition at line 62 of file connectionframe.h.

+ Here is the caller graph for this function:

bool ConnectionFrame::isFromRoomplan ( ) const
inline

Definition at line 80 of file connectionframe.h.

+ Here is the caller graph for this function:

bool ConnectionFrame::isSelected ( ) const
inline

Definition at line 69 of file connectionframe.h.

bool ConnectionFrame::isTutor ( ) const
inline

Definition at line 79 of file connectionframe.h.

void ConnectionFrame::leaveEvent ( QEvent *  event)
overrideprotected

Handle mouse leaves frame.

Parameters
event

Definition at line 242 of file connectionframe.cpp.

void ConnectionFrame::mouseDoubleClickEvent ( QMouseEvent *  event)
overrideprotected

Handle double click event on frame.

Parameters
event

Definition at line 305 of file connectionframe.cpp.

void ConnectionFrame::mouseMoveEvent ( QMouseEvent *  event)
overrideprotected

Hanle mouse movement over frame.

Parameters
event

Definition at line 271 of file connectionframe.cpp.

void ConnectionFrame::mousePressEvent ( QMouseEvent *  event)
overrideprotected

Handle mouse press on frame.

Parameters
event

Definition at line 252 of file connectionframe.cpp.

void ConnectionFrame::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotected

Handle mouse release event on frame.

Check if frame was clicked or moved, if not moved enough, the event is handled as click.

Parameters
event

Definition at line 286 of file connectionframe.cpp.

void ConnectionFrame::onClientDisconnected ( )
privateslot

Handle if client was disconnected.

Kill timer and set appearence to default.

Definition at line 433 of file connectionframe.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ConnectionFrame::onThumbUpdated ( Client client,
const QImage &  thumb 
)
privateslot

Update thumb of specific client.

Parameters
client
thumb

Definition at line 450 of file connectionframe.cpp.

+ Here is the caller graph for this function:

void ConnectionFrame::paintEvent ( QPaintEvent *  event)
overrideprotected

Draw remote screen in frame.

Parameters
event

Definition at line 315 of file connectionframe.cpp.

void ConnectionFrame::resizeEvent ( QResizeEvent *  event)
overrideprotected

Definition at line 457 of file connectionframe.cpp.

+ Here is the call graph for this function:

void ConnectionFrame::setComputerId ( QString  computerId)
inline

Definition at line 72 of file connectionframe.h.

+ Here is the call graph for this function:

void ConnectionFrame::setGridPosition ( int  x,
int  y 
)

Definition at line 147 of file connectionframe.cpp.

+ Here is the caller graph for this function:

void ConnectionFrame::setGridPosition ( const QPoint &  pos)

Definition at line 141 of file connectionframe.cpp.

+ Here is the call graph for this function:

void ConnectionFrame::setSelection ( bool  selected)

Set frame as selected or not.

Parameters
selected

Definition at line 356 of file connectionframe.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ConnectionFrame::setTutor ( bool  b)

Set tutor status of frame.

Parameters
b

Definition at line 368 of file connectionframe.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ConnectionFrame::showDefaultThumb ( )
private

Show default thumg instead of remote screen in connectionFrame.

Definition at line 201 of file connectionframe.cpp.

+ Here is the caller graph for this function:

void ConnectionFrame::timerEvent ( QTimerEvent *  event)
overrideprotected

Handle timer event.

Parameters
event

Definition at line 342 of file connectionframe.cpp.

+ Here is the call graph for this function:

void ConnectionFrame::updateAppearance ( )
privateslot

Update appearence of frame.

Check tutor status, vnc status and set background or icon.

Definition at line 380 of file connectionframe.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ConnectionFrame::updateGeometry ( )

Definition at line 152 of file connectionframe.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ConnectionFrame::updateLabels ( )
privateslot

Definition at line 214 of file connectionframe.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

QPoint ConnectionFrame::_clickPoint
private

Definition at line 37 of file connectionframe.h.

Client* ConnectionFrame::_client {}
private

Definition at line 42 of file connectionframe.h.

QString ConnectionFrame::_computerId
private

Definition at line 24 of file connectionframe.h.

QSize ConnectionFrame::_desiredThumbSize
private

Definition at line 40 of file connectionframe.h.

QPoint ConnectionFrame::_gridPosition
private

Definition at line 39 of file connectionframe.h.

QLabel* ConnectionFrame::_icoCam
private

Definition at line 32 of file connectionframe.h.

QLabel * ConnectionFrame::_icoEye
private

Definition at line 32 of file connectionframe.h.

QLabel * ConnectionFrame::_icoLock
private

Definition at line 32 of file connectionframe.h.

QBoxLayout* ConnectionFrame::_iconLayout
private

Definition at line 27 of file connectionframe.h.

QList<QLabel*> ConnectionFrame::_icons
private

Definition at line 33 of file connectionframe.h.

bool ConnectionFrame::_isFromRoomplan
private

Definition at line 47 of file connectionframe.h.

bool ConnectionFrame::_isSelected {}
private

Definition at line 45 of file connectionframe.h.

bool ConnectionFrame::_isTutor {}
private

Definition at line 46 of file connectionframe.h.

QLabel* ConnectionFrame::_lblExamMode
private

Definition at line 30 of file connectionframe.h.

QLabel* ConnectionFrame::_lblHostName
private

Definition at line 29 of file connectionframe.h.

QLabel* ConnectionFrame::_lblUserName
private

Definition at line 28 of file connectionframe.h.

QBoxLayout* ConnectionFrame::_mainLayout
private

Definition at line 26 of file connectionframe.h.

MainWindow* ConnectionFrame::_mainWindow
private

Definition at line 53 of file connectionframe.h.

QPoint ConnectionFrame::_previousPosition
private

Definition at line 38 of file connectionframe.h.

QImage ConnectionFrame::_remoteScreen
private

Definition at line 35 of file connectionframe.h.

int ConnectionFrame::_timerCounter {}
private

Definition at line 44 of file connectionframe.h.

int ConnectionFrame::_timerId {}
private

Definition at line 44 of file connectionframe.h.

bool ConnectionFrame::paintDisabled = false
static

Definition at line 57 of file connectionframe.h.


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