summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt134
-rw-r--r--i18n/client/pvsclient_ar_JO.ts193
-rw-r--r--i18n/client/pvsclient_de_DE.ts74
-rw-r--r--i18n/client/pvsclient_es_MX.ts193
-rw-r--r--i18n/client/pvsclient_fr_FR.ts193
-rw-r--r--i18n/client/pvsclient_pl_PL.ts193
-rw-r--r--i18n/server/pvsmgr_ar_JO.ts304
-rw-r--r--i18n/server/pvsmgr_de_DE.ts184
-rw-r--r--i18n/server/pvsmgr_es_MX.ts393
-rw-r--r--i18n/server/pvsmgr_fr_FR.ts393
-rw-r--r--i18n/server/pvsmgr_pl_PL.ts393
-rw-r--r--pvs2.config1
-rw-r--r--pvs2.creator1
-rw-r--r--pvs2.files93
-rw-r--r--pvs2.includes18
-rw-r--r--res/icons/altexit.svg (renamed from icons/altexit.svg)0
-rw-r--r--res/icons/altterm.svg (renamed from icons/altterm.svg)0
-rw-r--r--res/icons/broadcast.svg (renamed from icons/broadcast.svg)0
-rw-r--r--res/icons/cam32.svg (renamed from icons/cam32.svg)0
-rw-r--r--res/icons/cf_icon_cam.svg (renamed from icons/cf_icon_cam.svg)0
-rw-r--r--res/icons/cf_icon_eye.svg (renamed from icons/cf_icon_eye.svg)0
-rw-r--r--res/icons/cf_icon_lock.svg (renamed from icons/cf_icon_lock.svg)0
-rw-r--r--res/icons/chat_msg16.svg (renamed from icons/chat_msg16.svg)0
-rw-r--r--res/icons/dark-green-check-mark.svg (renamed from icons/dark-green-check-mark.svg)0
-rw-r--r--res/icons/darrow16.svg (renamed from icons/darrow16.svg)0
-rw-r--r--res/icons/dozent.svg (renamed from icons/dozent.svg)0
-rw-r--r--res/icons/exit.svg (renamed from icons/exit.svg)0
-rw-r--r--res/icons/eye.svg (renamed from icons/eye.svg)0
-rw-r--r--res/icons/graduate.svg (renamed from icons/graduate.svg)0
-rw-r--r--res/icons/hand-raise-red.svg (renamed from icons/hand-raise-red.svg)0
-rw-r--r--res/icons/hand-raise.svg (renamed from icons/hand-raise.svg)0
-rw-r--r--res/icons/help.svg (renamed from icons/help.svg)0
-rw-r--r--res/icons/keyboard_key.svg (renamed from icons/keyboard_key.svg)0
-rw-r--r--res/icons/lock-single.svg (renamed from icons/lock-single.svg)0
-rw-r--r--res/icons/lock.svg (renamed from icons/lock.svg)0
-rw-r--r--res/icons/log-out.svg (renamed from icons/log-out.svg)0
-rw-r--r--res/icons/ok16.svg (renamed from icons/ok16.svg)0
-rw-r--r--res/icons/photo.svg (renamed from icons/photo.svg)0
-rw-r--r--res/icons/refresh.svg (renamed from icons/refresh.svg)bin8103 -> 8103 bytes
-rw-r--r--res/icons/reloadClassroom.svg (renamed from icons/reloadClassroom.svg)0
-rw-r--r--res/icons/screen.svg (renamed from icons/screen.svg)0
-rw-r--r--res/icons/space.svg (renamed from icons/space.svg)0
-rw-r--r--res/icons/stopprojection.svg (renamed from icons/stopprojection.svg)0
-rw-r--r--res/icons/student2all.svg (renamed from icons/student2all.svg)0
-rw-r--r--res/icons/student2tutor.svg (renamed from icons/student2tutor.svg)0
-rw-r--r--res/icons/student2tutor_extension.svg (renamed from icons/student2tutor_extension.svg)0
-rw-r--r--res/icons/terminal.svg (renamed from icons/terminal.svg)0
-rw-r--r--res/icons/trash.svg (renamed from icons/trash.svg)0
-rw-r--r--res/icons/tutor2all.svg (renamed from icons/tutor2all.svg)0
-rw-r--r--res/icons/tutor2student.svg (renamed from icons/tutor2student.svg)0
-rw-r--r--res/icons/view-restore.svg (renamed from icons/view-restore.svg)0
-rw-r--r--res/pvsclient.qrc (renamed from pvsclient.qrc)6
-rw-r--r--res/pvsclient_ts.qrc5
-rw-r--r--res/pvsmgr.qrc (renamed from pvsmgr.qrc)6
-rw-r--r--res/pvsmgr_ts.qrc5
-rw-r--r--src/client/addons/addons.cpp39
-rw-r--r--src/client/addons/addons.h4
-rw-r--r--src/client/clientapp/clientapp.cpp53
-rw-r--r--src/client/clientapp/clientapp.h9
-rw-r--r--src/client/connectwindow/connectwindow.cpp36
-rw-r--r--src/client/connectwindow/connectwindow.h22
-rw-r--r--src/client/connectwindow/connectwindow.ui (renamed from gui/client/connect.ui)0
-rw-r--r--src/client/informationdialog/informationdialog.cpp36
-rw-r--r--src/client/informationdialog/informationdialog.h11
-rw-r--r--src/client/main.cpp9
-rw-r--r--src/client/net/serverconnection.cpp51
-rw-r--r--src/client/net/serverconnection.h16
-rw-r--r--src/client/net/serverdiscovery.cpp33
-rw-r--r--src/client/net/serverdiscovery.h6
-rw-r--r--src/client/toolbar/toolbar.cpp67
-rw-r--r--src/client/toolbar/toolbar.h42
-rw-r--r--src/client/toolbar/toolbar.ui (renamed from gui/client/toolbar.ui)0
-rw-r--r--src/client/util/platform/blankscreen.cpp8
-rw-r--r--src/client/util/room.h6
-rw-r--r--src/client/util/util.h7
-rw-r--r--src/client/vnc/vncserver.cpp38
-rw-r--r--src/client/vnc/vncserver.h12
-rw-r--r--src/client/vnc/vncthread.cpp40
-rw-r--r--src/client/vnc/vncthread.h12
-rw-r--r--src/client/vnc/vncwindow.cpp45
-rw-r--r--src/client/vnc/vncwindow.h7
-rw-r--r--src/server/clicklabel/clicklabel.h9
-rw-r--r--src/server/connectionframe/connectionframe.cpp95
-rw-r--r--src/server/connectionframe/connectionframe.h55
-rw-r--r--src/server/helpwindow/helpwindow.cpp14
-rw-r--r--src/server/main.cpp27
-rw-r--r--src/server/mainwindow/mainwindow.cpp237
-rw-r--r--src/server/mainwindow/mainwindow.h53
-rw-r--r--src/server/mainwindow/mainwindow.ui (renamed from gui/server_normal/mainwindow.ui)0
-rw-r--r--src/server/net/certmanager.cpp45
-rw-r--r--src/server/net/client.cpp90
-rw-r--r--src/server/net/client.h66
-rw-r--r--src/server/net/discoverylistener.cpp37
-rw-r--r--src/server/net/discoverylistener.h14
-rw-r--r--src/server/net/filedownloader.cpp41
-rw-r--r--src/server/net/filedownloader.h44
-rw-r--r--src/server/net/listenserver.cpp10
-rw-r--r--src/server/net/listenserver.h4
-rw-r--r--src/server/net/sslserver.cpp16
-rw-r--r--src/server/net/sslserver.h6
-rw-r--r--src/server/numerickeyboard/numerickeyboard.cpp31
-rw-r--r--src/server/numerickeyboard/numerickeyboard.h2
-rw-r--r--src/server/numerickeyboard/numerickeyboard.ui (renamed from gui/server_normal/numerickeyboard.ui)0
-rw-r--r--src/server/reloadroomwindow/reloadroomwindow.cpp25
-rw-r--r--src/server/reloadroomwindow/reloadroomwindow.h17
-rw-r--r--src/server/reloadroomwindow/reloadroomwindow.ui (renamed from gui/server_normal/reloadroom.ui)0
-rw-r--r--src/server/serverapp/serverapp.cpp92
-rw-r--r--src/server/serverapp/serverapp.h32
-rw-r--r--src/server/sessionnamewindow/sessionnamewindow.cpp28
-rw-r--r--src/server/sessionnamewindow/sessionnamewindow.h13
-rw-r--r--src/server/sessionnamewindow/sessionnamewindow.ui (renamed from gui/server_normal/sessionname.ui)0
-rw-r--r--src/server/util/platform/screensaver.cpp19
-rw-r--r--src/shared/networkmessage.h16
-rw-r--r--src/shared/util.cpp2
-rw-r--r--src/shared/util.h10
115 files changed, 1050 insertions, 3491 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e1b550..8bbbb20 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,21 @@
################################################################################
# General
################################################################################
+cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
+
+set(pvs2_BUILD_TYPES Release Debug)
+get_property(multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+if(multi_config)
+ set(CMAKE_CONFIGURATION_TYPES "${pvs2_BUILD_TYPES}" CACHE STRING "list of supported configuration types" FORCE)
+else()
+ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type of the project.")
+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${pvs2_BUILD_TYPES}")
+ if(NOT CMAKE_BUILD_TYPE IN_LIST pvs2_BUILD_TYPES)
+ message(FATAL_ERROR "Invalid build type '${CMAKE_BUILD_TYPE}'. Possible values:\n ${pvs2_BUILD_TYPES}")
+ endif()
+endif()
PROJECT(pvs2)
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
SET(EXTRA_C_FLAGS "" CACHE STRING "Additional options to pass to C compiler")
SET(EXTRA_CXX_FLAGS "" CACHE STRING "Additional options to pass to C++ compiler")
@@ -15,7 +27,11 @@ SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
# -Wshadow spams too much :/
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 ${EXTRA_C_FLAGS}")
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${EXTRA_CXX_FLAGS}")
+SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-multichar -Wno-error=deprecated-declarations ${EXTRA_CXX_FLAGS}" )
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
# local cmake modules
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
@@ -26,14 +42,13 @@ FIND_PACKAGE(X11 REQUIRED)
FIND_PACKAGE(VNC REQUIRED)
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
-SET(CMAKE_AUTOMOC ON)
# some includes
-INCLUDE_DIRECTORIES(
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${X11_INCLUDE_DIR}
-)
+#INCLUDE_DIRECTORIES(
+# ${CMAKE_CURRENT_SOURCE_DIR}
+# ${CMAKE_CURRENT_BINARY_DIR}
+# ${X11_INCLUDE_DIR}
+#)
IF(X11_Xscreensaver_FOUND)
ADD_DEFINITIONS(-DX11_Xscreensaver_FOUND)
@@ -78,20 +93,27 @@ FILE(GLOB PVSCLIENT_SRCS
################################################################################
# .ui files
-FILE(GLOB PVSMGR_UIS
- gui/server_normal/*.ui
+FILE(GLOB_RECURSE PVSMGR_UIS
+ src/server/*.ui
)
-FILE(GLOB PVSCLIENT_UIS
- gui/client/*.ui
+FILE(GLOB_RECURSE PVSCLIENT_UIS
+ src/client/*.ui
)
# .qrc files
+# Copy these to build dir since the paths inside are relative, and this is where the translations end up
+configure_file(res/pvsmgr_ts.qrc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
+configure_file(res/pvsclient_ts.qrc ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
+
FILE(GLOB PVSMGR_RC_SRCS
- pvsmgr.qrc
+ res/pvsmgr.qrc
+ ${CMAKE_CURRENT_BINARY_DIR}/pvsmgr_ts.qrc
+
)
FILE(GLOB PVSCLIENT_RC_SRCS
- pvsclient.qrc
+ res/pvsclient.qrc
+ ${CMAKE_CURRENT_BINARY_DIR}/pvsclient_ts.qrc
)
# i18n
@@ -103,57 +125,12 @@ FILE(GLOB PVSCLIENT_TSS
i18n/client/*.ts
)
-
-# this will run uic on .ui files
-QT5_WRAP_UI(PVSMGR_UI_HDRS ${PVSMGR_UIS})
-QT5_WRAP_UI(PVSCLIENT_UI_HDRS ${PVSCLIENT_UIS})
-
-# this will run moc
-#QT4_WRAP_CPP(PVSMGR_MOC_SRCS ${PVSMGR_MOC_HDRS})
-#QT4_WRAP_CPP(PVSCLIENT_MOC_SRCS ${PVSCLIENT_MOC_HDRS})
-
-option(UPDATE_TRANSLATIONS "Update .ts files (WARNING: make clean will delete the .ts files!)" OFF)
-
if(PVSMGR_TSS)
-
- if (UPDATE_TRANSLATIONS)
- set(FILES_TO_TRANSLATE ${PVSMGR_SRCS} ${PVSMGR_UIS})
- QT5_CREATE_TRANSLATION(PVSMGR_QMS ${FILES_TO_TRANSLATE} ${PVSMGR_TSS} OPTIONS -noobsolete)
- message(STATUS ".tr files have been updated")
- else (UPDATE_TRANSLATIONS)
- QT5_ADD_TRANSLATION(PVSMGR_QMS ${PVSMGR_TSS})
- endif (UPDATE_TRANSLATIONS)
- # # write a resource file for qm files
- # set(resource_file_content "<RCC>\n <qresource prefix=\"/\">\n")
- # foreach(file ${PVSMGR_QMS})
- # get_filename_component(filename ${file} NAME)
- # set(resource_file_content "${resource_file_content} <file>${filename}</file>\n")
- # endforeach(file)
- # set(resource_file_content "${resource_file_content} </qresource>\n</RCC>\n")
- # file(WRITE "${CMAKE_BINARY_DIR}/ts_pvsmgr.qrc" "${resource_file_content}")
- # set(PVSMGR_RESOURCES ${PVSMGR_RESOURCES} "${CMAKE_BINARY_DIR}/ts_pvsmgr.qrc")
-
+ QT5_CREATE_TRANSLATION(PVSMGR_QMS ${PVSMGR_UIS} ${PVSMGR_SRCS} ${PVSMGR_TSS} OPTIONS -noobsolete)
endif(PVSMGR_TSS)
if(PVSCLIENT_TSS)
-
- if (UPDATE_TRANSLATIONS)
- set(FILES_TO_TRANSLATE ${PVSCLIENT_SRCS} ${PVSCLIENT_UIS})
- QT5_CREATE_TRANSLATION(PVSCLIENT_QMS ${FILES_TO_TRANSLATE} ${PVSCLIENT_TSS} OPTIONS -noobsolete)
- message(STATUS ".tr files have been updated")
- else (UPDATE_TRANSLATIONS)
- QT5_ADD_TRANSLATION(PVSCLIENT_QMS ${PVSCLIENT_TSS})
- endif (UPDATE_TRANSLATIONS)
- # # write a resource file for qm files
- # set(resource_file_content "<RCC>\n <qresource prefix=\"/\">\n")
- # foreach(file ${PVSCLIENT_QMS})
- # get_filename_component(filename ${file} NAME)
- # set(resource_file_content "${resource_file_content} <file>${filename}</file>\n")
- # endforeach(file)
- # set(resource_file_content "${resource_file_content} </qresource>\n</RCC>\n")
- # file(WRITE "${CMAKE_BINARY_DIR}/ts_pvsclient.qrc" "${resource_file_content}")
- # set(PVSCLIENT_RESOURCES ${PVSCLIENT_RESOURCES} "${CMAKE_BINARY_DIR}/ts_pvsclient.qrc")
-
+ QT5_CREATE_TRANSLATION(PVSCLIENT_QMS ${PVSCLIENT_UIS} ${PVSCLIENT_SRCS} ${PVSCLIENT_TSS} OPTIONS -noobsolete)
endif(PVSCLIENT_TSS)
# this will run rcc on .qrc files
@@ -167,8 +144,6 @@ QT5_ADD_RESOURCES(PVSCLIENT_RCS ${PVSCLIENT_RC_SRCS})
ADD_EXECUTABLE(pvsmgr
${PVSMGR_SRCS}
${PVSMGR_RCS}
-# ${PVSMGR_MOC_SRCS}
- ${PVSMGR_UI_HDRS}
${PVSMGR_RC_SRCS}
${PVSMGR_QMS}
)
@@ -176,8 +151,6 @@ ADD_EXECUTABLE(pvsmgr
ADD_EXECUTABLE(pvsclient
${PVSCLIENT_SRCS}
${PVSCLIENT_RCS}
-# ${PVSCLIENT_MOC_SRCS}
- ${PVSCLIENT_UI_HDRS}
${PVSCLIENT_RC_SRCS}
${PVSCLIENT_QMS}
)
@@ -188,7 +161,6 @@ TARGET_LINK_LIBRARIES(pvsmgr
Qt5::Widgets
Qt5::Svg
Qt5::X11Extras
-# ${VNC_LIBRARIES}
${X11_LIBRARIES}
${X11_Xscreensaver_LIB}
)
@@ -204,33 +176,3 @@ SET_PROPERTY(TARGET pvsmgr PROPERTY COMPILE_DEFINITIONS MAINWINDOW_USE_NORMALGUI
# install
INSTALL(TARGETS pvsmgr pvsclient RUNTIME DESTINATION bin)
-#INSTALL(PROGRAMS misc/pvs-vncsrv DESTINATION bin)
-#INSTALL(FILES misc/pvsclient.conf misc/pvsmgr.conf DESTINATION /etc/openslx)
-#INSTALL(FILES misc/pvsclient.desktop DESTINATION /etc/xdg/autostart)
-
-# uninstall
-CONFIGURE_FILE(
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Uninstall.cmake"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake/Uninstall.cmake"
- IMMEDIATE @ONLY
-)
-ADD_CUSTOM_TARGET(uninstall
- "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake/Uninstall.cmake"
-)
-
-# package
-SET( CPACK_GENERATOR "DEB" )
-SET( CPACK_SET_DESTDIR "ON" )
-SET( CPACK_PACKAGE_NAME "pvs" )
-SET( CPACK_PACKAGE_VERSION_MAJOR "3" )
-SET( CPACK_PACKAGE_VERSION_MINOR "1" )
-SET( CPACK_PACKAGE_VERSION_PATCH "2" )
-SET( CPACK_PACKAGE_DESCRIPTION_SUMMARY "Pool Video Switch" )
-SET( CPACK_PACKAGE_DESCRIPTION "")
-SET( CPACK_PACKAGE_CONTACT "Johann Latocha <johann@latocha.de>" )
-SET( CPACK_DEBIAN_PACKAGE_DEPENDS "libvncserver0 (>= 0.9.3.dfsg.1-2), libqtgui4 (>= 4:4.5.3-4), libqt4-dbus (>= 4:4.5.3-4), libqt4-network (>= 4:4.5.3-4)" )
-SET( CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386" )
-SET( CPACK_DEBIAN_PACKAGE_SECTION "Network" )
-SET( CPACK_DEBIAN_PACKAGE_PRIORITY "optional" )
-SET( CPACK_DEBIAN_PACKAGE_RECOMMENDS "x11vnc (>= 0.9.9-1)" )
-INCLUDE( CPack )
diff --git a/i18n/client/pvsclient_ar_JO.ts b/i18n/client/pvsclient_ar_JO.ts
deleted file mode 100644
index af303f5..0000000
--- a/i18n/client/pvsclient_ar_JO.ts
+++ /dev/null
@@ -1,193 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1">
-<context>
- <name>ConnectWindow</name>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="77"/>
- <source>&amp;Disconnect</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="78"/>
- <source>Connected to %1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="85"/>
- <source>&amp;Stop</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="87"/>
- <source>&amp;Connect</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="91"/>
- <source>Ready to connect.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="94"/>
- <source>Scanning for session %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="97"/>
- <source>Found session, connecting...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="100"/>
- <source>Waiting for server challenge...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="103"/>
- <source>Replied to challenge, sent own...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="106"/>
- <source>Logging in...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="111"/>
- <source>Invalid certificate.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="114"/>
- <source>Invalid TLS hash: %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="117"/>
- <source>Unknown state :-(</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="260"/>
- <source>Session Name...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="23"/>
- <source>Connect to PVS session</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="51"/>
- <source>Connection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="57"/>
- <source>Connect to</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="76"/>
- <source>Manual Connection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="82"/>
- <source>Session Name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="152"/>
- <source>Close</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="198"/>
- <source>Connect</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>InformationDialog</name>
- <message>
- <location filename="../../src/client/informationdialog/informationdialog.cpp" line="11"/>
- <source>&lt;h1&gt;system information&lt;/h1&gt;</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/informationdialog/informationdialog.cpp" line="33"/>
- <source>hostname</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>Toolbar</name>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="169"/>
- <source>&amp;Connect...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="170"/>
- <source>&amp;Disconnect</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="172"/>
- <source>&amp;Information...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="173"/>
- <source>&amp;What&apos;s this?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="174"/>
- <source>&amp;Quit</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="348"/>
- <source>Streaming</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="369"/>
- <source>Offline</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="478"/>
- <source>About PVS Client</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="479"/>
- <source>The PVS - client is part of a software system for managing the virtual data traffic within the computer pools, between the tutor&apos;s and student&apos;s PCs. It has been developed to simplify the information traffic in seminars and general eLearning.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="354"/>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="392"/>
- <source>Online</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/toolbar.ui" line="76"/>
- <location filename="../../gui/client/toolbar.ui" line="79"/>
- <source>Menu</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>VncWindow</name>
- <message>
- <location filename="../../src/client/vnc/vncwindow.cpp" line="375"/>
- <source>Connecting...</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
diff --git a/i18n/client/pvsclient_de_DE.ts b/i18n/client/pvsclient_de_DE.ts
index 4a3bfa2..c053421 100644
--- a/i18n/client/pvsclient_de_DE.ts
+++ b/i18n/client/pvsclient_de_DE.ts
@@ -4,107 +4,107 @@
<context>
<name>ConnectWindow</name>
<message>
- <location filename="../../gui/client/connect.ui" line="23"/>
+ <location filename="../../src/client/connectwindow/connectwindow.ui" line="23"/>
<source>Connect to PVS session</source>
<translation>Verbinde zu PVS Sitzung</translation>
</message>
<message>
- <location filename="../../gui/client/connect.ui" line="51"/>
+ <location filename="../../src/client/connectwindow/connectwindow.ui" line="51"/>
<source>Connection</source>
<translation>Verbindung</translation>
</message>
<message>
- <location filename="../../gui/client/connect.ui" line="57"/>
+ <location filename="../../src/client/connectwindow/connectwindow.ui" line="57"/>
<source>Connect to</source>
<translation>Verbinden zu</translation>
</message>
<message>
- <location filename="../../gui/client/connect.ui" line="76"/>
+ <location filename="../../src/client/connectwindow/connectwindow.ui" line="76"/>
<source>Manual Connection</source>
<translation>Manuelle Verbindung</translation>
</message>
<message>
- <location filename="../../gui/client/connect.ui" line="82"/>
+ <location filename="../../src/client/connectwindow/connectwindow.ui" line="82"/>
<source>Session Name</source>
<translation>Sitzungsname</translation>
</message>
<message>
- <location filename="../../gui/client/connect.ui" line="152"/>
+ <location filename="../../src/client/connectwindow/connectwindow.ui" line="152"/>
<source>Close</source>
<translation>Schließen</translation>
</message>
<message>
- <location filename="../../gui/client/connect.ui" line="198"/>
+ <location filename="../../src/client/connectwindow/connectwindow.ui" line="198"/>
<source>Connect</source>
<translation>Verbinden</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="77"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="81"/>
<source>&amp;Disconnect</source>
<translation>&amp;Trennen</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="78"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="82"/>
<source>Connected to %1</source>
<translation>Verbunden zu %1</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="85"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="89"/>
<source>&amp;Stop</source>
<translation>&amp;Stop</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="87"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="91"/>
<source>&amp;Connect</source>
<translation>&amp;Verbinden</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="91"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="95"/>
<source>Ready to connect.</source>
<translation>Bereit für Verbindung.</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="94"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="98"/>
<source>Scanning for session %1.</source>
<translation>Suche nach Sitzung %1.</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="97"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="101"/>
<source>Found session, connecting...</source>
<translation>Sitzung gefunden, verbinden...</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="100"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="104"/>
<source>Waiting for server challenge...</source>
<translation>Warte auf Server Challenge...</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="103"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="107"/>
<source>Replied to challenge, sent own...</source>
<translation>Challenge beantwortet, sende eigene...</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="106"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="110"/>
<source>Logging in...</source>
<translation>Einloggen...</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="111"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="115"/>
<source>Invalid certificate.</source>
<translation>Ungültiges Zertifikat.</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="114"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="118"/>
<source>Invalid TLS hash: %1.</source>
<translation>Ungültiger TLS-Hash %1.</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="117"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="121"/>
<source>Unknown state :-(</source>
<translation>Unbekannter Zustand :-(</translation>
</message>
<message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="260"/>
+ <location filename="../../src/client/connectwindow/connectwindow.cpp" line="264"/>
<source>Session Name...</source>
<translation>Sitzungsname...</translation>
</message>
@@ -112,12 +112,12 @@
<context>
<name>InformationDialog</name>
<message>
- <location filename="../../src/client/informationdialog/informationdialog.cpp" line="11"/>
+ <location filename="../../src/client/informationdialog/informationdialog.cpp" line="15"/>
<source>&lt;h1&gt;system information&lt;/h1&gt;</source>
<translation>&lt;h1&gt;Systeminformation&lt;/h1&gt;</translation>
</message>
<message>
- <location filename="../../src/client/informationdialog/informationdialog.cpp" line="33"/>
+ <location filename="../../src/client/informationdialog/informationdialog.cpp" line="37"/>
<source>hostname</source>
<translation>Hostname</translation>
</message>
@@ -125,59 +125,59 @@
<context>
<name>Toolbar</name>
<message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="169"/>
+ <location filename="../../src/client/toolbar/toolbar.cpp" line="180"/>
<source>&amp;Connect...</source>
<translation>&amp;Verbinden...</translation>
</message>
<message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="170"/>
+ <location filename="../../src/client/toolbar/toolbar.cpp" line="181"/>
<source>&amp;Disconnect</source>
<translation>&amp;Trennen</translation>
</message>
<message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="172"/>
+ <location filename="../../src/client/toolbar/toolbar.cpp" line="183"/>
<source>&amp;Information...</source>
<translation>System&amp;information</translation>
</message>
<message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="173"/>
+ <location filename="../../src/client/toolbar/toolbar.cpp" line="184"/>
<source>&amp;What&apos;s this?</source>
<translation>&amp;Was ist das hier?</translation>
</message>
<message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="174"/>
+ <location filename="../../src/client/toolbar/toolbar.cpp" line="185"/>
<source>&amp;Quit</source>
<translation>&amp;Beenden</translation>
</message>
<message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="348"/>
+ <location filename="../../src/client/toolbar/toolbar.cpp" line="359"/>
<source>Streaming</source>
<translation>Ãœbertragung</translation>
</message>
<message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="369"/>
+ <location filename="../../src/client/toolbar/toolbar.cpp" line="380"/>
<source>Offline</source>
<translation>Offline</translation>
</message>
<message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="478"/>
+ <location filename="../../src/client/toolbar/toolbar.cpp" line="489"/>
<source>About PVS Client</source>
<translation>Ãœber PVS Client</translation>
</message>
<message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="479"/>
+ <location filename="../../src/client/toolbar/toolbar.cpp" line="490"/>
<source>The PVS - client is part of a software system for managing the virtual data traffic within the computer pools, between the tutor&apos;s and student&apos;s PCs. It has been developed to simplify the information traffic in seminars and general eLearning.</source>
<translation>Der PVS-Client ist Teil eines Softwaresystems für die Steuerung des virtuellen Datenverkehrs in den Poolräumen zwischen den Dozenten- und Studenten - PCs. Es wurde zur Vereinfachung des Informationsflusses und allgemeinem eLearning entwickelt.</translation>
</message>
<message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="354"/>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="392"/>
+ <location filename="../../src/client/toolbar/toolbar.cpp" line="365"/>
+ <location filename="../../src/client/toolbar/toolbar.cpp" line="403"/>
<source>Online</source>
<translation>Online</translation>
</message>
<message>
- <location filename="../../gui/client/toolbar.ui" line="76"/>
- <location filename="../../gui/client/toolbar.ui" line="79"/>
+ <location filename="../../src/client/toolbar/toolbar.ui" line="76"/>
+ <location filename="../../src/client/toolbar/toolbar.ui" line="79"/>
<source>Menu</source>
<translation>Menü</translation>
</message>
@@ -185,7 +185,7 @@
<context>
<name>VncWindow</name>
<message>
- <location filename="../../src/client/vnc/vncwindow.cpp" line="375"/>
+ <location filename="../../src/client/vnc/vncwindow.cpp" line="368"/>
<source>Connecting...</source>
<translation>Verbinden...</translation>
</message>
diff --git a/i18n/client/pvsclient_es_MX.ts b/i18n/client/pvsclient_es_MX.ts
deleted file mode 100644
index 13e143e..0000000
--- a/i18n/client/pvsclient_es_MX.ts
+++ /dev/null
@@ -1,193 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="es_MX" sourcelanguage="en_US">
-<context>
- <name>ConnectWindow</name>
- <message>
- <location filename="../../gui/client/connect.ui" line="23"/>
- <source>Connect to PVS session</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="51"/>
- <source>Connection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="57"/>
- <source>Connect to</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="76"/>
- <source>Manual Connection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="82"/>
- <source>Session Name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="152"/>
- <source>Close</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="198"/>
- <source>Connect</source>
- <translation type="unfinished">Conectar</translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="77"/>
- <source>&amp;Disconnect</source>
- <translation type="unfinished">&amp;Desconectar</translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="78"/>
- <source>Connected to %1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="85"/>
- <source>&amp;Stop</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="87"/>
- <source>&amp;Connect</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="91"/>
- <source>Ready to connect.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="94"/>
- <source>Scanning for session %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="97"/>
- <source>Found session, connecting...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="100"/>
- <source>Waiting for server challenge...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="103"/>
- <source>Replied to challenge, sent own...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="106"/>
- <source>Logging in...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="111"/>
- <source>Invalid certificate.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="114"/>
- <source>Invalid TLS hash: %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="117"/>
- <source>Unknown state :-(</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="260"/>
- <source>Session Name...</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>InformationDialog</name>
- <message>
- <location filename="../../src/client/informationdialog/informationdialog.cpp" line="11"/>
- <source>&lt;h1&gt;system information&lt;/h1&gt;</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/informationdialog/informationdialog.cpp" line="33"/>
- <source>hostname</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>Toolbar</name>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="169"/>
- <source>&amp;Connect...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="170"/>
- <source>&amp;Disconnect</source>
- <translation type="unfinished">&amp;Desconectar</translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="172"/>
- <source>&amp;Information...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="173"/>
- <source>&amp;What&apos;s this?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="174"/>
- <source>&amp;Quit</source>
- <translation type="unfinished">&amp;Cerrar</translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="348"/>
- <source>Streaming</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="369"/>
- <source>Offline</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="478"/>
- <source>About PVS Client</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="479"/>
- <source>The PVS - client is part of a software system for managing the virtual data traffic within the computer pools, between the tutor&apos;s and student&apos;s PCs. It has been developed to simplify the information traffic in seminars and general eLearning.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="354"/>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="392"/>
- <source>Online</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/toolbar.ui" line="76"/>
- <location filename="../../gui/client/toolbar.ui" line="79"/>
- <source>Menu</source>
- <translation type="unfinished">Menu</translation>
- </message>
-</context>
-<context>
- <name>VncWindow</name>
- <message>
- <location filename="../../src/client/vnc/vncwindow.cpp" line="375"/>
- <source>Connecting...</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
diff --git a/i18n/client/pvsclient_fr_FR.ts b/i18n/client/pvsclient_fr_FR.ts
deleted file mode 100644
index af303f5..0000000
--- a/i18n/client/pvsclient_fr_FR.ts
+++ /dev/null
@@ -1,193 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1">
-<context>
- <name>ConnectWindow</name>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="77"/>
- <source>&amp;Disconnect</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="78"/>
- <source>Connected to %1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="85"/>
- <source>&amp;Stop</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="87"/>
- <source>&amp;Connect</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="91"/>
- <source>Ready to connect.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="94"/>
- <source>Scanning for session %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="97"/>
- <source>Found session, connecting...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="100"/>
- <source>Waiting for server challenge...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="103"/>
- <source>Replied to challenge, sent own...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="106"/>
- <source>Logging in...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="111"/>
- <source>Invalid certificate.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="114"/>
- <source>Invalid TLS hash: %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="117"/>
- <source>Unknown state :-(</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="260"/>
- <source>Session Name...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="23"/>
- <source>Connect to PVS session</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="51"/>
- <source>Connection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="57"/>
- <source>Connect to</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="76"/>
- <source>Manual Connection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="82"/>
- <source>Session Name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="152"/>
- <source>Close</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="198"/>
- <source>Connect</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>InformationDialog</name>
- <message>
- <location filename="../../src/client/informationdialog/informationdialog.cpp" line="11"/>
- <source>&lt;h1&gt;system information&lt;/h1&gt;</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/informationdialog/informationdialog.cpp" line="33"/>
- <source>hostname</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>Toolbar</name>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="169"/>
- <source>&amp;Connect...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="170"/>
- <source>&amp;Disconnect</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="172"/>
- <source>&amp;Information...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="173"/>
- <source>&amp;What&apos;s this?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="174"/>
- <source>&amp;Quit</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="348"/>
- <source>Streaming</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="369"/>
- <source>Offline</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="478"/>
- <source>About PVS Client</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="479"/>
- <source>The PVS - client is part of a software system for managing the virtual data traffic within the computer pools, between the tutor&apos;s and student&apos;s PCs. It has been developed to simplify the information traffic in seminars and general eLearning.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="354"/>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="392"/>
- <source>Online</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/toolbar.ui" line="76"/>
- <location filename="../../gui/client/toolbar.ui" line="79"/>
- <source>Menu</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>VncWindow</name>
- <message>
- <location filename="../../src/client/vnc/vncwindow.cpp" line="375"/>
- <source>Connecting...</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
diff --git a/i18n/client/pvsclient_pl_PL.ts b/i18n/client/pvsclient_pl_PL.ts
deleted file mode 100644
index af303f5..0000000
--- a/i18n/client/pvsclient_pl_PL.ts
+++ /dev/null
@@ -1,193 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1">
-<context>
- <name>ConnectWindow</name>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="77"/>
- <source>&amp;Disconnect</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="78"/>
- <source>Connected to %1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="85"/>
- <source>&amp;Stop</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="87"/>
- <source>&amp;Connect</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="91"/>
- <source>Ready to connect.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="94"/>
- <source>Scanning for session %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="97"/>
- <source>Found session, connecting...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="100"/>
- <source>Waiting for server challenge...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="103"/>
- <source>Replied to challenge, sent own...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="106"/>
- <source>Logging in...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="111"/>
- <source>Invalid certificate.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="114"/>
- <source>Invalid TLS hash: %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="117"/>
- <source>Unknown state :-(</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/connectwindow/connectwindow.cpp" line="260"/>
- <source>Session Name...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="23"/>
- <source>Connect to PVS session</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="51"/>
- <source>Connection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="57"/>
- <source>Connect to</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="76"/>
- <source>Manual Connection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="82"/>
- <source>Session Name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="152"/>
- <source>Close</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/connect.ui" line="198"/>
- <source>Connect</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>InformationDialog</name>
- <message>
- <location filename="../../src/client/informationdialog/informationdialog.cpp" line="11"/>
- <source>&lt;h1&gt;system information&lt;/h1&gt;</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/informationdialog/informationdialog.cpp" line="33"/>
- <source>hostname</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>Toolbar</name>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="169"/>
- <source>&amp;Connect...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="170"/>
- <source>&amp;Disconnect</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="172"/>
- <source>&amp;Information...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="173"/>
- <source>&amp;What&apos;s this?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="174"/>
- <source>&amp;Quit</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="348"/>
- <source>Streaming</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="369"/>
- <source>Offline</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="478"/>
- <source>About PVS Client</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="479"/>
- <source>The PVS - client is part of a software system for managing the virtual data traffic within the computer pools, between the tutor&apos;s and student&apos;s PCs. It has been developed to simplify the information traffic in seminars and general eLearning.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="354"/>
- <location filename="../../src/client/toolbar/toolbar.cpp" line="392"/>
- <source>Online</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/client/toolbar.ui" line="76"/>
- <location filename="../../gui/client/toolbar.ui" line="79"/>
- <source>Menu</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>VncWindow</name>
- <message>
- <location filename="../../src/client/vnc/vncwindow.cpp" line="375"/>
- <source>Connecting...</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
diff --git a/i18n/server/pvsmgr_ar_JO.ts b/i18n/server/pvsmgr_ar_JO.ts
deleted file mode 100644
index 6a6b73c..0000000
--- a/i18n/server/pvsmgr_ar_JO.ts
+++ /dev/null
@@ -1,304 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1">
-<context>
- <name>ConnectionFrame</name>
- <message>
- <source>EXAM-MODE</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <source>Close</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Help</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <source>toolBar</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Exit</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Ctrl+Q</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Lock or Unlock all Clients</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Ctrl+A</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Student&apos;s Screen to Tutor</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Tutor&apos;s Screen to Student</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Tutor&apos;s Screen to Everyone</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Delete Client</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Help</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>No tutor defined.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Tutor is offline.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Please select a projection source.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>The projection source is offline.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Please select a projection destination.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>The projection destination is offline.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Selected projection target is tutor.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Selected client is currently online.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>No projection destination available.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Session Name: %1 [click to edit]</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>No item selected, please select room!</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Are you sure you want to reload the room?
-Note that all clients will be deleted.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Projection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Selection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>No client is selected.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>The selected client is not connected.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>This client is still connected.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Lock/Unlock single client</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Reload Room</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Question</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Are you sure you want to exit?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Do you want to delete and disconnect any clients
-not belonging to the current room layout?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Warning</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Are you sure you want to delete the selected client?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Lock/Unlock all clients</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>This will show a black screen on all connected clients, except the tutor&apos;s client.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Stream currently selected client&apos;s screen content to the tutor&apos;s client.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Stream currently selected client&apos;s screen content to the tutor&apos;s client while showing a locked black screen on all other clients.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Stream the tutor&apos;s screen contents to the currently selected client.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Stream the tutor&apos;s screen contents to everyone.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Reset</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Unlock all clients, stop any running screen content streaming.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>R</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Declare tutor</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>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.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>T</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Delete currently selected client. Only allowed for disconnected clients.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Del</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Show this help text.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>F1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Load a new room layout</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>This shows a list of preconfigured rooms which you can load. This will reset the currently shown layout and disconnect all clients.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Lock or unlock the selected client only.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>L</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Student&apos;s Screen to Tutor, others blanked</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>NumericKeyboard</name>
- <message>
- <source>GroupBox</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Keyboard</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Del</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>QCoreApplication</name>
- <message>
- <source>OpenSSL error</source>
- <comment>CertManager</comment>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Could not generate certificates for secure connections.
-PVS will not work.
-
-Press OK to quit.</source>
- <comment>CertManager</comment>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>ReloadRoom</name>
- <message>
- <source>Reload Room</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Choose room configuration to reload:</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>SessionName</name>
- <message>
- <source>Set session name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>New session name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Random name</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
diff --git a/i18n/server/pvsmgr_de_DE.ts b/i18n/server/pvsmgr_de_DE.ts
index 0cac3ed..fb88890 100644
--- a/i18n/server/pvsmgr_de_DE.ts
+++ b/i18n/server/pvsmgr_de_DE.ts
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0" language="de_DE" sourcelanguage="en_US">
+<TS version="2.1" language="de_DE" sourcelanguage="en_US">
<context>
<name>ConnectionFrame</name>
<message>
- <location filename="../../src/server/connectionframe/connectionframe.cpp" line="103"/>
+ <location filename="../../src/server/connectionframe/connectionframe.cpp" line="109"/>
<source>EXAM-MODE</source>
<translation>KLAUSURMODUS</translation>
</message>
@@ -25,300 +25,296 @@
<context>
<name>MainWindow</name>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="164"/>
- <location filename="../../gui/server_normal/mainwindow.ui" line="167"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="100"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="164"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="167"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="88"/>
<source>Exit</source>
<translation>Beenden</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="46"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="43"/>
<source>No tutor defined.</source>
<translation>Kein Tutor definiert.</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="47"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="44"/>
<source>Tutor is offline.</source>
<translation>Tutor ist offline.</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="48"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="45"/>
<source>Please select a projection source.</source>
<translation>Bitte eine Projektionsquelle auswählen.</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="49"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="46"/>
<source>The projection source is offline.</source>
<translation>Die Projektionsquelle ist offline.</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="50"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="47"/>
<source>Please select a projection destination.</source>
<translation>Bitte ein Projektionsziel auswählen.</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="51"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="48"/>
<source>The projection destination is offline.</source>
<translation>Das Projektionsziel ist offline.</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="52"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="49"/>
<source>Selected projection target is tutor.</source>
<translation>Das ausgewählte Projektionsziel ist Tutor.</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="53"/>
- <source>Selected client is currently online.</source>
- <translation>Der ausgewählte Client ist derzeit online.</translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="54"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="50"/>
<source>No projection destination available.</source>
<translation>Kein Projektionsziel verfügbar.</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="82"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="70"/>
<source>Reload Room</source>
<translation>Raum neu laden</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="418"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="668"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="406"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="654"/>
<source>Question</source>
<translation>Frage</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="418"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="406"/>
<source>Are you sure you want to exit?</source>
<translation>Wollen Sie den PVS-Manager wirklich beenden?</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="668"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="654"/>
<source>Do you want to delete and disconnect any clients
not belonging to the current room layout?</source>
<translation>Möchten Sie alle Teilnehmer, die nicht zum aktuellen Raumplan gehören, aus der Sitzung entfernen?</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1008"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1015"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1051"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1282"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1011"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1018"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1054"/>
<location filename="../../src/server/mainwindow/mainwindow.cpp" line="1286"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1290"/>
<source>Selection</source>
<translation>Auswahl</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1286"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1290"/>
<source>This client is still connected.</source>
<translation>Dieser Client ist noch verbunden.</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1289"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="779"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1293"/>
<source>Warning</source>
<translation>Warnung</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1289"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1293"/>
<source>Are you sure you want to delete the selected client?</source>
<translation>Möchten Sie den gewählten Client löschen?</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="656"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="642"/>
<source>Session Name: %1 [click to edit]</source>
<translation>Sitzungsname: %1 [anklicken editiert]</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="789"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="776"/>
<source>No item selected, please select room!</source>
<translation>Keine Auswahl getroffen, bitte einen Raum auswählen!</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="792"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="780"/>
<source>Are you sure you want to reload the room?
Note that all clients will be deleted.</source>
<translation>Wollen Sie den Raum wirklich neu laden? Beachten Sie, dass alle Clienten gelöscht werden.</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="854"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="856"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="858"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="886"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="888"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="890"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="892"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="894"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="935"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="937"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="939"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="941"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="943"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="841"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="843"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="845"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="873"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="875"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="877"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="879"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="881"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="938"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="940"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="942"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="944"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="946"/>
<source>Projection</source>
<translation>Projektion</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1008"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1051"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1282"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1011"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1054"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1286"/>
<source>No client is selected.</source>
<translation>Kein Client ausgewählt.</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1015"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1018"/>
<source>The selected client is not connected.</source>
<translation>Ausgewählter Client ist nicht verbunden.</translation>
</message>
<message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="101"/>
+ <location filename="../../src/server/mainwindow/mainwindow.cpp" line="89"/>
<source>Lock or Unlock all Clients</source>
<translation>Alle Clients sperren oder entsperren</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="170"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="170"/>
<source>Ctrl+Q</source>
<translation>Strg+Q</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="185"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="185"/>
<source>Lock/Unlock all clients</source>
<translation>Alle Clients (ent)sperren</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="182"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="182"/>
<source>This will show a black screen on all connected clients, except the tutor&apos;s client.</source>
<translation>Schaltet alle Bildschirme schwarz und deaktiviert Maus/Tastatur. Der Tutor ist von dieser Funktion ausgenommen.</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="197"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="197"/>
<source>Stream currently selected client&apos;s screen content to the tutor&apos;s client.</source>
<translation>Übertrage den Bildschirminhalt des gewählten Clients an den Tutor.</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="209"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="209"/>
<source>Stream currently selected client&apos;s screen content to the tutor&apos;s client while showing a locked black screen on all other clients.</source>
<translation>Der Bildschirm des gewählten Clients wird an den Tutor übertragen, während alle anderen Teilnehmer einen Schwarzen Bildschirm sehen.</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="233"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="233"/>
<source>Stream the tutor&apos;s screen contents to everyone.</source>
<translation>Bildschirminhalt des Tutors an alle verbundenen Clients übertragen.</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="248"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="248"/>
<source>Reset</source>
<translation>Reset</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="245"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="245"/>
<source>Unlock all clients, stop any running screen content streaming.</source>
<translation>Ausgangszustand wiederherstellen: Alle Clients entsperren, alle laufenden Bildschirmübertragungen abbrechen.</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="251"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="251"/>
<source>R</source>
<translation>R</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="263"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="263"/>
<source>Declare tutor</source>
<translation>Zum Tutor ernennen</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="260"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="260"/>
<source>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.</source>
<translation>Den aktuell gewählten Client zum Tutor ernennen. Der Client des Tutors wird vom Bildschirmsperren ausgenommen, und dient als fixer Endpunkt für Bildschirmübertragungen.</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="212"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="212"/>
<source>Student&apos;s Screen to Tutor, others blanked</source>
<translation>Gewählten Client an Tutor übertragen, andere Teilnehmer sperren</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="266"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="266"/>
<source>T</source>
<translation>T</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="293"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="293"/>
<source>Show this help text.</source>
<translation>Diese Hilfe anzeigen.</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="299"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="299"/>
<source>F1</source>
<translation>F1</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="314"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="314"/>
<source>Load a new room layout</source>
<translation>Neuen Raumplan laden</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="311"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="311"/>
<source>This shows a list of preconfigured rooms which you can load. This will reset the currently shown layout and disconnect all clients.</source>
<translation>Zeigt eine Liste aller vordefinierten Räume an. Wird ein neuer Raumplan geladen, werden alle aktuell verbundenen Clients getrennt.</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="323"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="323"/>
<source>Lock or unlock the selected client only.</source>
<translation>Gewählten Client (ent)sperren.</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="329"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="329"/>
<source>L</source>
<translation>L</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="188"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="188"/>
<source>Ctrl+A</source>
<translation>Strg+A</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="200"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="200"/>
<source>Student&apos;s Screen to Tutor</source>
<translation>Gewählten Client an Tutor übertragen</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="224"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="224"/>
<source>Tutor&apos;s Screen to Student</source>
<translation>Tutorenbildschirm an gewählten Client</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="221"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="221"/>
<source>Stream the tutor&apos;s screen contents to the currently selected client.</source>
<translation>Den Bildschirminhalt des Tutors an alle verbundenen Clients übertragen.</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="236"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="236"/>
<source>Tutor&apos;s Screen to Everyone</source>
<translation>Tutorenbildschirm an alle</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="278"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="278"/>
<source>Delete Client</source>
<translation>Lösche Client</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="275"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="275"/>
<source>Delete currently selected client. Only allowed for disconnected clients.</source>
<translation>Den gewählten Client löschen. Nur möglich bei nicht verbundenen Clients.</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="281"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="281"/>
<source>Del</source>
<translation>Entf</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="296"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="296"/>
<source>Help</source>
<translation>Hilfe</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="326"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="326"/>
<source>Lock/Unlock single client</source>
<translation>Einzelnen Client (ent)sperren</translation>
</message>
<message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="120"/>
+ <location filename="../../src/server/mainwindow/mainwindow.ui" line="120"/>
<source>toolBar</source>
<translation>toolBar</translation>
</message>
@@ -326,37 +322,37 @@ Note that all clients will be deleted.</source>
<context>
<name>NumericKeyboard</name>
<message>
- <location filename="../../gui/server_normal/numerickeyboard.ui" line="20"/>
+ <location filename="../../src/server/numerickeyboard/numerickeyboard.ui" line="20"/>
<source>GroupBox</source>
<translation>GroupBox</translation>
</message>
<message>
- <location filename="../../gui/server_normal/numerickeyboard.ui" line="23"/>
+ <location filename="../../src/server/numerickeyboard/numerickeyboard.ui" line="23"/>
<source>Keyboard</source>
<translation>Tastatur</translation>
</message>
<message>
- <location filename="../../gui/server_normal/numerickeyboard.ui" line="48"/>
+ <location filename="../../src/server/numerickeyboard/numerickeyboard.ui" line="48"/>
<source>Del</source>
<translation>C</translation>
</message>
</context>
<context>
- <name>QCoreApplication</name>
+ <name>QObject</name>
<message>
- <location filename="../../src/server/net/certmanager.cpp" line="69"/>
+ <location filename="../../src/server/net/certmanager.cpp" line="72"/>
<source>OpenSSL error</source>
<comment>CertManager</comment>
- <translation>OpenSSL-Fehler</translation>
+ <translation type="unfinished">OpenSSL-Fehler</translation>
</message>
<message>
- <location filename="../../src/server/net/certmanager.cpp" line="70"/>
+ <location filename="../../src/server/net/certmanager.cpp" line="73"/>
<source>Could not generate certificates for secure connections.
PVS will not work.
Press OK to quit.</source>
<comment>CertManager</comment>
- <translation>Konnte kein Zertifikat + Schlüssel für gesicherte Verbindungen erzeugen.
+ <translation type="unfinished">Konnte kein Zertifikat + Schlüssel für gesicherte Verbindungen erzeugen.
PVS wird nicht funktionieren.
OK beendet den PVS-Manager.</translation>
@@ -365,12 +361,12 @@ OK beendet den PVS-Manager.</translation>
<context>
<name>ReloadRoom</name>
<message>
- <location filename="../../gui/server_normal/reloadroom.ui" line="14"/>
+ <location filename="../../src/server/reloadroomwindow/reloadroomwindow.ui" line="14"/>
<source>Reload Room</source>
<translation>Raum neu laden</translation>
</message>
<message>
- <location filename="../../gui/server_normal/reloadroom.ui" line="28"/>
+ <location filename="../../src/server/reloadroomwindow/reloadroomwindow.ui" line="28"/>
<source>Choose room configuration to reload:</source>
<translation>Wählen Sie den neuzuladenden Raum:</translation>
</message>
@@ -378,17 +374,17 @@ OK beendet den PVS-Manager.</translation>
<context>
<name>SessionName</name>
<message>
- <location filename="../../gui/server_normal/sessionname.ui" line="23"/>
+ <location filename="../../src/server/sessionnamewindow/sessionnamewindow.ui" line="23"/>
<source>Set session name</source>
<translation>Sitzungsname eingeben</translation>
</message>
<message>
- <location filename="../../gui/server_normal/sessionname.ui" line="29"/>
+ <location filename="../../src/server/sessionnamewindow/sessionnamewindow.ui" line="29"/>
<source>New session name</source>
<translation>Neuer Sitzungsname</translation>
</message>
<message>
- <location filename="../../gui/server_normal/sessionname.ui" line="58"/>
+ <location filename="../../src/server/sessionnamewindow/sessionnamewindow.ui" line="58"/>
<source>Random name</source>
<translation>Zufälliger Sitzungsname</translation>
</message>
diff --git a/i18n/server/pvsmgr_es_MX.ts b/i18n/server/pvsmgr_es_MX.ts
deleted file mode 100644
index 71a62ed..0000000
--- a/i18n/server/pvsmgr_es_MX.ts
+++ /dev/null
@@ -1,393 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="es_MX" sourcelanguage="en_US">
-<context>
- <name>ConnectionFrame</name>
- <message>
- <location filename="../../src/server/connectionframe/connectionframe.cpp" line="103"/>
- <source>EXAM-MODE</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../../src/server/helpwindow/helpwindow.cpp" line="17"/>
- <source>Help</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/helpwindow/helpwindow.cpp" line="60"/>
- <source>Close</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="164"/>
- <location filename="../../gui/server_normal/mainwindow.ui" line="167"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="100"/>
- <source>Exit</source>
- <translation>Salir</translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="46"/>
- <source>No tutor defined.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="47"/>
- <source>Tutor is offline.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="48"/>
- <source>Please select a projection source.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="49"/>
- <source>The projection source is offline.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="50"/>
- <source>Please select a projection destination.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="51"/>
- <source>The projection destination is offline.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="52"/>
- <source>Selected projection target is tutor.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="53"/>
- <source>Selected client is currently online.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="54"/>
- <source>No projection destination available.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="82"/>
- <source>Reload Room</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="418"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="668"/>
- <source>Question</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="418"/>
- <source>Are you sure you want to exit?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="668"/>
- <source>Do you want to delete and disconnect any clients
-not belonging to the current room layout?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1008"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1015"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1051"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1282"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1286"/>
- <source>Selection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1286"/>
- <source>This client is still connected.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1289"/>
- <source>Warning</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1289"/>
- <source>Are you sure you want to delete the selected client?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="656"/>
- <source>Session Name: %1 [click to edit]</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="789"/>
- <source>No item selected, please select room!</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="792"/>
- <source>Are you sure you want to reload the room?
-Note that all clients will be deleted.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="854"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="856"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="858"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="886"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="888"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="890"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="892"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="894"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="935"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="937"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="939"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="941"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="943"/>
- <source>Projection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1008"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1051"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1282"/>
- <source>No client is selected.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1015"/>
- <source>The selected client is not connected.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="101"/>
- <source>Lock or Unlock all Clients</source>
- <translation>Bloquear o desbloquear todos los clientes</translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="170"/>
- <source>Ctrl+Q</source>
- <translation>Ctrl+Q</translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="185"/>
- <source>Lock/Unlock all clients</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="182"/>
- <source>This will show a black screen on all connected clients, except the tutor&apos;s client.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="200"/>
- <source>Student&apos;s Screen to Tutor</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="197"/>
- <source>Stream currently selected client&apos;s screen content to the tutor&apos;s client.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="209"/>
- <source>Stream currently selected client&apos;s screen content to the tutor&apos;s client while showing a locked black screen on all other clients.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="233"/>
- <source>Stream the tutor&apos;s screen contents to everyone.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="248"/>
- <source>Reset</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="245"/>
- <source>Unlock all clients, stop any running screen content streaming.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="251"/>
- <source>R</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="263"/>
- <source>Declare tutor</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="260"/>
- <source>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.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="212"/>
- <source>Student&apos;s Screen to Tutor, others blanked</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="266"/>
- <source>T</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="293"/>
- <source>Show this help text.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="299"/>
- <source>F1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="314"/>
- <source>Load a new room layout</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="311"/>
- <source>This shows a list of preconfigured rooms which you can load. This will reset the currently shown layout and disconnect all clients.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="323"/>
- <source>Lock or unlock the selected client only.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="329"/>
- <source>L</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="224"/>
- <source>Tutor&apos;s Screen to Student</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="221"/>
- <source>Stream the tutor&apos;s screen contents to the currently selected client.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="236"/>
- <source>Tutor&apos;s Screen to Everyone</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="278"/>
- <source>Delete Client</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="275"/>
- <source>Delete currently selected client. Only allowed for disconnected clients.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="281"/>
- <source>Del</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="296"/>
- <source>Help</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="326"/>
- <source>Lock/Unlock single client</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="188"/>
- <source>Ctrl+A</source>
- <translation>Ctrl+A</translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="120"/>
- <source>toolBar</source>
- <translation>Barra de herramientas</translation>
- </message>
-</context>
-<context>
- <name>NumericKeyboard</name>
- <message>
- <location filename="../../gui/server_normal/numerickeyboard.ui" line="20"/>
- <source>GroupBox</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/numerickeyboard.ui" line="23"/>
- <source>Keyboard</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/numerickeyboard.ui" line="48"/>
- <source>Del</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>QCoreApplication</name>
- <message>
- <location filename="../../src/server/net/certmanager.cpp" line="69"/>
- <source>OpenSSL error</source>
- <comment>CertManager</comment>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/net/certmanager.cpp" line="70"/>
- <source>Could not generate certificates for secure connections.
-PVS will not work.
-
-Press OK to quit.</source>
- <comment>CertManager</comment>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>ReloadRoom</name>
- <message>
- <location filename="../../gui/server_normal/reloadroom.ui" line="14"/>
- <source>Reload Room</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/reloadroom.ui" line="28"/>
- <source>Choose room configuration to reload:</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>SessionName</name>
- <message>
- <location filename="../../gui/server_normal/sessionname.ui" line="23"/>
- <source>Set session name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/sessionname.ui" line="29"/>
- <source>New session name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/sessionname.ui" line="58"/>
- <source>Random name</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
diff --git a/i18n/server/pvsmgr_fr_FR.ts b/i18n/server/pvsmgr_fr_FR.ts
deleted file mode 100644
index 3c49f17..0000000
--- a/i18n/server/pvsmgr_fr_FR.ts
+++ /dev/null
@@ -1,393 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1">
-<context>
- <name>ConnectionFrame</name>
- <message>
- <location filename="../../src/server/connectionframe/connectionframe.cpp" line="103"/>
- <source>EXAM-MODE</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../../src/server/helpwindow/helpwindow.cpp" line="17"/>
- <source>Help</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/helpwindow/helpwindow.cpp" line="60"/>
- <source>Close</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="164"/>
- <location filename="../../gui/server_normal/mainwindow.ui" line="167"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="100"/>
- <source>Exit</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="46"/>
- <source>No tutor defined.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="47"/>
- <source>Tutor is offline.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="48"/>
- <source>Please select a projection source.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="49"/>
- <source>The projection source is offline.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="50"/>
- <source>Please select a projection destination.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="51"/>
- <source>The projection destination is offline.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="52"/>
- <source>Selected projection target is tutor.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="53"/>
- <source>Selected client is currently online.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="54"/>
- <source>No projection destination available.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="82"/>
- <source>Reload Room</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="418"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="668"/>
- <source>Question</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="418"/>
- <source>Are you sure you want to exit?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="668"/>
- <source>Do you want to delete and disconnect any clients
-not belonging to the current room layout?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1008"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1015"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1051"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1282"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1286"/>
- <source>Selection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1286"/>
- <source>This client is still connected.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1289"/>
- <source>Warning</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1289"/>
- <source>Are you sure you want to delete the selected client?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="656"/>
- <source>Session Name: %1 [click to edit]</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="789"/>
- <source>No item selected, please select room!</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="792"/>
- <source>Are you sure you want to reload the room?
-Note that all clients will be deleted.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="854"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="856"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="858"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="886"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="888"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="890"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="892"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="894"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="935"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="937"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="939"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="941"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="943"/>
- <source>Projection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1008"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1051"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1282"/>
- <source>No client is selected.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1015"/>
- <source>The selected client is not connected.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="101"/>
- <source>Lock or Unlock all Clients</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="170"/>
- <source>Ctrl+Q</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="185"/>
- <source>Lock/Unlock all clients</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="182"/>
- <source>This will show a black screen on all connected clients, except the tutor&apos;s client.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="197"/>
- <source>Stream currently selected client&apos;s screen content to the tutor&apos;s client.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="209"/>
- <source>Stream currently selected client&apos;s screen content to the tutor&apos;s client while showing a locked black screen on all other clients.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="233"/>
- <source>Stream the tutor&apos;s screen contents to everyone.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="248"/>
- <source>Reset</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="245"/>
- <source>Unlock all clients, stop any running screen content streaming.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="251"/>
- <source>R</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="263"/>
- <source>Declare tutor</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="260"/>
- <source>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.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="212"/>
- <source>Student&apos;s Screen to Tutor, others blanked</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="266"/>
- <source>T</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="293"/>
- <source>Show this help text.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="299"/>
- <source>F1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="314"/>
- <source>Load a new room layout</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="311"/>
- <source>This shows a list of preconfigured rooms which you can load. This will reset the currently shown layout and disconnect all clients.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="323"/>
- <source>Lock or unlock the selected client only.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="329"/>
- <source>L</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="188"/>
- <source>Ctrl+A</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="200"/>
- <source>Student&apos;s Screen to Tutor</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="224"/>
- <source>Tutor&apos;s Screen to Student</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="221"/>
- <source>Stream the tutor&apos;s screen contents to the currently selected client.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="236"/>
- <source>Tutor&apos;s Screen to Everyone</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="278"/>
- <source>Delete Client</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="275"/>
- <source>Delete currently selected client. Only allowed for disconnected clients.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="281"/>
- <source>Del</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="296"/>
- <source>Help</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="326"/>
- <source>Lock/Unlock single client</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="120"/>
- <source>toolBar</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>NumericKeyboard</name>
- <message>
- <location filename="../../gui/server_normal/numerickeyboard.ui" line="20"/>
- <source>GroupBox</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/numerickeyboard.ui" line="23"/>
- <source>Keyboard</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/numerickeyboard.ui" line="48"/>
- <source>Del</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>QCoreApplication</name>
- <message>
- <location filename="../../src/server/net/certmanager.cpp" line="69"/>
- <source>OpenSSL error</source>
- <comment>CertManager</comment>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/net/certmanager.cpp" line="70"/>
- <source>Could not generate certificates for secure connections.
-PVS will not work.
-
-Press OK to quit.</source>
- <comment>CertManager</comment>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>ReloadRoom</name>
- <message>
- <location filename="../../gui/server_normal/reloadroom.ui" line="14"/>
- <source>Reload Room</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/reloadroom.ui" line="28"/>
- <source>Choose room configuration to reload:</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>SessionName</name>
- <message>
- <location filename="../../gui/server_normal/sessionname.ui" line="23"/>
- <source>Set session name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/sessionname.ui" line="29"/>
- <source>New session name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/sessionname.ui" line="58"/>
- <source>Random name</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
diff --git a/i18n/server/pvsmgr_pl_PL.ts b/i18n/server/pvsmgr_pl_PL.ts
deleted file mode 100644
index 3c49f17..0000000
--- a/i18n/server/pvsmgr_pl_PL.ts
+++ /dev/null
@@ -1,393 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1">
-<context>
- <name>ConnectionFrame</name>
- <message>
- <location filename="../../src/server/connectionframe/connectionframe.cpp" line="103"/>
- <source>EXAM-MODE</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../../src/server/helpwindow/helpwindow.cpp" line="17"/>
- <source>Help</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/helpwindow/helpwindow.cpp" line="60"/>
- <source>Close</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="164"/>
- <location filename="../../gui/server_normal/mainwindow.ui" line="167"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="100"/>
- <source>Exit</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="46"/>
- <source>No tutor defined.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="47"/>
- <source>Tutor is offline.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="48"/>
- <source>Please select a projection source.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="49"/>
- <source>The projection source is offline.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="50"/>
- <source>Please select a projection destination.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="51"/>
- <source>The projection destination is offline.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="52"/>
- <source>Selected projection target is tutor.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="53"/>
- <source>Selected client is currently online.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="54"/>
- <source>No projection destination available.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="82"/>
- <source>Reload Room</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="418"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="668"/>
- <source>Question</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="418"/>
- <source>Are you sure you want to exit?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="668"/>
- <source>Do you want to delete and disconnect any clients
-not belonging to the current room layout?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1008"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1015"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1051"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1282"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1286"/>
- <source>Selection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1286"/>
- <source>This client is still connected.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1289"/>
- <source>Warning</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1289"/>
- <source>Are you sure you want to delete the selected client?</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="656"/>
- <source>Session Name: %1 [click to edit]</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="789"/>
- <source>No item selected, please select room!</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="792"/>
- <source>Are you sure you want to reload the room?
-Note that all clients will be deleted.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="854"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="856"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="858"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="886"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="888"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="890"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="892"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="894"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="935"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="937"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="939"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="941"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="943"/>
- <source>Projection</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1008"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1051"/>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1282"/>
- <source>No client is selected.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="1015"/>
- <source>The selected client is not connected.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/mainwindow/mainwindow.cpp" line="101"/>
- <source>Lock or Unlock all Clients</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="170"/>
- <source>Ctrl+Q</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="185"/>
- <source>Lock/Unlock all clients</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="182"/>
- <source>This will show a black screen on all connected clients, except the tutor&apos;s client.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="197"/>
- <source>Stream currently selected client&apos;s screen content to the tutor&apos;s client.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="209"/>
- <source>Stream currently selected client&apos;s screen content to the tutor&apos;s client while showing a locked black screen on all other clients.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="233"/>
- <source>Stream the tutor&apos;s screen contents to everyone.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="248"/>
- <source>Reset</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="245"/>
- <source>Unlock all clients, stop any running screen content streaming.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="251"/>
- <source>R</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="263"/>
- <source>Declare tutor</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="260"/>
- <source>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.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="212"/>
- <source>Student&apos;s Screen to Tutor, others blanked</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="266"/>
- <source>T</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="293"/>
- <source>Show this help text.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="299"/>
- <source>F1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="314"/>
- <source>Load a new room layout</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="311"/>
- <source>This shows a list of preconfigured rooms which you can load. This will reset the currently shown layout and disconnect all clients.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="323"/>
- <source>Lock or unlock the selected client only.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="329"/>
- <source>L</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="188"/>
- <source>Ctrl+A</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="200"/>
- <source>Student&apos;s Screen to Tutor</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="224"/>
- <source>Tutor&apos;s Screen to Student</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="221"/>
- <source>Stream the tutor&apos;s screen contents to the currently selected client.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="236"/>
- <source>Tutor&apos;s Screen to Everyone</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="278"/>
- <source>Delete Client</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="275"/>
- <source>Delete currently selected client. Only allowed for disconnected clients.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="281"/>
- <source>Del</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="296"/>
- <source>Help</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="326"/>
- <source>Lock/Unlock single client</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/mainwindow.ui" line="120"/>
- <source>toolBar</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>NumericKeyboard</name>
- <message>
- <location filename="../../gui/server_normal/numerickeyboard.ui" line="20"/>
- <source>GroupBox</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/numerickeyboard.ui" line="23"/>
- <source>Keyboard</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/numerickeyboard.ui" line="48"/>
- <source>Del</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>QCoreApplication</name>
- <message>
- <location filename="../../src/server/net/certmanager.cpp" line="69"/>
- <source>OpenSSL error</source>
- <comment>CertManager</comment>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../src/server/net/certmanager.cpp" line="70"/>
- <source>Could not generate certificates for secure connections.
-PVS will not work.
-
-Press OK to quit.</source>
- <comment>CertManager</comment>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>ReloadRoom</name>
- <message>
- <location filename="../../gui/server_normal/reloadroom.ui" line="14"/>
- <source>Reload Room</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/reloadroom.ui" line="28"/>
- <source>Choose room configuration to reload:</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>SessionName</name>
- <message>
- <location filename="../../gui/server_normal/sessionname.ui" line="23"/>
- <source>Set session name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/sessionname.ui" line="29"/>
- <source>New session name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../../gui/server_normal/sessionname.ui" line="58"/>
- <source>Random name</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
diff --git a/pvs2.config b/pvs2.config
deleted file mode 100644
index 8cec188..0000000
--- a/pvs2.config
+++ /dev/null
@@ -1 +0,0 @@
-// ADD PREDEFINED MACROS HERE!
diff --git a/pvs2.creator b/pvs2.creator
deleted file mode 100644
index e94cbbd..0000000
--- a/pvs2.creator
+++ /dev/null
@@ -1 +0,0 @@
-[General]
diff --git a/pvs2.files b/pvs2.files
deleted file mode 100644
index 599b005..0000000
--- a/pvs2.files
+++ /dev/null
@@ -1,93 +0,0 @@
-build/CMakeFiles/2.8.12.2/CompilerIdC/CMakeCCompilerId.c
-build/CMakeFiles/2.8.12.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
-build/src/client/connectwindow/moc_connectwindow.cxx
-build/src/client/net/moc_serverconnection.cxx
-build/src/client/net/moc_serverdiscovery.cxx
-build/src/client/toolbar/moc_toolbar.cxx
-build/src/client/util/platform/moc_blankscreen.cxx
-build/src/client/util/moc_util.cxx
-build/src/client/vnc/moc_vncserver.cxx
-build/src/client/vnc/moc_vncthread.cxx
-build/src/client/vnc/moc_vncwindow.cxx
-build/src/server/clicklabel/moc_clicklabel.cxx
-build/src/server/connectionframe/moc_connectionframe.cxx
-build/src/server/helpwindow/moc_helpwindow.cxx
-build/src/server/mainwindow/moc_mainwindow.cxx
-build/src/server/net/moc_certmanager.cxx
-build/src/server/net/moc_client.cxx
-build/src/server/net/moc_discoverylistener.cxx
-build/src/server/net/moc_filedownloader.cxx
-build/src/server/net/moc_listenserver.cxx
-build/src/server/net/moc_sslserver.cxx
-build/src/server/reloadroomwindow/moc_reloadroomwindow.cxx
-build/src/server/reloadwindow/moc_reloadwindow.cxx
-build/src/server/sessionnamewindow/moc_sessionnamewindow.cxx
-build/src/server/util/moc_global.cxx
-build/src/server/util/moc_util.cxx
-build/qrc_pvsclient.cxx
-build/qrc_pvsmgr.cxx
-build/ui_connect.h
-build/ui_help.h
-build/ui_mainwindow.h
-build/ui_reloadroom.h
-build/ui_sessionname.h
-build/ui_toolbar.h
-src/client/connectwindow/connectwindow.cpp
-src/client/connectwindow/connectwindow.h
-src/client/net/serverconnection.cpp
-src/client/net/serverconnection.h
-src/client/net/serverdiscovery.cpp
-src/client/net/serverdiscovery.h
-src/client/toolbar/toolbar.cpp
-src/client/toolbar/toolbar.h
-src/client/util/platform/blankscreen.h
-src/client/util/platform/blankscreen_Win32.cpp
-src/client/util/platform/blankscreen_X11.cpp
-src/client/util/util.cpp
-src/client/util/util.h
-src/client/vnc/vncserver.cpp
-src/client/vnc/vncserver.h
-src/client/vnc/vncthread.cpp
-src/client/vnc/vncthread.h
-src/client/vnc/vncwindow.cpp
-src/client/vnc/vncwindow.h
-src/client/main.cpp
-src/server/clicklabel/clicklabel.cpp
-src/server/clicklabel/clicklabel.h
-src/server/connectionframe/connectionframe.cpp
-src/server/connectionframe/connectionframe.h
-src/server/helpwindow/helpwindow.cpp
-src/server/helpwindow/helpwindow.h
-src/server/mainwindow/mainwindow.cpp
-src/server/mainwindow/mainwindow.h
-src/server/net/certmanager.cpp
-src/server/net/certmanager.h
-src/server/net/client.cpp
-src/server/net/client.h
-src/server/net/discoverylistener.cpp
-src/server/net/discoverylistener.h
-src/server/net/filedownloader.cpp
-src/server/net/filedownloader.h
-src/server/net/listenserver.cpp
-src/server/net/listenserver.h
-src/server/net/sslserver.cpp
-src/server/net/sslserver.h
-src/server/reloadroomwindow/reloadroomwindow.cpp
-src/server/reloadroomwindow/reloadroomwindow.h
-src/server/sessionnamewindow/sessionnamewindow.cpp
-src/server/sessionnamewindow/sessionnamewindow.h
-src/server/util/global.cpp
-src/server/util/global.h
-src/server/util/util.cpp
-src/server/util/util.h
-src/server/main.cpp
-src/shared/network.cpp
-src/shared/network.h
-src/shared/networkmessage.cpp
-src/shared/networkmessage.h
-src/shared/settings.h
-src/shared/util.cpp
-src/shared/util.h
-src/server/numerickeyboard/numerickeyboard.h
-src/server/numerickeyboard/numerickeyboard.cpp
-gui/numerickeyboard.ui
diff --git a/pvs2.includes b/pvs2.includes
deleted file mode 100644
index 0d3fb41..0000000
--- a/pvs2.includes
+++ /dev/null
@@ -1,18 +0,0 @@
-build
-src/client/connectwindow
-src/client/net
-src/client/toolbar
-src/client/util
-src/client/util/platform
-src/client/vnc
-src/server/clicklabel
-src/server/connectionframe
-src/server/helpwindow
-src/server/mainwindow
-src/server/net
-src/server/reloadroomwindow
-src/server/sessionnamewindow
-src/server/util
-src/shared
-gui
-src/server/numerickeyboard
diff --git a/icons/altexit.svg b/res/icons/altexit.svg
index 5331ab6..5331ab6 100644
--- a/icons/altexit.svg
+++ b/res/icons/altexit.svg
diff --git a/icons/altterm.svg b/res/icons/altterm.svg
index 2197700..2197700 100644
--- a/icons/altterm.svg
+++ b/res/icons/altterm.svg
diff --git a/icons/broadcast.svg b/res/icons/broadcast.svg
index 9d8b2f5..9d8b2f5 100644
--- a/icons/broadcast.svg
+++ b/res/icons/broadcast.svg
diff --git a/icons/cam32.svg b/res/icons/cam32.svg
index c3f085c..c3f085c 100644
--- a/icons/cam32.svg
+++ b/res/icons/cam32.svg
diff --git a/icons/cf_icon_cam.svg b/res/icons/cf_icon_cam.svg
index c51ab6d..c51ab6d 100644
--- a/icons/cf_icon_cam.svg
+++ b/res/icons/cf_icon_cam.svg
diff --git a/icons/cf_icon_eye.svg b/res/icons/cf_icon_eye.svg
index cfda228..cfda228 100644
--- a/icons/cf_icon_eye.svg
+++ b/res/icons/cf_icon_eye.svg
diff --git a/icons/cf_icon_lock.svg b/res/icons/cf_icon_lock.svg
index 5700e7d..5700e7d 100644
--- a/icons/cf_icon_lock.svg
+++ b/res/icons/cf_icon_lock.svg
diff --git a/icons/chat_msg16.svg b/res/icons/chat_msg16.svg
index 1e4be83..1e4be83 100644
--- a/icons/chat_msg16.svg
+++ b/res/icons/chat_msg16.svg
diff --git a/icons/dark-green-check-mark.svg b/res/icons/dark-green-check-mark.svg
index ac4238d..ac4238d 100644
--- a/icons/dark-green-check-mark.svg
+++ b/res/icons/dark-green-check-mark.svg
diff --git a/icons/darrow16.svg b/res/icons/darrow16.svg
index 4b1609a..4b1609a 100644
--- a/icons/darrow16.svg
+++ b/res/icons/darrow16.svg
diff --git a/icons/dozent.svg b/res/icons/dozent.svg
index 056a339..056a339 100644
--- a/icons/dozent.svg
+++ b/res/icons/dozent.svg
diff --git a/icons/exit.svg b/res/icons/exit.svg
index d8766c9..d8766c9 100644
--- a/icons/exit.svg
+++ b/res/icons/exit.svg
diff --git a/icons/eye.svg b/res/icons/eye.svg
index 86518ca..86518ca 100644
--- a/icons/eye.svg
+++ b/res/icons/eye.svg
diff --git a/icons/graduate.svg b/res/icons/graduate.svg
index 63f9f88..63f9f88 100644
--- a/icons/graduate.svg
+++ b/res/icons/graduate.svg
diff --git a/icons/hand-raise-red.svg b/res/icons/hand-raise-red.svg
index 1391d3e..1391d3e 100644
--- a/icons/hand-raise-red.svg
+++ b/res/icons/hand-raise-red.svg
diff --git a/icons/hand-raise.svg b/res/icons/hand-raise.svg
index 8dcbab1..8dcbab1 100644
--- a/icons/hand-raise.svg
+++ b/res/icons/hand-raise.svg
diff --git a/icons/help.svg b/res/icons/help.svg
index 2e97f37..2e97f37 100644
--- a/icons/help.svg
+++ b/res/icons/help.svg
diff --git a/icons/keyboard_key.svg b/res/icons/keyboard_key.svg
index c6cc88e..c6cc88e 100644
--- a/icons/keyboard_key.svg
+++ b/res/icons/keyboard_key.svg
diff --git a/icons/lock-single.svg b/res/icons/lock-single.svg
index 5e0cd95..5e0cd95 100644
--- a/icons/lock-single.svg
+++ b/res/icons/lock-single.svg
diff --git a/icons/lock.svg b/res/icons/lock.svg
index 6359f2c..6359f2c 100644
--- a/icons/lock.svg
+++ b/res/icons/lock.svg
diff --git a/icons/log-out.svg b/res/icons/log-out.svg
index e94c873..e94c873 100644
--- a/icons/log-out.svg
+++ b/res/icons/log-out.svg
diff --git a/icons/ok16.svg b/res/icons/ok16.svg
index 3d60d49..3d60d49 100644
--- a/icons/ok16.svg
+++ b/res/icons/ok16.svg
diff --git a/icons/photo.svg b/res/icons/photo.svg
index 6552735..6552735 100644
--- a/icons/photo.svg
+++ b/res/icons/photo.svg
diff --git a/icons/refresh.svg b/res/icons/refresh.svg
index e499882..e499882 100644
--- a/icons/refresh.svg
+++ b/res/icons/refresh.svg
Binary files differ
diff --git a/icons/reloadClassroom.svg b/res/icons/reloadClassroom.svg
index e3dfe62..e3dfe62 100644
--- a/icons/reloadClassroom.svg
+++ b/res/icons/reloadClassroom.svg
diff --git a/icons/screen.svg b/res/icons/screen.svg
index 17abe8b..17abe8b 100644
--- a/icons/screen.svg
+++ b/res/icons/screen.svg
diff --git a/icons/space.svg b/res/icons/space.svg
index 797cbc8..797cbc8 100644
--- a/icons/space.svg
+++ b/res/icons/space.svg
diff --git a/icons/stopprojection.svg b/res/icons/stopprojection.svg
index 90e6425..90e6425 100644
--- a/icons/stopprojection.svg
+++ b/res/icons/stopprojection.svg
diff --git a/icons/student2all.svg b/res/icons/student2all.svg
index 5971d45..5971d45 100644
--- a/icons/student2all.svg
+++ b/res/icons/student2all.svg
diff --git a/icons/student2tutor.svg b/res/icons/student2tutor.svg
index c40c478..c40c478 100644
--- a/icons/student2tutor.svg
+++ b/res/icons/student2tutor.svg
diff --git a/icons/student2tutor_extension.svg b/res/icons/student2tutor_extension.svg
index 5a8cf5e..5a8cf5e 100644
--- a/icons/student2tutor_extension.svg
+++ b/res/icons/student2tutor_extension.svg
diff --git a/icons/terminal.svg b/res/icons/terminal.svg
index d9b5a2d..d9b5a2d 100644
--- a/icons/terminal.svg
+++ b/res/icons/terminal.svg
diff --git a/icons/trash.svg b/res/icons/trash.svg
index e217a09..e217a09 100644
--- a/icons/trash.svg
+++ b/res/icons/trash.svg
diff --git a/icons/tutor2all.svg b/res/icons/tutor2all.svg
index cf46921..cf46921 100644
--- a/icons/tutor2all.svg
+++ b/res/icons/tutor2all.svg
diff --git a/icons/tutor2student.svg b/res/icons/tutor2student.svg
index 2f88720..2f88720 100644
--- a/icons/tutor2student.svg
+++ b/res/icons/tutor2student.svg
diff --git a/icons/view-restore.svg b/res/icons/view-restore.svg
index 000c826..000c826 100644
--- a/icons/view-restore.svg
+++ b/res/icons/view-restore.svg
diff --git a/pvsclient.qrc b/res/pvsclient.qrc
index b5fcd79..3e04631 100644
--- a/pvsclient.qrc
+++ b/res/pvsclient.qrc
@@ -11,11 +11,5 @@
<file alias="help">icons/help.svg</file>
<file alias="hand-raise">icons/hand-raise.svg</file>
<file alias="hand-raise-red">icons/hand-raise-red.svg</file>
- <file alias="AUTHORS">AUTHORS</file>
- <file alias="l_de">build/pvsclient_de_DE.qm</file>
- <file alias="l_fr">build/pvsclient_fr_FR.qm</file>
- <file alias="l_es_MX">build/pvsclient_es_MX.qm</file>
- <file alias="l_ar_JO">build/pvsclient_ar_JO.qm</file>
- <file alias="l_pl">build/pvsclient_pl_PL.qm</file>
</qresource>
</RCC>
diff --git a/res/pvsclient_ts.qrc b/res/pvsclient_ts.qrc
new file mode 100644
index 0000000..e08876d
--- /dev/null
+++ b/res/pvsclient_ts.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file alias="l_de">pvsclient_de_DE.qm</file>
+ </qresource>
+</RCC>
diff --git a/pvsmgr.qrc b/res/pvsmgr.qrc
index b6bd891..1070fe7 100644
--- a/pvsmgr.qrc
+++ b/res/pvsmgr.qrc
@@ -18,14 +18,8 @@
<file alias="helpme">icons/help.svg</file>
<file alias="trash">icons/trash.svg</file>
<file alias="reloadClassroom">icons/reloadClassroom.svg</file>
- <file alias="AUTHORS">AUTHORS</file>
<file alias="cf_cam">icons/cf_icon_cam.svg</file>
<file alias="cf_eye">icons/cf_icon_eye.svg</file>
<file alias="cf_lock">icons/cf_icon_lock.svg</file>
- <file alias="l_de">build/pvsmgr_de_DE.qm</file>
- <file alias="l_fr">build/pvsmgr_fr_FR.qm</file>
- <file alias="l_es_MX">build/pvsmgr_es_MX.qm</file>
- <file alias="l_ar_JO">build/pvsmgr_ar_JO.qm</file>
- <file alias="l_pl">build/pvsmgr_pl_PL.qm</file>
</qresource>
</RCC>
diff --git a/res/pvsmgr_ts.qrc b/res/pvsmgr_ts.qrc
new file mode 100644
index 0000000..6608fc6
--- /dev/null
+++ b/res/pvsmgr_ts.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource>
+ <file alias="l_de">pvsmgr_de_DE.qm</file>
+ </qresource>
+</RCC>
diff --git a/src/client/addons/addons.cpp b/src/client/addons/addons.cpp
index 43813ee..d39e53c 100644
--- a/src/client/addons/addons.cpp
+++ b/src/client/addons/addons.cpp
@@ -30,13 +30,12 @@ QList<Addon*> AddonManager::_addons;
class Addon
{
public:
- Addon() : button(nullptr), menu(nullptr), wantConnectInfo(false) {}
- QPushButton *button;
- QAction *menu;
+ QPushButton *button{};
+ QAction *menu{};
QProcess process;
- bool wantConnectInfo;
- bool wantInit;
- bool runAsync;
+ bool wantConnectInfo{};
+ bool wantInit{};
+ bool runAsync{};
QList<QPair<QString, QString>> envir;
};
@@ -57,7 +56,7 @@ void AddonManager::loadFromPath(const QString &path, QList<QPushButton*> &button
QFileInfoList fileInfoList = configDir.entryInfoList(QDir::Files, QDir::Name);
QRegularExpression paramRegex("^([A-Z]+)=(.*)$", QRegularExpression::MultilineOption);
- for (QFileInfo fileInfo : fileInfoList) {
+ for (const auto& fileInfo : fileInfoList) {
QString filePath = fileInfo.absoluteFilePath();
QSettings setting(filePath, QSettings::IniFormat);
setting.setIniCodec("UTF-8");
@@ -77,7 +76,7 @@ void AddonManager::loadFromPath(const QString &path, QList<QPushButton*> &button
}
// Alloc addon
- Addon *addon = new Addon();
+ auto *addon = new Addon();
// Toggle/click callback
auto toggleFun = [=](bool value) {
addon->envir.append(qMakePair(s_EVENT, s_clicked));
@@ -92,7 +91,7 @@ void AddonManager::loadFromPath(const QString &path, QList<QPushButton*> &button
addon->menu->setCheckable(checkable);
addon->menu->setToolTip(tooltip);
menuEntries.append(addon->menu);
- addon->menu->connect(addon->menu, &QAction::triggered, toggleFun);
+ QObject::connect(addon->menu, &QAction::triggered, toggleFun);
} else if (type == "button") {
addon->button = new QPushButton(caption);
if (!icon.isNull()) {
@@ -103,7 +102,7 @@ void AddonManager::loadFromPath(const QString &path, QList<QPushButton*> &button
addon->button->setCheckable(checkable);
addon->button->setToolTip(tooltip);
buttons.append(addon->button);
- addon->button->connect(addon->button, &QPushButton::clicked, toggleFun);
+ QObject::connect(addon->button, &QPushButton::clicked, toggleFun);
} else {
qDebug() << "Ignoring unknown addon type" << type;
delete addon;
@@ -117,13 +116,13 @@ void AddonManager::loadFromPath(const QString &path, QList<QPushButton*> &button
// Setup process
addon->process.setProgram(exec);
// Stdin for status updates
- addon->process.connect(&addon->process, &QProcess::readyReadStandardOutput, [=]() {
+ QObject::connect(&addon->process, &QProcess::readyReadStandardOutput, [=]() {
auto lines = addon->process.readAllStandardOutput();
auto matches = paramRegex.globalMatch(lines);
handleAddonOutput(addon, matches);
});
// Stderr just for debugging
- addon->process.connect(&addon->process, &QProcess::readyReadStandardError, [=]() {
+ QObject::connect(&addon->process, &QProcess::readyReadStandardError, [=]() {
qDebug() << exec << "stderr:" << QString::fromLocal8Bit(addon->process.readAllStandardError());
});
}
@@ -144,7 +143,7 @@ void AddonManager::initControls()
void AddonManager::connectEvent(bool isLocal, const QString &address)
{
- for (auto addon : _addons) {
+ for (auto *addon : _addons) {
if (!addon->wantConnectInfo)
continue;
addon->envir.append(qMakePair(s_EVENT, s_connected));
@@ -168,7 +167,7 @@ static void executeAddon(Addon *addon)
{
// Set up environment
auto env = QProcessEnvironment::systemEnvironment();
- for (auto e : addon->envir) {
+ for (const auto& e : addon->envir) {
env.insert(e.first, e.second);
}
addon->envir.clear();
@@ -184,26 +183,26 @@ static void executeAddon(Addon *addon)
addon->process.setProcessEnvironment(env);
// Run
if (addon->runAsync) {
- addon->process.startDetached(addon->process.program(), QStringList());
+ QProcess::startDetached(addon->process.program(), QStringList());
} else {
addon->process.start();
addon->process.closeWriteChannel();
}
}
-static void setAddonVisible(Addon *addon, bool newValue)
+static void setAddonVisible(Addon *addon, bool visible)
{
if (addon->button != nullptr) {
QWidget *p = addon->button->parentWidget();
bool wasVisible = p != nullptr && addon->button->isVisibleTo(p);
- addon->button->setVisible(newValue);
- if (p != nullptr && wasVisible != newValue) {
+ addon->button->setVisible(visible);
+ if (p != nullptr && wasVisible != visible) {
// Visibility changed -- adjust size of toolbar
- int size = (addon->button->width() + 2) * (newValue ? 1 : -1);
+ int size = (addon->button->width() + 2) * (visible ? 1 : -1);
p->setFixedWidth(p->width() + size);
}
} else {
- addon->menu->setVisible(newValue);
+ addon->menu->setVisible(visible);
}
}
diff --git a/src/client/addons/addons.h b/src/client/addons/addons.h
index 185c399..6f39087 100644
--- a/src/client/addons/addons.h
+++ b/src/client/addons/addons.h
@@ -1,5 +1,5 @@
-#ifndef _ADDONS_H_
-#define _ADDONS_H_
+#ifndef PVS_ADDONS_H_
+#define PVS_ADDONS_H_
#include <QString>
#include <QList>
diff --git a/src/client/clientapp/clientapp.cpp b/src/client/clientapp/clientapp.cpp
index 2447526..2bc8fac 100644
--- a/src/client/clientapp/clientapp.cpp
+++ b/src/client/clientapp/clientapp.cpp
@@ -1,11 +1,18 @@
#include "clientapp.h"
-#include <QNetworkInterface>
+
#include "../connectwindow/connectwindow.h"
#include "../toolbar/toolbar.h"
#include "../net/serverconnection.h"
+#include <QNetworkInterface>
+#include <QTranslator>
+#include <QLibraryInfo>
+
ClientApp::ClientApp(int& argc, char** argv)
- : QApplication(argc, argv), _connectionMode(ConnectionMode::None), _examMode(false), _connection(nullptr), _isManagerPc(false)
+ : QApplication(argc, argv)
+ , _connectionMode(ConnectionMode::None)
+ , _examMode(false)
+ , _connection(nullptr)
{
/* some values */
setOrganizationName("openslx");
@@ -21,24 +28,22 @@ ClientApp::ClientApp(int& argc, char** argv)
/* set translator */
// System strings
- QTranslator *qtTranslator = new QTranslator(this);
+ auto *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";
+ auto *translator = new QTranslator(this);
+ if (!translator->load(QLocale::system(), ":/", "l_")) {
+ qDebug() << "Could not load app translations" << QLocale::system();
} else {
installTranslator(translator);
}
- readIsManagerPc();
-
_connectWindow = new ConnectWindow(nullptr);
- connect(_connectWindow, SIGNAL(connected(ServerConnection*)), this, SLOT(connected(ServerConnection*)));
+ connect(_connectWindow, &ConnectWindow::connected, this, &ClientApp::connected);
if (_connectionMode == ConnectionMode::Auto) {
_toolbar = new Toolbar(true); // auto connect client without session ID.
} else if (_connectionMode == ConnectionMode::Session) {
@@ -54,7 +59,7 @@ ClientApp::ClientApp(int& argc, char** argv)
QStringList ClientApp::parseParameters()
{
QStringList rest;
- for (QString a : QApplication::arguments()) {
+ for (const QString &a : QApplication::arguments()) {
if (a == "--exam-mode") {
_examMode = true;
} else if (a == "--auto") {
@@ -79,7 +84,7 @@ QStringList ClientApp::arguments()
QSharedPointer<QSettings> ClientApp::getSettings()
{
QSharedPointer<QSettings> set;
- if (_iniPath == "") {
+ if (_iniPath.isEmpty()) {
/* default location (system scope) */
set = QSharedPointer<QSettings>(new QSettings(QSettings::IniFormat, QSettings::SystemScope, "openslx/pvs2", "pvs2"));
} else {
@@ -90,32 +95,10 @@ QSharedPointer<QSettings> ClientApp::getSettings()
return set;
}
-/* returns true when the pc of this client is also eligible to be a manager */
-void ClientApp::readIsManagerPc()
-{
- QList<Room> myRooms;
- auto conf = clientApp->getSettings();
- QStringList roomNames = conf->value("rooms").toStringList();
-
- /* go through all rooms and check if this client is a manager of the room. */
- for (auto roomName : roomNames) {
- conf->beginGroup(roomName);
- const QString mgrIP = conf->value("mgrIP").toString();
-
- foreach (const QHostAddress & address, QNetworkInterface::allAddresses()) {
- if (address.toString() == mgrIP) {
- _isManagerPc = true;
- return;
- }
- }
- conf->endGroup();
- }
-}
-
void ClientApp::connected(ServerConnection* connection)
{
_connection = connection;
- connect(connection, SIGNAL(disconnected(ServerConnection*)), this, SLOT(disconnected(ServerConnection*)));
+ connect(_connection, &ServerConnection::disconnected, this, &ClientApp::disconnected);
}
void ClientApp::disconnected(ServerConnection* connection)
diff --git a/src/client/clientapp/clientapp.h b/src/client/clientapp/clientapp.h
index 91dccf3..0824683 100644
--- a/src/client/clientapp/clientapp.h
+++ b/src/client/clientapp/clientapp.h
@@ -9,7 +9,7 @@
#if defined(clientApp)
#undef clientApp
#endif
-#define clientApp (static_cast<ClientApp*>(QCoreApplication::instance()))
+#define clientApp (static_cast<ClientApp*>(QCoreApplication::instance())) // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
class Toolbar;
class ConnectWindow;
@@ -36,12 +36,9 @@ private:
ServerConnection* _connection;
QStringList _arguments;
QString _iniPath;
- bool _isManagerPc;
QStringList parseParameters();
- void readIsManagerPc();
-
public:
ClientApp(int& argc, char** argv);
@@ -56,9 +53,7 @@ public:
ConnectWindow* connectWindow() const { return _connectWindow; }
- bool isConfiguredAsManager() { return _isManagerPc; }
-
- bool isConnectedToLocalManager() { return _connection != nullptr && _connection->isLocalConnection(); }
+ bool isConnectedToLocalManager() const { return _connection != nullptr && _connection->isLocalConnection(); }
private slots:
diff --git a/src/client/connectwindow/connectwindow.cpp b/src/client/connectwindow/connectwindow.cpp
index 7674cc2..0bc6835 100644
--- a/src/client/connectwindow/connectwindow.cpp
+++ b/src/client/connectwindow/connectwindow.cpp
@@ -7,16 +7,21 @@
#include <QNetworkInterface>
#include "../../shared/settings.h"
-#include "../../shared/network.h"
#include "../../shared/util.h"
#include "../net/serverconnection.h"
#include "../clientapp/clientapp.h"
#include "connectwindow.h"
-#include "ui_connect.h"
+#include "ui_connectwindow.h"
+
+#include <QCloseEvent>
#define UDPBUFSIZ 9000
#define SALT_LEN 18
+namespace Ui {
+ class ConnectWindow;
+}
+
/**
* Initialize Connection Window.
* @param parent
@@ -39,17 +44,16 @@ ConnectWindow::ConnectWindow(QWidget *parent) : QWidget(parent)
_ui->stackedWidget->setCurrentIndex(0);
// Set actions of buttons
- connect(_ui->btn_connection, SIGNAL(clicked()), this, SLOT(onBtnConnection()));
- connect(_ui->btn_hide, SIGNAL(clicked()), this, SLOT(onBtnHide()));
+ connect(_ui->btn_connection, &QPushButton::clicked, this, &ConnectWindow::onBtnConnection);
+ connect(_ui->btn_hide, &QPushButton::clicked, this, &ConnectWindow::onBtnHide);
- connect(_ui->comboBox_rooms, SIGNAL(currentIndexChanged(int)), this, SLOT(onRoomSelection(int)));
+ connect(_ui->comboBox_rooms, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ConnectWindow::onRoomSelection);
// React on discovery signal
- connect(&_serverDiscovery, SIGNAL(serverDetected(QString, quint16, QByteArray, QByteArray, bool)),
- this, SLOT(onServerDetected(QString, quint16, QByteArray, QByteArray, bool)));
+ connect(&_serverDiscovery, &ServerDiscovery::serverDetected, this, &ConnectWindow::onServerDetected);
/* finally the most requested feature: connect on press of the enter key */
- connect(_ui->lineEditName, SIGNAL(returnPressed()), _ui->btn_connection, SIGNAL(clicked()));
+ connect(_ui->lineEditName, &QLineEdit::returnPressed, this, &ConnectWindow::onBtnConnection);
/* by default don't show the manual connection box */
_ui->box_manual->setVisible(false);
@@ -60,7 +64,7 @@ ConnectWindow::ConnectWindow(QWidget *parent) : QWidget(parent)
/**
* @brief ConnectWindow::~ConnectWindow
*/
-ConnectWindow::~ConnectWindow() {}
+ConnectWindow::~ConnectWindow() = default;
@@ -177,7 +181,7 @@ void ConnectWindow::showEvent(QShowEvent* /* event */ )
* if not --> connect to given sessionName.
* @param sessionName
*/
-void ConnectWindow::connectToSession(const QByteArray sessionName, QString mgrIP)
+void ConnectWindow::connectToSession(const QByteArray& sessionName, const QString &mgrIP)
{
if (_state != Idle)
return;
@@ -250,7 +254,7 @@ void ConnectWindow::onBtnConnection()
/** set the available rooms.
* If the list of rooms is empty, switches automatically to the "manual
* connection" page */
-void ConnectWindow::setAvailableRooms(QList<Room> m)
+void ConnectWindow::setAvailableRooms(const QList<Room>& m)
{
_ui->comboBox_rooms->clear();
foreach (Room r, m) {
@@ -294,9 +298,9 @@ void ConnectWindow::onRoomSelection(int index)
void ConnectWindow::onServerDetected(const QString& host, const quint16 port, const QByteArray& sessionName, const QByteArray& certHash, bool autoConnect)
{
_pendingConnection = new ServerConnection(host, port, sessionName, certHash, autoConnect);
- connect(_pendingConnection, SIGNAL(stateChange(ConnectWindow::ConnectionState)), this, SLOT(onConnectionStateChange(ConnectWindow::ConnectionState)));
- connect(_pendingConnection, SIGNAL(destroyed(QObject*)), this, SLOT(onConnectionClosed(QObject*)));
- connect(_pendingConnection, SIGNAL(disconnected(ServerConnection*)), this, SLOT(onConnectionDisconnected(ServerConnection*)));
+ connect(_pendingConnection, &ServerConnection::stateChange, this, &ConnectWindow::onConnectionStateChange);
+ connect(_pendingConnection, &ServerConnection::destroyed, this, &ConnectWindow::onConnectionClosed);
+ connect(_pendingConnection, &ServerConnection::disconnected, this, &ConnectWindow::onConnectionDisconnected);
}
@@ -317,8 +321,8 @@ void ConnectWindow::onConnectionStateChange(ConnectWindow::ConnectionState state
_state = Scanning;
}
if (state == Connected) {
- QObject::disconnect(_pendingConnection, SIGNAL(stateChange(ConnectWindow::ConnectionState)), this, SLOT(onConnectionStateChange(ConnectWindow::ConnectionState)));
- QObject::disconnect(_pendingConnection, SIGNAL(destroyed(QObject*)), this, SLOT(onConnectionClosed(QObject*)));
+ QObject::disconnect(_pendingConnection, &ServerConnection::stateChange, this, &ConnectWindow::onConnectionStateChange);
+ QObject::disconnect(_pendingConnection, &ServerConnection::destroyed, this, &ConnectWindow::onConnectionClosed);
emit connected(_pendingConnection);
_pendingConnection = nullptr;
_timerHide = startTimer(2000);
diff --git a/src/client/connectwindow/connectwindow.h b/src/client/connectwindow/connectwindow.h
index 9fcaf4e..4a0ae7d 100644
--- a/src/client/connectwindow/connectwindow.h
+++ b/src/client/connectwindow/connectwindow.h
@@ -16,7 +16,7 @@
#ifndef PVSCONNECTWINDOW_H_
#define PVSCONNECTWINDOW_H_
-#include <QtWidgets>
+#include <QWidget>
#include <QMap>
#include <QUdpSocket>
#include <QSslSocket>
@@ -28,6 +28,7 @@ namespace Ui
{
class ConnectWindow;
}
+
class ServerConnection;
/**
@@ -55,10 +56,10 @@ public:
};
explicit ConnectWindow(QWidget *parent = nullptr);
- virtual ~ConnectWindow();
+ ~ConnectWindow() override;
- void connectToSession(const QByteArray sessionName, QString mgrIP);
- void setAvailableRooms(QList<Room> m);
+ void connectToSession(const QByteArray& sessionName, const QString &mgrIP);
+ void setAvailableRooms(const QList<Room>& m);
private:
Ui::ConnectWindow *_ui;
@@ -70,18 +71,17 @@ private:
QString _currentIp;
QString _defaultSessionName;
NetworkMessage _packet;
- bool _tryReconnect;
+ bool _tryReconnect{};
int _timerHide;
void updateUserInterface();
protected:
- void timerEvent(QTimerEvent* event);
- void closeEvent(QCloseEvent *e);
- void showEvent(QShowEvent* event);
+ void timerEvent(QTimerEvent* event) override;
+ void closeEvent(QCloseEvent *e) override;
+ void showEvent(QShowEvent* event) override;
protected slots:
- void doShow();
void onBtnConnection();
void onBtnHide();
@@ -91,13 +91,15 @@ protected slots:
void onConnectionClosed(QObject* connection);
void onConnectionDisconnected(ServerConnection* connection);
// void onUdpReadyRead();
- void onServerDetected(const QString& host, const quint16 port, const QByteArray& sessionName, const QByteArray& certHash, bool autoConnect);
+ void onServerDetected(const QString& host, quint16 port, const QByteArray& sessionName, const QByteArray& certHash, bool autoConnect);
public slots:
/** actually connects the connection **/
void DoConnect();
/** actually disconnects the connection **/
void DoDisconnect();
+
+ void doShow();
signals:
void disconnect();
void connected(ServerConnection* connection);
diff --git a/gui/client/connect.ui b/src/client/connectwindow/connectwindow.ui
index 0bfc654..0bfc654 100644
--- a/gui/client/connect.ui
+++ b/src/client/connectwindow/connectwindow.ui
diff --git a/src/client/informationdialog/informationdialog.cpp b/src/client/informationdialog/informationdialog.cpp
index fb3e87c..ff96641 100644
--- a/src/client/informationdialog/informationdialog.cpp
+++ b/src/client/informationdialog/informationdialog.cpp
@@ -1,19 +1,23 @@
#include "informationdialog.h"
+
#include <QNetworkInterface>
#include <QHostInfo>
#include <QDir>
#include <QDirIterator>
+#include <QLayout>
+#include <QFormLayout>
+#include <QLabel>
InformationDialog::InformationDialog() : QDialog()
{
/* widgets */
- _lblTitle = new QLabel(tr("<h1>system information</h1>"));
- _tableWidget = new QWidget();
+ _lblTitle = new QLabel(tr("<h1>system information</h1>"), this);
+ _tableWidget = new QWidget(this);
/* layouts */
- _layout = new QVBoxLayout();
- _tableLayout = new QFormLayout();
+ _layout = new QVBoxLayout(this);
+ _tableLayout = new QFormLayout(this);
/* */
_tableWidget->setLayout(_tableLayout);
@@ -30,11 +34,12 @@ void InformationDialog::initTable()
{
/* NETWORK*/
/* hostnames */
- _tableLayout->addRow(new QLabel("<b>" + tr("hostname") + "</b>"), new QLabel(QHostInfo::localHostName()));
+ _tableLayout->addRow(new QLabel("<b>" + tr("hostname") + "</b>", this),
+ new QLabel(QHostInfo::localHostName(), this));
/* ips */
QStringList interfaceFilter;
QString bridgeDevicePath("/sys/devices/virtual/net/");
- QDirIterator it(bridgeDevicePath, QStringList() << "brif", QDir::Dirs, QDirIterator::Subdirectories);
+ QDirIterator it(bridgeDevicePath, QStringList("brif"), QDir::Dirs, QDirIterator::Subdirectories);
while (it.hasNext()) {
it.next();
QDir dir = it.filePath();
@@ -42,16 +47,16 @@ void InformationDialog::initTable()
interfaceFilter += dir.entryList();
}
- for (QNetworkInterface interface : QNetworkInterface::allInterfaces()) {
+ for (const auto& interface : QNetworkInterface::allInterfaces()) {
if (interfaceFilter.contains(interface.name()) || interface.flags().testFlag(QNetworkInterface::IsLoopBack)) {
qDebug() << "interface filtered: " << interface.name();
continue;
}
- _tableLayout->addRow("<u><b>" + interface.name() + "</b></u>", new QLabel(""));
+ _tableLayout->addRow("<u><b>" + interface.name() + "</b></u>", new QLabel(this));
- for (QNetworkAddressEntry entry : interface.addressEntries()) {
+ for (const auto &entry : interface.addressEntries()) {
QLabel* label;
QLabel* value;
QHostAddress hostAddr = entry.ip();
@@ -61,18 +66,17 @@ void InformationDialog::initTable()
continue;
if (hostAddr.protocol() == QAbstractSocket::IPv6Protocol) {
- label = new QLabel("IPv6");
- value = new QLabel(hostAddr.toString().split("%").first());
+ label = new QLabel("IPv6", this);
+ value = new QLabel(hostAddr.toString().split("%").first(), this);
} else {
- label = new QLabel("IPv4");
- value = new QLabel(hostAddr.toString());
+ label = new QLabel("IPv4", this);
+ value = new QLabel(hostAddr.toString(), this);
}
_tableLayout->addRow(label, value);
}
- _tableLayout->addRow("MAC", new QLabel(interface.hardwareAddress()));
+ _tableLayout->addRow("MAC", new QLabel(interface.hardwareAddress(), this));
}
/* TODO: Add other information */
-}
-
+} \ No newline at end of file
diff --git a/src/client/informationdialog/informationdialog.h b/src/client/informationdialog/informationdialog.h
index 42aaa7b..f210dd8 100644
--- a/src/client/informationdialog/informationdialog.h
+++ b/src/client/informationdialog/informationdialog.h
@@ -1,12 +1,11 @@
#ifndef INFORMATION_DIALOG_H
#define INFORMATION_DIALOG_H
+
#include <QDialog>
-#include <QLayout>
-#include <QFormLayout>
-#include <QLabel>
-#include <QDebug>
-#include <QStringList>
+class QLayout;
+class QFormLayout;
+class QLabel;
class InformationDialog : public QDialog
{
@@ -21,7 +20,7 @@ private:
void initTable();
public:
- InformationDialog();
+ explicit InformationDialog();
};
diff --git a/src/client/main.cpp b/src/client/main.cpp
index eefd0d8..6a7c2a0 100644
--- a/src/client/main.cpp
+++ b/src/client/main.cpp
@@ -2,6 +2,10 @@
#include "clientapp/clientapp.h"
#include "util/util.h"
+// Remove when we don't support Ubuntu 20.04 anymore
+#if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
+#define endl Qt::endl
+#endif
/* instantiates the ClientApp, handles some extra parameters and starts the
* main-loop of ClientApp */
@@ -9,10 +13,9 @@ int main(int argc, char** argv)
{
ClientApp app(argc, argv);
- qsrand(uint(QDateTime::currentMSecsSinceEpoch()));
/* here we handle the arguments that were not handled by ClientApp */
- for (QString a : app.arguments()) {
+ for (const auto &a : app.arguments()) {
if (a == "--usage" || a == "--help") {
qStdout() << "Usage: pvsclient [--exam-mode] [--auto|--session=xxx|\"\"]" << endl;
exit(0);
@@ -23,5 +26,5 @@ int main(int argc, char** argv)
exit(1);
}
}
- return app.exec();
+ return ClientApp::exec();
}
diff --git a/src/client/net/serverconnection.cpp b/src/client/net/serverconnection.cpp
index ca19c76..690ba23 100644
--- a/src/client/net/serverconnection.cpp
+++ b/src/client/net/serverconnection.cpp
@@ -1,21 +1,20 @@
#include "serverconnection.h"
-#include <QtCore>
-#include <QPixmap>
-#include <QGuiApplication>
-#include <QHostInfo>
-#include <unistd.h>
-#include <cstdlib>
-#include <sys/types.h>
-#include <pwd.h>
-//#define verbose
#include "../vnc/vncserver.h"
-
#include "../../shared/util.h"
#include "../../shared/settings.h"
#include "../util/platform/blankscreen.h"
#include "../clientapp/clientapp.h"
+#include <QPixmap>
+#include <QGuiApplication>
+#include <QHostInfo>
+#include <QScreen>
+// For getting logged-in username
+#include <sys/types.h>
+#include <pwd.h>
+#include <unistd.h>
+
#define CHALLENGE_LEN 20
ServerConnection::ServerConnection(const QString& host, const quint16 port, const QByteArray& sessionName, const QByteArray& certHash, bool autoConnect) :
@@ -23,16 +22,14 @@ ServerConnection::ServerConnection(const QString& host, const quint16 port, cons
{
_socket = new QSslSocket();
_blank = new BlankScreen();
- connect(_socket, SIGNAL(encrypted()), this, SLOT(sock_connected()));
- connect(_socket, SIGNAL(readyRead()), this, SLOT(sock_dataArrival()));
- connect(_socket, SIGNAL(disconnected()), this, SLOT(sock_closed()));
- connect(_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(sock_error(QAbstractSocket::SocketError)));
- connect(_socket,
- SIGNAL(sslErrors(const QList<QSslError> &)),
- this,
- SLOT(sslErrors(const QList<QSslError> &))
+ connect(_socket, &QSslSocket::encrypted, this, &ServerConnection::sock_connected);
+ connect(_socket, &QSslSocket::readyRead, this, &ServerConnection::sock_dataArrival);
+ connect(_socket, &QSslSocket::disconnected, this, &ServerConnection::sock_closed);
+ connect(_socket, QOverload<QAbstractSocket::SocketError>::of(&QSslSocket::errorOccurred),
+ this, &ServerConnection::sock_error);
+ connect(_socket, QOverload<const QList<QSslError> &>::of(&QSslSocket::sslErrors),
+ this, &ServerConnection::sslErrors
);
- connect(_socket, &QSslSocket::peerVerifyError, [=](const QSslError &error) { qDebug() << "PVE:" << error.errorString(); });
qDebug("Connecting to %s on port %d", host.toUtf8().data(), int(port));
_socket->ignoreSslErrors();
_socket->connectToHostEncrypted(host, port);
@@ -40,7 +37,7 @@ ServerConnection::ServerConnection(const QString& host, const quint16 port, cons
_lastData = QDateTime::currentMSecsSinceEpoch() + PING_TIMEOUT_MS;
_timerConnectionCheck = startTimer(5000);
// Connect the vnc start/stop signal to this class, so we can tell the server about successful vnc server startup
- connect(VncServer::instance(), SIGNAL(started(int, QString&, QString&)), this, SLOT(onVncServerStartStop(int, QString&, QString&)));
+ connect(VncServer::instance(), &VncServer::started, this, &ServerConnection::onVncServerStartStop);
}
ServerConnection::~ServerConnection()
@@ -106,13 +103,18 @@ void ServerConnection::handleMsg()
_lastData = QDateTime::currentMSecsSinceEpoch() + PING_TIMEOUT_MS;
const QString &id = _fromServer.getFieldString(_ID);
+ if (id == _ERROR) {
+ qWarning() << "Server sent error message:" << _fromServer.getFieldString(_ERROR);
+ return;
+ }
+
if (_authed == 0) {
if (id == _CHALLENGE) {
// Initial challenge request by server
emit stateChange(ConnectWindow::AwaitingChallengeResponse);
_myChallenge.resize(CHALLENGE_LEN);
for (int i = 0; i < CHALLENGE_LEN; ++i) {
- _myChallenge[i] = char(qrand() & 0xff);
+ _myChallenge[i] = char(slxrand() & 0xff);
}
QByteArray serverChallenge(_fromServer.getFieldBytes(_CHALLENGE));
_toServer.reset();
@@ -320,7 +322,7 @@ void ServerConnection::timerEvent(QTimerEvent *event)
* server was succesfully started, or was terminated (either planned or
* crashed).
*/
-void ServerConnection::onVncServerStartStop(int port, QString& ropass, QString& rwpass)
+void ServerConnection::onVncServerStartStop(int port, const QString &ropass, const QString &rwpass)
{
_toServer.reset();
_toServer.setField(_ID, _VNCSERVER);
@@ -357,9 +359,8 @@ void ServerConnection::onVncViewerStartStop(const bool started, const int client
void ServerConnection::sslErrors(const QList<QSslError> & errors)
{
_socket->ignoreSslErrors();
- for (QList<QSslError>::const_iterator it = errors.begin(); it != errors.end(); it++) {
- const QSslError &err = *it;
- qDebug("Connect SSL: %s", qPrintable(err.errorString()));
+ for (const auto &err : errors) {
+ qDebug("Connect SSL: %s", qPrintable(err.errorString()));
if (err.error() == QSslError::HostNameMismatch)
continue; // We don't pay attention to hostnames for validation
if (err.error() == QSslError::SelfSignedCertificate)
diff --git a/src/client/net/serverconnection.h b/src/client/net/serverconnection.h
index f5f6264..f434f0b 100644
--- a/src/client/net/serverconnection.h
+++ b/src/client/net/serverconnection.h
@@ -33,18 +33,15 @@ private:
void checkLocalConnection();
public:
- ServerConnection(const QString& host, const quint16 port, const QByteArray& sessionName, const QByteArray& certHash, bool autoConnect);
+ ServerConnection(const QString& host, quint16 port, const QByteArray& sessionName, const QByteArray& certHash, bool autoConnect);
void disconnectFromServer();
- ~ServerConnection();
+ ~ServerConnection() override;
inline bool isConnected() const
{
return _socket != nullptr && _socket->state() == QAbstractSocket::ConnectedState;
}
- const inline QString getPeerAdress() const
- {
- return _socket->peerAddress().toString();
- }
+ QString getPeerAdress() const { return _socket->peerAddress().toString(); }
bool isLocalConnection() {
if (_isLocalConnection == -1) {
@@ -57,7 +54,7 @@ public:
void sendAttention(bool on);
protected:
- void timerEvent(QTimerEvent *event);
+ void timerEvent(QTimerEvent *event) override;
private slots:
void sslErrors(const QList<QSslError> & errors); // triggered for errors that occur during SSL negotiation
@@ -66,9 +63,10 @@ private slots:
void sock_error(QAbstractSocket::SocketError errcode); // triggered if an error occurs on the socket
void sock_connected(); // triggered if the connection is established and ready to use
- void onVncServerStartStop(int port, QString& ropass, QString& rwpass); // triggered if the local vnc server was started
+ void onVncServerStartStop(int port, const QString &ropass, const QString &rwpass); // triggered if the local vnc server was started
- void onVncViewerStartStop(const bool started, const int clientId);
+public slots:
+ void onVncViewerStartStop(bool started, int clientId);
signals:
void openVnc(const QString& host, int port, const QString& passwd, bool ro, bool fullscreen, const QString& caption, const int clientId, const QByteArray& rawThumb);
diff --git a/src/client/net/serverdiscovery.cpp b/src/client/net/serverdiscovery.cpp
index b2d7605..5076a8b 100644
--- a/src/client/net/serverdiscovery.cpp
+++ b/src/client/net/serverdiscovery.cpp
@@ -4,8 +4,7 @@
#include "../../shared/network.h"
#include "../../shared/util.h"
#include "serverdiscovery.h"
-#include <assert.h>
-
+#include "../util/util.h"
/**
* Ctor
@@ -21,33 +20,31 @@ ServerDiscovery::ServerDiscovery(QObject *parent)
/* Try to get a UDP port for server discovery */
int tries = 10;
while (tries-- != 0) {
- quint16 port = quint16(16384 + qrand() % 32768);
+ quint16 port = quint16(16384 + slxrand() % 32768);
if (_discoverySocket.bind(QHostAddress::AnyIPv4, port))
break;
if (tries == 0)
qFatal("Could not bind to any UDP port for server discovery.");
}
// Handle incoming messages
- connect(&_discoverySocket, SIGNAL(readyRead()), this, SLOT(onUdpReadyRead()));
+ connect(&_discoverySocket, &QUdpSocket::readyRead, this, &ServerDiscovery::onUdpReadyRead);
/* Setup the discovery timer */
_discoveryTimer.setInterval(_minDiscoveryInterval);
_discoveryTimer.setSingleShot(true);
//
- connect(&_discoveryTimer, SIGNAL(timeout()), this, SLOT(doDiscovery()));
+ connect(&_discoveryTimer, &QTimer::timeout, this, &ServerDiscovery::doDiscovery);
}
/**
* Dtor
*/
-ServerDiscovery::~ServerDiscovery()
-{
-}
+ServerDiscovery::~ServerDiscovery() = default;
/**
* @brief start
*/
-void ServerDiscovery::start(const QByteArray& sessionName, QString mgrIP)
+void ServerDiscovery::start(const QByteArray& sessionName, const QString& mgrIP)
{
if (!mgrIP.isEmpty()) {
_mgrIP.setAddress(mgrIP);
@@ -98,8 +95,8 @@ void ServerDiscovery::doDiscovery()
if (_salt2.size() < SALT_LEN)
_salt2.resize(SALT_LEN);
for (int i = 0; i < SALT_LEN; ++i) {
- salt1[i] = char(qrand() & 0xff);
- _salt2[i] = char(qrand() & 0xff);
+ salt1[i] = char(slxrand() & 0xff);
+ _salt2[i] = char(slxrand() & 0xff);
}
_packet.reset();
_packet.setField(_HASH, genSha1(&_nameBytes, &salt1, &iplist));
@@ -109,7 +106,7 @@ void ServerDiscovery::doDiscovery()
// Check if specifig manager IP is given. If not broadcast in whole network.
if (_mgrIP != QHostAddress::Null) {
- qDebug() << "Broadcasting to " << _mgrIP.toString();
+ qDebug() << "Sending discovery to " << _mgrIP.toString();
if (!_packet.writeMessage(&_discoverySocket, _mgrIP, SERVICE_DISCOVERY_PORT))
qDebug("Failed");
} else {
@@ -141,7 +138,7 @@ void ServerDiscovery::onUdpReadyRead()
{
char data[UDPBUFSIZ];
QHostAddress addr;
- quint16 port;
+ quint16 peerPort;
while (_discoverySocket.hasPendingDatagrams()) {
// Discard any packets if discovery is stopped
if (!this->isActive()) {
@@ -149,13 +146,15 @@ void ServerDiscovery::onUdpReadyRead()
continue;
}
- const qint64 size = _discoverySocket.readDatagram(data, UDPBUFSIZ, &addr, &port);
+ const qint64 size = _discoverySocket.readDatagram(data, UDPBUFSIZ, &addr, &peerPort);
if (size <= 0) //|| clientApp->connection() != nullptr) // TODO CHECK
continue;
_packet.reset();
- if (_packet.readMessage(data, quint32(size)) != NM_READ_OK)
+ if (_packet.readMessage(data, quint32(size)) != NM_READ_OK) {
+ qDebug() << "Corrupt discovery reply from" << addr.toString();
continue;
+ }
// Valid packet, process it:
const QByteArray hash(_packet.getFieldBytes(_HASH));
@@ -165,6 +164,7 @@ void ServerDiscovery::onUdpReadyRead()
// Check if the source IP of the packet matches any of the addresses given in the IP list
if (!Network::isAddressInList(QString::fromUtf8(iplist), addr.toString())) {
+ qDebug() << "Received bogus discovery reply from" << addr.toString() << "... Not in" << iplist;
++_ipErrorCount;
emit error(ErrorType::InvalidIpList, _hashErrorCount);
continue;
@@ -173,6 +173,7 @@ void ServerDiscovery::onUdpReadyRead()
// If so, check if the submitted hash seems valid
if (genSha1(&_nameBytes, &_salt2, &iplist, &port, &cert) != hash && _mgrIP != addr) {
// did not match local session name, or other data was spoofed
+ qDebug() << "Received bogus session name in discovery reply from" << addr.toString();
++_hashErrorCount;
emit error(ErrorType::InvalidHash, _ipErrorCount);
continue;
@@ -187,6 +188,8 @@ void ServerDiscovery::onUdpReadyRead()
const ushort iport = QString::fromUtf8(port).toUShort(&ok);
if (ok) {
emit serverDetected(addr.toString(), quint16(iport), _nameBytes, cert, (_mgrIP == addr));
+ } else {
+ qDebug() << "... but server advertises unparsable port" << port;
}
// Stop the discovery
diff --git a/src/client/net/serverdiscovery.h b/src/client/net/serverdiscovery.h
index d7d6010..21f9bf9 100644
--- a/src/client/net/serverdiscovery.h
+++ b/src/client/net/serverdiscovery.h
@@ -17,10 +17,10 @@ public:
InvalidHash
};
- explicit ServerDiscovery(QObject *parent = 0);
- ~ServerDiscovery();
+ explicit ServerDiscovery(QObject *parent = nullptr);
+ ~ServerDiscovery() override;
- void start(const QByteArray& sessionName, QString mgrIP);
+ void start(const QByteArray& sessionName, const QString& mgrIP);
void stop();
inline bool isActive() { return _discoveryTimer.isActive(); }
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp
index 880e24f..bd5d689 100644
--- a/src/client/toolbar/toolbar.cpp
+++ b/src/client/toolbar/toolbar.cpp
@@ -2,7 +2,6 @@
#include "../net/serverconnection.h"
#include "../vnc/vncwindow.h"
#include "../vnc/vncserver.h"
-#include "../util/util.h"
#include "../informationdialog/informationdialog.h"
#include "../clientapp/clientapp.h"
#include "../addons/addons.h"
@@ -10,9 +9,11 @@
#include "toolbar.h"
#include "ui_toolbar.h"
-#include <QtAlgorithms>
#include <QNetworkInterface>
-#include <QProcess>
+#include <QScreen>
+#include <QMenu>
+#include <QMouseEvent>
+#include <QMessageBox>
/**
* @brief
@@ -24,8 +25,13 @@
* another widget, this widget becomes a child window inside parent. The new
* widget is deleted when its parent is deleted.
*/
-Toolbar::Toolbar(const QByteArray sessionName, QWidget *parent)
- : QWidget(parent), _showTimer(this), _hideTimer(this), _hideCountdown(10), _blinkTimer(this), _beWatchedEye(":eye")
+Toolbar::Toolbar(const QByteArray& sessionName, QWidget *parent)
+ : QWidget(parent)
+ , _showTimer(this)
+ , _hideTimer(this)
+ , _hideCountdown(10)
+ , _blinkTimer(this)
+ , _beWatchedEye(":eye")
{
qDebug() << "sessionName - constructor";
init();
@@ -44,7 +50,12 @@ Toolbar::Toolbar(const QByteArray sessionName, QWidget *parent)
* widget is deleted when its parent is deleted.
*/
Toolbar::Toolbar(const bool autoConnect, QWidget *parent)
- : QWidget(parent), _showTimer(this), _hideTimer(this), _hideCountdown(10), _blinkTimer(this), _beWatchedEye(":eye")
+ : QWidget(parent)
+ , _showTimer(this)
+ , _hideTimer(this)
+ , _hideCountdown(10)
+ , _blinkTimer(this)
+ , _beWatchedEye(":eye")
{
qDebug() << "auto - constructor!";
init();
@@ -100,9 +111,9 @@ void Toolbar::init()
/* Create the connect window */
clientApp->connectWindow()->setAvailableRooms(myRooms());
// Connect the signals
- connect(clientApp->connectWindow(), SIGNAL(disconnect()), this, SLOT(onDoDisconnect()));
- connect(clientApp->connectWindow(), SIGNAL(connected(ServerConnection*)), this, SLOT(onConnected(ServerConnection*)));
- connect(_ui->btnAttention, SIGNAL(toggled(bool)), this, SLOT(onBtnAttention()));
+ connect(clientApp->connectWindow(), &ConnectWindow::disconnect, this, &Toolbar::onDoDisconnect);
+ connect(clientApp->connectWindow(), &ConnectWindow::connected, this, &Toolbar::onConnected);
+ connect(_ui->btnAttention, &QToolButton::toggled, this, &Toolbar::onBtnAttention);
/* Setup menu */
initButtonsAndMenus();
@@ -112,7 +123,7 @@ void Toolbar::init()
_ui->btnAttention->setMaximumWidth(30);
/* Connect the signals from vnc server */
- connect(VncServer::instance(), SIGNAL(started(int, QString&, QString&)), this, SLOT(onVncServerIsRunning(int)));
+ connect(VncServer::instance(), &VncServer::started, this, &Toolbar::onVncServerIsRunning);
/* React to screen geometry change */
connect(QGuiApplication::primaryScreen(), &QScreen::availableGeometryChanged, this, &Toolbar::setToolbarPosition);
@@ -124,10 +135,10 @@ void Toolbar::init()
/* Setup show & hide timer */
_showTimer.setInterval(500);
_showTimer.setSingleShot(true);
- connect(&_showTimer, SIGNAL(timeout()), this, SLOT(showBar()));
+ connect(&_showTimer, &QTimer::timeout, this, &Toolbar::showBar);
_hideTimer.setInterval(50);
_hideTimer.setSingleShot(false);
- connect(&_hideTimer, SIGNAL(timeout()), this, SLOT(hideBar()));
+ connect(&_hideTimer, &QTimer::timeout, this, &Toolbar::hideBar);
setVisible(true);
raise();
@@ -135,11 +146,11 @@ void Toolbar::init()
/* Setup blink timer */
_blinkTimer.setInterval(500);
- connect(&_blinkTimer, SIGNAL(timeout()), this, SLOT(cameraBlink()));
+ connect(&_blinkTimer, &QTimer::timeout, this, &Toolbar::cameraBlink);
}
static QFrame* makeVerticalLine() {
- QFrame *f = new QFrame();
+ auto *f = new QFrame();
f->setFrameShape(QFrame::HLine);
f->setFrameShadow(QFrame::Sunken);
return f;
@@ -191,12 +202,12 @@ void Toolbar::initButtonsAndMenus()
_acnQuit->setVisible(allow);
// Connect the signals
- connect(_menu, SIGNAL(aboutToHide()), this, SLOT(delayedHideBar()));
- connect(_acnConnect, SIGNAL(triggered()), clientApp->connectWindow(), SLOT(doShow()));
- connect(_acnDisconnect, SIGNAL(triggered()), clientApp->connectWindow(), SLOT(DoDisconnect()));
- connect(_acnInformation, SIGNAL(triggered()), this, SLOT(showInformationDialog()));
- connect(_acnAbout, SIGNAL(triggered()), this, SLOT(showAboutDialog()));
- connect(_acnQuit, SIGNAL(triggered()), this, SLOT(exit()));
+ connect(_menu, &QMenu::aboutToHide, this, &Toolbar::delayedHideBar);
+ connect(_acnConnect, &QAction::triggered, clientApp->connectWindow(), &ConnectWindow::doShow);
+ connect(_acnDisconnect, &QAction::triggered, clientApp->connectWindow(), &ConnectWindow::DoDisconnect);
+ connect(_acnInformation, &QAction::triggered, this, &Toolbar::showInformationDialog);
+ connect(_acnAbout, &QAction::triggered, this, &Toolbar::showAboutDialog);
+ connect(_acnQuit, &QAction::triggered, this, &Toolbar::exit);
// Delay until bar is visible
QTimer::singleShot(10, [=]() {
@@ -363,7 +374,7 @@ void Toolbar::onVncServerIsRunning(int port)
void Toolbar::onDisconnected(ServerConnection* connection)
{
if (connection != nullptr) {
- disconnect(connection, SIGNAL(disconnected(ServerConnection*)), this, SLOT(onDisconnected(ServerConnection*)));
+ disconnect(connection, &ServerConnection::disconnected, this, &Toolbar::onDisconnected);
}
_ui->lblStatus->setStyleSheet("color:red");
_ui->lblStatus->setText(tr("Offline"));
@@ -394,12 +405,12 @@ void Toolbar::onConnected(ServerConnection* connection)
_ui->btnAttention->setVisible(true);
AddonManager::connectEvent(connection->isLocalConnection(), connection->getPeerAdress());
//
- connect(connection, SIGNAL(disconnected(ServerConnection*)), this, SLOT(onDisconnected(ServerConnection*)));
- connect(connection, SIGNAL(openVnc(const QString&, int, const QString&, bool, bool, const QString&, const int, const QByteArray&)),
- _vnc, SLOT(open(const QString&, int, const QString&, bool, bool, const QString&, const int, const QByteArray&)));
- connect(connection, SIGNAL(closeVnc()), _vnc, SLOT(close()));
- connect(connection, SIGNAL(attentionChanged(const bool)), this, SLOT(onServerAttentionChanged(const bool)));
- connect(_vnc, SIGNAL(running(const bool, const int)), connection, SLOT(onVncViewerStartStop(const bool, const int)));
+ connect(connection, &ServerConnection::disconnected, this, &Toolbar::onDisconnected);
+ connect(connection, &ServerConnection::openVnc,
+ _vnc, &VncWindow::open);
+ connect(connection, &ServerConnection::closeVnc, _vnc, &VncWindow::close);
+ connect(connection, &ServerConnection::attentionChanged, this, &Toolbar::onServerAttentionChanged);
+ connect(_vnc, &VncWindow::running, connection, &ServerConnection::onVncViewerStartStop);
}
/**
@@ -489,7 +500,7 @@ void Toolbar::showAboutDialog()
void Toolbar::showInformationDialog()
{
- InformationDialog* d = new InformationDialog();
+ auto* d = new InformationDialog();
d->exec();
d->deleteLater();
}
diff --git a/src/client/toolbar/toolbar.h b/src/client/toolbar/toolbar.h
index 48fbf03..702bae2 100644
--- a/src/client/toolbar/toolbar.h
+++ b/src/client/toolbar/toolbar.h
@@ -14,13 +14,15 @@
#ifndef PVSCLIENTGUI_H_
#define PVSCLIENTGUI_H_
-#include <QtWidgets>
+#include <QWidget>
+#include <QTimer>
#include "../util/room.h"
class ServerConnection;
class VncWindow;
class BlankScreen;
+class QMenu;
namespace Ui
{
@@ -32,47 +34,43 @@ class Toolbar : public QWidget
Q_OBJECT
public:
- Toolbar(QWidget *parent = 0);
- Toolbar(const QByteArray sessionName, QWidget *parent = 0);
- Toolbar(const bool autoConnect, QWidget *parent = 0);
- virtual ~Toolbar();
+ explicit Toolbar(QWidget *parent = nullptr);
+ explicit Toolbar(const QByteArray& sessionName, QWidget *parent = nullptr);
+ explicit Toolbar(bool autoConnect, QWidget *parent = nullptr);
+ ~Toolbar() override;
private:
- Ui::Toolbar *_ui;
- QMenu *_menu;
- QAction *_acnDisconnect;
- QAction *_acnConnect;
- QAction *_acnInformation;
- QAction *_acnAbout;
- QAction *_acnQuit;
+ 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;
- bool _isManagerPc;
+ VncWindow *_vnc{};
const QPixmap _cam32, _beWatchedEye;
QPoint _lastDragPos;
- int _yPos;
- int _yPosHidden;
+ int _yPos{};
+ int _yPosHidden{};
void enterEvent(QEvent* e) override;
void mousePressEvent(QMouseEvent* event) override;
void mouseMoveEvent(QMouseEvent* event) override;
- QList<Room> myRooms();
- bool isManagerPc();
- QString identifyMgrIP();
+ static QList<Room> myRooms();
+ static QString identifyMgrIP();
void init();
void initButtonsAndMenus();
- QProcess lockDesktopP;
-
private slots:
void onVncServerIsRunning(int port);
void onDisconnected(ServerConnection* connection);
void onConnected(ServerConnection* connection);
- void onServerAttentionChanged(const bool on);
+ void onServerAttentionChanged(bool on);
void onDoDisconnect();
void onBtnAttention();
void exit();
diff --git a/gui/client/toolbar.ui b/src/client/toolbar/toolbar.ui
index 9908dda..9908dda 100644
--- a/gui/client/toolbar.ui
+++ b/src/client/toolbar/toolbar.ui
diff --git a/src/client/util/platform/blankscreen.cpp b/src/client/util/platform/blankscreen.cpp
index 5f9b04b..a4c7d30 100644
--- a/src/client/util/platform/blankscreen.cpp
+++ b/src/client/util/platform/blankscreen.cpp
@@ -7,10 +7,6 @@
#include <QTimer>
#include <X11/Xlib.h>
-#include <X11/cursorfont.h>
-
-#include <cassert>
-#include <cstring>
struct BlankScreen_Sysdep {
Display *dpy;
@@ -27,8 +23,8 @@ BlankScreen::BlankScreen() : QDialog(nullptr)
setStyleSheet("background-color:#000");
_locked = false;
- QTimer *upper = new QTimer(this);
- connect(upper, SIGNAL(timeout()), this, SLOT(timer_moveToTop()));
+ auto *upper = new QTimer(this);
+ connect(upper, &QTimer::timeout, this, &BlankScreen::timer_moveToTop);
upper->start(1111);
}
diff --git a/src/client/util/room.h b/src/client/util/room.h
index 86939f7..46f8c02 100644
--- a/src/client/util/room.h
+++ b/src/client/util/room.h
@@ -1,11 +1,13 @@
#ifndef ROOM_H
#define ROOM_H
+#include <QDebug>
+
struct Room {
QString mgr;
QString name;
int priority;
- Room (QString _name, QString _mgr, int _priority)
+ Room (const QString &_name, const QString &_mgr, int _priority)
{
mgr = _mgr;
name = _name;
@@ -13,7 +15,7 @@ struct Room {
};
};
-inline QDebug operator<<(QDebug debug, const Room& r)
+inline QDebug& operator<<(QDebug& debug, const Room& r)
{
debug << r.name << "{mgr=" << r.mgr << ",prio=" << r.priority << "}";
return debug;
diff --git a/src/client/util/util.h b/src/client/util/util.h
index 89b19f4..e7a5ac9 100644
--- a/src/client/util/util.h
+++ b/src/client/util/util.h
@@ -1,10 +1,9 @@
-#ifndef UTIL_H_
-#define UTIL_H_
+#ifndef PVS_UTIL_H_
+#define PVS_UTIL_H_
#include <QDir>
#include <QTextStream>
-
namespace Util
{
//#
@@ -22,4 +21,4 @@ inline QTextStream& qStdout()
}
-#endif /* UTIL_H_ */
+#endif /* PVS_UTIL_H_ */
diff --git a/src/client/vnc/vncserver.cpp b/src/client/vnc/vncserver.cpp
index d819668..7db8423 100644
--- a/src/client/vnc/vncserver.cpp
+++ b/src/client/vnc/vncserver.cpp
@@ -6,11 +6,15 @@
*/
-#include <QApplication>
+#include <QGuiApplication>
#include <QProcess>
-#include <QDesktopWidget>
+#include <QScreen>
#include "vncserver.h"
#include "../util/util.h"
+#include "../../shared/util.h"
+
+// Remove in future - see util.h
+#undef errorOccurred
VncServer* VncServer::me = nullptr;
@@ -34,7 +38,7 @@ static QString makePassword(int len = 10)
{
QString ret(len, Qt::Uninitialized);
for (int i = 0; i < len; ++i)
- ret[i] = QChar(43 + qrand() % 80);
+ ret[i] = QChar(43 + slxrand() % 80);
return ret;
}
@@ -53,7 +57,7 @@ VncServer::VncServer() : _process(nullptr), _port(0), _timerId(0) {}
/**
* @brief VncServer::~VncServer
*/
-VncServer::~VncServer() {}
+VncServer::~VncServer() = default;
QSharedPointer<QFile> VncServer::createPwFile(const QDir& dir)
{
@@ -74,8 +78,8 @@ void VncServer::start()
{
// Keep things clean
if (_process != nullptr) {
- disconnect(_process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(onError(QProcess::ProcessError)));
- disconnect(_process, SIGNAL(finished(int)), this, SLOT(onFinished(int)));
+ _process->blockSignals(true);
+ _process->kill();
}
this->stop();
// Generate passwords
@@ -99,22 +103,22 @@ void VncServer::start()
pwhandle->close();
// Create new process
_process = new QProcess(this);
- connect(_process, SIGNAL(readyReadStandardOutput()), this, SLOT(onStdOut()));
- connect(_process, SIGNAL(readyReadStandardError()), this, SLOT(onStdErr()));
- connect(_process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(onError(QProcess::ProcessError)));
- connect(_process, SIGNAL(finished(int)), this, SLOT(onFinished(int)));
+ connect(_process, &QProcess::readyReadStandardOutput, this, &VncServer::onStdOut);
+ connect(_process, &QProcess::readyReadStandardError, this, &VncServer::onStdErr);
+ connect(_process, &QProcess::errorOccurred, this, &VncServer::onError);
+ connect(_process, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
+ this, &VncServer::onFinished);
_timerId = startTimer(4000);
QStringList args;
args << "-forever";
args << "-display" << ":0";
- args << "-passwdfile" << (QString("rm:" + pwhandle->fileName()));
+ args << "-passwdfile" << (QStringLiteral("rm:") + pwhandle->fileName());
args << "-shared";
args << "-repeat";
args << "-autoport" << QString::number(54112);
// Get rect of primary screen
- const QDesktopWidget desktop;
- const QRect primaryRect = desktop.screenGeometry();
+ const QRect primaryRect = QGuiApplication::primaryScreen()->geometry();
// Tell x11vnc to just use primary screen
args << "-clip";
@@ -141,8 +145,8 @@ void VncServer::stop()
if (_process == nullptr)
return;
qDebug("Stopping old VNC server.");
- disconnect(_process, SIGNAL(readyReadStandardOutput()), this, SLOT(onStdOut()));
- disconnect(_process, SIGNAL(readyReadStandardError()), this, SLOT(onStdErr()));
+ disconnect(_process, &QProcess::readyReadStandardOutput, this, &VncServer::onStdOut);
+ disconnect(_process, &QProcess::readyReadStandardError, this, &VncServer::onStdErr);
QProcess *process = _process;
_process = nullptr;
_port = 0;
@@ -215,7 +219,7 @@ void VncServer::onStdErr()
qDebug("VncServer::onStdErr() called in bad state.");
return;
}
- QByteArray data(_process->readAllStandardError());
+ _process->readAllStandardError(); // Throw away
}
/**
@@ -232,7 +236,7 @@ void VncServer::onError(QProcess::ProcessError /* error */ )
* @brief VncServer::onFinished
* @param exitCode
*/
-void VncServer::onFinished(int /* exitCode */ )
+void VncServer::onFinished(int /* exitCode */, QProcess::ExitStatus /* exitStatus */)
{
this->stop();
emit started(0, _ropass, _rwpass);
diff --git a/src/client/vnc/vncserver.h b/src/client/vnc/vncserver.h
index 4974946..1e71e2e 100644
--- a/src/client/vnc/vncserver.h
+++ b/src/client/vnc/vncserver.h
@@ -25,29 +25,29 @@ private:
int _timerId;
VncServer();
- virtual ~VncServer();
- QSharedPointer<QFile> createPwFile(const QDir& dir);
+ ~VncServer() override;
+ static QSharedPointer<QFile> createPwFile(const QDir& dir);
static VncServer *me;
public:
static VncServer *instance();
- inline bool isVncServerRunning() { return _port > 0; }
+ inline bool isVncServerRunning() const { return _port > 0; }
void start();
void stop();
protected:
- void timerEvent(QTimerEvent *event);
+ void timerEvent(QTimerEvent *event) override;
signals:
// Emited when started succesfully, or if startup failed. port will be <= 0 if it failed.
- void started(int port, QString& ropass, QString& rwpass);
+ void started(int port, const QString& ropass, const QString& rwpass);
private slots:
void onStdOut();
void onStdErr();
- void onFinished(int exitCode);
+ void onFinished(int exitCode, QProcess::ExitStatus exitStatus);
void onError(QProcess::ProcessError error);
};
diff --git a/src/client/vnc/vncthread.cpp b/src/client/vnc/vncthread.cpp
index 1a903d5..0e98cfe 100644
--- a/src/client/vnc/vncthread.cpp
+++ b/src/client/vnc/vncthread.cpp
@@ -17,8 +17,10 @@
*/
#include "vncthread.h"
-#include <QPainter>
+#include "../../shared/util.h"
+#include <QPainter>
+#include <utility>
#include <netinet/tcp.h>
/**
@@ -29,15 +31,15 @@
* @param passwd The password of the VNC server
* @param quality The desired quality level for the VNC stream
*/
-VncThread::VncThread(QString host, int port, QString passwd, int quality) :
- QThread(), _run(true), _started(false)
+VncThread::VncThread(QString host, int port, QString passwd, int quality)
+ : QThread()
+ , _host(std::move(host))
+ , _port(port)
+ , _passwd(std::move(passwd))
+ , _quality(quality)
+ , _run(true)
+ , _started(false)
{
- _host = host;
- _port = port;
- _passwd = passwd;
- _quality = quality;
- _client = nullptr;
- _connected = false;
moveToThread(this);
}
@@ -74,7 +76,7 @@ void VncThread::run()
// setup network
for (int retry = 0; retry < 5 && _run; ++retry) {
- this->msleep(1 + qrand() % 60);
+ msleep(1 + slxrand() % 60);
if (!_run)
break;
_client = rfbGetClient(8, 3, 4);
@@ -100,7 +102,7 @@ void VncThread::run()
if (!_run)
break;
// error, let's try again
- this->msleep(10 + qrand() % 50);
+ msleep(10 + slxrand() % 50);
}
if (_client != nullptr) {
qDebug("[%s] Connection successful!", metaObject()->className());
@@ -125,7 +127,7 @@ void VncThread::run()
_connected = false;
emit projectionStopped();
while (_run)
- this->msleep(100);
+ msleep(100);
qDebug("[%s] VNC client stopped.", metaObject()->className());
}
@@ -134,10 +136,10 @@ void VncThread::run()
*
* @return Name of the remote desktop
*/
-const QString VncThread::getDesktopName() const
+QString VncThread::getDesktopName() const
{
if (_client == nullptr || _client->desktopName == nullptr)
- return QString();
+ return {};
return QString(_client->desktopName);
}
@@ -172,7 +174,7 @@ void VncThread::emitStarted()
*/
char* VncThread::passwdHandler(rfbClient *client)
{
- VncThread* t = reinterpret_cast<VncThread*>(rfbClientGetClientData(client, nullptr));
+ auto* t = reinterpret_cast<VncThread*>(rfbClientGetClientData(client, nullptr));
return strdup(t->_passwd.toUtf8());
}
@@ -185,7 +187,7 @@ char* VncThread::passwdHandler(rfbClient *client)
*/
rfbBool VncThread::frameBufferHandler(rfbClient *client)
{
- VncThread *t = reinterpret_cast<VncThread*>(rfbClientGetClientData(client, nullptr));
+ auto *t = reinterpret_cast<VncThread*>(rfbClientGetClientData(client, nullptr));
const int width = client->width, height = client->height, depth = 32;
const int size = width * height * (depth / 8);
qDebug("[%s] Remote desktop: %ix%ix%i", t->metaObject()->className(), width, height, depth);
@@ -196,8 +198,8 @@ rfbBool VncThread::frameBufferHandler(rfbClient *client)
}
t->_img = QSharedPointer<QImage>(new QImage(width, height, QImage::Format_RGB32));
- if (size > t->_img->byteCount()) {
- qDebug() << "Fatal: Created image too small:" << t->_img->byteCount() << "<" << size;
+ if (size > t->_img->sizeInBytes()) {
+ qDebug() << "Fatal: Created image too small:" << t->_img->sizeInBytes() << "<" << size;
::exit(1);
}
client->frameBuffer = t->_img->bits();
@@ -260,6 +262,6 @@ rfbBool VncThread::frameBufferHandler(rfbClient *client)
*/
void VncThread::updateImage(rfbClient* client, int x, int y, int w, int h)
{
- VncThread* t = (VncThread*)rfbClientGetClientData(client, 0);
+ auto* t = (VncThread*)rfbClientGetClientData(client, 0);
t->processImageUpdate(x, y, w, h);
}
diff --git a/src/client/vnc/vncthread.h b/src/client/vnc/vncthread.h
index 16491fe..f7a020b 100644
--- a/src/client/vnc/vncthread.h
+++ b/src/client/vnc/vncthread.h
@@ -38,7 +38,7 @@ class VncThread : public QThread
Q_OBJECT
private:
- rfbClient *_client;
+ rfbClient *_client{};
QString _host;
int _port;
@@ -47,7 +47,7 @@ private:
QSharedPointer<QImage> _img;
- volatile bool _connected;
+ volatile bool _connected{};
volatile bool _run;
bool _started;
@@ -63,13 +63,13 @@ private:
public:
VncThread(QString host, int port, QString passwd, int quality);
- ~VncThread();
+ ~VncThread() override;
- const QString getDesktopName() const;
- bool isConnected() { return _connected; }
+ QString getDesktopName() const;
+ bool isConnected() const { return _connected; }
void stop() { _run = false; }
const QSharedPointer<QImage>& getFrameBuffer() { return _img; }
- void run();
+ void run() override;
int const static HIGH = 0;
int const static MEDIUM = 1;
diff --git a/src/client/vnc/vncwindow.cpp b/src/client/vnc/vncwindow.cpp
index f7b6a3e..0947112 100644
--- a/src/client/vnc/vncwindow.cpp
+++ b/src/client/vnc/vncwindow.cpp
@@ -19,7 +19,11 @@
#include "vncthread.h"
#include "../clientapp/clientapp.h"
+#include <QGuiApplication>
#include <QTimer>
+#include <QPainter>
+#include <QScreen>
+#include <QKeyEvent>
/**
* Calc greatest common divisor.
@@ -39,15 +43,12 @@ VncWindow::VncWindow(QWidget *parent) :
QWidget(parent), _srcStepX(1), _srcStepY(1), _dstStepX(1), _dstStepY(1),
_vncWorker(nullptr), _viewOnly(true), _multiScreen(false), _clientId(0), _redrawTimer(0), _tcpTimeoutTimer(0)
{
- QTimer *upper = new QTimer(this);
- connect(upper, SIGNAL(timeout()), this, SLOT(timer_moveToTop()));
+ auto *upper = new QTimer(this);
+ connect(upper, &QTimer::timeout, this, &VncWindow::timer_moveToTop);
upper->start(1111);
}
-VncWindow::~VncWindow()
-{
- //
-}
+VncWindow::~VncWindow() = default;
////////////////////////////////////////////////////////////////////////////////
// Private
@@ -64,10 +65,9 @@ void VncWindow::terminateVncThread()
if (_vncWorker == nullptr)
return;
- disconnect(_vncWorker, SIGNAL(projectionStopped()), this, SLOT(onProjectionStopped()));
- disconnect(_vncWorker, SIGNAL(projectionStarted()), this, SLOT(onProjectionStarted()));
- disconnect(_vncWorker, SIGNAL(imageUpdated(const int, const int, const int, const int)), this,
- SLOT(onUpdateImage(const int, const int, const int, const int)));
+ disconnect(_vncWorker, &VncThread::projectionStopped, this, &VncWindow::onProjectionStopped);
+ disconnect(_vncWorker, &VncThread::projectionStarted, this, &VncWindow::onProjectionStarted);
+ disconnect(_vncWorker, &VncThread::imageUpdated, this, &VncWindow::onUpdateImage);
_vncWorker->stop();
_vncWorker = nullptr;
if (_redrawTimer != 0) {
@@ -188,12 +188,10 @@ void VncWindow::open(const QString& host, int port, const QString& passwd, bool
this->terminateVncThread();
_clientId = clientId;
_vncWorker = new VncThread(host, port, passwd, 1);
- connect(_vncWorker, SIGNAL(projectionStopped()), this, SLOT(onProjectionStopped()), Qt::QueuedConnection);
- connect(_vncWorker, SIGNAL(projectionStarted()), this, SLOT(onProjectionStarted()), Qt::QueuedConnection);
- connect(_vncWorker, SIGNAL(imageUpdated(const int, const int, const int, const int)), this,
- SLOT(onUpdateImage(const int, const int, const int, const int)),
- Qt::QueuedConnection);
- connect(_vncWorker, SIGNAL(finished()), this, SLOT(deleteVncThread()), Qt::QueuedConnection);
+ connect(_vncWorker, &VncThread::projectionStopped, this, &VncWindow::onProjectionStopped, Qt::QueuedConnection);
+ connect(_vncWorker, &VncThread::projectionStarted, this, &VncWindow::onProjectionStarted, Qt::QueuedConnection);
+ connect(_vncWorker, &VncThread::imageUpdated, this, &VncWindow::onUpdateImage, Qt::QueuedConnection);
+ connect(_vncWorker, &VncThread::finished, this, &VncWindow::deleteVncThread, Qt::QueuedConnection);
setWindowTitle(caption);
@@ -201,22 +199,18 @@ void VncWindow::open(const QString& host, int port, const QString& passwd, bool
_remoteThumb.loadFromData(rawThumb);
- QSize size;
if (fullscreen) {
setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::Tool); // | Qt::X11BypassWindowManagerHint); <- better, but window won't get any keyboard input
// Show projection on rightmost screen
- QDesktopWidget *desktop = QApplication::desktop();
- int ns = desktop->numScreens();
QRect best;
- for (int i = 0; i < ns; ++i) {
- QRect r = desktop->screenGeometry(i);
+ for (auto *screen : QGuiApplication::screens()) {
+ QRect r = screen->geometry();
if (best.isNull() || r.left() > best.left()) {
best = r;
}
}
- _multiScreen = ns > 1;
- qDebug() << "Spawning at" << best;
- size = best.size();
+ _multiScreen = QGuiApplication::screens().size() > 1;
+ qDebug() << "Spawning VNC viewer at" << best;
show();
setGeometry(best);
raise();
@@ -226,8 +220,7 @@ void VncWindow::open(const QString& host, int port, const QString& passwd, bool
move(best.topLeft());
} else {
setWindowFlags(Qt::Tool | Qt::WindowMaximizeButtonHint);
- size = QSize(800, 600);
- resize(size);
+ resize(800, 600);
showNormal();
}
diff --git a/src/client/vnc/vncwindow.h b/src/client/vnc/vncwindow.h
index 7124ddc..0e50ff9 100644
--- a/src/client/vnc/vncwindow.h
+++ b/src/client/vnc/vncwindow.h
@@ -14,12 +14,13 @@
#ifndef CLIENTVNCVIEWER_H_
#define CLIENTVNCVIEWER_H_
-#include <QtWidgets>
#include <QSharedPointer>
-#include <QImage>
+#include <QWidget>
+#include <QPixmap>
class VncThread;
class QPainter;
+class QImage;
class VncWindow : public QWidget
{
@@ -36,8 +37,8 @@ protected slots:
void timer_moveToTop();
void deleteVncThread();
+public slots:
void open(const QString& host, int port, const QString& passwd, bool ro, bool fullscreen, const QString& caption, const int clientId, const QByteArray& rawThumb);
-// bool close();
signals:
void running(const bool isRunning, const int clientId);
diff --git a/src/server/clicklabel/clicklabel.h b/src/server/clicklabel/clicklabel.h
index 4c5a898..cea024d 100644
--- a/src/server/clicklabel/clicklabel.h
+++ b/src/server/clicklabel/clicklabel.h
@@ -1,7 +1,6 @@
-#ifndef _CLICKLABEL_H_
-#define _CLICKLABEL_H_
+#ifndef PVS_CLICKLABEL_H_
+#define PVS_CLICKLABEL_H_
-#include <QtWidgets>
#include <QLabel>
/**
@@ -12,10 +11,10 @@ class ClickLabel : public QLabel
Q_OBJECT
public:
- ClickLabel(QWidget *parent);
+ explicit ClickLabel(QWidget *parent);
protected:
- void mouseReleaseEvent(QMouseEvent* e);
+ void mouseReleaseEvent(QMouseEvent* e) override;
signals:
diff --git a/src/server/connectionframe/connectionframe.cpp b/src/server/connectionframe/connectionframe.cpp
index c2bba70..c6c20b8 100644
--- a/src/server/connectionframe/connectionframe.cpp
+++ b/src/server/connectionframe/connectionframe.cpp
@@ -16,46 +16,51 @@
#include "connectionframe.h"
#include "../mainwindow/mainwindow.h"
+#include "../../shared/util.h"
#include "../net/client.h"
-#include <QImage>
-#include <cassert>
-#include <cmath>
-static QString style_student(
- "QLabel{ background-color: #FFF; border-radius: 2px; color: black;} \
- QGroupBox { background-color: #AAA; margin: 2px; border-radius: 4px}"
+#include <QImage>
+#include <QResizeEvent>
+#include <QBoxLayout>
+#include <QLabel>
+#include <QApplication>
+#include <QPainter>
+
+static const QString style_student(
+ "QLabel{ background-color: #FFF; border-radius: 2px; color: black;}"
+ " QGroupBox { background-color: #AAA; margin: 2px; border-radius: 4px}"
);
-static QString style_tutor(
- "QLabel{ background-color: #FFF; border-radius: 2px; color: black;} \
- QGroupBox { background-color: #70C670; margin: 2px; border-radius: 4px}"
+static const QString style_tutor(
+ "QLabel{ background-color: #FFF; border-radius: 2px; color: black;}"
+ " QGroupBox { background-color: #70C670; margin: 2px; border-radius: 4px}"
);
-static QString style_attention(
- "QLabel{ background-color: #FFF; border-radius: 2px; color: black;} \
- QGroupBox { background-color: #C88; margin: 2px; border-radius: 4px}"
+static const QString style_attention(
+ "QLabel{ background-color: #FFF; border-radius: 2px; color: black;}"
+ " QGroupBox { background-color: #C88; margin: 2px; border-radius: 4px}"
);
-static QString style_selectedStudent(
- "QLabel{ background-color: #FFF; border-radius: 2px; color: black; } \
- QGroupBox { background-color: #ccebff; margin: 0px; border-radius: 4px; border: 4px solid #6C8CF0;}"
+static const QString style_selectedStudent(
+ "QLabel{ background-color: #FFF; border-radius: 2px; color: black; }"
+ " QGroupBox { background-color: #ccebff; margin: 0px; border-radius: 4px; border: 4px solid #6C8CF0;}"
);
-static QString style_selectedTutor(
- "QLabel{ background-color: #FFF; border-radius: 2px; color: black;} \
- QGroupBox { background-color: #9f9; margin: 0px; border-radius: 4px; border: 4px solid #6C8CF0;}"
+static const QString style_selectedTutor(
+ "QLabel{ background-color: #FFF; border-radius: 2px; color: black;}"
+ " QGroupBox { background-color: #9f9; margin: 0px; border-radius: 4px; border: 4px solid #6C8CF0;}"
);
-static QString style_selectedAttention(
- "QLabel{ background-color: #FFF; border-radius: 2px; color: black;} \
- QGroupBox { background-color: #E99; margin: 0px; border-radius: 4px; border: 4px solid #6C8CF0;}"
+static const QString style_selectedAttention(
+ "QLabel{ background-color: #FFF; border-radius: 2px; color: black;}"
+ " QGroupBox { background-color: #E99; margin: 0px; border-radius: 4px; border: 4px solid #6C8CF0;}"
);
-static QString style_exam (
- "QLabel{ background-color: #919191; color: black; } \
- QGroupBox { background-color: #d35400; margin: 1px; border-radius: 4px}"
+static const QString style_exam (
+ "QLabel{ background-color: #919191; color: black; }"
+ " QGroupBox { background-color: #d35400; margin: 1px; border-radius: 4px}"
);
-static QString style_exam_selected (
- "QLabel{ background-color: #919191; color: black; } \
- QGroupBox { background-color: #cc743a; margin: 1px; border-radius: 4px}"
+static const QString style_exam_selected (
+ "QLabel{ background-color: #919191; color: black; }"
+ " QGroupBox { background-color: #cc743a; margin: 1px; border-radius: 4px}"
);
-static QString style_disconnected(
- "QLabel{ background-color: #919191; border-radius: 2px; color: black; } \
- QGroupBox { background-color: #7F7F7F; margin: 1px; border-radius: 4px}"
+static const QString style_disconnected(
+ "QLabel{ background-color: #919191; border-radius: 2px; color: black; }"
+ " QGroupBox { background-color: #7F7F7F; margin: 1px; border-radius: 4px}"
);
static QIcon *term = nullptr, *cam = nullptr, *eye = nullptr, *lock = nullptr;
@@ -70,9 +75,10 @@ bool ConnectionFrame::paintDisabled = false;
* @param width
* @param height
*/
-ConnectionFrame::ConnectionFrame(MainWindow* main, QWidget *parent, bool fromRoomplan) :
- QGroupBox(parent), _client(nullptr), _timerId(0), _timerCounter(0), _isSelected(false), _isTutor(false),
- _isFromRoomplan(fromRoomplan), _mainWindow(main)
+ConnectionFrame::ConnectionFrame(MainWindow* main, QWidget *parent, bool fromRoomplan)
+ : QGroupBox(parent)
+ , _isFromRoomplan(fromRoomplan)
+ , _mainWindow(main)
{
//defines the ui-stuff
@@ -158,7 +164,7 @@ void ConnectionFrame::updateGeometry()
*/
QLabel* ConnectionFrame::addIcon(const QIcon* icon)
{
- QLabel *label = new QLabel(this);
+ auto *label = new QLabel(this);
label->setPixmap(icon->pixmap(24, 24, QIcon::Normal, QIcon::On));
label->setAttribute(Qt::WA_TranslucentBackground);
label->hide();
@@ -174,17 +180,17 @@ QLabel* ConnectionFrame::addIcon(const QIcon* icon)
void ConnectionFrame::assignClient(Client* client)
{
assert(_client == nullptr);
- connect( client, SIGNAL(disconnected()), this, SLOT(onClientDisconnected()) );
- connect( client, SIGNAL(thumbUpdated(Client*, const QImage&)), this, SLOT(onThumbUpdated(Client*, const QImage&)) );
- connect( client, SIGNAL(vncServerStateChange(Client*)), this, SLOT(updateAppearance()));
- connect( client, SIGNAL(vncClientStateChange(Client*)), this, SLOT(updateAppearance()));
- connect( client, SIGNAL(stateChanged()), this, SLOT(updateAppearance()));
_client = client;
+ connect(_client, &Client::disconnected, this, &ConnectionFrame::onClientDisconnected );
+ connect(_client, &Client::thumbUpdated, this, &ConnectionFrame::onThumbUpdated );
+ connect(_client, &Client::vncServerStateChange, this, &ConnectionFrame::updateAppearance);
+ connect(_client, &Client::vncClientStateChange, this, &ConnectionFrame::updateAppearance);
+ connect(_client, &Client::stateChanged, this, &ConnectionFrame::updateAppearance);
_computerId = client->ip();
updateLabels();
showDefaultThumb();
if (_timerId == 0)
- _timerId = startTimer(1000 + qrand() % 150);
+ _timerId = startTimer(slxrand() % 150 + 1000);
this->updateAppearance();
_client->setTutor(_isTutor);
}
@@ -382,8 +388,8 @@ void ConnectionFrame::updateAppearance()
} else {
this->setStyleSheet(style_disconnected);
}
- for (QList<QLabel*>::iterator it(_icons.begin()); it != _icons.end(); ++it) {
- (**it).hide();
+ for (auto *_icon : _icons) {
+ _icon->hide();
}
return;
}
@@ -448,3 +454,8 @@ void ConnectionFrame::onThumbUpdated(Client* client, const QImage& thumb)
this->update();
}
+void ConnectionFrame::resizeEvent(QResizeEvent *event) {
+ calcDesiredThumbSize(event->size());
+ QGroupBox::resizeEvent(event);
+}
+
diff --git a/src/server/connectionframe/connectionframe.h b/src/server/connectionframe/connectionframe.h
index 1d004e6..cfebe85 100644
--- a/src/server/connectionframe/connectionframe.h
+++ b/src/server/connectionframe/connectionframe.h
@@ -1,9 +1,14 @@
-#ifndef _CONNECTIONFRAME_H_
-#define _CONNECTIONFRAME_H_
-#include <QtWidgets>
-#include "../net/client.h"
+#ifndef PVS_CONNECTIONFRAME_H_
+#define PVS_CONNECTIONFRAME_H_
+
+#include <QGroupBox>
+#include <utility>
+
+class QBoxLayout;
+class QLabel;
class MainWindow;
+class Client;
/**
* Class for representing the clients of current session, with a specific frame
@@ -34,11 +39,11 @@ private:
QPoint _gridPosition;
QSize _desiredThumbSize;
- Client *_client;
+ Client *_client{};
- int _timerId, _timerCounter;
- bool _isSelected;
- bool _isTutor;
+ int _timerId{}, _timerCounter{};
+ bool _isSelected{};
+ bool _isTutor{};
bool _isFromRoomplan;
void showDefaultThumb();
@@ -52,35 +57,39 @@ public:
static bool paintDisabled;
ConnectionFrame(MainWindow* main, QWidget* parent, bool fromRoomplan = false);
- virtual ~ConnectionFrame();
+ ~ConnectionFrame() override;
- const inline QPoint getGridPosition() const { return _gridPosition; }
+ const QPoint& getGridPosition() const { return _gridPosition; }
void setGridPosition(int x, int y);
void setGridPosition(const QPoint& pos);
void updateGeometry();
void assignClient(Client *client);
void setSelection(bool selected);
- inline bool isSelected() { return _isSelected; }
+ bool isSelected() const { return _isSelected; }
const QString& computerId() const { return _computerId; }
- void setComputerId(QString computerId) { if (_client != nullptr) return; _computerId = computerId; updateLabels(); }
+ void setComputerId(QString computerId) {
+ if (_client != nullptr)
+ return;
+ _computerId = std::move(computerId); updateLabels();
+ }
Client* client() const { return _client; }
- inline bool isTutor() { return _isTutor; }
- inline bool isFromRoomplan() { return _isFromRoomplan; }
+ bool isTutor() const { return _isTutor; }
+ bool isFromRoomplan() const { return _isFromRoomplan; }
void setTutor(bool b);
protected:
- void resizeEvent(QResizeEvent* event) { calcDesiredThumbSize(event->size()); }
- void mouseDoubleClickEvent(QMouseEvent* event);
- void mouseReleaseEvent(QMouseEvent* e);
- void enterEvent(QEvent* event);
- void leaveEvent(QEvent* event);
- void mousePressEvent(QMouseEvent* event);
- void mouseMoveEvent(QMouseEvent* event);
- void paintEvent(QPaintEvent *event);
- void timerEvent(QTimerEvent* event);
+ void resizeEvent(QResizeEvent* event) override;
+ void mouseDoubleClickEvent(QMouseEvent* event) override;
+ void mouseReleaseEvent(QMouseEvent* e) override;
+ void enterEvent(QEvent* event) override;
+ void leaveEvent(QEvent* event) override;
+ void mousePressEvent(QMouseEvent* event) override;
+ void mouseMoveEvent(QMouseEvent* event) override;
+ void paintEvent(QPaintEvent *event) override;
+ void timerEvent(QTimerEvent* event) override;
signals:
void frameMoving(ConnectionFrame* frame);
diff --git a/src/server/helpwindow/helpwindow.cpp b/src/server/helpwindow/helpwindow.cpp
index 152cf0d..f6f1f10 100644
--- a/src/server/helpwindow/helpwindow.cpp
+++ b/src/server/helpwindow/helpwindow.cpp
@@ -22,7 +22,7 @@ HelpWindow::HelpWindow(const QList<QAction*> &actions, QWidget *parent) :
break;
}
}
- QGridLayout *layout = new QGridLayout(this);
+ auto *layout = new QGridLayout(this);
layout->setSpacing(2);
QSizePolicy sizePol(QSizePolicy::Minimum, QSizePolicy::Preferred);
QList<QLabel*> wrapLabels;
@@ -31,24 +31,24 @@ HelpWindow::HelpWindow(const QList<QAction*> &actions, QWidget *parent) :
for (QAction *action : actions) {
if (action->icon().isNull() || action->text().isEmpty())
continue;
- QLabel *icon = new QLabel(this);
+ auto *icon = new QLabel(this);
icon->setPixmap(action->icon().pixmap(iconSize, iconSize, QIcon::Normal, QIcon::Off));
icon->setMinimumSize(iconSize + 5, iconSize + 2);
layout->addWidget(icon, row, 0, 3, 1, Qt::AlignTop | Qt::AlignLeft);
- QLabel *headline = new QLabel(action->toolTip(), this);
+ auto *headline = new QLabel(action->toolTip(), this);
QFont boldFont = headline->font();
boldFont.setBold(true);
headline->setFont(boldFont);
headline->setAlignment(Qt::AlignTop | Qt::AlignLeft);
layout->addWidget(headline, row, 1, Qt::AlignTop);
- QLabel *description = new QLabel(action->text(), this);
+ auto *description = new QLabel(action->text(), this);
description->setWordWrap(true);
description->setAlignment(Qt::AlignTop | Qt::AlignLeft);
description->setSizePolicy(sizePol);
wrapLabels.append(description);
layout->addWidget(description, row + 1, 1, Qt::AlignTop);
layout->setRowStretch(row + 2, 1);
- QFrame *line = new QFrame();
+ auto *line = new QFrame();
line->setFrameShape(QFrame::HLine);
line->setFrameShadow(QFrame::Sunken);
layout->addWidget(line, row + 3, 0, 1, 2);
@@ -57,12 +57,12 @@ HelpWindow::HelpWindow(const QList<QAction*> &actions, QWidget *parent) :
layout->setColumnStretch(1, 1);
// Add close button
layout->setRowStretch(row++, 1000);
- QPushButton *close = new QPushButton(tr("Close"), this);
+ auto *close = new QPushButton(tr("Close"), this);
QFont bigFont = close->font();
bigFont.setPointSize(20);
close->setFont(bigFont);
close->setDefault(true);
- connect(close, SIGNAL(clicked()), this, SLOT(hide()));
+ connect(close, &QPushButton::clicked, this, &HelpWindow::hide);
layout->addWidget(close, row++, 0, 1, 2);
this->setFixedWidth(600);
this->setSizePolicy(sizePol);
diff --git a/src/server/main.cpp b/src/server/main.cpp
index f804c1a..7ae0466 100644
--- a/src/server/main.cpp
+++ b/src/server/main.cpp
@@ -1,28 +1,27 @@
-#include <iostream>
-#include <stdlib.h>
-#include "mainwindow/mainwindow.h"
#include "serverapp/serverapp.h"
-using std::cout;
-using std::endl;
+#include <QDebug>
void usage()
{
- cout << "USAGE pvsmgr [OPTIONS]" << endl;
- cout << "OPTIONS: " << endl;
- cout << "--manager-only" << endl;
- cout << " pvsmgr terminates if this computer is not a manager of a room" << endl;
- cout << "--config=INIFILE" << endl;
- cout << " read configuration from INIFILE instead of default path (/opt/openslx/pvs2/pvs2.ini) " << endl;
- cout << "--usage" << endl;
- cout << " shows this message" << endl;
+ puts(
+ "USAGE pvsmgr [OPTIONS]\n"
+ "OPTIONS: \n"
+ "--manager-only\n"
+ " pvsmgr terminates if this computer is not a manager of a room\n"
+ "--config=INIFILE\n"
+ " read configuration from INIFILE instead of default path (/opt/openslx/pvs2/pvs2.ini) \n"
+ "--usage\n"
+ " shows this message\n"
+ );
}
int main(int argc, char** argv)
{
- qsrand(uint(QDateTime::currentMSecsSinceEpoch()));
ServerApp app(argc, argv);
+ if (app.shouldExit())
+ return 0;
for (QString a : app.arguments()) {
if (a == "--usage" || a == "--help") {
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index f6ff566..e8247d0 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -16,11 +16,13 @@
// Self
#include "mainwindow.h"
// QT stuff
-#include <QtWidgets>
-#include <QFileDialog>
#include <QSvgRenderer>
#include <QPainter>
#include <QImage>
+#include <QMessageBox>
+#include <QCloseEvent>
+#include <QDialogButtonBox>
+#include <QScreen>
// Other custom UI elements
#include "../serverapp/serverapp.h"
#include "../clicklabel/clicklabel.h"
@@ -32,16 +34,11 @@
#include "../net/listenserver.h"
#include "../net/client.h"
#include "../net/discoverylistener.h"
-#include "../net/filedownloader.h"
// Others
#include "../../shared/settings.h"
#include "../util/platform/screensaver.h"
// Auto-generated ui class
#include "ui_mainwindow.h"
-#include "ui_reloadroom.h"
-
-#include <iostream>
-#include <vector>
#define sStrTutorNdef MainWindow::tr("No tutor defined.")
#define sStrTutorOffline MainWindow::tr("Tutor is offline.")
@@ -50,33 +47,24 @@
#define sStrDestNdef MainWindow::tr("Please select a projection destination.")
#define sStrDestOffline MainWindow::tr("The projection destination is offline.")
#define sStrSourceDestSame MainWindow::tr("Selected projection target is tutor.")
-#define sStrClientOnline MainWindow::tr("Selected client is currently online.")
#define sStrNoDestAv MainWindow::tr("No projection destination available.")
-using std::vector;
-using std::cout;
-using std::endl;
-
/**
* Initialize MainWindow and ListenServer.
* @param ipListUrl
* @param parent
*/
-MainWindow::MainWindow(QWidget* parent) :
- QMainWindow(parent), ui(new Ui::MainWindow), _tbIconSize(24), _tbArea(Qt::LeftToolBarArea),
- _lastClientCount(0)
+MainWindow::MainWindow(QWidget* parent)
+ : QMainWindow(parent)
+ , ui(new Ui::MainWindow)
+ , _mode(Mode::Multicast)
{
qDebug() << "MainWindow(parent)";
- _mode = Mode::Multicast;
- _streamingSource = 0;
/* default value, these will be updated a room is loaded */
_tilesX = 10;
_tilesY = 10;
- _virtCols = 0;
- _virtRows = 0;
-
_sessionNameWindow = new SessionNameWindow(this);
_reloadWindow = new ReloadRoomWindow(this);
_reloadWindow->setWindowTitle(tr("Reload Room"));
@@ -114,26 +102,26 @@ MainWindow::MainWindow(QWidget* parent) :
serverApp->setExam(false);
// Close button in tool bar
- connect(ui->action_Exit, SIGNAL(triggered()), this, SLOT(onButtonExit()));
- connect(ui->action_TutorToAll, SIGNAL(triggered()), this, SLOT(onButtonTutorToAll()));
- connect(ui->action_StudentToTutor, SIGNAL(triggered()), this, SLOT(onButtonStudentToTutor()));
- connect(ui->action_StudentToTutorExclusive, SIGNAL(triggered()), this, SLOT(onButtonStudentToTutorExclusive()));
- connect(ui->action_TutorToStudent, SIGNAL(triggered()), this, SLOT(onButtonTutorToStudent()));
- connect(ui->action_StopProjection, SIGNAL(triggered()), this, SLOT(onButtonStopProjection()));
- connect(ui->action_SetAsTutor, SIGNAL(triggered()), this, SLOT(onButtonSetAsTutor()));
- connect(ui->action_SetAsTutor, SIGNAL(triggered()), this, SLOT(onButtonStopProjection()));
- connect(ui->action_Lock, SIGNAL(toggled(bool)), this, SLOT(onButtonLock(bool)));
- connect(ui->action_LockSingle, SIGNAL(triggered()), this, SLOT(onButtonLockSingle()));
- connect(ui->action_Help, SIGNAL(triggered()), this, SLOT(onButtonHelp()));
- connect(ui->actionReload_Room_Configuration, SIGNAL(triggered()), this, SLOT(onButtonReloadRoomConfig()));
- connect(ui->action_DeleteClient, SIGNAL(triggered()), this, SLOT(onDeleteClient()));
+ connect(ui->action_Exit, &QAction::triggered, this, &MainWindow::onButtonExit);
+ connect(ui->action_TutorToAll, &QAction::triggered, this, &MainWindow::onButtonTutorToAll);
+ connect(ui->action_StudentToTutor, &QAction::triggered, this, &MainWindow::onButtonStudentToTutor);
+ connect(ui->action_StudentToTutorExclusive, &QAction::triggered, this, &MainWindow::onButtonStudentToTutorExclusive);
+ connect(ui->action_TutorToStudent, &QAction::triggered, this, &MainWindow::onButtonTutorToStudent);
+ connect(ui->action_StopProjection, &QAction::triggered, this, &MainWindow::onButtonStopProjection);
+ connect(ui->action_SetAsTutor, &QAction::triggered, this, &MainWindow::onButtonSetAsTutor);
+ connect(ui->action_SetAsTutor, &QAction::triggered, this, &MainWindow::onButtonStopProjection);
+ connect(ui->action_Lock, &QAction::toggled, this, &MainWindow::onButtonLock);
+ connect(ui->action_LockSingle, &QAction::triggered, this, &MainWindow::onButtonLockSingle);
+ connect(ui->action_Help, &QAction::triggered, this, &MainWindow::onButtonHelp);
+ connect(ui->actionReload_Room_Configuration, &QAction::triggered, this, &MainWindow::onButtonReloadRoomConfig);
+ connect(ui->action_DeleteClient, &QAction::triggered, this, &MainWindow::onDeleteClient);
/* Stuff for the button lock */
//Setup a timeout
_buttonLockTimer = new QTimer(this);
_buttonLockTimer->setSingleShot(true);
_buttonLockTimer->setInterval(BUTTON_BLOCK_TIME);
- connect(_buttonLockTimer, SIGNAL(timeout()), this, SLOT(enableButtons()));
+ connect(_buttonLockTimer, &QTimer::timeout, this, &MainWindow::enableButtons);
// Define the locking buttons
_lockingButtons
<< ui->action_DeleteClient
@@ -147,18 +135,18 @@ MainWindow::MainWindow(QWidget* parent) :
<< ui->action_StopProjection;
// Clicking the session name label shows the edit field for it
- connect(_sessionNameLabel, SIGNAL(clicked()), this, SLOT(onSessionNameClick()));
+ connect(_sessionNameLabel, &ClickLabel::clicked, this, &MainWindow::onSessionNameClick);
// Listen to updates to the session name through the session name window
- connect(_sessionNameWindow, SIGNAL(updateSessionName()), this,
- SLOT(onSessionNameUpdate()));
+ connect(_sessionNameWindow, &SessionNameWindow::updateSessionName,
+ this, &MainWindow::onSessionNameUpdate);
setAttribute(Qt::WA_QuitOnClose);
setUnifiedTitleAndToolBarOnMac(true);
this->showMaximized(); // show the Mainwindow maximized
- _listenServer = new ListenServer(CLIENT_PORT);
- connect(_listenServer, SIGNAL(newClient(Client*)), this, SLOT(onClientConnected(Client*)));
- _discoveryListener = new DiscoveryListener();
+ auto *ls = new ListenServer(CLIENT_PORT, this);
+ connect(ls, &ListenServer::newClient, this, &MainWindow::onClientConnected);
+ new DiscoveryListener(this);
// Finally
this->onSessionNameUpdate(); // Just make lable visible.
@@ -175,8 +163,8 @@ void MainWindow::clientCountChanged()
int clientCount = 0;
- for (auto it = _clientFrames.begin(); it != _clientFrames.end(); ++it) {
- Client* c = (*it)->client();
+ for (auto * frame : _clientFrames) {
+ Client* c = frame->client();
if (c != nullptr) {
bool b = c->isExamMode();
examClientCount += b ? 1 : 0;
@@ -241,7 +229,7 @@ static int distance(QPoint a, QPoint b)
* @param toIgnore, ignore this connectionframe when considering free slots
* @return the free slot
*/
-QPoint MainWindow::closestFreeSlot(const QPoint preferredPixels, const ConnectionFrame* toIgnore)
+QPoint MainWindow::closestFreeSlot(const QPoint &preferredPixels, const ConnectionFrame* toIgnore)
{
const bool pickFirstOne = ( preferredPixels == QPoint(-1, -1) );
const QSize& clientSize = serverApp->getCurrentRoom()->clientSize;
@@ -250,11 +238,11 @@ QPoint MainWindow::closestFreeSlot(const QPoint preferredPixels, const Connectio
memset(grid, 0, sizeof(bool) * size_t(_tilesX * _tilesY)); /* set everything to false */
/* fill grid */
- for (auto it = _clientFrames.begin(); it != _clientFrames.end(); ++it) {
+ for (auto * frame : _clientFrames) {
- if (*it == toIgnore) { continue; }
+ if (frame == toIgnore) { continue; }
- const QPoint p = (*it)->getGridPosition();
+ const QPoint p = frame->getGridPosition();
for (int x = p.x(); x < p.x() + clientSize.width(); x++) {
for (int y = p.y(); y < p.y() + clientSize.height(); y++) {
@@ -323,7 +311,7 @@ void MainWindow::placeFrameInFreeSlot(ConnectionFrame* frame, QPoint preferredPi
*/
ConnectionFrame* MainWindow::createFrame(const QString &computerId, const QPoint* gridPosition, bool fromRoomplan)
{
- ConnectionFrame *cf = new ConnectionFrame(this, ui->frmRoom, fromRoomplan);
+ auto *cf = new ConnectionFrame(this, ui->frmRoom, fromRoomplan);
if (gridPosition == nullptr) {
placeFrameInFreeSlot(cf);
} else {
@@ -332,9 +320,9 @@ ConnectionFrame* MainWindow::createFrame(const QString &computerId, const QPoint
cf->setComputerId(computerId);
_clientFrames.append(cf);
cf->show();
- connect(cf, SIGNAL(frameMoved(ConnectionFrame *)), this, SLOT(onFrameDropped(ConnectionFrame *)));
- connect(cf, SIGNAL(clicked(ConnectionFrame *)), this, SLOT(onFrameClicked(ConnectionFrame *)));
- connect(cf, SIGNAL(frameMoving(ConnectionFrame *)), this, SLOT(onFrameMoving(ConnectionFrame *)));
+ connect(cf, &ConnectionFrame::frameMoved, this, &MainWindow::onFrameDropped);
+ connect(cf, &ConnectionFrame::clicked, this, &MainWindow::onFrameClicked);
+ connect(cf, &ConnectionFrame::frameMoving, this, &MainWindow::onFrameMoving);
return cf;
}
@@ -365,10 +353,10 @@ void MainWindow::tellClientCurrentSituation(Client* client)
*/
Client* MainWindow::getClientFromId(int id)
{
- for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) {
- if ((*it)->client() != nullptr) {
- if ((*it)->client()->id() == id)
- return (*it)->client();
+ for (auto * frame : _clientFrames) {
+ if (frame->client() != nullptr) {
+ if (frame->client()->id() == id)
+ return frame->client();
}
}
return nullptr;
@@ -382,9 +370,9 @@ Client* MainWindow::getClientFromId(int id)
*/
ConnectionFrame* MainWindow::getTutorFrame()
{
- for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) {
- if (((*it) != nullptr) && ((*it)->isTutor()))
- return (*it);
+ for (auto * frame : _clientFrames) {
+ if ((frame != nullptr) && (frame->isTutor()))
+ return frame;
}
return nullptr;
}
@@ -397,9 +385,9 @@ ConnectionFrame* MainWindow::getTutorFrame()
*/
ConnectionFrame* MainWindow::getSelectedFrame()
{
- for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) {
- if (((*it) != nullptr) && ((*it)->isSelected()))
- return (*it);
+ for (auto * frame : _clientFrames) {
+ if ((frame != nullptr) && (frame->isSelected()))
+ return frame;
}
return nullptr;
}
@@ -470,8 +458,8 @@ void MainWindow::resizeEvent(QResizeEvent* /* e */ )
const QSize& clientSize = room->clientSize;
// Check if any frames have been moved beyond the room dimensions
- for (auto it = _clientFrames.begin(); it != _clientFrames.end(); ++it) {
- QPoint bounds = (*it)->getGridPosition();
+ for (auto * frame : _clientFrames) {
+ QPoint bounds = frame->getGridPosition();
while (bounds.x() + clientSize.width() > newGridSize.width()) {
newGridSize += QSize(1, 0);
}
@@ -499,16 +487,16 @@ void MainWindow::resizeEvent(QResizeEvent* /* e */ )
const int maxY = _tilesY - clientSize.height();
/* Bring back frames which are now out of the screen */
- for (auto it = _clientFrames.begin(); it != _clientFrames.end(); ++it) {
- const QPoint gp = (*it)->getGridPosition();
+ for (auto * frame : _clientFrames) {
+ const QPoint gp = frame->getGridPosition();
if ( gp.x() > maxX || gp.y() > maxY ) {
- placeFrameInFreeSlot(*it, (*it)->pos());
+ placeFrameInFreeSlot(frame, frame->pos());
}
}
/* Resize all connection windows */
- for (auto it = _clientFrames.begin(); it != _clientFrames.end(); ++it) {
- (*it)->updateGeometry();
+ for (auto * frame : _clientFrames) {
+ frame->updateGeometry();
}
/* update background image label */
@@ -581,10 +569,10 @@ void MainWindow::reset(bool lock)
}
// Unlock all clients
- for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) {
- if ((*it)->client() != nullptr) {
- (*it)->client()->lockScreen(lock);
- (*it)->client()->removeAttention();
+ for (auto * frame : _clientFrames) {
+ if (frame->client() != nullptr) {
+ frame->client()->lockScreen(lock);
+ frame->client()->removeAttention();
}
}
@@ -596,6 +584,7 @@ void MainWindow::reset(bool lock)
void MainWindow::onFrameMoving(ConnectionFrame* connectionFrame)
{
+ // Get where the frame would be placed, and show a blue shadow in that spot
QPoint slot = closestFreeSlot(connectionFrame->pos(), connectionFrame);
_dropMarker->setGeometry(slot.x() * getTileWidthPx(), slot.y() * getTileHeightPx(), connectionFrame->width(), connectionFrame->height());
if (!_dropMarker->isVisible()) {
@@ -612,11 +601,8 @@ void MainWindow::onFrameMoving(ConnectionFrame* connectionFrame)
void MainWindow::onFrameDropped(ConnectionFrame* connectionFrame)
{
_dropMarker->hide();
- // if (_tilesX <= 0 || _tilesY <= 0) return;
const QPoint preferredPixels = connectionFrame->pos();
placeFrameInFreeSlot(connectionFrame, preferredPixels);
-
- //resizeEvent(nullptr);
}
/**
@@ -627,7 +613,7 @@ void MainWindow::onFrameClicked(ConnectionFrame* frame)
{
_dropMarker->hide();
ConnectionFrame *current = getSelectedFrame();
- // If same frame is clicked again,, do nothing
+ // If same frame is clicked again, do nothing
if (current == frame)
return;
@@ -711,27 +697,27 @@ 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(), &QDialogButtonBox::accepted, this, &MainWindow::onReloadRoomOk);
+ connect(_reloadWindow->buttonBox(), &QDialogButtonBox::rejected, this, &MainWindow::onReloadRoomCancel);
QList<QString> keyList = serverApp->getRooms().keys();
- for (QList<QString>::iterator it = keyList.begin(); it != keyList.end() ; it++) {
- _reloadWindow->ui->roomList->addItem(*it);
+ for (const auto & it : keyList) {
+ _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(), &QDialogButtonBox::accepted, this, &MainWindow::onReloadRoomOk);
+ disconnect(_reloadWindow->buttonBox(), &QDialogButtonBox::rejected, this, &MainWindow::onReloadRoomCancel);
+ _reloadWindow->clearRoomList();
_reloadWindow->hide();
}
void MainWindow::reloadCurrentRoom()
{
/* delete old image */
- if (_backgroundImage != nullptr) {delete _backgroundImage; }
+ delete _backgroundImage;
_backgroundImage = nullptr;
const Room *room = serverApp->getCurrentRoom();
@@ -743,8 +729,8 @@ void MainWindow::reloadCurrentRoom()
/* place connection frames */
for (auto it = room->clientPositions.begin(); it != room->clientPositions.end(); ++it) {
- QString computerId = it.key();
- QPoint pos = it.value();
+ const QString& computerId = it.key();
+ const QPoint& pos = it.value();
ConnectionFrame *cf = createFrame(computerId, &pos, true);
onFrameDropped(cf);
@@ -765,7 +751,7 @@ void MainWindow::reloadCurrentRoom()
qDebug() << "set background image path: " << imgPath;
if (imgPath.endsWith("svg")) {
/* render once with maximal screen size */
- const QSize &s = QApplication::desktop()->screenGeometry().size(); // ui->frmRoom->geometry().size();
+ QSize s = QGuiApplication::screenAt(geometry().center())->size();
QSvgRenderer renderer(imgPath);
_backgroundImage = new QImage(s, QImage::Format_ARGB32);
_backgroundImage->fill(Qt::lightGray); /* background color */
@@ -785,7 +771,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,21 +781,20 @@ 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(), &QDialogButtonBox::accepted, this, &MainWindow::onReloadRoomOk);
+ disconnect(_reloadWindow->buttonBox(), &QDialogButtonBox::rejected, this, &MainWindow::onReloadRoomCancel);
// Delete all clients.
- for (QList<ConnectionFrame*>::iterator it = _clientFrames.begin(); it != _clientFrames.end(); it++) {
- (*it)->hide();
- (*it)->deleteLater();
+ for (auto * frame : _clientFrames) {
+ frame->hide();
+ frame->deleteLater();
}
_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();
}
@@ -865,9 +851,9 @@ void MainWindow::onButtonTutorToAll()
}
// Set all clients as watchers of tutor. Except for the tutors desired source, which hase to be none
- for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it)
- if ((*it)->client() != nullptr)
- (*it)->client()->setDesiredProjectionSource((*it)->client() == getTutorFrame()->client() ? NO_SOURCE : getTutorFrame()->client()->id());
+ for (auto * frame : _clientFrames)
+ if (frame->client() != nullptr)
+ frame->client()->setDesiredProjectionSource(frame->client() == getTutorFrame()->client() ? NO_SOURCE : getTutorFrame()->client()->id());
disableButtons();
_mode = Mode::Broadcast;
@@ -914,7 +900,7 @@ void MainWindow::onButtonTutorToStudent()
disableButtons();
int numClients = 0;
- for (auto c : _clientFrames) {
+ for (auto * c : _clientFrames) {
if (c->client() != nullptr && c->client()->desiredProjectionSource() == sourceClient->id()) {
numClients++;
}
@@ -1036,10 +1022,10 @@ void MainWindow::onButtonLockSingle()
client->lockScreen(newState);
if (!newState) {
// If no more clients are locked, reset button
- for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) {
- if ((*it)->client() == nullptr)
+ for (auto * frame : _clientFrames) {
+ if (frame->client() == nullptr)
continue;
- if ((*it)->client()->isLocked())
+ if (frame->client()->isLocked())
return;
}
ui->action_Lock->setChecked(false);
@@ -1090,8 +1076,8 @@ void MainWindow::onButtonSetAsTutor()
*/
void MainWindow::onClientConnected(Client* client)
{
- connect(client, SIGNAL(authenticating(Client*, ClientLogin*)), this, SLOT(onClientAuthenticating(Client*, ClientLogin*)));
- connect(client, SIGNAL(authenticated(Client*)), this, SLOT(onClientAuthenticated(Client*)));
+ connect(client, &Client::authenticating, this, &MainWindow::onClientAuthenticating);
+ connect(client, &Client::authenticated, this, &MainWindow::onClientAuthenticated);
}
/**
@@ -1106,7 +1092,7 @@ void MainWindow::onClientConnected(Client* client)
*/
void MainWindow::onClientAuthenticating(Client* client, ClientLogin* request)
{
- disconnect(client, SIGNAL(authenticating(Client*, ClientLogin*)), this, SLOT(onClientAuthenticating(Client*, ClientLogin*)));
+ disconnect(client, &Client::authenticating, this, &MainWindow::onClientAuthenticating);
/* copy examMode */
client->setExamMode(request->examMode);
@@ -1117,8 +1103,8 @@ void MainWindow::onClientAuthenticating(Client* client, ClientLogin* request)
int addnum = 1;
do {
inuse = false;
- for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) {
- Client *c = (**it).client();
+ for (auto * frame : _clientFrames) {
+ Client *c = frame->client();
if (c == nullptr)
continue;
if (!c->isAuthed())
@@ -1134,10 +1120,11 @@ void MainWindow::onClientAuthenticating(Client* client, ClientLogin* request)
}
}
} while (inuse && addnum < 100);
- if (inuse)
+ if (inuse) {
request->accept = false;
- else
+ } else {
request->name = check;
+ }
}
/**
@@ -1152,14 +1139,14 @@ void MainWindow::onClientAuthenticating(Client* client, ClientLogin* request)
*/
void MainWindow::onClientAuthenticated(Client* client)
{
- disconnect(client, SIGNAL(authenticated(Client*)), this, SLOT(onClientAuthenticated(Client*)));
- connect(client, SIGNAL(vncServerStateChange(Client*)), this, SLOT(onVncServerStateChange(Client*)));
- connect(client, SIGNAL(vncClientStateChange(Client*)), this, SLOT(onVncClientStateChange(Client*)));
+ disconnect(client, &Client::authenticated, this, &MainWindow::onClientAuthenticated);
+ connect(client, &Client::vncServerStateChange, this, &MainWindow::onVncServerStateChange);
+ connect(client, &Client::vncClientStateChange, this, &MainWindow::onVncClientStateChange);
ConnectionFrame *existing = nullptr;
ConnectionFrame *cf = nullptr;
- for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) {
- if ((*it)->computerId() == client->ip()) {
- existing = *it;
+ for (auto * frame : _clientFrames) {
+ if (frame->computerId() == client->ip()) {
+ existing = frame;
}
}
@@ -1171,7 +1158,7 @@ void MainWindow::onClientAuthenticated(Client* client)
}
cf->assignClient(client);
- connect(client, SIGNAL(disconnected()), this, SLOT(clientCountChanged()));
+ connect(client, &Client::disconnected, this, &MainWindow::clientCountChanged);
tellClientCurrentSituation(client);
clientCountChanged();
}
@@ -1204,13 +1191,13 @@ void MainWindow::onVncServerStateChange(Client* client)
client->lockScreen(false);
} else {
// VNC server stopped on some client or failed to start - reset local pending projection information
- for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) {
- if ((*it)->client() != nullptr) {
- if ((*it)->client()->desiredProjectionSource() == client->id()) {
- (*it)->client()->setDesiredProjectionSource(NO_SOURCE);
- (*it)->client()->stopVncClient();
+ for (auto * frame : _clientFrames) {
+ if (frame->client() != nullptr) {
+ if (frame->client()->desiredProjectionSource() == client->id()) {
+ frame->client()->setDesiredProjectionSource(NO_SOURCE);
+ frame->client()->stopVncClient();
if (_mode == Mode::LockedUnicast)
- (*it)->client()->lockScreen(true);
+ frame->client()->lockScreen(true);
}
}
}
@@ -1251,14 +1238,14 @@ void MainWindow::onVncClientStateChange(Client* client)
* the new connect.
*/
bool serverHasWatchers = false;
- for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it)
- if ((*it)->client() != nullptr)
- if ((*it)->client()->desiredProjectionSource() == client->projectionSource()) {
+ for (auto * frame : _clientFrames)
+ if (frame->client() != nullptr)
+ if (frame->client()->desiredProjectionSource() == client->projectionSource()) {
serverHasWatchers = true;
break;
}
- if ( !serverHasWatchers ) {
+ if (!serverHasWatchers) {
Client* c = getClientFromId(client->projectionSource());
if (c != nullptr)
c->stopVncServer();
diff --git a/src/server/mainwindow/mainwindow.h b/src/server/mainwindow/mainwindow.h
index 86499af..d4967f8 100644
--- a/src/server/mainwindow/mainwindow.h
+++ b/src/server/mainwindow/mainwindow.h
@@ -1,9 +1,7 @@
-#ifndef _MAINWINDOW_H_
-#define _MAINWINDOW_H_
+#ifndef PVS_MAINWINDOW_H_
+#define PVS_MAINWINDOW_H_
-#include <QtWidgets>
#include <QMainWindow>
-#include "../net/client.h"
class SessionNameWindow;
class ConnectionFrame;
@@ -11,6 +9,11 @@ class ListenServer;
class DiscoveryListener;
class HelpWindow;
class ReloadRoomWindow;
+class ClientLogin;
+class Client;
+class ClickLabel;
+
+class QLabel;
namespace Ui
{
@@ -27,8 +30,8 @@ class MainWindow : public QMainWindow
public:
- MainWindow(QWidget *parent = 0);
- ~MainWindow();
+ explicit MainWindow(QWidget *parent = nullptr);
+ ~MainWindow() override;
QRect calcFrameGeometry(ConnectionFrame* frame) const;
@@ -38,24 +41,17 @@ private:
Ui::MainWindow *ui;
SessionNameWindow *_sessionNameWindow;
HelpWindow *_helpWindow;
- ReloadRoomWindow *_reloadWindow;
- QLabel *_sessionNameLabel;
- int _tbIconSize;
- Qt::ToolBarArea _tbArea;
+ ReloadRoomWindow *_reloadWindow;
+ ClickLabel *_sessionNameLabel;
int _tilesX;
int _tilesY;
QImage* _backgroundImage = nullptr;
QLabel* _examModeLabel = nullptr;
-
- /* virtual columns to preserve the aspect ratio of the loaded room */
- int _virtCols;
- int _virtRows;
-
// Button block stuff
QTimer *_buttonLockTimer;
QList<QAction*> _lockingButtons;
- static const qint64 BUTTON_BLOCK_TIME = 2000;
+ static const qint64 BUTTON_BLOCK_TIME = 2000;
// Management stuff
enum class Mode
@@ -66,19 +62,16 @@ private:
LockedUnicast,
None
} _mode;
- int _streamingSource;
+ int _streamingSource{};
QList<ConnectionFrame*> _clientFrames;
QWidget *_dropMarker;
- ListenServer *_listenServer;
- DiscoveryListener *_discoveryListener;
- int _lastClientCount;
+ int _lastClientCount{};
- QPoint closestFreeSlot(const QPoint preferredPixels, const ConnectionFrame* toIgnore);
+ QPoint closestFreeSlot(const QPoint &preferredPixels, const ConnectionFrame* toIgnore);
void placeFrameInFreeSlot(ConnectionFrame* frame, QPoint preferred = QPoint(-1, -1));
ConnectionFrame* createFrame(const QString &computerId = QString(), const QPoint *gridPosition = nullptr, bool fromRoomplan = false);
- void savePosition(ConnectionFrame *cf);
void startVncServerIfNecessary(int from);
void tellClientCurrentSituation(Client* client);
void reset(bool lock = false);
@@ -86,19 +79,19 @@ private:
ConnectionFrame* getTutorFrame();
ConnectionFrame* getSelectedFrame();
- void closeEvent(QCloseEvent *e);
- void changeEvent(QEvent *e);
- void resizeEvent(QResizeEvent *e);
- void mouseReleaseEvent(QMouseEvent* e);
+ void closeEvent(QCloseEvent *e) override;
+ void changeEvent(QEvent *e) override;
+ void resizeEvent(QResizeEvent *e) override;
+ void mouseReleaseEvent(QMouseEvent* e) override;
int getTileWidthPx() const;
int getTileHeightPx() const;
- void updateContextButtonStates();
+ void updateContextButtonStates();
void reloadCurrentRoom();
- void vncOneOnOne(bool exclusive);
+ void vncOneOnOne(bool exclusive);
protected slots:
void disableButtons();
@@ -126,8 +119,8 @@ protected slots:
void onButtonExit();
void onButtonHelp();
// connection frame
- void onFrameMoving(ConnectionFrame* frame);
- void onFrameDropped(ConnectionFrame* frame);
+ void onFrameMoving(ConnectionFrame* frame);
+ void onFrameDropped(ConnectionFrame* frame);
void onFrameClicked(ConnectionFrame* frame);
// Net
void onClientConnected(Client* client);
diff --git a/gui/server_normal/mainwindow.ui b/src/server/mainwindow/mainwindow.ui
index 62b92f7..62b92f7 100644
--- a/gui/server_normal/mainwindow.ui
+++ b/src/server/mainwindow/mainwindow.ui
diff --git a/src/server/net/certmanager.cpp b/src/server/net/certmanager.cpp
index a503088..5f0980b 100644
--- a/src/server/net/certmanager.cpp
+++ b/src/server/net/certmanager.cpp
@@ -18,19 +18,22 @@
#define CERTSTORAGE ".config/openslx/pvs2/"
#include "certmanager.h"
-#include <QMap>
+#include "../../shared/util.h"
+// Remove in future - see comment in util.h
+#undef errorOccurred
+
+#include <QHash>
#include <QDir>
#include <QDebug>
#include <QFileInfo>
-#include <QSettings>
#include <QMessageBox>
-#include <QApplication>
-#include <cstdlib>
+#include <QProcess>
+#include <QCoreApplication>
namespace CertManager
{
-static QMap<QString, QSslCertificate> _certs;
-static QMap<QString, QSslKey> _keys;
+static QHash<QString, QSslCertificate> _certs;
+static QHash<QString, QSslKey> _keys;
static void generateFiles(QString& key, QString& cert);
static bool loadFiles(QString& keyFile, QString& certFile, QSslKey &key, QSslCertificate &cert);
@@ -44,7 +47,7 @@ bool getPrivateKeyAndCert(const QString &name, QSslKey &key, QSslCertificate &ce
}
QString certDir = QDir::homePath().append("/").append(CERTSTORAGE);
if (!QDir::root().mkpath(certDir)) {
- certDir = QString("/tmp/") + QString::number(qrand()) + "-" + QString::number(qrand()) + "/";
+ certDir = QString("/tmp/") + QString::number(slxrand()) + "-" + QString::number(slxrand()) + "/";
QDir::root().mkpath(certDir);
}
QString certFile = certDir.append(name);
@@ -66,11 +69,11 @@ bool getPrivateKeyAndCert(const QString &name, QSslKey &key, QSslCertificate &ce
void fatal()
{
- QMessageBox::critical(nullptr, QCoreApplication::trUtf8("OpenSSL error", "CertManager"),
- QCoreApplication::trUtf8("Could not generate certificates for secure connections.\n"
+ QMessageBox::critical(nullptr, QObject::tr("OpenSSL error", "CertManager"),
+ QObject::tr("Could not generate certificates for secure connections.\n"
"PVS will not work.\n\n"
"Press OK to quit.", "CertManager"));
- qApp->exit(1);
+ QCoreApplication::exit(1);
}
static bool loadFiles(QString& keyFile, QString& certFile, QSslKey &key, QSslCertificate &cert)
@@ -95,14 +98,18 @@ static bool loadFiles(QString& keyFile, QString& certFile, QSslKey &key, QSslCer
static void generateFiles(QString& key, QString& cert)
{
- char tmp[1000];
- remove(key.toLocal8Bit().data());
- remove(cert.toLocal8Bit().data());
- snprintf(tmp, 1000,
- "openssl req -x509 -nodes -days 3650 -newkey rsa:1024 -subj '/C=DE/ST=BaWue/L=Freiburg/CN=openslx.org' -keyout \"%s\" -out \"%s\"",
- key.toLocal8Bit().data(), cert.toLocal8Bit().data());
- system(tmp);
- snprintf(tmp, 1000, "chmod 0600 \"%s\" \"%s\"", key.toLocal8Bit().data(), cert.toLocal8Bit().data());
- system(tmp);
+ QProcess p;
+ QFile::remove(key);
+ QFile::remove(cert);
+ p.setProcessChannelMode(QProcess::ForwardedChannels);
+ p.start(QStringLiteral("openssl"), {
+ "req", "-x509", "-nodes", "-days", "5000", "-newkey", "rsa:4096",
+ "-subj", "/C=DE/ST=BaWue/L=Freiburg/CN=openslx.org",
+ "-keyout", key, "-out", cert
+ });
+ p.waitForFinished();
+ p.start(QStringLiteral("chmod"), { "0600", key, cert });
+ p.waitForFinished(500);
}
+
}
diff --git a/src/server/net/client.cpp b/src/server/net/client.cpp
index 977eb84..51ffb61 100644
--- a/src/server/net/client.cpp
+++ b/src/server/net/client.cpp
@@ -9,46 +9,53 @@
#include "../serverapp/serverapp.h"
#include "../../shared/settings.h"
#include "../../shared/util.h"
+
#include <QPixmap>
#include <cassert>
#include <QNetworkInterface>
+#include <QTcpSocket>
+#include <QSslSocket>
+#include <QTimer>
#define CHALLENGE_LEN 20
int Client::_clientIdCounter = 0;
-Client::Client(QTcpSocket* socket) : _socket(socket)
+Client::Client(QTcpSocket* socket)
+ : _socket(socket)
{
assert(socket != nullptr);
- _authed = 0;
- _projectionSource = 0;
_desiredSource = NO_SOURCE;
- _isActiveVncClient = false;
- _vncPort = 0;
- _isTutor = false;
- _locked = false;
- _wantsAttention = false;
-
+ _socket->setParent(nullptr);
_id = ++_clientIdCounter;
//_ip = _socket->peerAddress().toString();
qDebug("*** Client %s created.", qPrintable(_socket->peerAddress().toString()));
// Connect important signals
- connect(_socket, SIGNAL(disconnected()),
- this, SLOT(disconnect()));
- connect(_socket, SIGNAL(error(QAbstractSocket::SocketError)),
- this, SLOT(disconnect()));
- connect(_socket, SIGNAL(sslErrors(const QList<QSslError> &)),
- this, SLOT(disconnect()));
- connect(_socket, SIGNAL(readyRead()),
- this, SLOT(onDataArrival()));
+ connect(_socket, &QTcpSocket::disconnected,
+ [this]() {
+ this->disconnect("Client closed connection");
+ });
+ connect(_socket, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::errorOccurred),
+ [this](QAbstractSocket::SocketError) {
+ this->disconnect("Client socket error");
+ });
+ auto *ssl = qobject_cast<QSslSocket*>(_socket);
+ if (ssl != nullptr) {
+ connect(ssl, QOverload<const QList<QSslError> &>::of(&QSslSocket::sslErrors),
+ [this](const QList<QSslError> &) {
+ this->disconnect("Client SSL Errors");
+ });
+ }
+ connect(_socket, &QTcpSocket::readyRead,
+ this, &Client::onDataArrival);
// Send challenge
_challenge.resize(CHALLENGE_LEN);
for (int i = 0; i < CHALLENGE_LEN; ++i) {
- _challenge[i] = char(qrand() & 0xff);
+ _challenge[i] = char(slxrand() & 0xff);
}
- NetworkMessage msgChlng;
- msgChlng.setField(_ID, _CHALLENGE);
- msgChlng.setField(_CHALLENGE, _challenge);
- msgChlng.writeMessage(_socket);
+ NetworkMessage msgChallenge;
+ msgChallenge.setField(_ID, _CHALLENGE);
+ msgChallenge.setField(_CHALLENGE, _challenge);
+ msgChallenge.writeMessage(_socket);
// give client 3 seconds to complete handshake
_timerIdAuthTimeout = startTimer(3000);
_timerPingTimeout = startTimer(3000);
@@ -58,22 +65,25 @@ Client::Client(QTcpSocket* socket) : _socket(socket)
Client::~Client()
{
qDebug() << "*** Client" << _host << " destroyed.";
- _socket->deleteLater();
+ _socket->blockSignals(true);
+ QTcpSocket *sck = _socket;
+ QTimer::singleShot(10, [sck]() {
+ sck->deleteLater();
+ });
}
void Client::timerEvent(QTimerEvent* event)
{
if (event->timerId() == _timerPingTimeout) {
if (_pingTimeout < QDateTime::currentMSecsSinceEpoch()) {
- qDebug() << "Client" << _socket->peerAddress().toString() << "has a ping timeout.";
killTimer(_timerPingTimeout);
- this->disconnect();
+ this->disconnect("Disconnecting client because of ping timeout");
}
} else if (event->timerId() == _timerIdAuthTimeout) {
// Client did not send login request within 3 seconds
killTimer(_timerIdAuthTimeout);
_timerIdAuthTimeout = 0;
- this->disconnect();
+ this->disconnect("Did not authenticate withing three seconds");
} else
killTimer(event->timerId());
}
@@ -122,7 +132,7 @@ void Client::onDataArrival()
while (_socket->bytesAvailable() > 0) {
int ret = _fromClient.readMessage(_socket); // let the message read data from socket
if (ret == NM_READ_FAILED) { // error parsing msg, disconnect client!
- this->disconnect();
+ this->disconnect("Malformed message received from client.");
return;
}
if (ret == NM_READ_INCOMPLETE)
@@ -210,8 +220,7 @@ void Client::handleMsg()
// emit event, see if request is accepted
emit authenticating(this, &request);
if (!request.accept) {
- qDebug("Request denied.");
- this->disconnect(); // Nope
+ this->disconnect("Login request denied."); // Nope
return;
}
// Accepted
@@ -236,10 +245,7 @@ void Client::handleMsg()
if (genSha1(&serverApp->sessionNameArray(), &_challenge) != hash
&& !(serverApp->getCurrentRoom()->clientPositions.contains(_socket->peerAddress().toString()))) {
// Challenge reply is invalid, drop client
- NetworkMessage msgErr;
- msgErr.buildErrorMessage("Challenge reply invalid.");
- msgErr.writeMessage(_socket);
- this->disconnect();
+ this->disconnect("Challenge reply invalid.");
return;
}
// Now answer to challenge by client
@@ -302,7 +308,7 @@ void Client::stopVncClient()
* Checks if client and manager runs on same machine.
* @return Return true, if pvsmanager is running on client.
*/
-bool Client::isManagerMachine()
+bool Client::isManagerMachine() const
{
foreach (const QHostAddress & address, QNetworkInterface::allAddresses())
if (address != QHostAddress(QHostAddress::LocalHost)
@@ -326,11 +332,21 @@ void Client::lockScreen(bool lock)
emit stateChanged();
}
-void Client::disconnect()
+void Client::disconnect(const char *errmsg)
{
- qDebug("*** Client %s disconnected.", qPrintable(_socket->peerAddress().toString()));
+ qDebug() << "*** Client" << _socket->peerAddress().toString() << "disconnected:" << errmsg;
+ if (_socket->state() == QAbstractSocket::ConnectedState) {
+ NetworkMessage msgErr;
+ msgErr.buildErrorMessage(errmsg);
+ msgErr.writeMessage(_socket);
+ _socket->flush();
+ }
_socket->blockSignals(true);
- _socket->abort();
this->deleteLater();
emit disconnected();
}
+
+QString Client::ip() const
+{
+ return _socket->peerAddress().toString();
+}
diff --git a/src/server/net/client.h b/src/server/net/client.h
index 3d5158b..5a4ac79 100644
--- a/src/server/net/client.h
+++ b/src/server/net/client.h
@@ -1,13 +1,13 @@
#ifndef CLIENT_H_
#define CLIENT_H_
-#include <QtCore>
-#include <QHostAddress>
-#include <QAbstractSocket>
-#include <QTcpSocket>
#include "../../shared/networkmessage.h"
+#include <QByteArray>
+
//class QSslSocket;
+class QTcpSocket;
+class Client;
#define NO_SOURCE 0
@@ -26,32 +26,32 @@ class Client : public QObject
public:
explicit Client(QTcpSocket* socket);
- ~Client();
+ ~Client() override;
// Getters
- inline bool isAuthed() const { return _authed == 2; }
- inline const QString& name() const { return _name; }
- inline const QString& host() const { return _host; }
- inline const QString ip() const { return _socket->peerAddress().toString(); }
- inline int id() const { return _id; }
- inline bool isActiveVncClient() const { return _isActiveVncClient; }
- inline bool isActiveVncServer() const { return _vncPort > 0; }
- inline bool isLocked() const { return _locked; }
- inline int desiredProjectionSource() const { return _desiredSource; }
- inline int projectionSource() const { return _projectionSource; }
- inline int isExamMode() const { return _isExamMode; }
- inline bool wantsAttention() const { return _wantsAttention; }
- inline void removeAttention() { if (!_wantsAttention) return; removeAttentionInternal(); }
+ bool isAuthed() const { return _authed == 2; }
+ const QString& name() const { return _name; }
+ const QString& host() const { return _host; }
+ QString ip() const;
+ int id() const { return _id; }
+ bool isActiveVncClient() const { return _isActiveVncClient; }
+ bool isActiveVncServer() const { return _vncPort > 0; }
+ bool isLocked() const { return _locked; }
+ int desiredProjectionSource() const { return _desiredSource; }
+ int projectionSource() const { return _projectionSource; }
+ int isExamMode() const { return _isExamMode; }
+ bool wantsAttention() const { return _wantsAttention; }
+ void removeAttention() { if (!_wantsAttention) return; removeAttentionInternal(); }
// Setters
- inline void setTutor(bool enable) { _isTutor = enable; }
- inline void setDesiredProjectionSource(int id) {_desiredSource = id;}
- inline void setExamMode(bool mode) { _isExamMode = mode; }
+ void setTutor(bool enable) { _isTutor = enable; }
+ void setDesiredProjectionSource(int id) { _desiredSource = id; }
+ void setExamMode(bool mode) { _isExamMode = mode; }
//Send message stuff
void startVncServer();
void stopVncServer();
- void startVncClient(Client const * const to );
+ void startVncClient(const Client * to);
void stopVncClient();
void lockScreen(bool);
void requestThumb(const QSize& size);
@@ -59,8 +59,8 @@ public:
private:
QTcpSocket * const _socket;
- bool _locked;
- int _authed; // 0 = challenge sent, awaiting reply 1 = challenge ok, client challenge replied, awaiting login, 2 = ESTABLISHED
+ bool _locked{};
+ int _authed{}; // 0 = challenge sent, awaiting reply 1 = challenge ok, client challenge replied, awaiting login, 2 = ESTABLISHED
QString _name;
QString _host;
QByteArray _challenge;
@@ -69,26 +69,26 @@ private:
int _timerIdAuthTimeout, _timerPingTimeout;
int _id; // this client's unique id
QString _vncRwPass, _vncRoPass;
- int _vncPort; // VNCserver state. Greater 0 -> active on this port. Equals 0 -> no server.
+ int _vncPort{}; // VNCserver state. Greater 0 -> active on this port. Equals 0 -> no server.
int _desiredSource; // The source the client shall be connected to
- int _projectionSource; // The source the client was or is connected to (depends on _isActiveVncClient)
- bool _isActiveVncClient; // VNCclient state. indicating that the client is displaying a remote screen via VNC
- bool _isTutor; // Flag indicating that the client has been set as a tutor
- bool _isExamMode;
- bool _wantsAttention; // Flag telling whether the client activated the "i want attention" button
+ int _projectionSource{}; // The source the client was or is connected to (depends on _isActiveVncClient)
+ bool _isActiveVncClient{}; // VNCclient state. indicating that the client is displaying a remote screen via VNC
+ bool _isTutor{}; // Flag indicating that the client has been set as a tutor
+ bool _isExamMode{};
+ bool _wantsAttention{}; // Flag telling whether the client activated the "i want attention" button
QByteArray _rawRemoteScreen;
static int _clientIdCounter;
- bool isManagerMachine();
+ bool isManagerMachine() const;
void handleMsg();
void sendMessage(NetworkMessage& message);
void removeAttentionInternal();
protected:
- void timerEvent(QTimerEvent* event);
+ void timerEvent(QTimerEvent* event) override;
signals:
void authenticating(Client* client, ClientLogin* request);
@@ -101,7 +101,7 @@ signals:
private slots:
void onDataArrival(); // triggered if data is available for reading
- void disconnect();
+ void disconnect(const char *errmsg);
};
diff --git a/src/server/net/discoverylistener.cpp b/src/server/net/discoverylistener.cpp
index 76c0f52..9586a71 100644
--- a/src/server/net/discoverylistener.cpp
+++ b/src/server/net/discoverylistener.cpp
@@ -29,23 +29,20 @@
/**
* @brief DiscoveryListener::DiscoveryListener
*/
-DiscoveryListener::DiscoveryListener() :
- _socket(this), _counterResetPos(0)
+DiscoveryListener::DiscoveryListener(QObject *parent)
+ : QObject(parent), _socket(this)
{
- if (!_socket.bind(QHostAddress::AnyIPv4, SERVICE_DISCOVERY_PORT))
+ if (!_socket.bind(QHostAddress::AnyIPv4, SERVICE_DISCOVERY_PORT)) {
qFatal("Could not bind to service discovery port %d", int(SERVICE_DISCOVERY_PORT));
- connect(&_socket, SIGNAL(readyRead()), this, SLOT(onReadyRead()));
- for (int i = 0; i < SD_PACKET_TABLE_SIZE; ++i)
- _packetCounter[i] = 0;
+ }
+ connect(&_socket, &QUdpSocket::readyRead, this, &DiscoveryListener::onReadyRead);
startTimer((SPAM_MODERATE_AT_ONCE * SPAM_MODERATE_INTERVAL) / SD_PACKET_TABLE_SIZE + 1);
}
/**
* @brief DiscoveryListener::~DiscoveryListener
*/
-DiscoveryListener::~DiscoveryListener()
-{
-}
+DiscoveryListener::~DiscoveryListener() = default;
/**
* @brief hash
@@ -57,8 +54,8 @@ static quint16 hash(const QHostAddress& host)
static quint16 seed1 = 0, seed2 = 0;
while (seed1 == 0) { // Make sure the algorithm uses different seeds each time the program is
// run to prevent hash collision attacks
- seed1 = quint16(qrand() & 0xffff);
- seed2 = quint16(qrand() & 0xffff);
+ seed1 = quint16(slxrand() & 0xffff);
+ seed2 = quint16(slxrand() & 0xffff);
}
quint8 data[16], len;
if (host.protocol() == QAbstractSocket::IPv4Protocol) {
@@ -79,8 +76,8 @@ static quint16 hash(const QHostAddress& host)
} else {
// Durr?
len = 2;
- data[0] = quint8(qrand());
- data[1] = quint8(qrand());
+ data[0] = quint8(slxrand());
+ data[1] = quint8(slxrand());
}
quint16 result = 0;
quint16 mod = seed1;
@@ -131,15 +128,17 @@ void DiscoveryListener::onReadyRead()
continue;
const quint16 bucket = hash(addr) % SD_PACKET_TABLE_SIZE;
if (_packetCounter[bucket] > SPAM_CUTOFF) {
- qDebug() << "SD: Potential (D)DoS from " << _socket.peerAddress().toString();
+ qDebug() << "SD: Potential (D)DoS from " << addr.toString();
// emit some signal and pop up a big warning that someone is flooding/ddosing the PVS SD
// ... on the other hand, will the user understand? ;)
continue;
}
++_packetCounter[bucket];
_packet.reset();
- if (_packet.readMessage(data, quint32(size)) != NM_READ_OK)
+ if (_packet.readMessage(data, quint32(size)) != NM_READ_OK) {
+ qDebug() << "Corrupted service discovery message from" << addr.toString();
continue;
+ }
// Valid packet, process it:
const QByteArray iplist(_packet.getFieldBytes(_IPLIST));
const QByteArray hash(_packet.getFieldBytes(_HASH));
@@ -149,12 +148,16 @@ void DiscoveryListener::onReadyRead()
if (salt1.size() < 16 || salt2.size() < 16)
continue; // To make this more secure, you could remember the last X salts used, and ignore new packets using the same
// Check if the source IP of the packet matches any of the addresses given in the IP list
- if (!Network::isAddressInList(QString::fromUtf8(iplist), addr.toString()))
+ if (!Network::isAddressInList(QString::fromUtf8(iplist), addr.toString())) {
+ qDebug() << "SD: Client" << addr.toString() << "did not supply IP in list:" << iplist;
continue;
+ }
// If so, check if the submitted hash seems valid
if (genSha1(&serverApp->sessionNameArray(), &salt1, &iplist) != hash &&
!(serverApp->getCurrentRoom()->clientPositions.contains(addr.toString()))) {
// did not match local session name and client is not in same room.
+ qDebug() << "SD: Mismatch, neither session name match, nor client for current room" << serverApp->getCurrentRoom()->tutorIP;
+ qDebug() << "SD: Allowed clients from room:" << serverApp->getCurrentRoom()->clientPositions.keys();
continue;
}
@@ -162,7 +165,7 @@ void DiscoveryListener::onReadyRead()
QByteArray myiplist(Network::interfaceAddressesToString().toUtf8());
QSslKey key;
QSslCertificate cert;
- if (!CertManager::getPrivateKeyAndCert("manager", key, cert)) {
+ if (!CertManager::getPrivateKeyAndCert("manager2", key, cert)) {
if (++certFails > 5) {
CertManager::fatal();
}
diff --git a/src/server/net/discoverylistener.h b/src/server/net/discoverylistener.h
index 64d4351..47a4295 100644
--- a/src/server/net/discoverylistener.h
+++ b/src/server/net/discoverylistener.h
@@ -8,12 +8,14 @@
#ifndef DISCOVERYLISTENER_H_
#define DISCOVERYLISTENER_H_
-#include <QtCore>
+#include <QObject>
#include <QUdpSocket>
#include "../../shared/networkmessage.h"
#define SD_PACKET_TABLE_SIZE 20000
+class QTimerEvent;
+
class DiscoveryListener : public QObject
{
Q_OBJECT
@@ -21,16 +23,16 @@ class DiscoveryListener : public QObject
private:
QUdpSocket _socket;
NetworkMessage _packet;
- int _counterResetPos;
+ int _counterResetPos{};
- quint8 _packetCounter[SD_PACKET_TABLE_SIZE]; // count packets per source address to ignore spammers
+ quint8 _packetCounter[SD_PACKET_TABLE_SIZE]{}; // count packets per source address to ignore spammers
protected:
- void timerEvent(QTimerEvent* event);
+ void timerEvent(QTimerEvent* event) override;
public:
- DiscoveryListener();
- virtual ~DiscoveryListener();
+ explicit DiscoveryListener(QObject *parent);
+ ~DiscoveryListener() override;
private slots:
void onReadyRead();
diff --git a/src/server/net/filedownloader.cpp b/src/server/net/filedownloader.cpp
deleted file mode 100644
index b930869..0000000
--- a/src/server/net/filedownloader.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * FileDownloader.cpp
- *
- * Created on: Mar 7, 2014
- * Author: nils
- */
-
-#include <QFileInfo>
-
-#include "filedownloader.h"
-
-FileDownloader::FileDownloader(QObject *parent) :
- QObject(parent)
-{
- connect(&m_WebCtrl, SIGNAL(finished(QNetworkReply*)),
- SLOT(fileDownloaded(QNetworkReply*)));
-}
-
-FileDownloader::~FileDownloader()
-{
-
-}
-
-void FileDownloader::connectSlot(QObject* obj, const char* slot)
-{
- QObject::connect(this, SIGNAL(downloaded(QByteArray&)),
- obj, slot);
-}
-
-void FileDownloader::fileDownloaded(QNetworkReply* pReply)
-{
- QByteArray downloadedData = pReply->readAll();
- //emit a signal
- pReply->deleteLater();
- emit downloaded(downloadedData);
-}
-
-void FileDownloader::downloadFile(const QUrl& fileUrl)
-{
- m_WebCtrl.get(QNetworkRequest(fileUrl));
-}
diff --git a/src/server/net/filedownloader.h b/src/server/net/filedownloader.h
deleted file mode 100644
index 227af50..0000000
--- a/src/server/net/filedownloader.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * filedownloader.h
- *
- * Created on: Mar 7, 2014
- * Author: nils
- */
-
-#ifndef FILEDOWNLOADER_H_
-#define FILEDOWNLOADER_H_
-
-#include <QObject>
-#include <QByteArray>
-#include <QNetworkAccessManager>
-#include <QNetworkRequest>
-#include <QNetworkReply>
-
-class FileDownloader : public QObject
-{
- Q_OBJECT
-public:
- explicit FileDownloader(QObject *parent = 0);
-
- virtual ~FileDownloader();
-
- void downloadFile(const QUrl& fileUrl);
-
- void connectSlot(QObject* obj, const char* slot);
-
- QByteArray downloadedData() const;
-
-signals:
- void downloaded(QByteArray& downloadedData);
-
-private slots:
-
- void fileDownloaded(QNetworkReply* pReply);
-
-private:
-
- QNetworkAccessManager m_WebCtrl;
-
-};
-
-#endif /* FILEDOWNLOADER_H_ */
diff --git a/src/server/net/listenserver.cpp b/src/server/net/listenserver.cpp
index 0438fb4..27a1412 100644
--- a/src/server/net/listenserver.cpp
+++ b/src/server/net/listenserver.cpp
@@ -1,18 +1,20 @@
#include "listenserver.h"
#include "client.h"
+
#include <QSslSocket>
-#define MAX_CLIENTS 50
/**
* Initialize listenServer to listen on specific port.
* And connect Signal newConnection() with Slot newClientConnection().
* @param port
*/
-ListenServer::ListenServer(quint16 port)
+ListenServer::ListenServer(quint16 port, QObject *parent)
+ : QObject(parent)
+ , _server(this)
{
if (!_server.listen(QHostAddress::AnyIPv4, port) || !_server.isListening())
qFatal("Cannot bind to TCP port %d (incoming SSL clients)", int(port));
- connect(&_server, SIGNAL(newConnection()), this, SLOT(newClientConnection()));
+ connect(&_server, &SslServer::newConnection, this, &ListenServer::newClientConnection);
}
ListenServer::~ListenServer()
@@ -32,7 +34,7 @@ void ListenServer::newClientConnection()
{
QTcpSocket* sock;
while ((sock = _server.nextPendingConnection()) != nullptr) {
- Client* client = new Client(sock); // TODO: what happens with disconnected clients
+ auto* client = new Client(sock); // TODO: what happens with disconnected clients
emit newClient(client);
}
}
diff --git a/src/server/net/listenserver.h b/src/server/net/listenserver.h
index 640da23..4ad363d 100644
--- a/src/server/net/listenserver.h
+++ b/src/server/net/listenserver.h
@@ -18,8 +18,8 @@ private:
SslServer _server;
public:
- explicit ListenServer(quint16 port);
- virtual ~ListenServer();
+ explicit ListenServer(quint16 port, QObject *parent);
+ ~ListenServer() override;
private slots:
void newClientConnection();
diff --git a/src/server/net/sslserver.cpp b/src/server/net/sslserver.cpp
index d968834..2dfa84c 100644
--- a/src/server/net/sslserver.cpp
+++ b/src/server/net/sslserver.cpp
@@ -21,7 +21,9 @@
#include "certmanager.h"
#include <unistd.h>
-SslServer::SslServer() : QTcpServer(nullptr), _timer(new QTimer(this))
+SslServer::SslServer(QObject *parent)
+ : QTcpServer(parent)
+ , _timer(new QTimer(this))
{
connect(_timer, &QTimer::timeout, [=]() {
if (_pending.empty())
@@ -43,9 +45,11 @@ SslServer::SslServer() : QTcpServer(nullptr), _timer(new QTimer(this))
SslServer::~SslServer()
{
_timer->stop();
- for (QSslSocket *sock : _pending.keys()) {
+ auto keys = _pending.keys();
+ for (QSslSocket *sock : keys) {
sock->deleteLater();
}
+ _pending.clear();
}
/**
@@ -57,14 +61,14 @@ void SslServer::incomingConnection(qintptr socketDescriptor)
static int certFails = 0;
QSslKey key;
QSslCertificate cert;
- if (!CertManager::getPrivateKeyAndCert("manager", key, cert)) {
+ if (!CertManager::getPrivateKeyAndCert("manager2", key, cert)) {
if (++certFails > 5) {
CertManager::fatal();
}
::close(int(socketDescriptor));
return;
}
- QSslSocket *serverSocket = new QSslSocket(nullptr);
+ auto *serverSocket = new QSslSocket(nullptr);
connect(serverSocket, QOverload<const QList<QSslError> &>::of(&QSslSocket::sslErrors), this, &SslServer::sslErrors);
serverSocket->setPrivateKey(key);
serverSocket->setLocalCertificate(cert);
@@ -93,8 +97,8 @@ void SslServer::incomingConnection(qintptr socketDescriptor)
void SslServer::sslErrors(const QList<QSslError>& errors)
{
qDebug() << "Client caused sslErrors before connection:";
- for (QList<QSslError>::const_iterator it = errors.begin(); it != errors.end(); it++) {
- qDebug() << it->errorString();
+ for (const auto & error : errors) {
+ qDebug() << error.errorString();
}
}
diff --git a/src/server/net/sslserver.h b/src/server/net/sslserver.h
index 03d947a..c74e56c 100644
--- a/src/server/net/sslserver.h
+++ b/src/server/net/sslserver.h
@@ -35,11 +35,11 @@ private slots:
void sslErrors ( const QList<QSslError> & errors );
public:
- explicit SslServer();
- virtual ~SslServer();
+ explicit SslServer(QObject *parent);
+ ~SslServer() override;
protected:
- void incomingConnection(qintptr handle);
+ void incomingConnection(qintptr handle) override;
QHash<QSslSocket*, qint64> _pending; // Queue for connected but unencrypted connections
QTimer* _timer;
};
diff --git a/src/server/numerickeyboard/numerickeyboard.cpp b/src/server/numerickeyboard/numerickeyboard.cpp
index d819a58..e6677aa 100644
--- a/src/server/numerickeyboard/numerickeyboard.cpp
+++ b/src/server/numerickeyboard/numerickeyboard.cpp
@@ -1,10 +1,5 @@
-#include "src/server/numerickeyboard/numerickeyboard.h"
+#include "numerickeyboard.h"
#include "ui_numerickeyboard.h"
-#include <iostream>
-
-using std::cout;
-using std::endl;
-
NumericKeyboard::NumericKeyboard(QWidget *parent) :
QGroupBox(parent),
@@ -12,20 +7,20 @@ NumericKeyboard::NumericKeyboard(QWidget *parent) :
{
ui->setupUi(this);
/* das geht leider nicht ? */
-// connect(ui->button_0, SIGNAL (clicked(bool)), this, SLOT (relayDigit(0)));
+// connect(ui->button_0, &QPushButton::clicked, this, &NumericKeyboard::relayDigit);
- connect(ui->button_0, SIGNAL (clicked(bool)), this, SLOT (relayDigit0()));
- connect(ui->button_1, SIGNAL (clicked(bool)), this, SLOT (relayDigit1()));
- connect(ui->button_2, SIGNAL (clicked(bool)), this, SLOT (relayDigit2()));
- connect(ui->button_3, SIGNAL (clicked(bool)), this, SLOT (relayDigit3()));
- connect(ui->button_4, SIGNAL (clicked(bool)), this, SLOT (relayDigit4()));
- connect(ui->button_5, SIGNAL (clicked(bool)), this, SLOT (relayDigit5()));
- connect(ui->button_6, SIGNAL (clicked(bool)), this, SLOT (relayDigit6()));
- connect(ui->button_7, SIGNAL (clicked(bool)), this, SLOT (relayDigit7()));
- connect(ui->button_8, SIGNAL (clicked(bool)), this, SLOT (relayDigit8()));
- connect(ui->button_9, SIGNAL (clicked(bool)), this, SLOT (relayDigit9()));
+ connect(ui->button_0, &QPushButton::clicked, this, &NumericKeyboard::relayDigit0);
+ connect(ui->button_1, &QPushButton::clicked, this, &NumericKeyboard::relayDigit1);
+ connect(ui->button_2, &QPushButton::clicked, this, &NumericKeyboard::relayDigit2);
+ connect(ui->button_3, &QPushButton::clicked, this, &NumericKeyboard::relayDigit3);
+ connect(ui->button_4, &QPushButton::clicked, this, &NumericKeyboard::relayDigit4);
+ connect(ui->button_5, &QPushButton::clicked, this, &NumericKeyboard::relayDigit5);
+ connect(ui->button_6, &QPushButton::clicked, this, &NumericKeyboard::relayDigit6);
+ connect(ui->button_7, &QPushButton::clicked, this, &NumericKeyboard::relayDigit7);
+ connect(ui->button_8, &QPushButton::clicked, this, &NumericKeyboard::relayDigit8);
+ connect(ui->button_9, &QPushButton::clicked, this, &NumericKeyboard::relayDigit9);
- connect(ui->button_del, SIGNAL (clicked(bool)), this, SLOT(relayDelete()));
+ connect(ui->button_del, &QPushButton::clicked, this, &NumericKeyboard::relayDelete);
}
NumericKeyboard::~NumericKeyboard()
diff --git a/src/server/numerickeyboard/numerickeyboard.h b/src/server/numerickeyboard/numerickeyboard.h
index 3ece99c..6db3de3 100644
--- a/src/server/numerickeyboard/numerickeyboard.h
+++ b/src/server/numerickeyboard/numerickeyboard.h
@@ -14,7 +14,7 @@ class NumericKeyboard : public QGroupBox
public:
explicit NumericKeyboard(QWidget *parent = 0);
- ~NumericKeyboard();
+ ~NumericKeyboard() override;
private:
Ui::NumericKeyboard *ui;
diff --git a/gui/server_normal/numerickeyboard.ui b/src/server/numerickeyboard/numerickeyboard.ui
index 2f83a2b..2f83a2b 100644
--- a/gui/server_normal/numerickeyboard.ui
+++ b/src/server/numerickeyboard/numerickeyboard.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..67c2a94 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);
- ~ReloadRoomWindow();
- Ui::ReloadRoom *ui;
+ explicit ReloadRoomWindow(QWidget *parent = nullptr);
+ ~ReloadRoomWindow() override;
+
+ QDialogButtonBox* buttonBox() const;
+
+ void addRoom(const QString &roomName);
- // void show();
+ void clearRoomList();
+
+ QString currentRoom() const;
private:
+ Ui::ReloadRoom *ui;
+
};
#endif
diff --git a/gui/server_normal/reloadroom.ui b/src/server/reloadroomwindow/reloadroomwindow.ui
index 2fb723e..2fb723e 100644
--- a/gui/server_normal/reloadroom.ui
+++ b/src/server/reloadroomwindow/reloadroomwindow.ui
diff --git a/src/server/serverapp/serverapp.cpp b/src/server/serverapp/serverapp.cpp
index 2cc237a..c91ed15 100644
--- a/src/server/serverapp/serverapp.cpp
+++ b/src/server/serverapp/serverapp.cpp
@@ -1,15 +1,16 @@
+#include "../mainwindow/mainwindow.h"
+#include "serverapp.h"
+#include "../../shared/util.h"
+
#include <QTranslator>
#include <QNetworkInterface>
-
-#include "serverapp.h"
+#include <QSettings>
+#include <QLibraryInfo>
static QSize minimalGridSize(const QMap<QString, QPoint>& clientPositions, QSize& clientSize);
ServerApp::ServerApp(int& argc, char** argv)
- : QApplication(argc, argv),
- _mainWindow(nullptr),
- _managerOnly(false),
- _isExam(false)
+ : QApplication(argc, argv)
{
setOrganizationName("openslx");
setOrganizationDomain("openslx.org");
@@ -21,20 +22,20 @@ ServerApp::ServerApp(int& argc, char** argv)
// If started in manager-only mode, and there is no current room
// after reading the config, exit right away
- if (_managerOnly && _currentRoom == "") {
- ::exit(0);
+ if (_managerOnly && _currentRoom.isEmpty()) {
+ _doExit = true;
return;
}
// System strings
- QTranslator *qtTranslator = new QTranslator(this);
+ auto *qtTranslator = new QTranslator(this);
if (!qtTranslator->load(QLocale::system(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
qDebug() << "Loading system translations failed" << QLibraryInfo::location(QLibraryInfo::TranslationsPath);
} else {
installTranslator(qtTranslator);
}
// App specific
- QTranslator *translator = new QTranslator(this);
+ auto *translator = new QTranslator(this);
if (!translator->load(QLocale::system(), ":", "l_")) {
qDebug() << "Loading app translations failed";
} else {
@@ -43,20 +44,20 @@ ServerApp::ServerApp(int& argc, char** argv)
/* Set the global path of the settings */
QSettings::setPath(QSettings::IniFormat, QSettings::SystemScope, "/opt/");
- QSharedPointer<QSettings> sys = getSettings();
+ QSettings* sys = getSettings();
qDebug() << "System settings are in:" << sys->fileName();
- _mainWindow = new MainWindow();
+ new MainWindow();
}
QStringList ServerApp::parseParameters()
{
QStringList rest;
- for (QString a : QApplication::arguments()) {
- if (a == "--manager-only") {
+ for (const QString& a : QApplication::arguments()) {
+ if (a == QStringLiteral("--manager-only")) {
_managerOnly = true;
break;
- } else if (a.startsWith("--config=")) {
+ } else if (a.startsWith(QStringLiteral("--config="))) {
_iniPath = a.mid(9);
} else {
rest << a;
@@ -73,17 +74,20 @@ QStringList ServerApp::arguments()
void ServerApp::loadRooms()
{
- QSharedPointer<QSettings> conf = getSettings();
+ QSettings* conf = getSettings();
- if (!conf->contains("rooms")) { qDebug() << "Invalid config file (no rooms are set)!"; return; }
+ if (!conf->contains(QStringLiteral("rooms"))) {
+ qDebug() << "Invalid config file (no rooms are set)!";
+ return;
+ }
QStringList rooms = conf->value("rooms").toStringList();
- for (QString roomId : rooms) {
+ for (const QString& roomId : rooms) {
conf->beginGroup(roomId);
QString roomName = conf->value("name").toString();
/* fallback to the old format where the room id was actually just the name */
- if (roomName == "") {
+ if (roomName.isEmpty()) {
roomName = roomId;
}
if (!conf->contains("mgrIP")) {
@@ -114,8 +118,8 @@ void ServerApp::loadRooms()
}
foreach (const QHostAddress & address, QNetworkInterface::allAddresses()) {
- if (address != QHostAddress(QHostAddress::LocalHost) && mgrIP == address.toString()) {
- qDebug("Found this ip in config.");
+ if (!address.isBroadcast() && !address.isLoopback() && !address.isMulticast() && mgrIP == address.toString()) {
+ qDebug() << "Found own ip in config.";
_currentRoom = roomName;
}
}
@@ -133,18 +137,17 @@ void ServerApp::loadRooms()
}
}
-const Room* ServerApp::getCurrentRoom()
+const Room* ServerApp::getCurrentRoom() const
{
- if (_rooms.contains(_currentRoom)) {
- return _rooms[_currentRoom];
- } else {
- static Room* defaultRoom = nullptr;
- if (defaultRoom == nullptr) {
- defaultRoom = new Room(QMap<QString,
- QPoint>(), QSize(8, 6), QSize(1, 1), "", "");
- }
- return defaultRoom;
+ auto *room = _rooms.value(_currentRoom);
+ if (room != nullptr)
+ return room;
+ static Room* defaultRoom = nullptr;
+ if (defaultRoom == nullptr) {
+ defaultRoom = new Room(QMap<QString,
+ QPoint>(), QSize(8, 6), QSize(1, 1), "", "<none>");
}
+ return defaultRoom;
}
void ServerApp::setSessionName(const QString& name)
{
@@ -154,20 +157,20 @@ void ServerApp::setSessionName(const QString& name)
void ServerApp::setSessionName()
{
- const QString name = QString::number(qrand() % 9000 + 1000);
+ const QString name = QString::number(slxrand() % 9000 + 1000);
_sessionName = name;
_sessionNameArray = name.toUtf8();
}
-QSharedPointer<QSettings> ServerApp::getSettings()
+QSettings * ServerApp::getSettings()
{
- QSharedPointer<QSettings> set;
- if (_iniPath == "") {
+ QSettings *set;
+ if (_iniPath.isEmpty()) {
/* default location (system scope) */
- set = QSharedPointer<QSettings>(new QSettings(QSettings::IniFormat, QSettings::SystemScope, "openslx/pvs2", "pvs2"));
+ set = new QSettings(QSettings::IniFormat, QSettings::SystemScope, "openslx/pvs2", "pvs2", this);
} else {
/* use _iniPath to find ini file */
- set = QSharedPointer<QSettings>(new QSettings(_iniPath, QSettings::IniFormat));
+ set = new QSettings(_iniPath, QSettings::IniFormat, this);
}
set->setIniCodec("UTF-8");
return set;
@@ -182,14 +185,15 @@ static QSize minimalGridSize(const QMap<QString, QPoint>& clientPositions, QSize
int x = 0;
int y = 0;
- for (auto it = clientPositions.begin(); it != clientPositions.end(); ++it) {
- QPoint pos = it.value();
- if (pos.x() > x) { x = pos.x(); }
- if (pos.y() > y) { y = pos.y(); }
-
+ for (const auto &pos : clientPositions) {
+ if (pos.x() > x) {
+ x = pos.x();
+ }
+ if (pos.y() > y) {
+ y = pos.y();
+ }
}
/* need a little extra space */
- QSize size(x + clientSize.width(), y + clientSize.height());
- return size;
+ return QSize(x + clientSize.width(), y + clientSize.height());
}
diff --git a/src/server/serverapp/serverapp.h b/src/server/serverapp/serverapp.h
index e0a1351..3cb40b5 100644
--- a/src/server/serverapp/serverapp.h
+++ b/src/server/serverapp/serverapp.h
@@ -5,10 +5,10 @@
#include <QStringList>
#include <QMap>
-#include "../mainwindow/mainwindow.h"
+class QSettings;
struct Room {
- Room(QMap<QString, QPoint> cPos, QSize grid, QSize client, QString image, QString tutor) :
+ Room(const QMap<QString, QPoint> &cPos, const QSize &grid, const QSize &client, const QString &image, const QString &tutor) :
clientPositions(cPos),
gridSize(grid),
clientSize(client),
@@ -23,12 +23,12 @@ struct Room {
/* define a macro `serverApp` that can be used anywhere in the program and
- * returns a reference to the current ClientApp instance */
+ * returns a reference to the current ServerApp instance */
#if defined(serverApp)
#undef serverApp
#endif
-#define serverApp (static_cast<ServerApp*>(QCoreApplication::instance()))
+#define serverApp (static_cast<ServerApp*>(QCoreApplication::instance())) // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
/* this class is supposed to (after complete refactoring) to encapsulate all
* state of the application. At the moment, the state is distributed within
@@ -42,15 +42,15 @@ class ServerApp : public QApplication
private:
QStringList _arguments;
- MainWindow* _mainWindow;
QString _sessionName;
QByteArray _sessionNameArray;
QMap<QString, Room*> _rooms;
QString _currentRoom;
+ bool _doExit{};
- bool _managerOnly;
- bool _isExam;
+ bool _managerOnly{};
+ bool _isExam{};
QString _iniPath;
QStringList parseParameters();
@@ -64,23 +64,21 @@ public:
/* getters */
- const QString& sessionName() { return _sessionName; }
- const QByteArray& sessionNameArray() { return _sessionNameArray; }
- const QMap<QString, Room*> & rooms() { return _rooms; }
- const QString& getCurrentRoomName() { return _currentRoom; }
- const QMap<QString, Room*>& getRooms() { return _rooms; }
- bool isExam() { return _isExam; }
- bool isManagerOnly() { return _managerOnly; }
- const Room* getCurrentRoom();
- QSharedPointer<QSettings> getSettings();
+ const QString &sessionName() const { return _sessionName; }
+ const QByteArray &sessionNameArray() const { return _sessionNameArray; }
+ const QMap<QString, Room *> &getRooms() const { return _rooms; }
+ bool isExam() const { return _isExam; }
+ const Room* getCurrentRoom() const;
+ QSettings * getSettings();
/* setters */
void setSessionName(const QString& name);
void setSessionName();
- void setIniPath(QString s) { _iniPath = s; };
void setCurrentRoom(const QString& room) { _currentRoom = room; }
void setExam(bool exam) { _isExam = exam; }
+ bool shouldExit() const { return _doExit; }
+
};
#endif
diff --git a/src/server/sessionnamewindow/sessionnamewindow.cpp b/src/server/sessionnamewindow/sessionnamewindow.cpp
index 5671c39..74aa05d 100644
--- a/src/server/sessionnamewindow/sessionnamewindow.cpp
+++ b/src/server/sessionnamewindow/sessionnamewindow.cpp
@@ -9,32 +9,30 @@
#
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
- # mainWindow.cpp
- This is the Main class for the pvsManager. The GUI is contructed here.
- # -----------------------------------------------------------------------------
*/
-#include <QtWidgets>
#include "sessionnamewindow.h"
+#include "ui_sessionnamewindow.h"
#include "../serverapp/serverapp.h"
#include "../numerickeyboard/numerickeyboard.h"
-#include "ui_sessionname.h"
-
+#include "../../shared/util.h"
-SessionNameWindow::SessionNameWindow(QWidget *parent) :
- QDialog(parent), ui(new Ui::SessionName)
+#include <QCloseEvent>
+SessionNameWindow::SessionNameWindow(QWidget *parent)
+ : QDialog(parent)
+ , ui(new Ui::SessionName)
{
ui->setupUi(this);
- connect(ui->bboxOkCancel, SIGNAL(accepted()), this, SLOT(onOkClicked()));
- connect(ui->bboxOkCancel, SIGNAL(rejected()), this, SLOT(close()));
- connect(ui->cmdRandom, SIGNAL(clicked(bool)), this, SLOT(onGenerateRandomName()));
+ connect(ui->bboxOkCancel, &QDialogButtonBox::accepted, this, &SessionNameWindow::onOkClicked);
+ connect(ui->bboxOkCancel, &QDialogButtonBox::rejected, this, &SessionNameWindow::close);
+ connect(ui->cmdRandom, &QPushButton::clicked, this, &SessionNameWindow::onGenerateRandomName);
/* add a virtual numeric keyboard */
- NumericKeyboard *keyboard = new NumericKeyboard();
+ auto *keyboard = new NumericKeyboard();
ui->keyboard_placeholder->addWidget(keyboard);
- connect(keyboard, SIGNAL(digitTyped(int)), this, SLOT(onDigitTyped(int)));
- connect(keyboard, SIGNAL(digitDelete()), this, SLOT(onDigitDelete()));
+ connect(keyboard, &NumericKeyboard::digitTyped, this, &SessionNameWindow::onDigitTyped);
+ connect(keyboard, &NumericKeyboard::digitDelete, this, &SessionNameWindow::onDigitDelete);
}
@@ -73,7 +71,7 @@ void SessionNameWindow::onOkClicked()
void SessionNameWindow::onGenerateRandomName()
{
- ui->lineEditName->setText(QString::number(qrand() % 9000 + 1000));
+ ui->lineEditName->setText(QString::number(slxrand() % 9000 + 1000));
}
/** deletes the last digit of the saved sessionname */
diff --git a/src/server/sessionnamewindow/sessionnamewindow.h b/src/server/sessionnamewindow/sessionnamewindow.h
index e46b895..024df48 100644
--- a/src/server/sessionnamewindow/sessionnamewindow.h
+++ b/src/server/sessionnamewindow/sessionnamewindow.h
@@ -1,8 +1,7 @@
-#ifndef _SESSIONNAMEWINDOW_H_
-#define _SESSIONNAMEWINDOW_H_
-
-#include <QtWidgets>
+#ifndef PVS_SESSIONNAMEWINDOW_H_
+#define PVS_SESSIONNAMEWINDOW_H_
+#include <QDialog>
namespace Ui
{
@@ -17,13 +16,13 @@ private:
Ui::SessionName *ui;
public:
- SessionNameWindow(QWidget *parent = 0);
- ~SessionNameWindow();
+ explicit SessionNameWindow(QWidget *parent = nullptr);
+ ~SessionNameWindow() override;
void show(const QString& name);
protected:
- void closeEvent(QCloseEvent *e);
+ void closeEvent(QCloseEvent *e) override;
private slots:
void onOkClicked();
diff --git a/gui/server_normal/sessionname.ui b/src/server/sessionnamewindow/sessionnamewindow.ui
index 299df3d..299df3d 100644
--- a/gui/server_normal/sessionname.ui
+++ b/src/server/sessionnamewindow/sessionnamewindow.ui
diff --git a/src/server/util/platform/screensaver.cpp b/src/server/util/platform/screensaver.cpp
index cdd6ee1..569a4a3 100644
--- a/src/server/util/platform/screensaver.cpp
+++ b/src/server/util/platform/screensaver.cpp
@@ -3,6 +3,7 @@
#include <QX11Info>
#include <QStringList>
#include <QProcess>
+#include <QTimer>
#include <X11/Xlib.h>
#ifdef X11_Xscreensaver_FOUND
@@ -17,6 +18,7 @@ namespace {
Display *display = nullptr;
bool extensionSupported = false;
bool dpmsSupported = false;
+ QTimer *timer = nullptr;
bool init()
{
@@ -51,16 +53,25 @@ namespace ScreenSaver {
return;
}
#endif
- // TODO: Maybe try some fallback, call xset, or trigger some event periodically
+ if (allow) {
+ if (timer != nullptr) {
+ timer->stop();
+ }
+ } else {
+ if (timer == nullptr) {
+ timer = new QTimer;
+ QObject::connect(timer, &QTimer::timeout, forceUnlockAndScreenOn);
+ }
+ timer->setSingleShot(false);
+ timer->start(55000);
+ }
}
void forceUnlockAndScreenOn()
{
if (!init())
return;
- QProcess process;
- process.start("xscreensaver-command", QStringList() << "-deactivate");
- process.waitForFinished(100);
+ QProcess::startDetached("xscreensaver-command", QStringList() << "-deactivate");
#ifdef X11_dpms_FOUND
CARD16 power_level;
BOOL state;
diff --git a/src/shared/networkmessage.h b/src/shared/networkmessage.h
index c072070..327f544 100644
--- a/src/shared/networkmessage.h
+++ b/src/shared/networkmessage.h
@@ -12,7 +12,9 @@
#define NM_READ_INCOMPLETE (2)
#define NM_READ_FAILED (0)
-#include <QtCore>
+#include <QHostAddress>
+#include <QByteArray>
+#include <QString>
class QAbstractSocket;
class QUdpSocket;
@@ -62,16 +64,16 @@ private:
public:
NetworkMessage();
virtual ~NetworkMessage();
- int readMessage(QAbstractSocket* socket);
+ int readMessage(QAbstractSocket *socket);
int readMessage(char* data, quint32 len);
- bool writeMessage(QAbstractSocket * const socket);
+ bool writeMessage(QAbstractSocket *socket);
bool writeMessage(QUdpSocket* socket, const QHostAddress& address, quint16 port);
void reset() { _fields.clear(); _bufferSize = 0; _mode = 0; }
- bool readComplete() { return _mode == 3; }
- bool writeComplete() { return _mode == 4; }
+ bool readComplete() const { return _mode == 3; }
+ bool writeComplete() const { return _mode == 4; }
bool hasField(QByteArray& key) { return _fields.contains(key); }
- const QString getFieldString(const QByteArray& key) const { return QString::fromUtf8(_fields.value(key)); }
- const QByteArray getFieldBytes(const QByteArray& key) const { return _fields.value(key); }
+ QString getFieldString(const QByteArray& key) const { return QString::fromUtf8(_fields.value(key)); }
+ QByteArray getFieldBytes(const QByteArray& key) const { return _fields.value(key); }
void setField(const QByteArray& key, const QByteArray& value) { if (_mode == 1 || _mode == 2) qFatal("setField called in bad state."); _fields.insert(key, value); _mode = 0; }
void setField(const QByteArray& key, const QString& value) { setField(key, value.toUtf8()); }
// Convenience
diff --git a/src/shared/util.cpp b/src/shared/util.cpp
index d5c101e..880ffca 100644
--- a/src/shared/util.cpp
+++ b/src/shared/util.cpp
@@ -10,7 +10,7 @@
static QCryptographicHash sha1(QCryptographicHash::Sha1);
-QByteArray genSha1(const QByteArray* a, const QByteArray* b, const QByteArray* c, const QByteArray* d, const QByteArray* e)
+QByteArray genSha1(const QByteArray *a, const QByteArray *b, const QByteArray *c, const QByteArray *d, const QByteArray *e)
{
sha1.reset();
sha1.addData(*a);
diff --git a/src/shared/util.h b/src/shared/util.h
index e9530a8..2637419 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -9,7 +9,15 @@
#define UTIL_H_
#include <QByteArray>
+#include <QRandomGenerator>
-QByteArray genSha1(const QByteArray* a, const QByteArray* b = nullptr, const QByteArray* c = nullptr, const QByteArray* d = nullptr, const QByteArray* e = nullptr);
+// Remove after we drop Ubuntu 20.04
+#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
+#define errorOccurred error
+#endif
+
+#define slxrand() (QRandomGenerator::system()->generate())
+
+QByteArray genSha1(const QByteArray *a, const QByteArray *b = nullptr, const QByteArray *c = nullptr, const QByteArray *d = nullptr, const QByteArray *e = nullptr);
#endif /* UTIL_H_ */