diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/clientapp/clientapp.cpp | 6 | ||||
-rw-r--r-- | src/client/connectwindow/connectwindow.cpp | 6 | ||||
-rw-r--r-- | src/client/connectwindow/connectwindow.h | 1 | ||||
-rw-r--r-- | src/client/connectwindow/connectwindow.ui | 216 | ||||
-rw-r--r-- | src/client/toolbar/toolbar.ui | 233 | ||||
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 23 | ||||
-rw-r--r-- | src/server/mainwindow/mainwindow.ui | 339 | ||||
-rw-r--r-- | src/server/numerickeyboard/numerickeyboard.ui | 173 | ||||
-rw-r--r-- | src/server/reloadroomwindow/reloadroomwindow.cpp | 25 | ||||
-rw-r--r-- | src/server/reloadroomwindow/reloadroomwindow.h | 15 | ||||
-rw-r--r-- | src/server/reloadroomwindow/reloadroomwindow.ui | 73 | ||||
-rw-r--r-- | src/server/sessionnamewindow/sessionnamewindow.cpp | 2 | ||||
-rw-r--r-- | src/server/sessionnamewindow/sessionnamewindow.ui | 66 |
13 files changed, 1157 insertions, 21 deletions
diff --git a/src/client/clientapp/clientapp.cpp b/src/client/clientapp/clientapp.cpp index 2447526..8131e6f 100644 --- a/src/client/clientapp/clientapp.cpp +++ b/src/client/clientapp/clientapp.cpp @@ -23,14 +23,14 @@ ClientApp::ClientApp(int& argc, char** argv) // System strings QTranslator *qtTranslator = new QTranslator(this); if (!qtTranslator->load(QLocale::system(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { - qDebug() << "Could not load system string translations"; + qDebug() << "Could not load system string translations" << QLocale::system() << QLibraryInfo::location(QLibraryInfo::TranslationsPath); } else { installTranslator(qtTranslator); } // App specific QTranslator *translator = new QTranslator(this); - if (!translator->load(QLocale::system(), ":", "l_")) { - qDebug() << "Could not load app translations"; + if (!translator->load(QLocale::system(), ":/", "l_")) { + qDebug() << "Could not load app translations" << QLocale::system(); } else { installTranslator(translator); } diff --git a/src/client/connectwindow/connectwindow.cpp b/src/client/connectwindow/connectwindow.cpp index 7674cc2..8c47eea 100644 --- a/src/client/connectwindow/connectwindow.cpp +++ b/src/client/connectwindow/connectwindow.cpp @@ -12,11 +12,15 @@ #include "../net/serverconnection.h" #include "../clientapp/clientapp.h" #include "connectwindow.h" -#include "ui_connect.h" +#include "ui_connectwindow.h" #define UDPBUFSIZ 9000 #define SALT_LEN 18 +namespace Ui { + class ConnectWindow; +} + /** * Initialize Connection Window. * @param parent diff --git a/src/client/connectwindow/connectwindow.h b/src/client/connectwindow/connectwindow.h index 9fcaf4e..2df672d 100644 --- a/src/client/connectwindow/connectwindow.h +++ b/src/client/connectwindow/connectwindow.h @@ -28,6 +28,7 @@ namespace Ui { class ConnectWindow; } + class ServerConnection; /** diff --git a/src/client/connectwindow/connectwindow.ui b/src/client/connectwindow/connectwindow.ui new file mode 100644 index 0000000..0bfc654 --- /dev/null +++ b/src/client/connectwindow/connectwindow.ui @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>ConnectWindow</class> + <widget class="QWidget" name="ConnectWindow"> + <property name="windowModality"> + <enum>Qt::WindowModal</enum> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>512</width> + <height>233</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>512</width> + <height>92</height> + </size> + </property> + <property name="windowTitle"> + <string>Connect to PVS session</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QStackedWidget" name="stackedWidget"> + <property name="acceptDrops"> + <bool>false</bool> + </property> + <property name="currentIndex"> + <number>0</number> + </property> + <widget class="QWidget" name="page0"> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QGroupBox" name="box_auto"> + <property name="title"> + <string>Connection</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Connect to</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="comboBox_rooms"/> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="box_manual"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Manual Connection</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Session Name</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="lineEditName"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="page1"> + <layout class="QHBoxLayout" name="sw_p1_hl"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="lblCheckmark"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>94</width> + <height>72</height> + </size> + </property> + <property name="pixmap"> + <pixmap resource="../../pvsclient.qrc">:/dark-green-check-mark.svg</pixmap> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>6</number> + </property> + <item> + <widget class="QPushButton" name="btn_hide"> + <property name="text"> + <string>Close</string> + </property> + <property name="autoDefault"> + <bool>false</bool> + </property> + <property name="default"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="lblStatus"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="btn_connection"> + <property name="text"> + <string>Connect</string> + </property> + <property name="autoDefault"> + <bool>true</bool> + </property> + <property name="default"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources> + <include location="../../pvsclient.qrc"/> + </resources> + <connections/> +</ui> diff --git a/src/client/toolbar/toolbar.ui b/src/client/toolbar/toolbar.ui new file mode 100644 index 0000000..9908dda --- /dev/null +++ b/src/client/toolbar/toolbar.ui @@ -0,0 +1,233 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Toolbar</class> + <widget class="QWidget" name="Toolbar"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>281</width> + <height>28</height> + </rect> + </property> + <property name="windowTitle"> + <string notr="true">Form</string> + </property> + <property name="styleSheet"> + <string notr="true">#Toolbar { + background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f6f7fa, stop: 1 #dadbde); + border-radius: 0px; +} +QLabel { + background-color: none; +} +/* QPushButton */ +QPushButton { + background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f6f7fa, stop: 1 #dadbde); + border: 2px solid #8f8f91; + border-radius: 4px; + min-width: 80px; +} +QPushButton:hover { + border: 2px solid rgb(0, 170, 255); +} +QPushButton:pressed { + background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #dadbde, stop: 1 #f6f7fa); +} +QPushButton:checked { + background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #cacbce, stop: 1 #e6e7ea); +} +QPushButton::menu-indicator { + image: url(:/darrow16.svg); +} +</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>1</number> + </property> + <property name="leftMargin"> + <number>2</number> + </property> + <property name="topMargin"> + <number>2</number> + </property> + <property name="rightMargin"> + <number>2</number> + </property> + <property name="bottomMargin"> + <number>2</number> + </property> + <item> + <widget class="QPushButton" name="cmdMenu"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>84</width> + <height>24</height> + </size> + </property> + <property name="toolTip"> + <string>Menu</string> + </property> + <property name="text"> + <string>Menu</string> + </property> + </widget> + </item> + <item> + <spacer name="spacer_left"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="lblStatus"> + <property name="styleSheet"> + <string notr="true">color:red</string> + </property> + <property name="text"> + <string notr="true">Offline</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>19</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="icon_cam"> + <property name="minimumSize"> + <size> + <width>16</width> + <height>16</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16</width> + <height>16</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="icon_pvs"> + <property name="font"> + <font> + <pointsize>10</pointsize> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + <kerning>true</kerning> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color:#05f;</string> + </property> + <property name="text"> + <string notr="true">PVS</string> + </property> + </widget> + </item> + <item> + <spacer name="spacer_right"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="buttonContainer"/> + </item> + <item> + <widget class="QToolButton" name="btnAttention"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>30</width> + <height>24</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>30</width> + <height>16777215</height> + </size> + </property> + <property name="sizeIncrement"> + <size> + <width>30</width> + <height>0</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>30</width> + <height>0</height> + </size> + </property> + <property name="text"> + <string notr="true"/> + </property> + <property name="icon"> + <iconset resource="../../pvsclient.qrc"> + <normaloff>:/hand-raise</normaloff> + <normalon>:/hand-raise-red</normalon>:/hand-raise</iconset> + </property> + <property name="iconSize"> + <size> + <width>22</width> + <height>22</height> + </size> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + <resources> + <include location="../../pvsclient.qrc"/> + </resources> + <connections/> +</ui> diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index f6ff566..b63545f 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -38,7 +38,6 @@ #include "../util/platform/screensaver.h" // Auto-generated ui class #include "ui_mainwindow.h" -#include "ui_reloadroom.h" #include <iostream> #include <vector> @@ -711,20 +710,20 @@ void MainWindow::startVncServerIfNecessary(int from) void MainWindow::onButtonReloadRoomConfig() { - connect(_reloadWindow->ui->buttonBox, SIGNAL(accepted()), this, SLOT(onReloadRoomOk())); - connect(_reloadWindow->ui->buttonBox, SIGNAL(rejected()), this, SLOT(onReloadRoomCancel())); + connect(_reloadWindow->buttonBox(), SIGNAL(accepted()), this, SLOT(onReloadRoomOk())); + connect(_reloadWindow->buttonBox(), SIGNAL(rejected()), this, SLOT(onReloadRoomCancel())); QList<QString> keyList = serverApp->getRooms().keys(); for (QList<QString>::iterator it = keyList.begin(); it != keyList.end() ; it++) { - _reloadWindow->ui->roomList->addItem(*it); + _reloadWindow->addRoom(*it); } _reloadWindow->show(); } void MainWindow::onReloadRoomCancel() { - disconnect(_reloadWindow->ui->buttonBox, SIGNAL(accepted()), this, SLOT(onReloadRoomOk())); - disconnect(_reloadWindow->ui->buttonBox, SIGNAL(rejected()), this, SLOT(onReloadRoomCancel())); - _reloadWindow->ui->roomList->clear(); + disconnect(_reloadWindow->buttonBox(), SIGNAL(accepted()), this, SLOT(onReloadRoomOk())); + disconnect(_reloadWindow->buttonBox(), SIGNAL(rejected()), this, SLOT(onReloadRoomCancel())); + _reloadWindow->clearRoomList(); _reloadWindow->hide(); } @@ -785,7 +784,8 @@ void MainWindow::reloadCurrentRoom() void MainWindow::onReloadRoomOk() { - if (_reloadWindow->ui->roomList->currentItem() == nullptr) { + QString roomToReload = _reloadWindow->currentRoom(); + if (roomToReload.isEmpty()) { QMessageBox::critical(this, "Warning", tr("No item selected, please select room!"), 0, 1); return; } @@ -794,8 +794,8 @@ void MainWindow::onReloadRoomOk() "Note that all clients will be deleted."), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); if (ret == QMessageBox::Yes) { - disconnect(_reloadWindow->ui->buttonBox, SIGNAL(accepted()), this, SLOT(onReloadRoomOk())); - disconnect(_reloadWindow->ui->buttonBox, SIGNAL(rejected()), this, SLOT(onReloadRoomCancel())); + disconnect(_reloadWindow->buttonBox(), SIGNAL(accepted()), this, SLOT(onReloadRoomOk())); + disconnect(_reloadWindow->buttonBox(), SIGNAL(rejected()), this, SLOT(onReloadRoomCancel())); // Delete all clients. for (QList<ConnectionFrame*>::iterator it = _clientFrames.begin(); it != _clientFrames.end(); it++) { (*it)->hide(); @@ -804,11 +804,10 @@ void MainWindow::onReloadRoomOk() _clientFrames.clear(); // Load new room configuration. - QString roomToReload = _reloadWindow->ui->roomList->currentItem()->data(0).toString(); serverApp->setCurrentRoom(roomToReload); reloadCurrentRoom(); - _reloadWindow->ui->roomList->clear(); + _reloadWindow->clearRoomList(); _reloadWindow->hide(); } diff --git a/src/server/mainwindow/mainwindow.ui b/src/server/mainwindow/mainwindow.ui new file mode 100644 index 0000000..62b92f7 --- /dev/null +++ b/src/server/mainwindow/mainwindow.ui @@ -0,0 +1,339 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MainWindow</class> + <widget class="QMainWindow" name="MainWindow"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>846</width> + <height>801</height> + </rect> + </property> + <property name="windowTitle"> + <string notr="true">PVS2 Manager</string> + </property> + <property name="styleSheet"> + <string notr="true">QToolButton { + border-radius: 8px; + padding: 4px; + margin: 5px; + border: 1px solid #777; +} +QToolButton:enabled { +background-color: #f8f8f8; +border: 1px solid #555; +} +QToolButton:enabled:hover { + background: qradialgradient(cx: 0.4, cy: -0.1, +fx: 0.4, fy: -0.1, +radius: 1.35, stop: 0 #fff, stop: 1 #ddd); +} + +QToolButton:enabled:checked, +QToolButton:enabled:pressed { +background: qradialgradient(cx: 0.4, cy: -0.1, +fx: 0.4, fy: -0.1, +radius: 1.35, stop: 0 #888, stop: 1 #aaa); +} +QLabel#examModeLabel { + width: 71px; + margin: 5px; + border-radius: 8px; + background-color: rgb(170, 170, 170); +}</string> + </property> + <widget class="QWidget" name="centralWidget"> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QVBoxLayout" name="mainLayout"> + <property name="spacing"> + <number>3</number> + </property> + <item> + <widget class="QFrame" name="frmRoom"> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Sunken</enum> + </property> + <property name="lineWidth"> + <number>2</number> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="imageLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Expanding"> + <horstretch>1</horstretch> + <verstretch>1</verstretch> + </sizepolicy> + </property> + <property name="lineWidth"> + <number>0</number> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <widget class="QToolBar" name="toolBar"> + <property name="windowTitle"> + <string>toolBar</string> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="autoFillBackground"> + <bool>true</bool> + </property> + <property name="movable"> + <bool>false</bool> + </property> + <property name="iconSize"> + <size> + <width>48</width> + <height>48</height> + </size> + </property> + <attribute name="toolBarArea"> + <enum>LeftToolBarArea</enum> + </attribute> + <attribute name="toolBarBreak"> + <bool>false</bool> + </attribute> + <addaction name="actionReload_Room_Configuration"/> + <addaction name="action_Lock"/> + <addaction name="action_LockSingle"/> + <addaction name="action_TutorToAll"/> + <addaction name="action_TutorToStudent"/> + <addaction name="action_StudentToTutor"/> + <addaction name="action_StudentToTutorExclusive"/> + <addaction name="action_SetAsTutor"/> + <addaction name="action_DeleteClient"/> + <addaction name="action_StopProjection"/> + <addaction name="separator"/> + <addaction name="action_Help"/> + <addaction name="action_Exit"/> + </widget> + <action name="action_Exit"> + <property name="icon"> + <iconset resource="../../pvsmgr.qrc"> + <normaloff>:/exit</normaloff> + <normalon>:/exit</normalon>:/exit</iconset> + </property> + <property name="text"> + <string>Exit</string> + </property> + <property name="toolTip"> + <string>Exit</string> + </property> + <property name="shortcut"> + <string>Ctrl+Q</string> + </property> + </action> + <action name="action_Lock"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="icon"> + <iconset resource="../../pvsmgr.qrc"> + <normaloff>:/lock</normaloff>:/lock</iconset> + </property> + <property name="text"> + <string>This will show a black screen on all connected clients, except the tutor's client.</string> + </property> + <property name="toolTip"> + <string>Lock/Unlock all clients</string> + </property> + <property name="shortcut"> + <string>Ctrl+A</string> + </property> + </action> + <action name="action_StudentToTutor"> + <property name="icon"> + <iconset resource="../../pvsmgr.qrc"> + <normaloff>:/student2tutor</normaloff>:/student2tutor</iconset> + </property> + <property name="text"> + <string>Stream currently selected client's screen content to the tutor's client.</string> + </property> + <property name="toolTip"> + <string>Student's Screen to Tutor</string> + </property> + </action> + <action name="action_StudentToTutorExclusive"> + <property name="icon"> + <iconset resource="../../pvsmgr.qrc"> + <normaloff>:/student2tutorextension</normaloff>:/student2tutorextension</iconset> + </property> + <property name="text"> + <string>Stream currently selected client's screen content to the tutor's client while showing a locked black screen on all other clients.</string> + </property> + <property name="toolTip"> + <string>Student's Screen to Tutor, others blanked</string> + </property> + </action> + <action name="action_TutorToStudent"> + <property name="icon"> + <iconset resource="../../pvsmgr.qrc"> + <normaloff>:/tutor2student</normaloff>:/tutor2student</iconset> + </property> + <property name="text"> + <string>Stream the tutor's screen contents to the currently selected client.</string> + </property> + <property name="toolTip"> + <string>Tutor's Screen to Student</string> + </property> + </action> + <action name="action_TutorToAll"> + <property name="icon"> + <iconset resource="../../pvsmgr.qrc"> + <normaloff>:/tutor2all</normaloff>:/tutor2all</iconset> + </property> + <property name="text"> + <string>Stream the tutor's screen contents to everyone.</string> + </property> + <property name="toolTip"> + <string>Tutor's Screen to Everyone</string> + </property> + </action> + <action name="action_StopProjection"> + <property name="icon"> + <iconset resource="../../pvsclient.qrc"> + <normaloff>:/reset</normaloff>:/reset</iconset> + </property> + <property name="text"> + <string>Unlock all clients, stop any running screen content streaming.</string> + </property> + <property name="toolTip"> + <string>Reset</string> + </property> + <property name="shortcut"> + <string>R</string> + </property> + </action> + <action name="action_SetAsTutor"> + <property name="icon"> + <iconset resource="../../pvsmgr.qrc"> + <normaloff>:/dozent</normaloff>:/dozent</iconset> + </property> + <property name="text"> + <string>Declare the currently selected client as tutor. The tutor will be excluded from screen locking and can be used as a fixed source/target for screen content streaming.</string> + </property> + <property name="toolTip"> + <string>Declare tutor</string> + </property> + <property name="shortcut"> + <string>T</string> + </property> + </action> + <action name="action_DeleteClient"> + <property name="icon"> + <iconset resource="../../pvsmgr.qrc"> + <normaloff>:/trash</normaloff>:/trash</iconset> + </property> + <property name="text"> + <string>Delete currently selected client. Only allowed for disconnected clients.</string> + </property> + <property name="toolTip"> + <string>Delete Client</string> + </property> + <property name="shortcut"> + <string>Del</string> + </property> + <property name="visible"> + <bool>true</bool> + </property> + </action> + <action name="action_Help"> + <property name="icon"> + <iconset resource="../../pvsmgr.qrc"> + <normaloff>:/helpme</normaloff>:/helpme</iconset> + </property> + <property name="text"> + <string>Show this help text.</string> + </property> + <property name="toolTip"> + <string>Help</string> + </property> + <property name="shortcut"> + <string>F1</string> + </property> + <property name="visible"> + <bool>true</bool> + </property> + </action> + <action name="actionReload_Room_Configuration"> + <property name="icon"> + <iconset resource="../../pvsmgr.qrc"> + <normaloff>:/reloadClassroom</normaloff>:/reloadClassroom</iconset> + </property> + <property name="text"> + <string>This shows a list of preconfigured rooms which you can load. This will reset the currently shown layout and disconnect all clients.</string> + </property> + <property name="toolTip"> + <string>Load a new room layout</string> + </property> + </action> + <action name="action_LockSingle"> + <property name="icon"> + <iconset resource="../../pvsmgr.qrc"> + <normaloff>:/lock-single</normaloff>:/lock-single</iconset> + </property> + <property name="text"> + <string>Lock or unlock the selected client only.</string> + </property> + <property name="toolTip"> + <string>Lock/Unlock single client</string> + </property> + <property name="shortcut"> + <string>L</string> + </property> + </action> + </widget> + <layoutdefault spacing="6" margin="11"/> + <resources> + <include location="../../pvsclient.qrc"/> + <include location="../../pvsmgr.qrc"/> + </resources> + <connections/> +</ui> diff --git a/src/server/numerickeyboard/numerickeyboard.ui b/src/server/numerickeyboard/numerickeyboard.ui new file mode 100644 index 0000000..2f83a2b --- /dev/null +++ b/src/server/numerickeyboard/numerickeyboard.ui @@ -0,0 +1,173 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>NumericKeyboard</class> + <widget class="QGroupBox" name="NumericKeyboard"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>438</width> + <height>300</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>300</height> + </size> + </property> + <property name="windowTitle"> + <string>GroupBox</string> + </property> + <property name="title"> + <string>Keyboard</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="3" column="0"> + <widget class="QPushButton" name="button_0"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="text"> + <string notr="true">0</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QPushButton" name="button_del"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="text"> + <string>Del</string> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QPushButton" name="button_1"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="text"> + <string notr="true">1</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QPushButton" name="button_8"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="text"> + <string notr="true">8</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QPushButton" name="button_4"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="text"> + <string notr="true">4</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QPushButton" name="button_2"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="text"> + <string notr="true">2</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QPushButton" name="button_5"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="text"> + <string notr="true">5</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QPushButton" name="button_7"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="text"> + <string notr="true">7</string> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QPushButton" name="button_3"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="text"> + <string notr="true">3</string> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QPushButton" name="button_6"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="text"> + <string notr="true">6</string> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QPushButton" name="button_9"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="text"> + <string notr="true">9</string> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/server/reloadroomwindow/reloadroomwindow.cpp b/src/server/reloadroomwindow/reloadroomwindow.cpp index 3070148..aea6a96 100644 --- a/src/server/reloadroomwindow/reloadroomwindow.cpp +++ b/src/server/reloadroomwindow/reloadroomwindow.cpp @@ -1,5 +1,5 @@ #include "reloadroomwindow.h" -#include "ui_reloadroom.h" +#include "ui_reloadroomwindow.h" ReloadRoomWindow::ReloadRoomWindow(QWidget *parent) : QDialog(parent), ui(new Ui::ReloadRoom) @@ -11,3 +11,26 @@ ReloadRoomWindow::~ReloadRoomWindow() { delete ui; } + +QDialogButtonBox *ReloadRoomWindow::buttonBox() const +{ + return ui->buttonBox; +} + +void ReloadRoomWindow::addRoom(const QString &roomName) +{ + ui->roomList->addItem(roomName); +} + +void ReloadRoomWindow::clearRoomList() +{ + ui->roomList->clear(); +} + +QString ReloadRoomWindow::currentRoom() const +{ + auto *cur = ui->roomList->currentItem(); + if (cur == nullptr) + return QLatin1String(); + return cur->data(0).toString(); +} diff --git a/src/server/reloadroomwindow/reloadroomwindow.h b/src/server/reloadroomwindow/reloadroomwindow.h index 2d2ae85..2baf53f 100644 --- a/src/server/reloadroomwindow/reloadroomwindow.h +++ b/src/server/reloadroomwindow/reloadroomwindow.h @@ -8,19 +8,28 @@ namespace Ui class ReloadRoom; } +class QDialogButtonBox; + class ReloadRoomWindow : public QDialog { Q_OBJECT public: - explicit ReloadRoomWindow(QWidget *parent = 0); + explicit ReloadRoomWindow(QWidget *parent = nullptr); ~ReloadRoomWindow(); - Ui::ReloadRoom *ui; - // void show(); + QDialogButtonBox* buttonBox() const; + + void addRoom(const QString &roomName); + + void clearRoomList(); + + QString currentRoom() const; private: + Ui::ReloadRoom *ui; + }; #endif diff --git a/src/server/reloadroomwindow/reloadroomwindow.ui b/src/server/reloadroomwindow/reloadroomwindow.ui new file mode 100644 index 0000000..2fb723e --- /dev/null +++ b/src/server/reloadroomwindow/reloadroomwindow.ui @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>ReloadRoom</class> + <widget class="QDialog" name="ReloadRoom"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>432</width> + <height>400</height> + </rect> + </property> + <property name="windowTitle"> + <string>Reload Room</string> + </property> + <property name="widgetResizable" stdset="0"> + <bool>true</bool> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QLabel" name="label"> + <property name="font"> + <font> + <pointsize>11</pointsize> + </font> + </property> + <property name="text"> + <string>Choose room configuration to reload:</string> + </property> + </widget> + </item> + <item> + <widget class="QListWidget" name="roomList"> + <property name="font"> + <font> + <pointsize>20</pointsize> + <stylestrategy>PreferDefault</stylestrategy> + </font> + </property> + <property name="contextMenuPolicy"> + <enum>Qt::DefaultContextMenu</enum> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="resizeMode"> + <enum>QListView::Adjust</enum> + </property> + </widget> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="font"> + <font> + <pointsize>20</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true">* {font-size: 20pt;}</string> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + <property name="centerButtons"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/server/sessionnamewindow/sessionnamewindow.cpp b/src/server/sessionnamewindow/sessionnamewindow.cpp index 5671c39..f79efbf 100644 --- a/src/server/sessionnamewindow/sessionnamewindow.cpp +++ b/src/server/sessionnamewindow/sessionnamewindow.cpp @@ -18,7 +18,7 @@ #include "sessionnamewindow.h" #include "../serverapp/serverapp.h" #include "../numerickeyboard/numerickeyboard.h" -#include "ui_sessionname.h" +#include "ui_sessionnamewindow.h" SessionNameWindow::SessionNameWindow(QWidget *parent) : diff --git a/src/server/sessionnamewindow/sessionnamewindow.ui b/src/server/sessionnamewindow/sessionnamewindow.ui new file mode 100644 index 0000000..299df3d --- /dev/null +++ b/src/server/sessionnamewindow/sessionnamewindow.ui @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>SessionName</class> + <widget class="QDialog" name="SessionName"> + <property name="windowModality"> + <enum>Qt::ApplicationModal</enum> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>226</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="windowTitle"> + <string>Set session name</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="2" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>New session name</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLineEdit" name="lineEditName"> + <property name="font"> + <font> + <pointsize>14</pointsize> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + </font> + </property> + </widget> + </item> + <item row="3" column="0" rowspan="2" colspan="2"> + <layout class="QVBoxLayout" name="keyboard_placeholder"/> + </item> + <item row="5" column="1"> + <widget class="QDialogButtonBox" name="bboxOkCancel"> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + <item row="5" column="0"> + <widget class="QPushButton" name="cmdRandom"> + <property name="text"> + <string>Random name</string> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> |