Skip to content

Commit a9c1945

Browse files
authored
Merge pull request #111 from introlab/dev
Main merge for 1.3.2 release
2 parents 7c95ff6 + 08d7d24 commit a9c1945

39 files changed

+3245
-1621
lines changed

.github/workflows/build_on_pull_request.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,19 @@ jobs:
1313
steps:
1414

1515
- name: Install Qt
16-
uses: jurplel/install-qt-action@v3.3.0
16+
uses: jurplel/install-qt-action@v4
1717
with:
1818
version: '6.7.3'
19-
host: 'windows'
2019
target: 'desktop'
20+
host: 'windows'
2121
arch: 'win64_msvc2019_64'
22-
dir: 'C:\'
23-
install-deps: 'true'
24-
modules: 'all'
25-
#archives: 'qtbase qtsvg'
26-
cache: 'false'
27-
cache-key-prefix: 'install-qt-action'
28-
setup-python: 'false'
29-
tools: 'tools_ninja'
30-
set-env: 'true'
31-
tools-only: 'false'
32-
aqtversion: '==3.1.*'
33-
py7zrversion: '==0.20.*'
34-
extra: '--external 7z'
22+
use-official: true
23+
email: ${{ secrets.QT_EMAIL }}
24+
pw: ${{ secrets.QT_PW }}
25+
modules: 'qt3d qtactiveqt qtcharts qtconnectivity qtdatavis3d qtgraphs qtgrpc qthttpserver qtimageformats qtlanguageserver qtlocation qtlottie qtmultimedia qtnetworkauth qtpdf qtpositioning.debug_information qtpositioning qtquick3dphysics qtquickeffectmaker qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtspeech qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets qtwebview debug_info qt5compat qtquick3d qtquicktimeline qtshadertools'
3526

3627
- name: Checkout files
37-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
3829
with:
3930
submodules: recursive
4031

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ venv
77
doctrees
88
CMakeLists.txt.user
99
.DS_Store
10+
.cache

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
cmake_minimum_required(VERSION 3.21)
33

44
if (APPLE)
5-
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0" CACHE STRING "Minimum OS X deployment version")
6-
set(CMAKE_OSX_ARCHITECTURES arm64 x86_64 CACHE STRING "OS X supported architectures")
5+
set(CMAKE_OSX_DEPLOYMENT_TARGET "13.0" CACHE STRING "Minimum OS X deployment version")
6+
set(CMAKE_OSX_ARCHITECTURES arm64 x86_64)
77
endif(APPLE)
88

