summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorSimon Rettberg2022-10-30 12:03:43 +0100
committerSimon Rettberg2022-10-30 12:03:43 +0100
commit9bacddf36631572b610f042e17b5ee631dfebbca (patch)
treeb7537d8a5293f28e7d02d41545f609bfa10921c1 /src/client
parentFix Qt fix (diff)
downloadpvs2-9bacddf36631572b610f042e17b5ee631dfebbca.tar.gz
pvs2-9bacddf36631572b610f042e17b5ee631dfebbca.tar.xz
pvs2-9bacddf36631572b610f042e17b5ee631dfebbca.zip
Modernize cmake file and project structure a bit
Diffstat (limited to 'src/client')
-rw-r--r--src/client/clientapp/clientapp.cpp6
-rw-r--r--src/client/connectwindow/connectwindow.cpp6
-rw-r--r--src/client/connectwindow/connectwindow.h1
-rw-r--r--src/client/connectwindow/connectwindow.ui216
-rw-r--r--src/client/toolbar/toolbar.ui233
5 files changed, 458 insertions, 4 deletions
diff --git a/src/client/clientapp/clientapp.cpp b/src/client/clientapp/clientapp.cpp
index 2447526..8131e6f 100644
--- a/src/client/clientapp/clientapp.cpp
+++ b/src/client/clientapp/clientapp.cpp
@@ -23,14 +23,14 @@ ClientApp::ClientApp(int& argc, char** argv)
// System strings
QTranslator *qtTranslator = new QTranslator(this);
if (!qtTranslator->load(QLocale::system(), "qt", "_", QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
- qDebug() << "Could not load system string translations";
+ qDebug() << "Could not load system string translations" << QLocale::system() << QLibraryInfo::location(QLibraryInfo::TranslationsPath);
} else {
installTranslator(qtTranslator);
}
// App specific
QTranslator *translator = new QTranslator(this);
- if (!translator->load(QLocale::system(), ":", "l_")) {
- qDebug() << "Could not load app translations";
+ if (!translator->load(QLocale::system(), ":/", "l_")) {
+ qDebug() << "Could not load app translations" << QLocale::system();
} else {
installTranslator(translator);
}
diff --git a/src/client/connectwindow/connectwindow.cpp b/src/client/connectwindow/connectwindow.cpp
index 7674cc2..8c47eea 100644
--- a/src/client/connectwindow/connectwindow.cpp
+++ b/src/client/connectwindow/connectwindow.cpp
@@ -12,11 +12,15 @@
#include "../net/serverconnection.h"
#include "../clientapp/clientapp.h"
#include "connectwindow.h"
-#include "ui_connect.h"
+#include "ui_connectwindow.h"
#define UDPBUFSIZ 9000
#define SALT_LEN 18
+namespace Ui {
+ class ConnectWindow;
+}
+
/**
* Initialize Connection Window.
* @param parent
diff --git a/src/client/connectwindow/connectwindow.h b/src/client/connectwindow/connectwindow.h
index 9fcaf4e..2df672d 100644
--- a/src/client/connectwindow/connectwindow.h
+++ b/src/client/connectwindow/connectwindow.h
@@ -28,6 +28,7 @@ namespace Ui
{
class ConnectWindow;
}
+
class ServerConnection;
/**
diff --git a/src/client/connectwindow/connectwindow.ui b/src/client/connectwindow/connectwindow.ui
new file mode 100644
index 0000000..0bfc654
--- /dev/null
+++ b/src/client/connectwindow/connectwindow.ui
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ConnectWindow</class>
+ <widget class="QWidget" name="ConnectWindow">
+ <property name="windowModality">
+ <enum>Qt::WindowModal</enum>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>512</width>
+ <height>233</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>512</width>
+ <height>92</height>
+ </size>
+ </property>
+ <property name="windowTitle">
+ <string>Connect to PVS session</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QStackedWidget" name="stackedWidget">
+ <property name="acceptDrops">
+ <bool>false</bool>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="page0">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="box_auto">
+ <property name="title">
+ <string>Connection</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Connect to</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="comboBox_rooms"/>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="box_manual">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Manual Connection</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Session Name</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEditName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="page1">
+ <layout class="QHBoxLayout" name="sw_p1_hl">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="lblCheckmark">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>94</width>
+ <height>72</height>
+ </size>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../../pvsclient.qrc">:/dark-green-check-mark.svg</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QPushButton" name="btn_hide">
+ <property name="text">
+ <string>Close</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="lblStatus">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btn_connection">
+ <property name="text">
+ <string>Connect</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="../../pvsclient.qrc"/>
+ </resources>
+ <connections/>
+</ui>
diff --git a/src/client/toolbar/toolbar.ui b/src/client/toolbar/toolbar.ui
new file mode 100644
index 0000000..9908dda
--- /dev/null
+++ b/src/client/toolbar/toolbar.ui
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Toolbar</class>
+ <widget class="QWidget" name="Toolbar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>281</width>
+ <height>28</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string notr="true">Form</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">#Toolbar {
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f6f7fa, stop: 1 #dadbde);
+ border-radius: 0px;
+}
+QLabel {
+ background-color: none;
+}
+/* QPushButton */
+QPushButton {
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f6f7fa, stop: 1 #dadbde);
+ border: 2px solid #8f8f91;
+ border-radius: 4px;
+ min-width: 80px;
+}
+QPushButton:hover {
+ border: 2px solid rgb(0, 170, 255);
+}
+QPushButton:pressed {
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #dadbde, stop: 1 #f6f7fa);
+}
+QPushButton:checked {
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #cacbce, stop: 1 #e6e7ea);
+}
+QPushButton::menu-indicator {
+ image: url(:/darrow16.svg);
+}
+</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>1</number>
+ </property>
+ <property name="leftMargin">
+ <number>2</number>
+ </property>
+ <property name="topMargin">
+ <number>2</number>
+ </property>
+ <property name="rightMargin">
+ <number>2</number>
+ </property>
+ <property name="bottomMargin">
+ <number>2</number>
+ </property>
+ <item>
+ <widget class="QPushButton" name="cmdMenu">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>84</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Menu</string>
+ </property>
+ <property name="text">
+ <string>Menu</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="spacer_left">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="lblStatus">
+ <property name="styleSheet">
+ <string notr="true">color:red</string>
+ </property>
+ <property name="text">
+ <string notr="true">Offline</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>19</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="icon_cam">
+ <property name="minimumSize">
+ <size>
+ <width>16</width>
+ <height>16</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16</width>
+ <height>16</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="icon_pvs">
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ <weight>75</weight>
+ <italic>true</italic>
+ <bold>true</bold>
+ <kerning>true</kerning>
+ </font>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#05f;</string>
+ </property>
+ <property name="text">
+ <string notr="true">PVS</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="spacer_right">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="buttonContainer"/>
+ </item>
+ <item>
+ <widget class="QToolButton" name="btnAttention">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>30</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="sizeIncrement">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="baseSize">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string notr="true"/>
+ </property>
+ <property name="icon">
+ <iconset resource="../../pvsclient.qrc">
+ <normaloff>:/hand-raise</normaloff>
+ <normalon>:/hand-raise-red</normalon>:/hand-raise</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="../../pvsclient.qrc"/>
+ </resources>
+ <connections/>
+</ui>