|
Pool Video Switch v2
Software video switch for distributed remote display in a lecture environment
|
Initializing MainWindow. More...
#include "mainwindow.h"
Inheritance diagram for MainWindow:
Collaboration diagram for MainWindow:Public Member Functions | |
| MainWindow (QWidget *parent=nullptr) | |
| Initialize MainWindow and ListenServer. More... | |
| ~MainWindow () override | |
| QRect | calcFrameGeometry (ConnectionFrame *frame) const |
Protected Slots | |
| void | disableButtons () |
| DisableButtons. More... | |
| void | enableButtons () |
| EnableButtons. More... | |
| void | clientCountChanged () |
| this function determines if the number of clients in exam mode comprise more than 50%. More... | |
| void | onSessionNameClick () |
| Show session name, after it was clicked on. More... | |
| void | onSessionNameUpdate () |
| Update session name. More... | |
| void | onDeleteClient () |
| void | onButtonLock (bool checked) |
| Handle button to lock or unlock screens of client(s). More... | |
| void | onButtonLockSingle () |
| void | onButtonStudentToTutor () |
| Handle projection from one student to tutor. More... | |
| void | onButtonStudentToTutorExclusive () |
| Handle projection from one student to tutor, lock everyone else. More... | |
| void | onButtonTutorToAll () |
| Handle projection from tutor to all. More... | |
| void | onButtonTutorToStudent () |
| Handle the projection from Tutor to specific student. More... | |
| void | onButtonStopProjection () |
| Handle Button StopProjection. More... | |
| void | onButtonSetAsTutor () |
| Handle button to set specific client as tutor. More... | |
| void | onButtonReloadRoomConfig () |
| void | onReloadRoomOk () |
| void | onReloadRoomCancel () |
| void | onButtonExit () |
| On button exit, close application. More... | |
| void | onButtonHelp () |
| Display popup which explains possible actions about the buttons. More... | |
| void | onFrameMoving (ConnectionFrame *frame) |
| void | onFrameDropped (ConnectionFrame *frame) |
| Place frame to from user specified position. More... | |
| void | onFrameClicked (ConnectionFrame *frame) |
| Mark given frame after it was clicked on. More... | |
| void | onClientConnected (Client *client) |
| Handle from ListenServer signaled new client connection. More... | |
| void | onClientAuthenticating (Client *client, ClientLogin *request) |
| Authenticate new Client client. More... | |
| void | onClientAuthenticated (Client *client) |
| New client was authenticated, make several checks. More... | |
| void | onVncServerStateChange (Client *client) |
| Handle if VNC Server State has changed. More... | |
| void | onVncClientStateChange (Client *client) |
| Handle VNC client state change. More... | |
Private Types | |
| enum | Mode { Mode::Broadcast, Mode::Multicast, Mode::Unicast, Mode::LockedUnicast, Mode::None } |
Private Member Functions | |
| QPoint | closestFreeSlot (const QPoint &preferredPixels, const ConnectionFrame *toIgnore) |
| : find the closest available frame. More... | |
| void | placeFrameInFreeSlot (ConnectionFrame *frame, QPoint preferred=QPoint(-1,-1)) |
| ConnectionFrame * | createFrame (const QString &computerId=QString(), const QPoint *gridPosition=nullptr, bool fromRoomplan=false) |
| Create new Frame. More... | |
| void | startVncServerIfNecessary (int from) |
| MainWindow::startVncServerIfNecessary. More... | |
| void | tellClientCurrentSituation (Client *client) |
| Tells the new client the current situation in class room. More... | |
| void | reset (bool lock=false) |
| reset More... | |
| Client * | getClientFromId (int id) |
| Returns connected client which belongs to given id. More... | |
| ConnectionFrame * | getTutorFrame () |
| Return the Frame, which is currently beeing Tutor. More... | |
| ConnectionFrame * | getSelectedFrame () |
| Return the Frame, which is currently selected by user. More... | |
| void | closeEvent (QCloseEvent *e) override |
| Handle closeEvent. More... | |
| void | changeEvent (QEvent *e) override |
| Change Event. More... | |
| void | resizeEvent (QResizeEvent *e) override |
| Resize event. More... | |
| void | mouseReleaseEvent (QMouseEvent *e) override |
| Handle Mouse Release Event. More... | |
| int | getTileWidthPx () const |
| int | getTileHeightPx () const |
| void | updateContextButtonStates () |
| void | reloadCurrentRoom () |
| void | vncOneOnOne (bool exclusive) |
Private Attributes | |
| Ui::MainWindow * | ui |
| SessionNameWindow * | _sessionNameWindow |
| HelpWindow * | _helpWindow |
| ReloadRoomWindow * | _reloadWindow |
| ClickLabel * | _sessionNameLabel |
| int | _tilesX |
| int | _tilesY |
| QImage * | _backgroundImage = nullptr |
| QLabel * | _examModeLabel = nullptr |
| QTimer * | _buttonLockTimer |
| QList< QAction * > | _lockingButtons |
| enum MainWindow::Mode | _mode |
| int | _streamingSource {} |
| QList< ConnectionFrame * > | _clientFrames |
| QWidget * | _dropMarker |
| int | _lastClientCount {} |
Static Private Attributes | |
| static const qint64 | BUTTON_BLOCK_TIME = 2000 |
Initializing MainWindow.
Handle ButtonEvents and initialize ListenServer.
Definition at line 27 of file mainwindow.h.
|
strongprivate |
| Enumerator | |
|---|---|
| Broadcast | |
| Multicast | |
| Unicast | |
| LockedUnicast | |
| None | |
Definition at line 57 of file mainwindow.h.
|
explicit |
Initialize MainWindow and ListenServer.
| ipListUrl | |
| parent |
Definition at line 57 of file mainwindow.cpp.
Here is the call graph for this function:
|
override |
Definition at line 204 of file mainwindow.cpp.
| QRect MainWindow::calcFrameGeometry | ( | ConnectionFrame * | frame | ) | const |
Definition at line 814 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprivate |
|
protectedslot |
this function determines if the number of clients in exam mode comprise more than 50%.
In that case the whole manager switches to exam mode, disabling many features in the toolbar
Definition at line 160 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprivate |
Handle closeEvent.
If user calls closing MainWindow, close, else ignore.
| e |
Definition at line 404 of file mainwindow.cpp.
|
private |
: find the closest available frame.
Closest: smallest Euclidean distance from center to center
'Algorithm': ideally, go in circles around the preferred point until you find a free spot. Lazy way: store all free positions in an array and find later there the closest (<- that's what I do)
| preferred | in Pixels! |
| toIgnore,ignore | this connectionframe when considering free slots |
Definition at line 232 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Create new Frame.
Create new frame and add to current available frame list. Also connect signals frameMoved() and clicked() with slots.
Definition at line 312 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
DisableButtons.
Definition at line 1260 of file mainwindow.cpp.
Here is the caller graph for this function:
|
protectedslot |
EnableButtons.
Definition at line 1271 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Returns connected client which belongs to given id.
Iterating over ConnectionFrames and comparing id to given id.
| id |
Definition at line 354 of file mainwindow.cpp.
Here is the caller graph for this function:
|
private |
Return the Frame, which is currently selected by user.
Iterating over all ConnectionFrame and looking for flag _isSelected.
Definition at line 386 of file mainwindow.cpp.
Here is the caller graph for this function:
|
private |
|
private |
|
private |
Return the Frame, which is currently beeing Tutor.
Iterating over all ConnectionFrames, and looking for flag _isTutor.
Definition at line 371 of file mainwindow.cpp.
Here is the caller graph for this function:
|
overrideprivate |
Handle Mouse Release Event.
Check if click was inside the frame and if that is the case, set the selection of each connected client to false.
| e |
Definition at line 542 of file mainwindow.cpp.
Here is the call graph for this function:
|
protectedslot |
On button exit, close application.
Definition at line 1039 of file mainwindow.cpp.
Here is the caller graph for this function:
|
protectedslot |
Display popup which explains possible actions about the buttons.
Definition at line 826 of file mainwindow.cpp.
Here is the caller graph for this function:
|
protectedslot |
Handle button to lock or unlock screens of client(s).
If already locked, do nothing, else lock or unlock the clients, except the tutor and the manager running machine.
| checked |
Definition at line 1001 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Definition at line 1007 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Definition at line 698 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Handle button to set specific client as tutor.
Unset active tutor and set selected client, if not inactive, as new tutor.
Definition at line 1048 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Handle Button StopProjection.
Set ProjectionSource of each client to false, stop the active VNC Server and the active VNC Client(s) and unlock all screens.
Definition at line 989 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Handle projection from one student to tutor.
Definition at line 921 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Handle projection from one student to tutor, lock everyone else.
Definition at line 930 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Handle projection from tutor to all.
Get the client who is tutor and set the projectionSource of all clients, except the tutor ones, to false.
Definition at line 836 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Handle the projection from Tutor to specific student.
Set the client who is tutor as from and the selected client as to.
Definition at line 868 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
New client was authenticated, make several checks.
Check if new clients ip already exists, if yes –> not necessary to create new clientFrame. if not –> create a new one and adapt this one to current situation in class room(projection / lock screen). Check if avctiv tutor is available, if not –> check if new client is possible tutor.
| client |
Definition at line 1140 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Authenticate new Client client.
Check if incoming client ip already exists, if yes –> return. Check if same name of client already exist, if yes –> name new client as name(x). x = number of clients with the same name.
| client | |
| request |
Definition at line 1093 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Handle from ListenServer signaled new client connection.
| client |
Definition at line 1077 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Definition at line 1281 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Mark given frame after it was clicked on.
| frame |
Definition at line 612 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Place frame to from user specified position.
Should be called when a connectionFrame is dropped during the "drag-n-drop".
Definition at line 601 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Definition at line 585 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Definition at line 709 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Definition at line 772 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Show session name, after it was clicked on.
Definition at line 632 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Update session name.
Definition at line 640 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Handle VNC client state change.
Check if any vnc client is in use, and if that is not the case, stop VNC Server.
| client | |
| lastProjectionSource |
Definition at line 1222 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedslot |
Handle if VNC Server State has changed.
Check if VNC server has been started/stopped on some client and start VNC server/reset pending VNC projection information.
| client |
Definition at line 1172 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 300 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 717 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
reset
Definition at line 562 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprivate |
Resize event.
| e |
Definition at line 450 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
MainWindow::startVncServerIfNecessary.
| from |
Definition at line 675 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Tells the new client the current situation in class room.
Set the specific parameters like projection source or lock screen.
| client |
Definition at line 334 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 515 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 935 of file mainwindow.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 48 of file mainwindow.h.
|
private |
Definition at line 52 of file mainwindow.h.
|
private |
Definition at line 67 of file mainwindow.h.
|
private |
Definition at line 68 of file mainwindow.h.
|
private |
Definition at line 49 of file mainwindow.h.
|
private |
Definition at line 43 of file mainwindow.h.
|
private |
Definition at line 70 of file mainwindow.h.
|
private |
Definition at line 53 of file mainwindow.h.
|
private |
|
private |
Definition at line 44 of file mainwindow.h.
|
private |
Definition at line 45 of file mainwindow.h.
|
private |
Definition at line 42 of file mainwindow.h.
|
private |
Definition at line 65 of file mainwindow.h.
|
private |
Definition at line 46 of file mainwindow.h.
|
private |
Definition at line 47 of file mainwindow.h.
|
staticprivate |
Definition at line 54 of file mainwindow.h.
|
private |
Definition at line 41 of file mainwindow.h.
1.8.8