99
project(OpenTeraPlus)
@@ -19,7 +19,7 @@ cmake_policy(SET CMP0007 NEW)
1919
# Software version
2020
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
2121
SET(CPACK_PACKAGE_VERSION_MINOR "3")
22-
SET(CPACK_PACKAGE_VERSION_PATCH "1")
22+
SET(CPACK_PACKAGE_VERSION_PATCH "2")
2323
SET(CPACK_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
2424
add_definitions(-DOPENTERAPLUS_VERSION="${CPACK_PACKAGE_VERSION}" )
2525
add_definitions(-DOPENTERAPLUS_VERSION_MAJOR="${CPACK_PACKAGE_VERSION_MAJOR}" )

client/resources/stylesheet.qss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ QLineEdit, QSpinBox, QTextEdit, QDateTimeEdit, QTimeEdit, QDateEdit{
291291
color:black;
292292
min-height: 25px;
293293
padding-left: 5px;
294+
selection-color: white;
295+
selection-background-color: black;
294296
}
295297

296298
QLineEdit:!enabled, QSpinBox:!enabled, QDateTimeEdit:!enabled, QTimeEdit:!enabled, QDateEdit:!enabled{
@@ -321,6 +323,8 @@ QDateTimeEdit::down-arrow:!enabled, QDateTimeEdit::up-arrow:!enabled, QDateEdit:
321323
QPlainTextEdit {
322324
background-color: rgba(255,255,255,70%);
323325
color: black;
326+
selection-color: white;
327+
selection-background-color: black;
324328
}
325329

326330
QPlainTextEdit:!enabled{
@@ -484,6 +488,14 @@ QCheckBox::indicator {
484488
height: 32px;
485489
}
486490

491+
QCheckBox:unchecked:!enabled{
492+
color: #e47f7577;
493+
}
494+
495+
QCheckBox:checked:!enabled{
496+
color: rgba(0,255,0,50%);
497+
}
498+
487499
QListView::indicator, QTreeWidget::indicator, QTableWidget::indicator {
488500
width: 20px;
489501
height: 20px;

client/resources/translations/openteraplus_en.ts

Lines changed: 826 additions & 764 deletions
Large diffs are not rendered by default.

client/resources/translations/openteraplus_fr.ts

Lines changed: 822 additions & 764 deletions
Large diffs are not rendered by default.

client/src/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ set(headers
8989
editors/UserWidget.h
9090

9191
# Services
92+
services/ActimetryService/ActimetryComManager.h
93+
services/ActimetryService/ActimetryWebAPI.h
94+
services/ActimetryService/ActimetryConfigWidget.h
9295
services/BaseServiceComManager.h
9396
services/BaseServiceWidget.h
9497
services/BaseServiceToolsWidget.h
@@ -103,11 +106,15 @@ set(headers
103106
services/EmailService/EmailComManager.h
104107
services/EmailService/EmailServiceWebAPI.h
105108
services/EmailService/EmailTemplateWidget.h
109+
services/MOVEService/MOVEConfigWidget.h
110+
services/MOVEService/MOVEWebAPI.h
111+
services/MOVEService/MOVEComManager.h
106112
services/SurveyService/SurveyComManager.h
107113
services/SurveyService/SurveyEditorDialog.h
108114
services/SurveyService/SurveyServiceConfigWidget.h
109115
services/SurveyService/SurveyServiceWebAPI.h
110116

117+
111118
# Widgets
112119
widgets/SessionInviteWidget.h
113120
widgets/OnlineManagerWidget.h
@@ -231,6 +238,8 @@ set(srcs
231238
editors/UserWidget.cpp
232239

233240
# Services
241+
services/ActimetryService/ActimetryComManager.cpp
242+
services/ActimetryService/ActimetryConfigWidget.cpp
234243
services/BaseServiceComManager.cpp
235244
services/BaseServiceWidget.cpp
236245
services/BaseServiceToolsWidget.cpp
@@ -242,6 +251,8 @@ set(srcs
242251
services/EmailService/EmailComManager.cpp
243252
services/EmailService/EmailServiceConfigWidget.cpp
244253
services/EmailService/EmailTemplateWidget.cpp
254+
services/MOVEService/MOVEConfigWidget.cpp
255+
services/MOVEService/MOVEComManager.cpp
245256
services/SurveyService/SurveyComManager.cpp
246257
services/SurveyService/SurveyEditorDialog.cpp
247258
services/SurveyService/SurveyServiceConfigWidget.cpp
@@ -350,7 +361,9 @@ SET(uis
350361
editors/UserWidget.ui
351362

352363
# Services
364+
services/ActimetryService/ActimetryConfigWidget.ui
353365
services/DanceService/DanceConfigWidget.ui
366+
services/MOVEService/MOVEConfigWidget.ui
354367
services/DashboardsService/DashboardsConfigWidget.ui
355368
services/EmailService/EmailServiceConfigWidget.ui
356369
services/EmailService/EmailTemplateWidget.ui

client/src/Info.plist.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,9 @@
4545
<string>Microphone access</string>
4646
<key>LSMinimumSystemVersion</key>
4747
<string>10.13</string>
48+
<key>LSApplicationQueriesSchemes</key>
49+
<array>
50+
<string>https</string>
51+
</array>
4852
</dict>
4953
</plist>

client/src/dialogs/PasswordStrengthDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void PasswordStrengthDialog::checkPasswordsMatch()
5050
ui->txtPasswordConf->setStyleSheet("background-color: #ffaaaa;");
5151
ui->btnOK->setEnabled(false);
5252
}else{
53-
ui->txtPasswordConf->setStyleSheet("");
53+
ui->txtPasswordConf->setStyleSheet(" ");
5454
ui->btnOK->setEnabled(m_errors.isEmpty());
5555
}
5656
}

client/src/editors/ParticipantWidget.cpp

Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
#include "dialogs/GeneratePasswordDialog.h"
1010
#include "dialogs/PasswordStrengthDialog.h"
1111

12+
#include "services/ActimetryService/ActimetryConfigWidget.h"
1213
#include "services/DanceService/DanceConfigWidget.h"
14+
#include "services/MOVEService/MOVEConfigWidget.h"
1315

1416
ParticipantWidget::ParticipantWidget(ComManager *comMan, const TeraData *data, QWidget *parent) :
1517
DataEditorWidget(comMan, data, parent),
@@ -393,14 +395,13 @@ void ParticipantWidget::updateServiceTabs()
393395
addServiceTab(service);
394396
}
395397

396-
// Remove tabs not anymore present
397-
/*for(QWidget* tab: std::as_const(m_services_tabs)){
398-
if (!ids_service.contains(m_services_tabs.key(tab))){
399-
ui->tabNav->removeTab(ui->tabNav->indexOf(tab));
400-
tab->deleteLater();
401-
m_services_tabs.remove(m_services_tabs.key(tab));
398+
if (m_services_tabs.count() == 0){
399+
// No config widget (maybe because no widget) - hide tab
400+
int indexTabServices = ui->tabNav->indexOf(ui->tabServices);
401+
if (ui->tabNav->isTabVisible(indexTabServices)){
402+
ui->tabNav->setTabVisible(indexTabServices, false);
402403
}
403-
}*/
404+
}
404405
}
405406

406407
void ParticipantWidget::addServiceTab(const TeraData &service)
@@ -411,13 +412,27 @@ void ParticipantWidget::addServiceTab(const TeraData &service)
411412

412413
QString service_key = service.getFieldValue("service_key").toString();
413414

415+
// Actimetry Service
416+
if (service_key == "ActimetryService") {
417+
ActimetryConfigWidget* wdg = new ActimetryConfigWidget(m_comManager, m_data->getFieldValue("id_project").toInt(), m_data->getUuid(), m_data->getName());
418+
ui->tabServicesDetails->insertTab(0, wdg, QIcon("://icons/service.png"), service.getName());
419+
m_services_tabs.insert(id_service, wdg);
420+
}
421+
414422
// Dance Service
415423
if (service_key == "DanceService"){
416424
DanceConfigWidget* wdg = new DanceConfigWidget(m_comManager, m_data->getFieldValue("id_project").toInt(), m_data->getUuid());
417425
ui->tabServicesDetails->insertTab(0, wdg, QIcon("://icons/service.png"), service.getName());
418426
m_services_tabs.insert(id_service, wdg);
419427
}
420428

429+
// MOVE Service
430+
if (service_key == "MOVEService"){
431+
MOVEConfigWidget* wdg = new MOVEConfigWidget(m_comManager, m_data->getFieldValue("id_project").toInt(), m_data->getUuid(), m_data->getName());
432+
ui->tabServicesDetails->insertTab(0, wdg, QIcon("://icons/service.png"), service.getName());
433+
m_services_tabs.insert(id_service, wdg);
434+
}
435+
421436
int indexTabServices = ui->tabNav->indexOf(ui->tabServices);
422437
if (!ui->tabNav->isTabVisible(indexTabServices)){
423438
ui->tabNav->setTabVisible(indexTabServices, true);
@@ -428,8 +443,19 @@ void ParticipantWidget::addServiceTab(const TeraData &service)
428443

429444
void ParticipantWidget::refreshWebAccessUrl()
430445
{
431-
int index = ui->cmbServices->currentIndex();
432-
if (index >= m_services.count() || index <0 || dataIsNew())
446+
if (dataIsNew())
447+
return;
448+
449+
QString service_key = ui->cmbServices->currentData().toString();
450+
int index = -1;
451+
for (int i=0; i<m_services.count(); i++){
452+
if (m_services.at(i).getFieldValue("service_key").toString() == service_key){
453+
index = i;
454+
break;
455+
}
456+
}
457+
458+
if (index < 0)
433459
return;
434460

435461
QString service_url = TeraData::getServiceParticipantUrl(m_services[index],
@@ -489,6 +515,9 @@ void ParticipantWidget::processSessionTypesReply(QList<TeraData> session_types)
489515
}
490516
}
491517

518+
if (ui->cmbSessionType->count() == 0)
519+
ui->cmbSessionType->hide();
520+
492521
// Query sessions for that participant
493522
if (!m_data->isNew()){
494523
// Select current session type based on last session type used with that participant
@@ -580,14 +609,22 @@ void ParticipantWidget::processServicesReply(QList<TeraData> services, QUrlQuery
580609
bool has_email_service = false;
581610
foreach(TeraData service, services){
582611
QString service_key = service.getFieldValue("service_key").toString();
583-
if (service_key != "FileTransferService"){
584-
m_services.append(service);
585-
ui->cmbServices->addItem(service.getName(), service_key);
586-
}else{
587-
m_allowFileTransfers = true; // We have a file transfer service with that project - allow uploads!
588-
ui->wdgSessions->enableFileTransfers(true);
612+
m_services.append(service);
613+
614+
// Web access combo box
615+
if (service.hasFieldName("service_endpoint_participant")){
616+
if (!service.getFieldValue("service_endpoint_participant").isNull()){
617+
// Ignore specific services...
618+
if (service_key != "FileTransferService" && service_key != "ActimetryService" && service_key != "EmailService")
619+
ui->cmbServices->addItem(service.getName(), service_key);
620+
}
589621
}
590622

623+
// Assets
624+
m_allowFileTransfers = service.getFieldValue("service_has_assets").toBool(); // We have a file transfer service with that project - allow uploads!
625+
ui->wdgSessions->enableFileTransfers(m_allowFileTransfers);
626+
627+
// Email
591628
if (service_key == "EmailService"){
592629
has_email_service = true;
593630
}
@@ -613,6 +650,8 @@ void ParticipantWidget::processServicesReply(QList<TeraData> services, QUrlQuery
613650
int default_index = ui->cmbServices->findData("VideoRehabService");
614651
if (default_index>=0)
615652
ui->cmbServices->setCurrentIndex(default_index);
653+
ui->chkWebAccess->setEnabled(ui->cmbServices->count() > 0);
654+
ui->chkLogin->setEnabled(ui->cmbServices->count() > 0);
616655

617656
// Add specific services configuration tabs
618657
updateServiceTabs();
@@ -1003,7 +1042,7 @@ void ParticipantWidget::on_txtUsername_textEdited(const QString &current)
10031042
if (current.isEmpty()){
10041043
ui->txtUsername->setStyleSheet("background-color: #ffaaaa;");
10051044
}else{
1006-
ui->txtUsername->setStyleSheet("");
1045+
ui->txtUsername->setStyleSheet(" ");
10071046
}
10081047
}
10091048

@@ -1030,16 +1069,16 @@ void ParticipantWidget::on_txtPassword_textEdited(const QString &current)
10301069
if (!m_data->getFieldValue("participant_login_enabled").toBool() && ui->txtPassword->text().isEmpty()){
10311070
ui->txtPassword->setStyleSheet("background-color: #ffaaaa;");
10321071
}else{
1033-
ui->txtPassword->setStyleSheet("");
1072+
ui->txtPassword->setStyleSheet(" ");
10341073
}
10351074

10361075
/*QString confirm_pass = ui->txtPasswordConfirm->text();
10371076
if (current != confirm_pass || ui->txtPassword->text().isEmpty()){
10381077
ui->txtPassword->setStyleSheet("background-color: #ffaaaa;");
10391078
ui->txtPasswordConfirm->setStyleSheet("background-color: #ffaaaa;");
10401079
}else{
1041-
ui->txtPassword->setStyleSheet("");
1042-
ui->txtPasswordConfirm->setStyleSheet("");
1080+
ui->txtPassword->setStyleSheet(" ");
1081+
ui->txtPasswordConfirm->setStyleSheet(" ");
10431082
}*/
10441083
}
10451084

0 commit comments

Comments
 (0)