diff --git a/RingWinClient.pro b/RingWinClient.pro index 735b90dfcffa0045746226bb0394023bfa69699e..c4a06d832aa734cf46a760af5c65faa51066b342 100644 --- a/RingWinClient.pro +++ b/RingWinClient.pro @@ -80,11 +80,11 @@ SOURCES += main.cpp\ invitebuttonswidget.cpp \ wizardwidget.cpp \ currentaccountcombobox.cpp \ - conversationfilterbutton.cpp \ messagewebpage.cpp \ messagewebview.cpp \ webchathelpers.cpp \ - animationhelpers.cpp + animationhelpers.cpp \ + settingsitemwidget.cpp HEADERS += mainwindow.h \ callwidget.h \ @@ -128,11 +128,11 @@ HEADERS += mainwindow.h \ invitebuttonswidget.h \ wizardwidget.h \ currentaccountcombobox.h \ - conversationfilterbutton.h \ messagewebpage.h \ messagewebview.h \ webchathelpers.h \ - animationhelpers.h + animationhelpers.h \ + settingsitemwidget.h contains(DEFINES, URI_PROTOCOL) { diff --git a/accountdetails.cpp b/accountdetails.cpp index fed1d3a10283909b86f5b4549c1c237c061742ff..ee95a82581959f7f6296b1faa225edd2d86b7b6f 100644 --- a/accountdetails.cpp +++ b/accountdetails.cpp @@ -157,7 +157,7 @@ AccountDetails::setAccount(Account* currentAccount) { if (not currentAccount_->tlsPrivateKey().isEmpty()) ui->lrcfg_tlsPrivateKeyCertificate->setText(currentAccount_->tlsPrivateKey()); -#if defined(Q_OS_WIN) && !defined(_MSC_VER) +#if defined(Q_OS_WIN) && !defined(_MSC_VER) certMap_[ui->lrcfg_tlsCaListCertificate->objectName()] = ¤tAccount_->setTlsCaListCertificate; certMap_[ui->lrcfg_tlsCertificate->objectName()] = ¤tAccount_->setTlsCertificate; certMap_[ui->lrcfg_tlsPrivateKeyCertificate->objectName()] = ¤tAccount_->setTlsPrivateKey; diff --git a/advancedsettingswidget.cpp b/advancedsettingswidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ef915fae5a3a118a141ca0b94ef300e0846ef07 --- /dev/null +++ b/advancedsettingswidget.cpp @@ -0,0 +1,419 @@ +/*************************************************************************** + * Copyright (C) 2018 by Savoir-faire Linux * + * Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + **************************************************************************/ +#include "direct.h" +#include <QFileDialog> + +#include "lrcinstance.h" +#include "api/newcodecmodel.h" + +#include "advancedsettingswidget.h" +#include "ui_advancedsettingswidget.h" + +AdvancedSettingsWidget::AdvancedSettingsWidget(QWidget* parent) + :QWidget(parent), + ui(new Ui::AdvancedSettingsWidget) +{ + ui->setupUi(this); + + updateAdvancedSettings(); +/////////////////////////////////////////////////////////////////////////////// + // call settings + connect(ui->checkBoxUntrusted, &QCheckBox::stateChanged, this, &AdvancedSettingsWidget::setCallsUntrusted); + connect(ui->checkBoxCustomRingtone, &QCheckBox::stateChanged, this, &AdvancedSettingsWidget::setEnableRingtone); + connect(ui->checkBoxAutoAnswer, &QCheckBox::stateChanged, this, &AdvancedSettingsWidget::setAutoAnswerCalls); + connect(ui->btnRingtone, &QPushButton::clicked, this, &AdvancedSettingsWidget::openFileCustomRingtone); + connect(ui->checkBoxCustomRingtone, &QCheckBox::stateChanged, [this](int state) { ui->btnRingtone->setEnabled((bool)state); }); + + // name server + connect(ui->lineEditNameServer, &QLineEdit::textChanged, this, &AdvancedSettingsWidget::setNameServer); + + // openDHT config + connect(ui->checkBoxEnableProxy, &QCheckBox::stateChanged, this, &AdvancedSettingsWidget::setEnableProxy); + + connect(ui->lineEditProxy, &QLineEdit::textChanged, this, &AdvancedSettingsWidget::setProxyAddress); + connect(ui->lineEditBootstrap, &QLineEdit::textChanged, this, &AdvancedSettingsWidget::setBootstrapAddress); + + // security + connect(ui->btnCACert, &QPushButton::clicked, this, &AdvancedSettingsWidget::openFileCACert); + connect(ui->btnUserCert, &QPushButton::clicked, this, &AdvancedSettingsWidget::openFileUserCert); + connect(ui->btnPrivateKey, &QPushButton::clicked, this, &AdvancedSettingsWidget::openFilePrivateKey); + + // connectivity + connect(ui->checkBoxUPnP, &QCheckBox::stateChanged, this, &AdvancedSettingsWidget::setUseUPnP); + connect(ui->checkBoxTurnEnable, &QCheckBox::stateChanged, this, &AdvancedSettingsWidget::setUseTURN); + connect(ui->checkBoxSTUNEnable, &QCheckBox::stateChanged, this, &AdvancedSettingsWidget::setUseSTUN); + + connect(ui->lineEditTurnAddress, &QLineEdit::textChanged, this, &AdvancedSettingsWidget::setTURNAddress); + connect(ui->lineEditTurnUsername, &QLineEdit::textChanged, this, &AdvancedSettingsWidget::setTURNUsername); + connect(ui->lineEditTurnPsswd, &QLineEdit::textChanged, this, &AdvancedSettingsWidget::setTURNPsswd); + connect(ui->lineEditSTUNAddress, &QLineEdit::textChanged, this, &AdvancedSettingsWidget::setSTUNAddress); + + // codecs + connect(ui->audioListWidget, &QListWidget::itemChanged, this, &AdvancedSettingsWidget::audioCodecsStateChange); + connect(ui->videoListWidget, &QListWidget::itemChanged, this, &AdvancedSettingsWidget::videoCodecsStateChange); + + connect(ui->videoCheckBox, &QCheckBox::stateChanged, this, &AdvancedSettingsWidget::setVideoState); + + // codec priority setting + connect(ui->audioDownPushButton, &QPushButton::clicked, this, &AdvancedSettingsWidget::decreaseAudioCodecPriority); + connect(ui->audioUpPushButton, &QPushButton::clicked, this, &AdvancedSettingsWidget::increaseAudioCodecPriority); + + connect(ui->videoDownPushButton, &QPushButton::clicked, this, &AdvancedSettingsWidget::decreaseVideoCodecPriority); + connect(ui->videoUpPushButton, &QPushButton::clicked, this, &AdvancedSettingsWidget::increaseVideoCodecPriority); + + +/////////////////////////////////////////////////////////////////////////////// + ui->btnRingtone->setEnabled(LRCInstance::getCurrAccConfig().Ringtone.ringtoneEnabled); + ui->lineEditProxy->setEnabled(LRCInstance::getCurrAccConfig().proxyEnabled); + ui->lineEditSTUNAddress->setEnabled(LRCInstance::getCurrAccConfig().STUN.enable); + + +} + +AdvancedSettingsWidget::~AdvancedSettingsWidget() +{ + delete ui; +} + +void +AdvancedSettingsWidget::updateAdvancedSettings() +{ + auto config = LRCInstance::getCurrAccConfig(); + //Call Settings + ui->checkBoxUntrusted->setChecked(config.allowIncoming); + ui->checkBoxAutoAnswer->setChecked(config.autoAnswer); + ui->checkBoxCustomRingtone->setChecked(config.Ringtone.ringtoneEnabled); + + // Name Server + ui->lineEditNameServer->setText(QString::fromStdString(config.RingNS.uri)); + + //OpenDHT Config + ui->checkBoxEnableProxy->setChecked(config.proxyEnabled); + ui->lineEditProxy->setText(QString::fromStdString(config.proxyServer)); + ui->lineEditBootstrap->setText(QString::fromStdString(config.hostname)); + + // Security + ui->btnCACert->setText(QString::fromStdString(config.TLS.certificateListFile)); + ui->btnUserCert->setText(QString::fromStdString(config.TLS.certificateFile)); + ui->btnPrivateKey->setText(QString::fromStdString(config.TLS.privateKeyFile)); + + // Connectivity + ui->checkBoxUPnP->setChecked(config.upnpEnabled); + ui->checkBoxTurnEnable->setChecked(config.TURN.enable); + ui->lineEditTurnAddress->setText(QString::fromStdString(config.TURN.server)); + ui->lineEditTurnUsername->setText(QString::fromStdString(config.TURN.username)); + ui->lineEditTurnPsswd->setText(QString::fromStdString(config.TURN.password)); + ui->checkBoxSTUNEnable->setChecked(config.STUN.enable); + ui->lineEditSTUNAddress->setText(QString::fromStdString(config.STUN.server)); + + // codecs + ui->videoCheckBox->setChecked(config.Video.videoEnabled); + updateAudioCodecs(); + updateVideoCodecs(); +} + +// call settings +void +AdvancedSettingsWidget::setCallsUntrusted(bool state) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.allowIncoming = state; + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} +void +AdvancedSettingsWidget::setAutoAnswerCalls(bool state) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.autoAnswer = state; + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} +void +AdvancedSettingsWidget::setEnableRingtone(bool state) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.Ringtone.ringtoneEnabled = state; + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} + +void +AdvancedSettingsWidget::openFileCustomRingtone() +{ + QString fileUrl; + fileUrl = QFileDialog::getOpenFileName(this, QString("Select a new ringtone"), QDir::currentPath() + QString("/ringtones/")); + if (!fileUrl.isEmpty()) { + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.Ringtone.ringtonePath = fileUrl.toStdString(); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); + ui->btnRingtone->setText(QString::fromStdString(LRCInstance::getCurrAccConfig().Ringtone.ringtonePath)); + + } else { + ui->btnRingtone->setText(tr("Add a custom ringtone")); + } +} + +// name server +void +AdvancedSettingsWidget::setNameServer(const QString& name) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.RingNS.uri = name.toStdString(); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} + +// openDHT config +void +AdvancedSettingsWidget::setEnableProxy(bool state) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.proxyEnabled = state; + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); + + state ? ui->lineEditProxy->setEnabled(true) : ui->lineEditProxy->setEnabled(false); +} +void +AdvancedSettingsWidget::setProxyAddress(const QString& name) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.proxyServer = name.toStdString(); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} +void +AdvancedSettingsWidget::setBootstrapAddress(const QString& name) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.hostname = name.toStdString(); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} + +// security + +// connectivity +void +AdvancedSettingsWidget::setUseUPnP(bool state) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.upnpEnabled = state; + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} +void +AdvancedSettingsWidget::setUseTURN(bool state) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.TURN.enable = state; + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} +void +AdvancedSettingsWidget::setUseSTUN(bool state) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.STUN.enable = state; + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); + + state ? ui->lineEditSTUNAddress->setEnabled(true) : ui->lineEditSTUNAddress->setEnabled(false); +} + +void +AdvancedSettingsWidget::setTURNAddress(const QString& name) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.TURN.server = name.toStdString(); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} +void +AdvancedSettingsWidget::setTURNUsername(const QString& name) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.TURN.username = name.toStdString(); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} +void +AdvancedSettingsWidget::setTURNPsswd(const QString& name) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.TURN.password = name.toStdString(); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} +void +AdvancedSettingsWidget::setSTUNAddress(const QString& name) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.STUN.server = name.toStdString(); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} + +void +AdvancedSettingsWidget::openFileCACert() +{ + QString fileUrl; + fileUrl = QFileDialog::getOpenFileName(this, QString("Select a CA certificate"), QDir::homePath() + + QString("/.local/share/ring/") + QString::fromStdString(LRCInstance::getCurrentAccountInfo().id)); + if (!fileUrl.isEmpty()) { + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.TLS.certificateListFile = fileUrl.toStdString(); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); + } + ui->btnCACert->setText(QString::fromStdString(LRCInstance::getCurrAccConfig().TLS.certificateListFile)); +} + +void +AdvancedSettingsWidget::openFileUserCert() +{ + QString fileUrl; + fileUrl = QFileDialog::getOpenFileName(this, QString("Select a user certificate"), QDir::homePath() + + QString("/.local/share/ring/") + QString::fromStdString(LRCInstance::getCurrentAccountInfo().id)); + if (!fileUrl.isEmpty()) { + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.TLS.certificateFile = fileUrl.toStdString(); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); + } + ui->btnUserCert->setText(QString::fromStdString(LRCInstance::getCurrAccConfig().TLS.certificateFile)); +} + +void +AdvancedSettingsWidget::openFilePrivateKey() +{ + QString fileUrl; + fileUrl = QFileDialog::getOpenFileName(this, QString("Select a private key"), QDir::homePath() + + QString("/.local/share/ring/") + QString::fromStdString(LRCInstance::getCurrentAccountInfo().id)); + if (!fileUrl.isEmpty()) { + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.TLS.privateKeyFile = fileUrl.toStdString(); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); + } + ui->btnPrivateKey->setText(QString::fromStdString(LRCInstance::getCurrAccConfig().TLS.privateKeyFile)); +} + +void +AdvancedSettingsWidget::updateAudioCodecs() +{ + ui->audioListWidget->clear(); + + auto audioCodecList = LRCInstance::getCurrentAccountInfo().codecModel->getAudioCodecs(); + int i = 0; + for (auto it = audioCodecList.begin(); it != audioCodecList.end(); ++it, ++i) { + QListWidgetItem* audioItem = new QListWidgetItem(ui->audioListWidget); + audioItem->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); + Qt::CheckState state; + it->enabled ? state = Qt::Checked : state = Qt::Unchecked; + audioItem->setCheckState(state); + audioItem->setData(Qt::DisplayRole, QString::fromStdString(it->name) + "\n" + QString::fromStdString(it->samplerate) + + " Hz"); + + ui->audioListWidget->addItem(audioItem); + } +} + +void +AdvancedSettingsWidget::updateVideoCodecs() +{ + ui->videoListWidget->clear(); + + auto videoCodecList = LRCInstance::getCurrentAccountInfo().codecModel->getVideoCodecs(); + int i = 0; + + for (auto it = videoCodecList.begin(); it != videoCodecList.end(); ++it, ++i) { + if (it->name.length()) { // [temporary fix] + QListWidgetItem* videoItem = new QListWidgetItem(ui->videoListWidget); + videoItem->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable); + Qt::CheckState state; + it->enabled ? state = Qt::Checked : state = Qt::Unchecked; + videoItem->setCheckState(state); + videoItem->setData(Qt::DisplayRole, QString::fromStdString(it->name) + "\n"); + + ui->audioListWidget->addItem(videoItem); + } + } +} + +void +AdvancedSettingsWidget::audioCodecsStateChange(QListWidgetItem* item) +{ + auto audioCodecList = LRCInstance::getCurrentAccountInfo().codecModel->getAudioCodecs(); + auto it = audioCodecList.begin(); + + std::advance(it, ui->audioListWidget->row(item)); + + LRCInstance::getCurrentAccountInfo().codecModel->enable(it->id, !(it->enabled)); +} + +void +AdvancedSettingsWidget::videoCodecsStateChange(QListWidgetItem* item) +{ + auto videoCodecList = LRCInstance::getCurrentAccountInfo().codecModel->getVideoCodecs(); + auto it = videoCodecList.begin(); + + std::advance(it, ui->videoListWidget->row(item)); + + LRCInstance::getCurrentAccountInfo().codecModel->enable(it->id, !(it->enabled)); +} + +void +AdvancedSettingsWidget::decreaseAudioCodecPriority() +{ + int selectedRow = ui->audioListWidget->row(ui->audioListWidget->selectedItems().at(0)); + auto audioCodecList = LRCInstance::getCurrentAccountInfo().codecModel->getAudioCodecs(); + auto it = audioCodecList.begin(); + + advance(it, selectedRow); + LRCInstance::getCurrentAccountInfo().codecModel->decreasePriority(it->id, false); + updateAudioCodecs(); +} + +void +AdvancedSettingsWidget::increaseAudioCodecPriority() +{ + int selectedRow = ui->audioListWidget->row(ui->audioListWidget->selectedItems().at(0)); + auto audioCodecList = LRCInstance::getCurrentAccountInfo().codecModel->getAudioCodecs(); + auto it = audioCodecList.begin(); + + advance(it, selectedRow); + LRCInstance::getCurrentAccountInfo().codecModel->increasePriority(it->id, false); + updateAudioCodecs(); +} + +void +AdvancedSettingsWidget::decreaseVideoCodecPriority() +{ + int selectedRow = ui->videoListWidget->row(ui->videoListWidget->selectedItems().at(0)); + auto videoCodecList = LRCInstance::getCurrentAccountInfo().codecModel->getVideoCodecs(); + auto it = videoCodecList.begin(); + + advance(it, selectedRow); + LRCInstance::getCurrentAccountInfo().codecModel->decreasePriority(it->id, true); + updateVideoCodecs(); +} + +void +AdvancedSettingsWidget::increaseVideoCodecPriority() +{ + int selectedRow = ui->videoListWidget->row(ui->videoListWidget->selectedItems().at(0)); + auto videoCodecList = LRCInstance::getCurrentAccountInfo().codecModel->getVideoCodecs(); + auto it = videoCodecList.begin(); + + advance(it, selectedRow); + LRCInstance::getCurrentAccountInfo().codecModel->increasePriority(it->id, true); + updateVideoCodecs(); +} + +void +AdvancedSettingsWidget::setVideoState(int state) +{ + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.Video.videoEnabled = (bool)state; + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} \ No newline at end of file diff --git a/advancedsettingswidget.h b/advancedsettingswidget.h new file mode 100644 index 0000000000000000000000000000000000000000..a805294926576bfae0ef6e6dbbbb2782cd5afd4c --- /dev/null +++ b/advancedsettingswidget.h @@ -0,0 +1,89 @@ +/*************************************************************************** + * Copyright (C) 2018 by Savoir-faire Linux * + * Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + **************************************************************************/ + +#pragma once + +#include <QWidget> +#include <QListWidgetItem> + +namespace Ui { + class AdvancedSettingsWidget; +} + +class AdvancedSettingsWidget : public QWidget { + + Q_OBJECT + AdvancedSettingsWidget(const AdvancedSettingsWidget& cpy); + +public: + AdvancedSettingsWidget(QWidget* parent = nullptr); + ~AdvancedSettingsWidget(); + +private: + Ui::AdvancedSettingsWidget* ui; + void updateAdvancedSettings(); + +private slots: +// call settings + void setCallsUntrusted(bool state); + void setAutoAnswerCalls(bool state); + void setEnableRingtone(bool state); + + void openFileCustomRingtone(); + +// name server + void setNameServer(const QString& name); + +// openDHT config + void setEnableProxy(bool state); + + void setProxyAddress(const QString& name); + void setBootstrapAddress(const QString& name); + +// security + void openFileCACert(); + void openFileUserCert(); + void openFilePrivateKey(); + +// connectivity + void setUseUPnP(bool state); + void setUseTURN(bool state); + void setUseSTUN(bool state); + + void setTURNAddress(const QString& name); + void setTURNUsername(const QString& name); + void setTURNPsswd(const QString& name); + void setSTUNAddress(const QString& name); + +// codecs + void updateAudioCodecs(); + void updateVideoCodecs(); + + void audioCodecsStateChange(QListWidgetItem* item = nullptr); + void videoCodecsStateChange(QListWidgetItem* item = nullptr); + + void decreaseAudioCodecPriority(); + void increaseAudioCodecPriority(); + + void decreaseVideoCodecPriority(); + void increaseVideoCodecPriority(); + + void setVideoState(int state); + + +}; \ No newline at end of file diff --git a/advancedsettingswidget.ui b/advancedsettingswidget.ui new file mode 100644 index 0000000000000000000000000000000000000000..61c4ba423bba70b23f1d2331f48753d008697bc5 --- /dev/null +++ b/advancedsettingswidget.ui @@ -0,0 +1,1082 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>AdvancedSettingsWidget</class> + <widget class="QWidget" name="AdvancedSettingsWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>688</width> + <height>1197</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <property name="styleSheet"> + <string notr="true">background: white;</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="Line" name="line"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="CallSettings"> + <property name="styleSheet"> + <string notr="true"/> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="topMargin"> + <number>20</number> + </property> + <property name="bottomMargin"> + <number>20</number> + </property> + <item> + <widget class="QLabel" name="label"> + <property name="font"> + <font> + <pointsize>11</pointsize> + </font> + </property> + <property name="text"> + <string>Call Settings</string> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="leftMargin"> + <number>40</number> + </property> + <property name="topMargin"> + <number>5</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_9"> + <property name="bottomMargin"> + <number>3</number> + </property> + <item> + <widget class="QCheckBox" name="checkBoxUntrusted"> + <property name="text"> + <string>Allow Calls From Untrusted Peers</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QCheckBox" name="checkBoxAutoAnswer"> + <property name="text"> + <string>Auto Answer Calls</string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0"> + <item> + <widget class="QCheckBox" name="checkBoxCustomRingtone"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Enable Custom Ringtone</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="btnRingtone"> + <property name="minimumSize"> + <size> + <width>250</width> + <height>25</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background: rgb(248, 248, 248); border-radius: 3px;</string> + </property> + <property name="text"> + <string>Add a custom ringtone</string> + </property> + <property name="icon"> + <iconset> + <normaloff>images/icons/round-folder-24px.svg</normaloff>images/icons/round-folder-24px.svg</iconset> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_7"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="Line" name="line_2"> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + <property name="lineWidth"> + <number>1</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="NameServer"> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <property name="topMargin"> + <number>30</number> + </property> + <property name="bottomMargin"> + <number>20</number> + </property> + <item> + <widget class="QLabel" name="label_2"> + <property name="font"> + <font> + <pointsize>11</pointsize> + </font> + </property> + <property name="text"> + <string>Name Server</string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="leftMargin"> + <number>40</number> + </property> + <item> + <widget class="QLabel" name="label_3"> + <property name="minimumSize"> + <size> + <width>60</width> + <height>0</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="text"> + <string>Address</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_8"> + <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="QLineEdit" name="lineEditNameServer"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>300</width> + <height>0</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">border-bottom: 1px solid black;</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="Line" name="line_3"> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="OpenDHTConfiguration"> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <property name="topMargin"> + <number>30</number> + </property> + <property name="bottomMargin"> + <number>20</number> + </property> + <item> + <widget class="QLabel" name="label_4"> + <property name="font"> + <font> + <pointsize>11</pointsize> + </font> + </property> + <property name="text"> + <string>OpenDHT Configuration</string> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_6"> + <property name="topMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="leftMargin"> + <number>40</number> + </property> + <item> + <widget class="QCheckBox" name="checkBoxEnableProxy"> + <property name="minimumSize"> + <size> + <width>100</width> + <height>0</height> + </size> + </property> + <property name="text"> + <string>Enable Proxy</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="QLineEdit" name="lineEditProxy"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>300</width> + <height>0</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">border-bottom: 1px solid black;</string> + </property> + <property name="frame"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <property name="leftMargin"> + <number>40</number> + </property> + <item> + <widget class="QLabel" name="labelBootstrap"> + <property name="text"> + <string>Bootstrap</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <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="QLineEdit" name="lineEditBootstrap"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>300</width> + <height>0</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">border-bottom: 1px solid black;</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="Line" name="line_4"> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="Security"> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QVBoxLayout" name="verticalLayout_16"> + <property name="topMargin"> + <number>30</number> + </property> + <property name="bottomMargin"> + <number>20</number> + </property> + <item> + <widget class="QLabel" name="label_17"> + <property name="font"> + <font> + <pointsize>11</pointsize> + </font> + </property> + <property name="text"> + <string>Security</string> + </property> + </widget> + </item> + <item> + <layout class="QGridLayout" name="gridLayout_2"> + <property name="leftMargin"> + <number>40</number> + </property> + <item row="3" column="0"> + <widget class="QLabel" name="label_21"> + <property name="text"> + <string>Private Key Password</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_19"> + <property name="text"> + <string>User Certificate</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QLineEdit" name="lineEditCertPassword"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>300</width> + <height>0</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">border-bottom: 1px solid black;</string> + </property> + <property name="placeholderText"> + <string>no password</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_20"> + <property name="text"> + <string>Private Key</string> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="label_18"> + <property name="text"> + <string>CA Certificate</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <widget class="QPushButton" name="btnCACert"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>250</width> + <height>25</height> + </size> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="styleSheet"> + <string notr="true">background: rgb(248, 248, 248); border-radius: 3px;</string> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset> + <normaloff>images/icons/round-folder-24px.svg</normaloff>images/icons/round-folder-24px.svg</iconset> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Minimum</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item row="1" column="1"> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <item> + <widget class="QPushButton" name="btnUserCert"> + <property name="minimumSize"> + <size> + <width>250</width> + <height>25</height> + </size> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="styleSheet"> + <string notr="true">background: rgb(248, 248, 248); border-radius: 3px;</string> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset> + <normaloff>images/icons/round-folder-24px.svg</normaloff>images/icons/round-folder-24px.svg</iconset> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Minimum</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item row="2" column="1"> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <item> + <widget class="QPushButton" name="btnPrivateKey"> + <property name="minimumSize"> + <size> + <width>250</width> + <height>25</height> + </size> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="styleSheet"> + <string notr="true">background: rgb(248, 248, 248); border-radius: 3px;</string> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset> + <normaloff>images/icons/round-folder-24px.svg</normaloff>images/icons/round-folder-24px.svg</iconset> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_6"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Minimum</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="Line" name="line_5"> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="Connectivity"> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QVBoxLayout" name="verticalLayout_8"> + <property name="topMargin"> + <number>30</number> + </property> + <property name="bottomMargin"> + <number>20</number> + </property> + <item> + <widget class="QLabel" name="label_11"> + <property name="font"> + <font> + <pointsize>11</pointsize> + </font> + </property> + <property name="text"> + <string>Connectivity</string> + </property> + </widget> + </item> + <item> + <layout class="QGridLayout" name="gridLayout"> + <property name="leftMargin"> + <number>40</number> + </property> + <item row="3" column="2"> + <widget class="QLineEdit" name="lineEditTurnUsername"> + <property name="styleSheet"> + <string notr="true">border-bottom: 1px solid black;</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <spacer name="horizontalSpacer_5"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_13"> + <property name="text"> + <string> TURN Address</string> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QLineEdit" name="lineEditTurnAddress"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>300</width> + <height>0</height> + </size> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="styleSheet"> + <string notr="true">border-bottom: 1px solid black;</string> + </property> + </widget> + </item> + <item row="5" column="0"> + <widget class="QCheckBox" name="checkBoxSTUNEnable"> + <property name="text"> + <string>Use STUN</string> + </property> + </widget> + </item> + <item row="4" column="2"> + <widget class="QLineEdit" name="lineEditTurnPsswd"> + <property name="styleSheet"> + <string notr="true">border-bottom: 1px solid black;</string> + </property> + </widget> + </item> + <item row="5" column="2"> + <widget class="QLineEdit" name="lineEditSTUNAddress"> + <property name="styleSheet"> + <string notr="true">border-bottom: 1px solid black;</string> + </property> + <property name="placeholderText"> + <string>STUN Address</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QLabel" name="label_14"> + <property name="text"> + <string> TURN Username</string> + </property> + </widget> + </item> + <item row="4" column="0"> + <widget class="QLabel" name="label_12"> + <property name="text"> + <string> TURN Password</string> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QCheckBox" name="checkBoxUPnP"> + <property name="text"> + <string>Use UPnP</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QCheckBox" name="checkBoxTurnEnable"> + <property name="text"> + <string>Use TURN</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="Line" name="line_6"> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_5"> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_14"> + <property name="topMargin"> + <number>30</number> + </property> + <property name="bottomMargin"> + <number>20</number> + </property> + <item> + <layout class="QVBoxLayout" name="verticalLayout_12"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_10"> + <item> + <widget class="QLabel" name="audioLabel"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>30</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true">border-bottom: 1px solid black;</string> + </property> + <property name="text"> + <string>Audio Codecs</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_10"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="audioDownPushButton"> + <property name="minimumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset> + <normaloff>images/icons/round-arrow_drop_down-24px.svg</normaloff>images/icons/round-arrow_drop_down-24px.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="audioUpPushButton"> + <property name="minimumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset> + <normaloff>images/icons/round-arrow_drop_up-24px.svg</normaloff>images/icons/round-arrow_drop_up-24px.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_11"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>10</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <widget class="QListWidget" name="audioListWidget"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>200</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_13"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_8"> + <item> + <widget class="QCheckBox" name="videoCheckBox"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>30</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true">border-bottom: 1px solid black;</string> + </property> + <property name="text"> + <string>Video Codecs</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_9"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="videoDownPushButton"> + <property name="minimumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset> + <normaloff>images/icons/round-arrow_drop_down-24px.svg</normaloff>images/icons/round-arrow_drop_down-24px.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="videoUpPushButton"> + <property name="minimumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset> + <normaloff>images/icons/round-arrow_drop_up-24px.svg</normaloff>images/icons/round-arrow_drop_up-24px.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_12"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>10</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <widget class="QListWidget" name="videoListWidget"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>200</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/avatargraphicsview.cpp b/avatargraphicsview.cpp new file mode 100644 index 0000000000000000000000000000000000000000..eb97f3a930e27107b4e635cc47e2928e3a7c3217 --- /dev/null +++ b/avatargraphicsview.cpp @@ -0,0 +1,59 @@ +/************************************************************************** +* Copyright (C) 2018 by Savoir-faire Linux * +* Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see <https://www.gnu.org/licenses/>. * +**************************************************************************/ + +#include "avatargraphicsview.h" + +AvatarGraphicsView::AvatarGraphicsView(QWidget* parent) + : QGraphicsView(parent) +{ + setDragMode(QGraphicsView::ScrollHandDrag); +} + +void +AvatarGraphicsView::wheelEvent(QWheelEvent* event) +{ + QPoint numSteps = event->angleDelta() / (8*15); + + if (!numSteps.isNull()) { + zoomImage(numSteps); + } + event->accept(); +} + +void +AvatarGraphicsView::zoomImage(const QPoint& steps) +{ + steps.y() == 1 ? scale(zoomIncrement_, zoomIncrement_) : scale(1 / zoomIncrement_, 1 / zoomIncrement_); +} + +void +AvatarGraphicsView::paintEvent(QPaintEvent* e) +{ + QGraphicsView::paintEvent(e); + QPainter painter(viewport()); + + QPainterPath square; + QPainterPath circle; + + square.addRect(0, 0, width(), height()); + circle.addEllipse(QPoint(width() / 2 - 0.5, height() / 2 - 0.5), circleSize_ + 1, circleSize_ + 1); + + painter.setOpacity(0.3); + + painter.fillPath(square.subtracted(circle), QBrush(QColor(Qt::black))); +} \ No newline at end of file diff --git a/avatargraphicsview.h b/avatargraphicsview.h new file mode 100644 index 0000000000000000000000000000000000000000..b8f79c8d55e90b52967cd8b837664cd10ec4026f --- /dev/null +++ b/avatargraphicsview.h @@ -0,0 +1,41 @@ +/************************************************************************** +* Copyright (C) 2018 by Savoir-faire Linux * +* Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see <https://www.gnu.org/licenses/>. * +**************************************************************************/ +#pragma once + +#include <QGraphicsView> +#include <QWheelEvent> +#include <QDragMoveEvent> + +class AvatarGraphicsView : public QGraphicsView +{ + Q_OBJECT + AvatarGraphicsView(const AvatarGraphicsView& cpy); + +public: + AvatarGraphicsView(QWidget* parent = nullptr); + inline void setAvatarSize(int size) { circleSize_ = size; }; + +private: + void wheelEvent(QWheelEvent* event); + void zoomImage(const QPoint& steps); + + void paintEvent(QPaintEvent* e); + + const qreal zoomIncrement_ = 1.03; + int circleSize_ = 130; +}; \ No newline at end of file diff --git a/bannedlistmodel.cpp b/bannedlistmodel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1bd85e60d197b4aa0b4afcdad935e12fbd8d1a54 --- /dev/null +++ b/bannedlistmodel.cpp @@ -0,0 +1,40 @@ +/*************************************************************************** +* Copyright (C) 2018 by Savoir-faire Linux * +* Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see <http://www.gnu.org/licenses/>. * +***************************************************************************/ + +#include "bannedlistmodel.h" +#include "lrcinstance.h" + +BannedListModel::BannedListModel(QObject *parent) + : QAbstractListModel(parent) +{ +} + +int +BannedListModel::rowCount(const QModelIndex &index) const +{ + if (!index.isValid()) { + return LRCInstance::accountModel().getAccountList().size(); // count + } + return 0; // A valid QModelIndex returns 0 as no entry has sub-elements +} + +bool +BannedListModel::setData(const QModelIndex& index, const QVariant& value, int role) +{ + return 1; +} \ No newline at end of file diff --git a/bannedlistmodel.h b/bannedlistmodel.h new file mode 100644 index 0000000000000000000000000000000000000000..2aa96b4fe3a3c51ec93a5b7a6e8b93d671e290e7 --- /dev/null +++ b/bannedlistmodel.h @@ -0,0 +1,33 @@ +/*************************************************************************** +* Copyright (C) 2018 by Savoir-faire Linux * +* Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see <http://www.gnu.org/licenses/>. * +***************************************************************************/ +#pragma once + +#include <QAbstractListModel> + +class BannedListModel : public QAbstractListModel +{ + Q_OBJECT + BannedListModel(const BannedListModel& cpy); + +public: + explicit BannedListModel(QObject *parent = nullptr); + + int rowCount(const QModelIndex &index = QModelIndex()) const override; + bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override; + +}; diff --git a/callwidget.cpp b/callwidget.cpp index d5679f2df1a5d7e67eaf860f51ab815096354c72..98b64f023b3034788de6c4929496df5bf7f1c046 100644 --- a/callwidget.cpp +++ b/callwidget.cpp @@ -193,6 +193,8 @@ CallWidget::CallWidget(QWidget* parent) : // chat view ui->messageView->buildView(); + + emit setLeftSizeWidget(ui->currentAccountComboBox->width()); } CallWidget::~CallWidget() @@ -439,7 +441,7 @@ CallWidget::imageForConv(const std::string& convUid) const std::string& CallWidget::selectedAccountId() { - return LRCInstance::getSelectedAccountId(); + return LRCInstance::getCurrAccId(); } const std::string& @@ -502,6 +504,7 @@ CallWidget::invitationsButtonClicked() void CallWidget::settingsButtonClicked() { + emit setLeftSizeWidget(ui->currentAccountComboBox->width()); emit NavigationRequested(ScreenEnum::ConfScreen); } @@ -727,7 +730,7 @@ CallWidget::showIMOutOfCall(const QModelIndex& nodeIdx) QString contactURI = nodeIdx.data(static_cast<int>(SmartListModel::Role::URI)).toString(); bool isContact = false; - auto selectedAccountId = LRCInstance::getSelectedAccountId(); + auto selectedAccountId = LRCInstance::getCurrAccId(); auto& accountInfo = LRCInstance::accountModel().getAccountInfo(selectedAccountId); bool isRINGAccount = accountInfo.profileInfo.type == lrc::api::profile::Type::RING; try { @@ -1062,10 +1065,17 @@ CallWidget::updateSmartList() SLOT(smartListSelectionChanged(QItemSelection, QItemSelection))); } +void +CallWidget::updateComboBox() +{ + ui->currentAccountComboBox->updateComboBoxDisplay(); +} + void CallWidget::update() { updateSmartList(); updateConversationsFilterWidget(); + updateComboBox(); connectConversationModel(); } diff --git a/callwidget.h b/callwidget.h index e6b1f13f3caa5e4fc6c4edcadb35124651b42b17..15010743b87830d7bfb721535fa0d15a9b609742 100644 --- a/callwidget.h +++ b/callwidget.h @@ -64,6 +64,9 @@ public: explicit CallWidget(QWidget* parent = 0); ~CallWidget(); +signals: + void setLeftSizeWidget(int size); + public slots: void on_ringContactLineEdit_returnPressed(); @@ -125,6 +128,7 @@ private: void setConversationFilter(const QString& filter); void setConversationFilter(lrc::api::profile::Type filter); void updateConversationsFilterWidget(); + void updateComboBox(); const std::string& selectedAccountId(); const std::string& selectedConvUid(); diff --git a/callwidget.ui b/callwidget.ui index dcc32b1ce1707cffd5af68d4dc99752b2c0716eb..4541ae1db646f4b24ff1d564c1b65d72963598bc 100644 --- a/callwidget.ui +++ b/callwidget.ui @@ -440,6 +440,32 @@ <property name="bottomMargin"> <number>0</number> </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_9"> + <property name="spacing"> + <number>0</number> + </property> + <property name="topMargin"> + <number>7</number> + </property> + <property name="rightMargin"> + <number>7</number> + </property> + <item> + <spacer name="horizontalSpacer_11"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> <item> <spacer name="verticalSpacer"> <property name="orientation"> diff --git a/configurationwidget.cpp b/configurationwidget.cpp index 803a99b16049a12d00f5cfb10899d379335266a5..ee3fb956db95f3e1d678c1192763bfe1e6c39451 100644 --- a/configurationwidget.cpp +++ b/configurationwidget.cpp @@ -84,15 +84,15 @@ ConfigurationWidget::ConfigurationWidget(QWidget *parent) : accountStateDelegate_ = new AccountStateDelegate(); ui->accountView->setItemDelegate(accountStateDelegate_); - // connect delete button to popup trigger - connect(ui->deleteAccountBtn, &QPushButton::clicked, [=](){ - auto idx = ui->accountView->currentIndex(); - DeleteAccountDialog dialog(idx); - dialog.exec(); - if (!LRCInstance::accountModel().getAccountList().size()) { - emit NavigationRequested(ScreenEnum::WizardScreen); - } - }); + //// connect delete button to popup trigger + //connect(ui->deleteAccountBtn, &QPushButton::clicked, [=](){ + // auto idx = ui->accountView->currentIndex(); + // DeleteAccountDialog dialog(idx); + // dialog.exec(); + // if (!LRCInstance::accountModel().getAccountList().size()) { + // emit NavigationRequested(ScreenEnum::WizardScreen); + // } + //}); isLoading_ = true; ui->deviceBox->setModel(deviceModel_); diff --git a/configurationwidget.ui b/configurationwidget.ui index 58483456e7b23b3041c7b4a2261a9c2e39c9fde4..86e6cfd711a4f6e1013ef0c9a24c90413955d956 100644 --- a/configurationwidget.ui +++ b/configurationwidget.ui @@ -209,7 +209,7 @@ <bool>true</bool> </property> <property name="currentIndex"> - <number>0</number> + <number>1</number> </property> <widget class="QWidget" name="generalPage"> <layout class="QHBoxLayout" name="verticalLayout_2"> diff --git a/conversationitemdelegate.cpp b/conversationitemdelegate.cpp index 9c3f1f41db085346123b208bab5d2c0e92227126..015ee88d94ef22bfdba60b04902401e14ff17cc7 100644 --- a/conversationitemdelegate.cpp +++ b/conversationitemdelegate.cpp @@ -187,7 +187,7 @@ ConversationItemDelegate::paintRingConversationItem(QPainter* painter, QFontMetrics fontMetrics(font); // The name is displayed at the avatar's right - QString nameStr = index.data(static_cast<int>(SmartListModel::Role::DisplayName)).value<QString>();; + QString nameStr = index.data(static_cast<int>(SmartListModel::Role::DisplayName)).value<QString>(); if (!nameStr.isNull()) { font.setItalic(false); font.setBold(true); diff --git a/copy-runtime-files.ps1 b/copy-runtime-files.ps1 index 7ad7349b630d4fdc7b347b14519ade970376336e..bba75a0bd765f3b005b5b50c466f05a8853f5a33 100644 --- a/copy-runtime-files.ps1 +++ b/copy-runtime-files.ps1 @@ -64,6 +64,8 @@ $FilesToCopy = @( "$QtDir\bin\Qt5Widgets.dll", "$QtDir\bin\Qt5WinExtras.dll", "$QtDir\bin\Qt5Xml.dll", + "$QtDir\bin\Qt5Multimedia.dll", + "$QtDir\bin\Qt5MultimediaWidgets.dll", "$QtDir\bin\QtWebEngineProcess.exe", "$QtDir\resources\qtwebengine_resources.pak", "$QtDir\resources\icudtl.dat" diff --git a/currentaccountcombobox.cpp b/currentaccountcombobox.cpp index 59f0b6783fa41878e3a3a2419c460b10d726d2f0..a9888b4978539c96eecb6658ed5d2604ba89628c 100644 --- a/currentaccountcombobox.cpp +++ b/currentaccountcombobox.cpp @@ -59,8 +59,7 @@ CurrentAccountComboBox::CurrentAccountComboBox(QWidget* parent) } }); - gearPixmap_.load(":/images/icons/round-settings-24px.svg"); - gearLabel_.setPixmap(gearPixmap_); + gearLabel_.setPixmap(QPixmap(":/images/icons/round-settings-24px.svg")); gearLabel_.setParent(this); gearLabel_.setStyleSheet("background: transparent;"); setupSettingsButton(); @@ -134,16 +133,17 @@ CurrentAccountComboBox::paintEvent(QPaintEvent* e) } } -void CurrentAccountComboBox::resizeEvent(QResizeEvent * event) +void CurrentAccountComboBox::resizeEvent(QResizeEvent* event) { + Q_UNUSED(event); setupSettingsButton(); } void CurrentAccountComboBox::setupSettingsButton() { - gearPoint_.setX(this->width() - gearSize_ - 4 * gearBorder_); - gearPoint_.setY(this->height() / 2 - gearLabel_.height() / 2 - 2 * gearBorder_); + gearPoint_.setX(this->width() - gearSize_ - 4 * gearBorder_ + 2); + gearPoint_.setY(this->height() / 2 - gearLabel_.height() / 2 - 2 * gearBorder_ + 4.5); gearLabel_.setGeometry(gearPoint_.x() - 3, gearPoint_.y(), gearSize_ + 2 * gearBorder_, gearSize_ + 2 * gearBorder_); gearLabel_.setMargin(gearBorder_); @@ -209,7 +209,6 @@ CurrentAccountComboBox::hidePopup() gearLabel_.show(); popupPresent = false; QComboBox::hidePopup(); - } void @@ -217,4 +216,10 @@ CurrentAccountComboBox::leaveEvent(QEvent* event) { gearLabel_.setStyleSheet("background: transparent;"); QComboBox::leaveEvent(event); -} \ No newline at end of file +} + +void +CurrentAccountComboBox::updateComboBoxDisplay() +{ + importLabelPhoto(LRCInstance::getCurrentAccountIndex()); +} diff --git a/currentaccountcombobox.h b/currentaccountcombobox.h index 586d911d60546487c8280e7744e52a43e0ca005e..93f85965ee0c9b9fb88471f3b847b522080111ba 100644 --- a/currentaccountcombobox.h +++ b/currentaccountcombobox.h @@ -36,6 +36,7 @@ public: ~CurrentAccountComboBox(); void accountListUpdate(); void setCurrentIndex(int index); + void updateComboBoxDisplay(); signals: void settingsButtonClicked(); @@ -64,6 +65,5 @@ private: bool popupPresent = false; QPoint gearPoint_; - QPixmap gearPixmap_; QLabel gearLabel_; -}; \ No newline at end of file +}; diff --git a/deleteaccountdialog.cpp b/deleteaccountdialog.cpp index 852860502f3a94f8bc6792a113160ab53e3b433c..ef8c5751c2c9d4d81490d85e41c68d5611f60c7a 100644 --- a/deleteaccountdialog.cpp +++ b/deleteaccountdialog.cpp @@ -1,6 +1,7 @@ /*************************************************************************** - * Copyright (C) 2015-2017 by Savoir-faire Linux * + * Copyright (C) 2015-2018 by Savoir-faire Linux * * Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> * + * Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -19,26 +20,22 @@ #include "deleteaccountdialog.h" #include "ui_deleteaccountdialog.h" -// LRC -#include "accountmodel.h" -#include "itemdataroles.h" -#include "account.h" +#include "lrcinstance.h" +#include "utils.h" -DeleteAccountDialog::DeleteAccountDialog(const QModelIndex & idx, QWidget *parent) : +DeleteAccountDialog::DeleteAccountDialog(QWidget *parent) : QDialog(parent), - ui(new Ui::DeleteAccountDialog), - index_(idx) + ui(new Ui::DeleteAccountDialog) { - setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); ui->setupUi(this); - ui->accountAliasLabel->setText(AccountModel::instance().data(index_, Qt::DisplayRole).toString()); - auto ac = AccountModel::instance().getAccountByModelIndex(index_); - if (ac->protocol() == Account::Protocol::RING){ - ui->accountIdLabel->setAlignment(Qt::AlignCenter); - ui->accountIdLabel->setText((ac->registeredName().isEmpty())? ac->username(): ac->registeredName() + "\n" + ac->username()); + if (LRCInstance::getCurrentAccountInfo().profileInfo.type == lrc::api::profile::Type::RING){ + ui->labelBestId->setText(QString::fromStdString(Utils::bestNameForAccount(LRCInstance::getCurrentAccountInfo()))); + ui->labelAccountHash->setText(QString::fromStdString(LRCInstance::getCurrentAccountInfo().profileInfo.uri)); } else { - ui->warningLabel->hide(); + ui->labelWarning->hide(); } + connect(ui->btnDeleteAccept, &QPushButton::clicked, this, &DeleteAccountDialog::on_deleteAcceptBtn_clicked); + connect(ui->btnDeleteCancel, &QPushButton::clicked, this, &DeleteAccountDialog::on_deleteCancelBtn_clicked); } DeleteAccountDialog::~DeleteAccountDialog() @@ -46,15 +43,15 @@ DeleteAccountDialog::~DeleteAccountDialog() delete ui; } -void DeleteAccountDialog::on_deleteCancelBtn_clicked() +void +DeleteAccountDialog::on_deleteCancelBtn_clicked() { - close(); + done(0); } -void DeleteAccountDialog::on_deleteAcceptBtn_clicked() +void +DeleteAccountDialog::on_deleteAcceptBtn_clicked() { - auto account = AccountModel::instance().getAccountByModelIndex(index_); - AccountModel::instance().remove(account); - AccountModel::instance().save(); - close(); -} + LRCInstance::editableAccountModel()->removeAccount(LRCInstance::getCurrAccId()); + done(0); +} \ No newline at end of file diff --git a/deleteaccountdialog.h b/deleteaccountdialog.h index d06163c9d7a2369928f36464cd46d8b71faf3750..9e97c0df68b5fb9098843c3ec2860c9927fe68c9 100644 --- a/deleteaccountdialog.h +++ b/deleteaccountdialog.h @@ -1,6 +1,7 @@ /*************************************************************************** - * Copyright (C) 2015-2017 by Savoir-faire Linux * + * Copyright (C) 2015-2018 by Savoir-faire Linux * * Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> * + * Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -20,7 +21,6 @@ #define DELETEACCOUNTDIALOG_H #include <QDialog> -#include <QModelIndex> namespace Ui { class DeleteAccountDialog; @@ -31,20 +31,17 @@ class DeleteAccountDialog : public QDialog Q_OBJECT public: - DeleteAccountDialog(const QModelIndex & idx, QWidget *parent = 0); + DeleteAccountDialog(QWidget *parent = nullptr); ~DeleteAccountDialog(); -signals: - void deleteAcceptClicked(); - private slots: void on_deleteCancelBtn_clicked(); - void on_deleteAcceptBtn_clicked(); +signals: + void deleteAcceptClicked(); private: Ui::DeleteAccountDialog *ui; - QModelIndex index_; }; #endif // DELETEACCOUNTDIALOG_H diff --git a/deleteaccountdialog.ui b/deleteaccountdialog.ui index c30cdaa3e704f45f235bd4073f2644154b141921..13ef201e39b5bdd0a4ae609ab77669c020eb1d77 100644 --- a/deleteaccountdialog.ui +++ b/deleteaccountdialog.ui @@ -2,6 +2,9 @@ <ui version="4.0"> <class>DeleteAccountDialog</class> <widget class="QDialog" name="DeleteAccountDialog"> + <property name="windowModality"> + <enum>Qt::ApplicationModal</enum> + </property> <property name="geometry"> <rect> <x>0</x> @@ -10,67 +13,126 @@ <height>240</height> </rect> </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>400</width> + <height>240</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>400</width> + <height>240</height> + </size> + </property> <property name="windowTitle"> - <string>Ring - account deletion</string> + <string>Account deletion</string> </property> - <layout class="QVBoxLayout" name="verticalLayout" stretch="3,3,1,1,1,0,3,0"> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> + <property name="styleSheet"> + <string notr="true">background: white;</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout" stretch="3,1,1,0,0,0,0,0"> + <item alignment="Qt::AlignHCenter"> + <widget class="QLabel" name="labelDeletion"> + <property name="maximumSize"> <size> - <width>20</width> + <width>16777215</width> <height>40</height> </size> </property> - </spacer> - </item> - <item alignment="Qt::AlignHCenter"> - <widget class="QLabel" name="deletionLabel1"> + <property name="font"> + <font> + <pointsize>8</pointsize> + </font> + </property> <property name="text"> - <string>Do you really want to delete account ?</string> + <string>Do you really want to delete the following account?</string> </property> </widget> </item> <item alignment="Qt::AlignHCenter"> - <widget class="QLabel" name="accountAliasLabel"> + <widget class="QLabel" name="labelBestId"> <property name="minimumSize"> <size> <width>30</width> <height>0</height> </size> </property> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> <property name="text"> <string/> </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> </widget> </item> <item alignment="Qt::AlignHCenter"> - <widget class="QLabel" name="accountIdLabel"> + <widget class="QLabel" name="labelAccountHash"> <property name="minimumSize"> <size> <width>20</width> <height>0</height> </size> </property> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> <property name="text"> <string/> </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> </widget> </item> - <item alignment="Qt::AlignHCenter"> - <widget class="QLabel" name="deletionLabel2"> - <property name="text"> - <string>This action is irrevocable</string> + <item> + <spacer name="verticalSpacer_3"> + <property name="orientation"> + <enum>Qt::Vertical</enum> </property> - </widget> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>10</height> + </size> + </property> + </spacer> </item> <item alignment="Qt::AlignHCenter"> - <widget class="QLabel" name="warningLabel"> + <widget class="QLabel" name="labelWarning"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>250</width> + <height>0</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">color: red;</string> + </property> <property name="text"> - <string>If this account hasn't been exported, or added to another device, it will be lost</string> + <string>If this account hasn't been exported, or added to another device, it will be irrevocably lost.</string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> @@ -78,6 +140,9 @@ <property name="wordWrap"> <bool>true</bool> </property> + <property name="margin"> + <number>3</number> + </property> </widget> </item> <item> @@ -85,10 +150,13 @@ <property name="orientation"> <enum>Qt::Vertical</enum> </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> <property name="sizeHint" stdset="0"> <size> <width>20</width> - <height>40</height> + <height>20</height> </size> </property> </spacer> @@ -121,9 +189,9 @@ </spacer> </item> <item> - <widget class="QPushButton" name="deleteCancelBtn"> + <widget class="QPushButton" name="btnDeleteAccept"> <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -134,11 +202,20 @@ <height>30</height> </size> </property> + <property name="maximumSize"> + <size> + <width>130</width> + <height>30</height> + </size> + </property> <property name="toolTip"> - <string>Cancel contact deletion button</string> + <string>Permanently delete account</string> + </property> + <property name="styleSheet"> + <string notr="true">border: 0px;; border-radius:3px; background: rgb(245, 245, 245);</string> </property> <property name="text"> - <string>Cancel</string> + <string>Delete</string> </property> </widget> </item> @@ -156,7 +233,13 @@ </spacer> </item> <item> - <widget class="QPushButton" name="deleteAcceptBtn"> + <widget class="QPushButton" name="btnDeleteCancel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="minimumSize"> <size> <width>130</width> @@ -164,10 +247,13 @@ </size> </property> <property name="toolTip"> - <string>Validate contact deletion button</string> + <string>Cancel account deletion</string> + </property> + <property name="styleSheet"> + <string notr="true">border: 0px; border-radius:3px; background: rgb(245, 245, 245);</string> </property> <property name="text"> - <string>Ok</string> + <string>Cancel</string> </property> </widget> </item> @@ -186,6 +272,22 @@ </item> </layout> </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>5</height> + </size> + </property> + </spacer> + </item> </layout> </widget> <resources/> diff --git a/deviceeditwidget.ui b/deviceeditwidget.ui new file mode 100644 index 0000000000000000000000000000000000000000..5ebc24567dbb8610e679f239eb474f1bc8fd25b1 --- /dev/null +++ b/deviceeditwidget.ui @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Form</class> + <widget class="QWidget" name="Form"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>324</width> + <height>120</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <widget class="QLineEdit" name="lineEdit"> + <property name="geometry"> + <rect> + <x>30</x> + <y>20</y> + <width>113</width> + <height>20</height> + </rect> + </property> + </widget> + <widget class="QPushButton" name="pushButton"> + <property name="geometry"> + <rect> + <x>240</x> + <y>50</y> + <width>75</width> + <height>23</height> + </rect> + </property> + <property name="text"> + <string>PushButton</string> + </property> + </widget> + </widget> + <resources/> + <connections/> +</ui> diff --git a/images/ajax-loader.gif b/images/ajax-loader.gif new file mode 100644 index 0000000000000000000000000000000000000000..f2a1bc0c6f545e20e631a96e8e92f9822e75d046 Binary files /dev/null and b/images/ajax-loader.gif differ diff --git a/images/icons/round-add-24px.svg b/images/icons/round-add-24px.svg new file mode 100644 index 0000000000000000000000000000000000000000..a2fcb8eb77790536ea3c9029f0ea53888d6366df --- /dev/null +++ b/images/icons/round-add-24px.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"/></svg> \ No newline at end of file diff --git a/images/icons/round-arrow_drop_down-24px.svg b/images/icons/round-arrow_drop_down-24px.svg new file mode 100644 index 0000000000000000000000000000000000000000..49addb23ac2a3c02f4b9df4a6bea97dcbe87a751 --- /dev/null +++ b/images/icons/round-arrow_drop_down-24px.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M8.71 11.71l2.59 2.59c.39.39 1.02.39 1.41 0l2.59-2.59c.63-.63.18-1.71-.71-1.71H9.41c-.89 0-1.33 1.08-.7 1.71z"/></svg> \ No newline at end of file diff --git a/images/icons/round-arrow_drop_up-24px.svg b/images/icons/round-arrow_drop_up-24px.svg new file mode 100644 index 0000000000000000000000000000000000000000..f5477aec80328fecb35f71505cd882b878e9df8f --- /dev/null +++ b/images/icons/round-arrow_drop_up-24px.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M8.71 12.29L11.3 9.7c.39-.39 1.02-.39 1.41 0l2.59 2.59c.63.63.18 1.71-.71 1.71H9.41c-.89 0-1.33-1.08-.7-1.71z"/></svg> \ No newline at end of file diff --git a/images/icons/round-arrow_right-24px.svg b/images/icons/round-arrow_right-24px.svg new file mode 100644 index 0000000000000000000000000000000000000000..81124fadc1d9c3b48a961b021d3ab338925dde99 --- /dev/null +++ b/images/icons/round-arrow_right-24px.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M11.71 15.29l2.59-2.59c.39-.39.39-1.02 0-1.41L11.71 8.7c-.63-.62-1.71-.18-1.71.71v5.17c0 .9 1.08 1.34 1.71.71z"/></svg> \ No newline at end of file diff --git a/images/icons/round-check_circle-24px.svg b/images/icons/round-check_circle-24px.svg new file mode 100644 index 0000000000000000000000000000000000000000..7466a897ae0dccbf512c689552130877f01c00d1 --- /dev/null +++ b/images/icons/round-check_circle-24px.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29L5.7 12.7c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0z"/></svg> \ No newline at end of file diff --git a/images/icons/round-close-24px.svg b/images/icons/round-close-24px.svg new file mode 100644 index 0000000000000000000000000000000000000000..e7261bc0603f8ecc5ecffcee2bae7c13a0dd0b7b --- /dev/null +++ b/images/icons/round-close-24px.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/></svg> \ No newline at end of file diff --git a/images/icons/round-edit-24px.svg b/images/icons/round-edit-24px.svg new file mode 100644 index 0000000000000000000000000000000000000000..8d6bc172461aacd04ac28025fa07d4743bff779c --- /dev/null +++ b/images/icons/round-edit-24px.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1c-.1.1-.15.22-.15.36zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg> \ No newline at end of file diff --git a/images/icons/round-error-24px.svg b/images/icons/round-error-24px.svg new file mode 100644 index 0000000000000000000000000000000000000000..3daa4785fdb15d0d6c600897337966b7ad1fe7dd --- /dev/null +++ b/images/icons/round-error-24px.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"/></svg> \ No newline at end of file diff --git a/images/icons/round-folder-24px.svg b/images/icons/round-folder-24px.svg new file mode 100644 index 0000000000000000000000000000000000000000..4f02e223ddf232fbe366df90dcc2e46ca8f6e25e --- /dev/null +++ b/images/icons/round-folder-24px.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M10.59 4.59C10.21 4.21 9.7 4 9.17 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-1.41-1.41z"/></svg> \ No newline at end of file diff --git a/images/icons/round-remove_circle-24px.svg b/images/icons/round-remove_circle-24px.svg new file mode 100644 index 0000000000000000000000000000000000000000..9413863e69d6fef35082028813dbf37068a3fde0 --- /dev/null +++ b/images/icons/round-remove_circle-24px.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4 11H8c-.55 0-1-.45-1-1s.45-1 1-1h8c.55 0 1 .45 1 1s-.45 1-1 1z"/></svg> \ No newline at end of file diff --git a/images/icons/round-save_alt-24px.svg b/images/icons/round-save_alt-24px.svg new file mode 100644 index 0000000000000000000000000000000000000000..07b2cb525732436847eba16de599f064135a4f87 --- /dev/null +++ b/images/icons/round-save_alt-24px.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M19 13v5c0 .55-.45 1-1 1H6c-.55 0-1-.45-1-1v-5c0-.55-.45-1-1-1s-1 .45-1 1v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6c0-.55-.45-1-1-1s-1 .45-1 1zm-6-.33l1.88-1.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-3.59 3.59c-.39.39-1.02.39-1.41 0L7.7 12.2c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0L11 12.67V4c0-.55.45-1 1-1s1 .45 1 1v8.67z"/></svg> \ No newline at end of file diff --git a/images/icons/round-undo-24px.svg b/images/icons/round-undo-24px.svg new file mode 100644 index 0000000000000000000000000000000000000000..c0e924148c804641ce90a1d419bde6bd467eff95 --- /dev/null +++ b/images/icons/round-undo-24px.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L3.71 8.71C3.08 8.08 2 8.52 2 9.41V15c0 .55.45 1 1 1h5.59c.89 0 1.34-1.08.71-1.71l-1.91-1.91c1.39-1.16 3.16-1.88 5.12-1.88 3.16 0 5.89 1.84 7.19 4.5.27.56.91.84 1.5.64.71-.23 1.07-1.04.75-1.72C20.23 10.42 16.65 8 12.5 8z"/></svg> \ No newline at end of file diff --git a/invitebuttonswidget.ui b/invitebuttonswidget.ui index e3caf2eccfa0035b040a5acd7e1e9a29e25a9ccc..bb6169c60f2281d6bbc69709f88c4d3d3c35f649 100644 --- a/invitebuttonswidget.ui +++ b/invitebuttonswidget.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>323</width> - <height>114</height> + <height>120</height> </rect> </property> <property name="sizePolicy"> diff --git a/linkdevwidget.cpp b/linkdevwidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..43159715ca1dc94b0a98d3abbd64efbf9fe16444 --- /dev/null +++ b/linkdevwidget.cpp @@ -0,0 +1,80 @@ +/*************************************************************************** + * Copyright (C) 2018 by Savoir-faire Linux * + * Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <https://www.gnu.org/licenses/>. * + **************************************************************************/ + +#include "linkdevwidget.h" + +#include <QMovie> + +LinkDevWidget::LinkDevWidget(QWidget* parent) + : QWidget(parent), + ui(new Ui::LinkDevWidget) +{ + ui->setupUi(this); + + if (LRCInstance::getCurrAccConfig().archiveHasPassword) { + ui->stackedWidget->setCurrentWidget(ui->start); + } else { + setGeneratingPage(); + } + + connect(ui->enterBtn, &QPushButton::clicked, this, &LinkDevWidget::setGeneratingPage); + connect(&LRCInstance::accountModel(), &lrc::api::NewAccountModel::exportOnRingEnded, + this, &LinkDevWidget::setExportPage); +} + +LinkDevWidget::~LinkDevWidget() +{ + delete ui; +} + +void +LinkDevWidget::setGeneratingPage() +{ + ui->stackedWidget->setCurrentWidget(ui->middle); + + QMovie* movie = new QMovie(":/images/ajax-loader.gif"); + ui->spinningLabel->setMovie(movie); + ui->spinningLabel->show(); + movie->start(); + + LRCInstance::accountModel().exportOnRing(LRCInstance::getCurrAccId(), ui->passwordLineEdit->text().toStdString()); +} + +void +LinkDevWidget::setExportPage(const std::string& accountId, lrc::api::account::ExportOnRingStatus status, const std::string& pin) +{ + Q_UNUSED(accountId); + ui->stackedWidget->setCurrentWidget(ui->end); + + switch (status) { + case lrc::api::account::ExportOnRingStatus::WRONG_PASSWORD: + ui->label_4->setText(tr("Your account password was incorrect")); + ui->label_5->hide(); + ui->label_6->hide(); + break; + + case lrc::api::account::ExportOnRingStatus::SUCCESS: + ui->label_5->setText(QString::fromStdString(pin)); + break; + + default: + ui->label_4->setText(tr("Something went wrong.\nPlease try again later.")); + ui->label_5->hide(); + ui->label_6->hide(); + } +} \ No newline at end of file diff --git a/linkdevwidget.h b/linkdevwidget.h new file mode 100644 index 0000000000000000000000000000000000000000..740cca22d50e77b989f27224996ba9920a0fb12a --- /dev/null +++ b/linkdevwidget.h @@ -0,0 +1,49 @@ +/*************************************************************************** + * Copyright (C) 2018 by Savoir-faire Linux * + * Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <https://www.gnu.org/licenses/>. * + **************************************************************************/ + +#pragma once +#include <QPushButton> + +#include "lrcinstance.h" +#include "ui_linkdevwidget.h" + + +namespace Ui { + class LinkDevWidget; +} + +class LinkDevWidget : public QWidget +{ + Q_OBJECT + LinkDevWidget(const LinkDevWidget& cpy); + +public: + explicit LinkDevWidget(QWidget* parent = nullptr); + ~LinkDevWidget(); + inline const QPushButton* cancelBtn() const { return ui->cancelBtn; }; + inline const QPushButton* enterBtn() const { return ui->enterBtn; }; + inline const QPushButton* endCancelBtn() const { return ui->closePushButton; }; + + +private: + Ui::LinkDevWidget* ui; + +private slots: + void setGeneratingPage(); + void setExportPage(const std::string& accountId, lrc::api::account::ExportOnRingStatus status, const std::string& pin); +}; diff --git a/linkdevwidget.ui b/linkdevwidget.ui new file mode 100644 index 0000000000000000000000000000000000000000..b9bc7b7c84b6cd9a3e318e9de0a92a2392742a34 --- /dev/null +++ b/linkdevwidget.ui @@ -0,0 +1,611 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>LinkDevWidget</class> + <widget class="QWidget" name="LinkDevWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>744</width> + <height>848</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <widget class="QWidget" name="verticalLayoutWidget"> + <property name="geometry"> + <rect> + <x>9</x> + <y>9</y> + <width>701</width> + <height>791</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout" stretch="0"> + <item> + <widget class="QStackedWidget" name="stackedWidget"> + <property name="currentIndex"> + <number>1</number> + </property> + <widget class="QWidget" name="start"> + <widget class="QWidget" name="verticalLayoutWidget_2"> + <property name="geometry"> + <rect> + <x>9</x> + <y>19</y> + <width>681</width> + <height>761</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0,1"> + <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="label"> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string>Add A New Device</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Minimum</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_3"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <spacer name="horizontalSpacer_3"> + <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="label_2"> + <property name="text"> + <string>To add a new device, enter your account password:</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <spacer name="horizontalSpacer_7"> + <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="QLineEdit" name="passwordLineEdit"> + <property name="minimumSize"> + <size> + <width>250</width> + <height>0</height> + </size> + </property> + <property name="echoMode"> + <enum>QLineEdit::Password</enum> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_8"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <spacer name="horizontalSpacer_9"> + <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="cancelBtn"> + <property name="text"> + <string>Cancel</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_11"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="enterBtn"> + <property name="text"> + <string>Enter</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_10"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </widget> + <widget class="QWidget" name="middle"> + <widget class="QWidget" name="verticalLayoutWidget_3"> + <property name="geometry"> + <rect> + <x>14</x> + <y>9</y> + <width>671</width> + <height>771</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <spacer name="verticalSpacer_4"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QWidget" name="widget" native="true"> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_6" stretch="1,0,1"> + <item> + <spacer name="horizontalSpacer_12"> + <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="label_3"> + <property name="text"> + <string>Exporting account on the ring</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_13"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4" stretch="1,0,1"> + <item> + <spacer name="horizontalSpacer_5"> + <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="spinningLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>50</width> + <height>50</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>50</width> + <height>50</height> + </size> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_6"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="verticalSpacer_5"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </widget> + <widget class="QWidget" name="end"> + <widget class="QWidget" name="verticalLayoutWidget_4"> + <property name="geometry"> + <rect> + <x>10</x> + <y>10</y> + <width>681</width> + <height>771</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <spacer name="verticalSpacer_6"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <item> + <spacer name="horizontalSpacer_14"> + <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="label_4"> + <property name="text"> + <string>Your generated pin:</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_15"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_8"> + <item> + <spacer name="horizontalSpacer_16"> + <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="label_5"> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_17"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_9"> + <item> + <spacer name="horizontalSpacer_18"> + <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="label_6"> + <property name="text"> + <string>This pin and the account password should be entered in your device within 5 minutes.</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_19"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_10"> + <item> + <spacer name="horizontalSpacer_20"> + <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="closePushButton"> + <property name="text"> + <string>Close</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_21"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_7"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </widget> + </widget> + </item> + </layout> + </widget> + </widget> + <resources/> + <connections/> +</ui> diff --git a/lrcinstance.h b/lrcinstance.h index 1377dd6c9ed5d032e116b4e6fb5ef1da15dec1a1..57fe69b5bc49e3cc11835a78e2a1a5cb38b750ee 100644 --- a/lrcinstance.h +++ b/lrcinstance.h @@ -1,6 +1,7 @@ /************************************************************************** | Copyright (C) 2015-2018 by Savoir-faire Linux | | Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> | +| Author: Isa Nanic <isa.nanic@savoirfairelinux.com> | | | | This program is free software; you can redistribute it and/or modify | | it under the terms of the GNU General Public License as published by | @@ -13,7 +14,7 @@ | GNU General Public License for more details. | | | | You should have received a copy of the GNU General Public License | -| along with this program. If not, see <http://www.gnu.org/licenses/>. | +| along with this program. If not, see <https://www.gnu.org/licenses/>. | **************************************************************************/ #pragma once @@ -22,6 +23,9 @@ #endif #include <QSettings> +#include <QRegularExpression> +#include <QPixmap> +#include <QBuffer> #include "api/lrc.h" #include "api/account.h" @@ -33,6 +37,10 @@ #include "api/contact.h" #include "api/datatransfermodel.h" #include "api/conversationmodel.h" +#include "accountlistmodel.h" + +#include "account.h" +//#include "instancemanager.cpp" #include <settingskey.h> @@ -50,19 +58,25 @@ public: static const lrc::api::NewAccountModel& accountModel() { return instance().lrc_->getAccountModel(); }; + static lrc::api::NewAccountModel* editableAccountModel() { + return const_cast<lrc::api::NewAccountModel*>(&instance().lrc_->getAccountModel()); + }; static const lrc::api::BehaviorController& behaviorController() { return instance().lrc_->getBehaviorController(); }; static const lrc::api::DataTransferModel& dataTransferModel() { return instance().lrc_->getDataTransferModel(); }; + static lrc::api::DataTransferModel* editableDataTransferModel() { + return const_cast<lrc::api::DataTransferModel*>(&instance().lrc_->getDataTransferModel()); + }; static bool isConnected() { return instance().lrc_->isConnected(); }; static const lrc::api::account::Info& getCurrentAccountInfo() { - return accountModel().getAccountInfo(instance().selectedAccountId); + return accountModel().getAccountInfo(getCurrAccId()); }; static lrc::api::ConversationModel* @@ -75,8 +89,15 @@ public: return getCurrentAccountInfo().callModel.get(); }; - static const std::string& getSelectedAccountId() { - return instance().selectedAccountId; + static const int getAccountNumList() { + return accountModel().getAccountList().size(); + }; + + static const std::string& getCurrAccId() { + if (!instance().selectedAccountId.empty()) { + return instance().selectedAccountId; + } + return accountModel().getAccountList()[0]; }; static void setSelectedAccountId(const std::string& accountId) { @@ -101,8 +122,36 @@ public: } }; + static const int getCurrentAccountIndex(){ + for (int i = 0; i < accountModel().getAccountList().size(); i++) { + if (accountModel().getAccountList()[i] == getCurrAccId()) { + return i; + } + } + return -1; + }; + + static const QPixmap getCurrAccPixmap() { + return instance().accountListModel_.data(instance().accountListModel_ + .index(getCurrentAccountIndex()), AccountListModel::Role::Picture).value<QPixmap>(); + }; + + static void setCurrAccAvatar(const std::string& avatar) { + instance().editableAccountModel()->setAvatar(getCurrAccId(), avatar); + }; + + static void setCurrAccDisplayName(const std::string& alias) { + instance().editableAccountModel()->setAlias(getCurrAccId(), alias); + }; + + static const lrc::api::account::ConfProperties_t& getCurrAccConfig() { + return instance().getCurrentAccountInfo().confProperties; + } + + private: std::unique_ptr<lrc::api::Lrc> lrc_; + AccountListModel accountListModel_; static LRCInstance& instance() { static LRCInstance instance_; @@ -115,4 +164,4 @@ private: std::string selectedAccountId; std::string selectedConvUid; -}; \ No newline at end of file +}; diff --git a/mainwindow.cpp b/mainwindow.cpp index 176853cb0cb259c77bc1edfd94728205e3694562..5ba06da3ff20b31c84efe0aa85c36c1d15becbc0 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -39,9 +39,11 @@ #include "utils.h" #include "wizarddialog.h" #include "version.h" +#include "settingswidget.h" MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), + ui(new Ui::MainWindow) { ui->setupUi(this); @@ -56,7 +58,7 @@ MainWindow::MainWindow(QWidget* parent) : Utils::setStackWidget(ui->navStack, ui->navStack->widget(scr)); }); - connect(ui->configurationwidget, &ConfigurationWidget::NavigationRequested, + connect(ui->settingswidget, &SettingsWidget::NavigationRequested, [this](ScreenEnum scr) { Utils::setStackWidget(ui->navStack, ui->navStack->widget(scr)); if (scr == ScreenEnum::CallScreen) { @@ -64,6 +66,11 @@ MainWindow::MainWindow(QWidget* parent) : } }); + connect(ui->callwidget, &CallWidget::setLeftSizeWidget, [=](int size) { + ui->settingswidget->updateSettings(size); + } + ); + QIcon icon(":images/ring.png"); this->setWindowIcon(icon); diff --git a/mainwindow.ui b/mainwindow.ui index f4c675accd7351f181e6d81682ed905f819e2072..32e75f49abd955dd5419674dc10934e62dbf0955 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -465,6 +465,7 @@ <widget class="QStackedWidget" name="navStack"> <widget class="WizardWidget" name="wizardwidget"/> <widget class="CallWidget" name="callwidget"/> + <widget class="SettingsWidget" name="settingswidget"/> <widget class="ConfigurationWidget" name="configurationwidget"/> </widget> </item> diff --git a/navwidget.h b/navwidget.h index 189250b739cdada131e65729c68cba86b6b1ee1f..402d5f6208a0fca399c2b15f021b257e6db721a3 100644 --- a/navwidget.h +++ b/navwidget.h @@ -25,6 +25,7 @@ enum ScreenEnum { WizardScreen, CallScreen, ConfScreen, + SetttingsScreen, END }; diff --git a/passworddialog.cpp b/passworddialog.cpp new file mode 100644 index 0000000000000000000000000000000000000000..53084a72d3a70f3ead7c04e4f0f913762bd25994 --- /dev/null +++ b/passworddialog.cpp @@ -0,0 +1,108 @@ +/************************************************************************** +* Copyright (C) 2018 by Savoir-faire Linux * +* Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see <http://www.gnu.org/licenses/>. * +**************************************************************************/ +#include <QTimer> + +#include "passworddialog.h" +#include "ui_passworddialog.h" + +#include "lrcinstance.h" + +PasswordDialog::PasswordDialog(QWidget* parent) + :ui(new Ui::PasswordDialog), + QDialog(parent) +{ + ui->setupUi(this); + + ui->currentPsswdEdit->setEchoMode(QLineEdit::Password); + ui->newPsswdEdit->setEchoMode(QLineEdit::Password); + ui->confirmNewPsswdEdit->setEchoMode(QLineEdit::Password); + + if (!LRCInstance::getCurrAccConfig().archiveHasPassword) { + ui->currentPsswdEdit->hide(); + } else { + ui->currentPsswdEdit->show(); + } + + connect(ui->currentPsswdEdit, &QLineEdit::textChanged, this, &PasswordDialog::validateNewPsswd); + connect(ui->newPsswdEdit, &QLineEdit::textChanged, this, &PasswordDialog::validateNewPsswd); + connect(ui->confirmNewPsswdEdit, &QLineEdit::textChanged, this, &PasswordDialog::validateNewPsswd); + + connect(ui->confirmButton, &QPushButton::clicked, [=]() { + savePassword(); + } + ); + + connect(ui->cancelButton, &QPushButton::clicked, this, &PasswordDialog::closeSlot); + + ui->confirmButton->setEnabled(false); +} + +PasswordDialog::~PasswordDialog() +{ + delete ui; +} + +// only sets new password if both new passwords match +void +PasswordDialog::validateNewPsswd() +{ + ui->newPsswdEdit->setStyleSheet("border: 1px solid red;"); + ui->confirmNewPsswdEdit->setStyleSheet("border: 1px solid red;"); + + if (ui->newPsswdEdit->text() == ui->confirmNewPsswdEdit->text()) { + ui->newPsswdEdit->setStyleSheet("border: 1px solid green;"); + ui->confirmNewPsswdEdit->setStyleSheet("border: 1px solid green;"); + } + freeConfirmButton(); +} + +void +PasswordDialog::freeConfirmButton() +{ + if (ui->newPsswdEdit->text() == ui->confirmNewPsswdEdit->text()) { + ui->confirmButton->setEnabled(true); + } + else { + ui->confirmButton->setEnabled(false); + } +} + +void +PasswordDialog::savePassword() +{ + if (LRCInstance::editableAccountModel()->changeAccountPassword(LRCInstance::getCurrAccId(), + ui->currentPsswdEdit->text().toStdString(), ui->newPsswdEdit->text().toStdString())) { + ui->userMessageLabel->setText(tr("Password Changed Successfully")); + + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + ui->newPsswdEdit->text().isEmpty() ? confProps.archiveHasPassword = false : confProps.archiveHasPassword = true; + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); + + ui->cancelButton->hide(); + ui->confirmButton->hide(); + ui->currentPsswdEdit->hide(); + ui->newPsswdEdit->hide(); + ui->confirmNewPsswdEdit->hide(); + + QTimer::singleShot(900, this, SLOT(closeSlot())); + } + else { + ui->userMessageLabel->setText(tr("Current Password Incorrect")); + ui->currentPsswdEdit->setText(""); + } +} \ No newline at end of file diff --git a/passworddialog.h b/passworddialog.h new file mode 100644 index 0000000000000000000000000000000000000000..6480191fb98afb13902d0a0677f3411b3acc39ad --- /dev/null +++ b/passworddialog.h @@ -0,0 +1,44 @@ +/************************************************************************** +* Copyright (C) 2018 by Savoir-faire Linux * +* Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see <http://www.gnu.org/licenses/>. * +**************************************************************************/ + +#pragma once +#include <QDialog> + +namespace Ui { + class PasswordDialog; +} + +class PasswordDialog : public QDialog +{ + Q_OBJECT + PasswordDialog(const PasswordDialog& cpy); + +public: + PasswordDialog(QWidget* parent = nullptr); + ~PasswordDialog(); + +private slots: + void validateNewPsswd(); + inline void closeSlot() { done(0); }; + +private: + Ui::PasswordDialog* ui; + + void freeConfirmButton(); + void savePassword(); +}; \ No newline at end of file diff --git a/passworddialog.ui b/passworddialog.ui new file mode 100644 index 0000000000000000000000000000000000000000..ee4e26c7ad98340cc4ab0c6f69545af7a49907f2 --- /dev/null +++ b/passworddialog.ui @@ -0,0 +1,205 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>PasswordDialog</class> + <widget class="PasswordDialog" name="PasswordDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>458</width> + <height>250</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>440</width> + <height>250</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>458</width> + <height>268</height> + </size> + </property> + <property name="windowTitle"> + <string>Change Account Password</string> + </property> + <property name="styleSheet"> + <string notr="true">background: white;</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="sizeConstraint"> + <enum>QLayout::SetDefaultConstraint</enum> + </property> + <item> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <item> + <widget class="QLineEdit" name="currentPsswdEdit"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="text"> + <string/> + </property> + <property name="placeholderText"> + <string>Enter Current Password</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>15</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLineEdit" name="newPsswdEdit"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="placeholderText"> + <string>Enter New Password</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="confirmNewPsswdEdit"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="placeholderText"> + <string>Confirm New Password</string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>20</number> + </property> + <property name="leftMargin"> + <number>20</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>20</number> + </property> + <item> + <widget class="QPushButton" name="confirmButton"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background: rgb(237, 237, 237); border: 1px solid black;</string> + </property> + <property name="text"> + <string>Confirm</string> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="cancelButton"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background: rgb(237, 237, 237); border: 1px solid black;</string> + </property> + <property name="text"> + <string>Cancel</string> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="userMessageLabel"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>25</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <customwidgets> + <customwidget> + <class>PasswordDialog</class> + <extends>QWidget</extends> + <header>passworddialog.h</header> + <container>1</container> + </customwidget> + </customwidgets> + <resources/> + <connections/> +</ui> diff --git a/photoboothdialog.ui b/photoboothdialog.ui index 748b015b16377ee1060b12ecc37ac6419507b457..ed799eb63a9871a732f380d11eb268e480ac7ce6 100644 --- a/photoboothdialog.ui +++ b/photoboothdialog.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>791</width> - <height>456</height> + <width>709</width> + <height>386</height> </rect> </property> <property name="windowTitle"> diff --git a/regnamedialog.cpp b/regnamedialog.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5f9c7326bc03cfa73f17455078c940961698f7e6 --- /dev/null +++ b/regnamedialog.cpp @@ -0,0 +1,46 @@ +/************************************************************************** +* Copyright (C) 2018 by Savoir-faire Linux * +* Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see <http://www.gnu.org/licenses/>. * +**************************************************************************/ + +#include "regnamedialog.h" +#include "ui_regnamedialog.h" + +RegNameDialog::RegNameDialog(const QString& newRegName, QWidget* parent) + :ui(new Ui::RegNameDialog), + QDialog(parent) +{ + ui->setupUi(this); + ui->registeredName->setText(newRegName); + + connect(ui->confirmBtn, &QPushButton::clicked, [this]() { + accept(); + } + ); + + connect(ui->cancelBtn, &QPushButton::clicked, [this]() { + reject(); + } + ); + ui->registeredName->setTextInteractionFlags(Qt::TextSelectableByMouse); +} + +RegNameDialog::~RegNameDialog() +{ + disconnect(this); + delete ui; +} + diff --git a/regnamedialog.h b/regnamedialog.h new file mode 100644 index 0000000000000000000000000000000000000000..d213d7269ad4c901e2fc0914cb64f8b994c07e42 --- /dev/null +++ b/regnamedialog.h @@ -0,0 +1,37 @@ +/************************************************************************** +* Copyright (C) 2018 by Savoir-faire Linux * +* Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see <http://www.gnu.org/licenses/>. * +**************************************************************************/ + +#pragma once +#include <QDialog> + +namespace Ui { + class RegNameDialog; +} + +class RegNameDialog : public QDialog +{ + Q_OBJECT + RegNameDialog(const RegNameDialog& cpy); + +public: + RegNameDialog(const QString& newRegName = "", QWidget* parent = nullptr); + ~RegNameDialog(); + +private: + Ui::RegNameDialog* ui; +}; \ No newline at end of file diff --git a/regnamedialog.ui b/regnamedialog.ui new file mode 100644 index 0000000000000000000000000000000000000000..028f120ed19c33235a50cc84aa4fdaeaff80db07 --- /dev/null +++ b/regnamedialog.ui @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>RegNameDialog</class> + <widget class="QDialog" name="RegNameDialog"> + <property name="windowModality"> + <enum>Qt::ApplicationModal</enum> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>420</width> + <height>182</height> + </rect> + </property> + <property name="windowTitle"> + <string>Set Registered Name</string> + </property> + <property name="styleSheet"> + <string notr="true">background: white;</string> + </property> + <property name="modal"> + <bool>true</bool> + </property> + <widget class="QLabel" name="label"> + <property name="geometry"> + <rect> + <x>20</x> + <y>20</y> + <width>381</width> + <height>21</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string>Are you sure you would like to register this name?</string> + </property> + </widget> + <widget class="QLabel" name="label_2"> + <property name="geometry"> + <rect> + <x>30</x> + <y>50</y> + <width>351</width> + <height>16</height> + </rect> + </property> + <property name="text"> + <string>Once associated to this account, it cannot be changed.</string> + </property> + </widget> + <widget class="QPushButton" name="confirmBtn"> + <property name="geometry"> + <rect> + <x>70</x> + <y>140</y> + <width>151</width> + <height>23</height> + </rect> + </property> + <property name="text"> + <string>Confirm Registration</string> + </property> + </widget> + <widget class="QPushButton" name="cancelBtn"> + <property name="geometry"> + <rect> + <x>260</x> + <y>140</y> + <width>75</width> + <height>23</height> + </rect> + </property> + <property name="text"> + <string>Cancel</string> + </property> + </widget> + <widget class="QLabel" name="label_3"> + <property name="geometry"> + <rect> + <x>10</x> + <y>90</y> + <width>231</width> + <height>21</height> + </rect> + </property> + <property name="text"> + <string>Your new registered name would be:</string> + </property> + </widget> + <widget class="QLabel" name="registeredName"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="geometry"> + <rect> + <x>246</x> + <y>90</y> + <width>161</width> + <height>21</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string/> + </property> + </widget> + </widget> + <resources/> + <connections/> +</ui> diff --git a/ressources.qrc b/ressources.qrc index 51b40be02b54c44a411fd93267a4293792243bfa..65db376b6a66fd71eb7298fd84537b08e2ac587b 100644 --- a/ressources.qrc +++ b/ressources.qrc @@ -1,62 +1,76 @@ <RCC> - <qresource prefix="/"> - <file>stylesheet.css</file> - <file>images/ring.png</file> - <file>images/logo-ring-standard-coul.png</file> - <file>images/icons/ic_arrow_back_white_24dp.png</file> - <file>images/icons/ic_mic_off_white_24dp.png</file> - <file>images/icons/ic_person_add_white_24dp.png</file> - <file>images/icons/ic_search_black_18dp_2x.png</file> - <file>images/icons/ic_content_copy_white_24dp.png</file> - <file>images/icons/ic_send_white_24dp.png</file> - <file>images/icons/ic_group_add_white_24dp.png</file> - <file>images/icons/ic_videocam_off_white_24dp.png</file> - <file>images/icons/ic_high_quality_white_24dp.png</file> - <file>images/icons/ic_pause_white_24dp.png</file> - <file>images/icons/ic_chat_white_24dp.png</file> - <file>images/icons/ic_done_white_24dp.png</file> - <file>images/icons/ic_close_white_24dp.png</file> - <file>images/icons/ic_call_transfer_white_24px.png</file> - <file>images/icons/ic_pause_white_100px.png</file> - <file>images/icons/ic_videocam_white.png</file> - <file>images/icons/ic_add_black_18dp_2x.png</file> - <file>images/icons/ic_delete_black_18dp_2x.png</file> - <file>images/icons/ic_arrow_drop_down_black_18dp_2x.png</file> - <file>images/icons/ic_arrow_drop_up_black_18dp_2x.png</file> - <file>images/icons/ic_check_white_18dp_2x.png</file> - <file>images/icons/ic_folder_black_18dp_2x.png</file> - <file>images/icons/ic_arrow_forward_white_48dp_2x.png</file> - <file>images/icons/ic_settings_white_48dp_2x.png</file> - <file>images/icons/ic_voicemail_white_24dp_2x.png</file> - <file>images/background-light.png</file> - <file>images/background-dark.png</file> - <file>images/icons/ic_arrow_drop_down_black_9dp_2x.png</file> - <file>images/icons/ic_arrow_drop_up_black_9dp_2x.png</file> - <file>images/icons/ic_arrow_tab_next_black_9dp_2x.png</file> - <file>images/icons/ic_arrow_tab_previous_black_9dp_2x.png</file> - <file>images/spikeMask.png</file> - <file>images/icons/ic_photo_camera_white_24dp_2x.png</file> - <file>images/qrcode.png</file> - <file>images/icons/ic_share_black_48dp_2x.png</file> - <file>images/loading.gif</file> - <file>images/FontAwesome.otf</file> - <file>images/icons/ic_chat_black_24dp_2x.png</file> - <file>images/icons/ic_person_add_black_24dp_2x.png</file> - <file>images/waiting.gif</file> - <file>images/default_avatar_overlay.svg</file> - <file>images/icons/ic_clear_24px.svg</file> - <file>images/icons/ic_block_24px.svg</file> - <file>images/icons/ic_phone_24px.svg</file> - <file>images/icons/ic_video_call_24px.svg</file> - <file>images/icons/ic_arrow_back_24px.svg</file> - <file>images/icons/ic_send_24px.svg</file> - <file>images/icons/round-settings-24px.svg</file> - <file>web/chatview.css</file> - <file>web/chatview.html</file> - <file>web/chatview.js</file> - <file>web/linkify-html.js</file> - <file>web/linkify-string.js</file> - <file>web/linkify.js</file> - <file>web/qwebchannel.js</file> - </qresource> + <qresource prefix="/"> + <file>stylesheet.css</file> + <file>images/ajax-loader.gif</file> + <file>images/background-dark.png</file> + <file>images/background-light.png</file> + <file>images/default_avatar_overlay.svg</file> + <file>images/FontAwesome.otf</file> + <file>images/loading.gif</file> + <file>images/logo-ring-standard-coul.png</file> + <file>images/qrcode.png</file> + <file>images/ring.ico</file> + <file>images/ring.png</file> + <file>images/spikeMask.png</file> + <file>images/waiting.gif</file> + <file>images/icons/ic_add_black_18dp_2x.png</file> + <file>images/icons/ic_arrow_back_24px.svg</file> + <file>images/icons/ic_arrow_back_white_24dp.png</file> + <file>images/icons/ic_arrow_drop_down_black_9dp_2x.png</file> + <file>images/icons/ic_arrow_drop_down_black_18dp_2x.png</file> + <file>images/icons/ic_arrow_drop_up_black_9dp_2x.png</file> + <file>images/icons/ic_arrow_drop_up_black_18dp_2x.png</file> + <file>images/icons/ic_arrow_forward_white_48dp_2x.png</file> + <file>images/icons/ic_arrow_tab_next_black_9dp_2x.png</file> + <file>images/icons/ic_arrow_tab_previous_black_9dp_2x.png</file> + <file>images/icons/ic_block_24px.svg</file> + <file>images/icons/ic_call_transfer_white_24px.png</file> + <file>images/icons/ic_chat_black_24dp_2x.png</file> + <file>images/icons/ic_chat_white_24dp.png</file> + <file>images/icons/ic_check_white_18dp_2x.png</file> + <file>images/icons/ic_clear_24px.svg</file> + <file>images/icons/ic_close_white_24dp.png</file> + <file>images/icons/ic_content_copy_white_24dp.png</file> + <file>images/icons/ic_delete_black_18dp_2x.png</file> + <file>images/icons/ic_done_white_24dp.png</file> + <file>images/icons/ic_folder_black_18dp_2x.png</file> + <file>images/icons/ic_group_add_white_24dp.png</file> + <file>images/icons/ic_high_quality_white_24dp.png</file> + <file>images/icons/ic_mic_off_white_24dp.png</file> + <file>images/icons/ic_pause_white_24dp.png</file> + <file>images/icons/ic_pause_white_100px.png</file> + <file>images/icons/ic_person_add_black_24dp_2x.png</file> + <file>images/icons/ic_person_add_white_24dp.png</file> + <file>images/icons/ic_phone_24px.svg</file> + <file>images/icons/ic_photo_camera_white_24dp_2x.png</file> + <file>images/icons/ic_search_black_18dp_2x.png</file> + <file>images/icons/ic_send_24px.svg</file> + <file>images/icons/ic_send_white_24dp.png</file> + <file>images/icons/ic_settings_white_48dp_2x.png</file> + <file>images/icons/ic_share_black_48dp_2x.png</file> + <file>images/icons/ic_video_call_24px.svg</file> + <file>images/icons/ic_videocam_off_white_24dp.png</file> + <file>images/icons/ic_videocam_white.png</file> + <file>images/icons/ic_voicemail_white_24dp_2x.png</file> + <file>images/icons/round-add-24px.svg</file> + <file>images/icons/round-arrow_drop_down-24px.svg</file> + <file>images/icons/round-arrow_drop_up-24px.svg</file> + <file>images/icons/round-arrow_right-24px.svg</file> + <file>images/icons/round-close-24px.svg</file> + <file>images/icons/round-edit-24px.svg</file> + <file>images/icons/round-folder-24px.svg</file> + <file>images/icons/round-remove_circle-24px.svg</file> + <file>images/icons/round-settings-24px.svg</file> + <file>images/icons/round-undo-24px.svg</file> + <file>web/chatview.css</file> + <file>web/chatview.html</file> + <file>web/chatview.js</file> + <file>web/linkify.js</file> + <file>web/linkify-html.js</file> + <file>web/linkify-string.js</file> + <file>web/qwebchannel.js</file> + <file>images/icons/round-check_circle-24px.svg</file> + <file>images/icons/round-error-24px.svg</file> + <file>images/icons/round-save_alt-24px.svg</file> + </qresource> </RCC> diff --git a/ring-client-windows.sln b/ring-client-windows.sln index 9106f8c44781633dfd5b0878fc1dba413182a8ef..ca572fd7cd4d37885b59e329e26c14f21675b723 100644 --- a/ring-client-windows.sln +++ b/ring-client-windows.sln @@ -5,14 +5,14 @@ VisualStudioVersion = 15.0.27703.2026 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ring-client-windows", "ring-client-windows.vcxproj", "{0F6318E4-4C06-384E-BCA8-F344DA187957}" ProjectSection(ProjectDependencies) = postProject - {A604BA33-C1DB-34F6-8584-C429857717A8} = {A604BA33-C1DB-34F6-8584-C429857717A8} + {103832FC-21E8-3D6C-8C85-21D927092562} = {103832FC-21E8-3D6C-8C85-21D927092562} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ring-daemon", "..\daemon\MSVC\ring-daemon.vcxproj", "{79F8DE42-595D-49D9-A66F-55244FD9DCC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ringclient_static", "..\lrc\msvc\ringclient_static.vcxproj", "{A604BA33-C1DB-34F6-8584-C429857717A8}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ringclient_static", "..\lrc\msvc\ringclient_static.vcxproj", "{103832FC-21E8-3D6C-8C85-21D927092562}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qtwrapper", "..\lrc\msvc\src\qtwrapper\qtwrapper.vcxproj", "{8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qtwrapper", "..\lrc\msvc\src\qtwrapper\qtwrapper.vcxproj", "{75CF859A-E546-32BB-8806-448BDB78A8C4}" ProjectSection(ProjectDependencies) = postProject {79F8DE42-595D-49D9-A66F-55244FD9DCC3} = {79F8DE42-595D-49D9-A66F-55244FD9DCC3} EndProjectSection @@ -99,60 +99,62 @@ Global {79F8DE42-595D-49D9-A66F-55244FD9DCC3}.RelWithDebInfo|x64.Build.0 = ReleaseLib|x64 {79F8DE42-595D-49D9-A66F-55244FD9DCC3}.RelWithDebInfo|x86.ActiveCfg = ReleaseLib|Win32 {79F8DE42-595D-49D9-A66F-55244FD9DCC3}.RelWithDebInfo|x86.Build.0 = ReleaseLib|Win32 - {A604BA33-C1DB-34F6-8584-C429857717A8}.Debug|x64.ActiveCfg = Debug|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.Debug|x64.Build.0 = Debug|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.Debug|x86.ActiveCfg = Debug|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.DebugLib_win32|x64.ActiveCfg = Debug|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.DebugLib_win32|x64.Build.0 = Debug|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.DebugLib_win32|x86.ActiveCfg = MinSizeRel|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.DebugLib_win32|x86.Build.0 = MinSizeRel|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.DebugLib|x64.ActiveCfg = Debug|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.DebugLib|x64.Build.0 = Debug|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.DebugLib|x86.ActiveCfg = MinSizeRel|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.DebugLib|x86.Build.0 = MinSizeRel|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.MinSizeRel|x86.ActiveCfg = MinSizeRel|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.Release|x64.ActiveCfg = Release|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.Release|x86.ActiveCfg = Release|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.ReleaseLib_win32|x64.ActiveCfg = Release|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.ReleaseLib_win32|x64.Build.0 = Release|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.ReleaseLib_win32|x86.ActiveCfg = MinSizeRel|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.ReleaseLib_win32|x86.Build.0 = MinSizeRel|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.ReleaseLib|x64.ActiveCfg = Release|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.ReleaseLib|x64.Build.0 = Release|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.ReleaseLib|x86.ActiveCfg = MinSizeRel|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.ReleaseLib|x86.Build.0 = MinSizeRel|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - {A604BA33-C1DB-34F6-8584-C429857717A8}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.Debug|x64.ActiveCfg = Debug|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.Debug|x64.Build.0 = Debug|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.Debug|x86.ActiveCfg = Debug|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.DebugLib_win32|x64.ActiveCfg = Debug|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.DebugLib_win32|x64.Build.0 = Debug|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.DebugLib_win32|x86.ActiveCfg = MinSizeRel|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.DebugLib_win32|x86.Build.0 = MinSizeRel|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.DebugLib|x64.ActiveCfg = Debug|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.DebugLib|x64.Build.0 = Debug|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.DebugLib|x86.ActiveCfg = MinSizeRel|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.DebugLib|x86.Build.0 = MinSizeRel|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.MinSizeRel|x86.ActiveCfg = MinSizeRel|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.Release|x64.ActiveCfg = Release|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.Release|x86.ActiveCfg = Release|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.ReleaseLib_win32|x64.ActiveCfg = Release|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.ReleaseLib_win32|x64.Build.0 = Release|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.ReleaseLib_win32|x86.ActiveCfg = MinSizeRel|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.ReleaseLib_win32|x86.Build.0 = MinSizeRel|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.ReleaseLib|x64.ActiveCfg = Release|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.ReleaseLib|x64.Build.0 = Release|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.ReleaseLib|x86.ActiveCfg = MinSizeRel|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.ReleaseLib|x86.Build.0 = MinSizeRel|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 - {8C3AD0D4-A52C-3EFB-A2C6-04EA3AB5F00E}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.Debug|x64.ActiveCfg = Debug|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.Debug|x64.Build.0 = Debug|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.Debug|x86.ActiveCfg = Debug|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.DebugLib_win32|x64.ActiveCfg = Debug|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.DebugLib_win32|x64.Build.0 = Debug|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.DebugLib_win32|x86.ActiveCfg = MinSizeRel|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.DebugLib_win32|x86.Build.0 = MinSizeRel|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.DebugLib|x64.ActiveCfg = Debug|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.DebugLib|x64.Build.0 = Debug|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.DebugLib|x86.ActiveCfg = MinSizeRel|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.DebugLib|x86.Build.0 = MinSizeRel|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.MinSizeRel|x86.ActiveCfg = MinSizeRel|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.Release|x64.ActiveCfg = Release|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.Release|x64.Build.0 = Release|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.Release|x86.ActiveCfg = Release|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.ReleaseLib_win32|x64.ActiveCfg = Release|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.ReleaseLib_win32|x64.Build.0 = Release|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.ReleaseLib_win32|x86.ActiveCfg = MinSizeRel|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.ReleaseLib_win32|x86.Build.0 = MinSizeRel|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.ReleaseLib|x64.ActiveCfg = Release|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.ReleaseLib|x64.Build.0 = Release|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.ReleaseLib|x86.ActiveCfg = MinSizeRel|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.ReleaseLib|x86.Build.0 = MinSizeRel|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 + {103832FC-21E8-3D6C-8C85-21D927092562}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.Debug|x64.ActiveCfg = Debug|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.Debug|x64.Build.0 = Debug|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.Debug|x86.ActiveCfg = Debug|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.DebugLib_win32|x64.ActiveCfg = Debug|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.DebugLib_win32|x64.Build.0 = Debug|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.DebugLib_win32|x86.ActiveCfg = MinSizeRel|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.DebugLib_win32|x86.Build.0 = MinSizeRel|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.DebugLib|x64.ActiveCfg = Debug|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.DebugLib|x64.Build.0 = Debug|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.DebugLib|x86.ActiveCfg = MinSizeRel|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.DebugLib|x86.Build.0 = MinSizeRel|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.MinSizeRel|x86.ActiveCfg = MinSizeRel|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.Release|x64.ActiveCfg = Release|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.Release|x64.Build.0 = Release|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.Release|x86.ActiveCfg = Release|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.ReleaseLib_win32|x64.ActiveCfg = Release|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.ReleaseLib_win32|x64.Build.0 = Release|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.ReleaseLib_win32|x86.ActiveCfg = MinSizeRel|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.ReleaseLib_win32|x86.Build.0 = MinSizeRel|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.ReleaseLib|x64.ActiveCfg = Release|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.ReleaseLib|x64.Build.0 = Release|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.ReleaseLib|x86.ActiveCfg = MinSizeRel|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.ReleaseLib|x86.Build.0 = MinSizeRel|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 + {75CF859A-E546-32BB-8806-448BDB78A8C4}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ring-client-windows.vcxproj b/ring-client-windows.vcxproj index 8d2867b525d5d53d42820b0e5b84a7831ae0dfa3..0d357db380b57bd7f56aa94b7e4d40c5e6868ad3 100644 --- a/ring-client-windows.vcxproj +++ b/ring-client-windows.vcxproj @@ -14,7 +14,7 @@ <ProjectGuid>{0F6318E4-4C06-384E-BCA8-F344DA187957}</ProjectGuid> <RootNamespace>Ring</RootNamespace> <Keyword>Qt4VSv1.0</Keyword> - <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion> + <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> @@ -92,7 +92,7 @@ <FunctionLevelLinking>true</FunctionLevelLinking> </ClCompile> <Link> - <AdditionalDependencies>dring.lib;qtwrapper.lib;ringclient_static.lib;WinSparkle.lib;qrcodelib.lib;shell32.lib;Ole32.lib;Advapi32.lib;Shlwapi.lib;User32.lib;Gdi32.lib;Crypt32.lib;Strmiids.lib;qtmain.lib;Qt5Svg.lib;Qt5Widgets.lib;Qt5WinExtras.lib;Qt5Gui.lib;Qt5Xml.lib;Qt5Network.lib;Qt5Core.lib;Qt5Sql.lib;Qt5WebEngineWidgets.lib;Qt5WebChannel.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>dring.lib;qtwrapper.lib;ringclient_static.lib;WinSparkle.lib;qrcodelib.lib;shell32.lib;Ole32.lib;Advapi32.lib;Shlwapi.lib;User32.lib;Gdi32.lib;Crypt32.lib;Strmiids.lib;qtmain.lib;Qt5Svg.lib;Qt5Widgets.lib;Qt5WinExtras.lib;Qt5Gui.lib;Qt5Xml.lib;Qt5Network.lib;Qt5Core.lib;Qt5Sql.lib;Qt5WebEngineWidgets.lib;Qt5WebChannel.lib;Qt5Multimedia.lib;Qt5MultimediaWidgets.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalLibraryDirectories>$(QTDIR)\lib;..\ring-daemon\contrib\msvc\lib\x64;..\daemon\contrib\msvc\lib\x64;..\ring-daemon\MSVC\x64\ReleaseLib_win32\bin;..\daemon\MSVC\x64\ReleaseLib_win32\bin;..\ring-lrc\msvc\release;..\lrc\msvc\release;..\ring-lrc\msvc\src\qtwrapper\Release;..\lrc\msvc\src\qtwrapper\Release;.\winsparkle\x64\release;.\qrencode-win32\qrencode-win32\vc8\qrcodelib\x64\Release-Lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /ignore:4006,4049,4078,4098 /LTCG /NODEFAULTLIB:LIBCMT %(AdditionalOptions)</AdditionalOptions> <DataExecutionPrevention>true</DataExecutionPrevention> @@ -219,6 +219,9 @@ </PreBuildEvent> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="advancedsettingswidget.cpp" /> + <ClCompile Include="avatargraphicsview.cpp" /> + <ClCompile Include="bannedlistmodel.cpp" /> <ClCompile Include="animationhelpers.cpp" /> <ClCompile Include="currentaccountcombobox.cpp" /> <ClCompile Include="aboutdialog.cpp" /> @@ -246,15 +249,18 @@ <ClCompile Include="globalsystemtray.cpp" /> <ClCompile Include="idlabel.cpp" /> <ClCompile Include="invitebuttonswidget.cpp" /> + <ClCompile Include="linkdevwidget.cpp" /> <ClCompile Include="main.cpp" /> <ClCompile Include="mainwindow.cpp" /> <ClCompile Include="messagewebpage.cpp" /> <ClCompile Include="messagewebview.cpp" /> <ClCompile Include="navwidget.cpp" /> + <ClCompile Include="passworddialog.cpp" /> <ClCompile Include="photoboothdialog.cpp" /> <ClCompile Include="photoboothwidget.cpp" /> <ClCompile Include="pixbufmanipulator.cpp" /> <ClCompile Include="qualitydialog.cpp" /> + <ClCompile Include="regnamedialog.cpp" /> <ClCompile Include="ringbutton.cpp" /> <ClCompile Include="ringcontactlineedit.cpp" /> <ClCompile Include="selectareadialog.cpp" /> @@ -269,6 +275,9 @@ <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG</Define> <Define Condition="'$(Configuration)|$(Platform)'=='ReleaseCompile|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG</Define> </ClCompile> + <ClCompile Include="setavatardialog.cpp" /> + <ClCompile Include="settingsitemwidget.cpp" /> + <ClCompile Include="settingswidget.cpp" /> <ClCompile Include="smartlistselectorbuttonnotifier.cpp" /> <ClCompile Include="smartlistview.cpp" /> <ClCompile Include="conversationitemdelegate.cpp" /> @@ -354,6 +363,22 @@ <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG</Define> <Define Condition="'$(Configuration)|$(Platform)'=='ReleaseCompile|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG</Define> </QtMoc> + <QtMoc Include="advancedsettingswidget.h"> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\.;.\GeneratedFiles;.;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\lrc\src;$(ProjectDir)..\client-windows\winsparkle\include;$(ProjectDir)..\client-windows\qrencode-win32\qrencode-win32;$(QTDIR)\include;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtXml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release</IncludePath> + <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG</Define> + </QtMoc> + <QtMoc Include="avatargraphicsview.h"> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\.;.\GeneratedFiles;.;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\lrc\src;$(ProjectDir)..\client-windows\winsparkle\include;$(ProjectDir)..\client-windows\qrencode-win32\qrencode-win32;$(QTDIR)\include;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtXml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets</IncludePath> + <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB</Define> + </QtMoc> + <QtMoc Include="bannedlistmodel.h"> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\.;.\GeneratedFiles;.;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\lrc\src;$(ProjectDir)..\client-windows\winsparkle\include;$(ProjectDir)..\client-windows\qrencode-win32\qrencode-win32;$(QTDIR)\include;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtXml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets</IncludePath> + <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB</Define> + </QtMoc> + <QtMoc Include="linkdevwidget.h"> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\.;.\GeneratedFiles;.;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\lrc\src;$(ProjectDir)..\client-windows\winsparkle\include;$(ProjectDir)..\client-windows\qrencode-win32\qrencode-win32;$(QTDIR)\include;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtXml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets</IncludePath> + <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB</Define> + </QtMoc> <ClInclude Include="lrcinstance.h" /> <QtMoc Include="messagewebview.h"> <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\.;.\GeneratedFiles;.;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\lrc\src;$(ProjectDir)..\client-windows\winsparkle\include;$(ProjectDir)..\client-windows\qrencode-win32\qrencode-win32;$(QTDIR)\include;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtXml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtWebEngineWidgets;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release</IncludePath> @@ -367,6 +392,10 @@ <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG</Define> <Define Condition="'$(Configuration)|$(Platform)'=='ReleaseCompile|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG</Define> </QtMoc> + <QtMoc Include="passworddialog.h"> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\.;.\GeneratedFiles;.;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\lrc\src;$(ProjectDir)..\client-windows\winsparkle\include;$(ProjectDir)..\client-windows\qrencode-win32\qrencode-win32;$(QTDIR)\include;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtXml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets</IncludePath> + <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB</Define> + </QtMoc> <ClInclude Include="pixbufmanipulator.h" /> <QtMoc Include="qualitydialog.h"> </QtMoc> @@ -374,11 +403,23 @@ </QtMoc> <QtMoc Include="ringcontactlineedit.h"> </QtMoc> + <QtMoc Include="regnamedialog.h"> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\.;.\GeneratedFiles;.;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\lrc\src;$(ProjectDir)..\client-windows\winsparkle\include;$(ProjectDir)..\client-windows\qrencode-win32\qrencode-win32;$(QTDIR)\include;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtXml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets</IncludePath> + <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB</Define> + </QtMoc> <ClInclude Include="ringthemeutils.h" /> <QtMoc Include="selectareadialog.h"> </QtMoc> <QtMoc Include="sendcontactrequestwidget.h"> </QtMoc> + <QtMoc Include="setavatardialog.h"> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\.;.\GeneratedFiles;.;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\lrc\src;$(ProjectDir)..\client-windows\winsparkle\include;$(ProjectDir)..\client-windows\qrencode-win32\qrencode-win32;$(QTDIR)\include;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtXml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release</IncludePath> + <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG</Define> + </QtMoc> + <ClInclude Include="settingsitemwidget.h"> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\.;.\GeneratedFiles;.;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\lrc\src;$(ProjectDir)..\client-windows\winsparkle\include;$(ProjectDir)..\client-windows\qrencode-win32\qrencode-win32;$(QTDIR)\include;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtXml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release;$(QTDIR)\include\QtMultimedia;$(QTDIR)\include\QtMultimediaWidgets</IncludePath> + <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG;QT_MULTIMEDIA_LIB;QT_MULTIMEDIAWIDGETS_LIB</Define> + </ClInclude> <ClInclude Include="settingskey.h" /> <QtMoc Include="smartlistview.h"> <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\.;.\GeneratedFiles;.;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\lrc\src;$(ProjectDir)..\client-windows\winsparkle\include;$(ProjectDir)..\client-windows\qrencode-win32\qrencode-win32;$(QTDIR)\include;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtXml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release</IncludePath> @@ -410,6 +451,11 @@ <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG</Define> <Define Condition="'$(Configuration)|$(Platform)'=='ReleaseCompile|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG</Define> </QtMoc> + <QtMoc Include="settingswidget.h"> + <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\.;.\GeneratedFiles;.;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\lrc\src;$(ProjectDir)..\client-windows\winsparkle\include;$(ProjectDir)..\client-windows\qrencode-win32\qrencode-win32;$(QTDIR)\include;$(QTDIR)\include\QtSvg;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtXml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release</IncludePath> + <Define Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;NIGHTLY_VERSION=20180706;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG</Define> + <SubType>Designer</SubType> + </QtMoc> <ClInclude Include="utils.h" /> <QtMoc Include="videooverlay.h"> </QtMoc> @@ -526,6 +572,9 @@ </QtUic> <QtUic Include="accountdetails.ui"> </QtUic> + <QtUic Include="advancedsettingswidget.ui"> + <SubType>Designer</SubType> + </QtUic> <QtUic Include="animatedoverlay.ui"> <SubType>Designer</SubType> </QtUic> @@ -543,11 +592,17 @@ <QtUic Include="contactrequestwidget.ui"> </QtUic> <QtUic Include="deleteaccountdialog.ui"> + <SubType>Designer</SubType> </QtUic> + <QtUic Include="deviceeditwidget.ui" /> <QtUic Include="invitebuttonswidget.ui" /> + <QtUic Include="linkdevwidget.ui" /> <QtUic Include="mainwindow.ui"> <SubType>Designer</SubType> </QtUic> + <QtUic Include="passworddialog.ui"> + <SubType>Designer</SubType> + </QtUic> <QtUic Include="photoboothdialog.ui"> </QtUic> <QtUic Include="photoboothwidget.ui"> @@ -556,10 +611,17 @@ </QtUic> <QtUic Include="quickactcontactrequestwidget.ui"> </QtUic> + <QtUic Include="regnamedialog.ui" /> <QtUic Include="ringbutton.ui"> </QtUic> <QtUic Include="sendcontactrequestwidget.ui"> </QtUic> + <QtUic Include="setavatardialog.ui"> + <SubType>Designer</SubType> + </QtUic> + <QtUic Include="settingswidget.ui"> + <SubType>Designer</SubType> + </QtUic> <QtUic Include="videooverlay.ui"> </QtUic> <QtUic Include="videoview.ui"> diff --git a/ring-client-windows.vcxproj.filters b/ring-client-windows.vcxproj.filters index d2e77d3928e780532f3f0543a1332841b13b511c..32b83a6b8748f40520153bf0dde34e2e2045f0d8 100644 --- a/ring-client-windows.vcxproj.filters +++ b/ring-client-windows.vcxproj.filters @@ -192,6 +192,36 @@ <ClCompile Include="animationhelpers.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="settingswidget.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="passworddialog.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="advancedsettingswidget.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="setavatardialog.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="avatargraphicsview.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="regnamedialog.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="accountlistmodel.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="bannedlistmodel.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="settingsitemwidget.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="linkdevwidget.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <QtMoc Include="aboutdialog.h"> @@ -326,6 +356,30 @@ <QtMoc Include="animationhelpers.h"> <Filter>Header Files</Filter> </QtMoc> + <QtMoc Include="settingswidget.h"> + <Filter>Header Files</Filter> + </QtMoc> + <QtMoc Include="passworddialog.h"> + <Filter>Header Files</Filter> + </QtMoc> + <QtMoc Include="advancedsettingswidget.h"> + <Filter>Header Files</Filter> + </QtMoc> + <QtMoc Include="setavatardialog.h"> + <Filter>Header Files</Filter> + </QtMoc> + <QtMoc Include="avatargraphicsview.h"> + <Filter>Header Files</Filter> + </QtMoc> + <QtMoc Include="regnamedialog.h"> + <Filter>Header Files</Filter> + </QtMoc> + <QtMoc Include="bannedlistmodel.h"> + <Filter>Header Files</Filter> + </QtMoc> + <QtMoc Include="linkdevwidget.h"> + <Filter>Header Files</Filter> + </QtMoc> </ItemGroup> <ItemGroup> <CustomBuild Include="debug\moc_predefs.h.cbt"> @@ -635,9 +689,30 @@ <QtUic Include="wizardwidget.ui"> <Filter>Form Files</Filter> </QtUic> + <QtUic Include="settingswidget.ui"> + <Filter>Form Files</Filter> + </QtUic> + <QtUic Include="passworddialog.ui"> + <Filter>Form Files</Filter> + </QtUic> + <QtUic Include="advancedsettingswidget.ui"> + <Filter>Form Files</Filter> + </QtUic> + <QtUic Include="setavatardialog.ui"> + <Filter>Form Files</Filter> + </QtUic> <QtUic Include="animatedoverlay.ui"> <Filter>Form Files</Filter> </QtUic> + <QtUic Include="regnamedialog.ui"> + <Filter>Form Files</Filter> + </QtUic> + <QtUic Include="deviceeditwidget.ui"> + <Filter>Form Files</Filter> + </QtUic> + <QtUic Include="linkdevwidget.ui"> + <Filter>Form Files</Filter> + </QtUic> </ItemGroup> <ItemGroup> <None Include="images\FontAwesome.otf"> @@ -783,6 +858,9 @@ <ClInclude Include="lrcinstance.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="settingsitemwidget.h"> + <Filter>Header Files</Filter> + </ClInclude> <ClInclude Include="webchathelpers.h"> <Filter>Header Files</Filter> </ClInclude> diff --git a/ringthemeutils.h b/ringthemeutils.h index 4536685069ab45269013e4bad6704ff520d47079..5434aca3a1980a7447bd73e52f61ccaca186b413 100644 --- a/ringthemeutils.h +++ b/ringthemeutils.h @@ -16,6 +16,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * **************************************************************************/ +#include <QColor> + #pragma once namespace RingTheme { diff --git a/ringtones/Makefile.am b/ringtones/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..64fab83013e4d451babb7ae788f2bfa7b0f605a8 --- /dev/null +++ b/ringtones/Makefile.am @@ -0,0 +1,5 @@ +ringringtonesdir = $(datadir)/ring/ringtones +dist_ringringtones_DATA = \ + konga.ul\ + default.wav \ + default.opus diff --git a/ringtones/default.opus b/ringtones/default.opus new file mode 100644 index 0000000000000000000000000000000000000000..c3c0a8076c1bdb474d95514005a0865063373b88 Binary files /dev/null and b/ringtones/default.opus differ diff --git a/ringtones/default.opus.LICENSE b/ringtones/default.opus.LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..98b99bfcbd12cb78da0d4c1fcefb3960b0cac4e9 --- /dev/null +++ b/ringtones/default.opus.LICENSE @@ -0,0 +1,4 @@ +Original file name: 171324__swidmark__ringtone.wav +Download location: https://freesound.org/people/swidmark/sounds/171324 +Uploader: https://freesound.org/people/swidmark +License: CC0 1.0 Universal (CC0 1.0) (https://creativecommons.org/publicdomain/zero/1.0/) diff --git a/ringtones/default.wav b/ringtones/default.wav new file mode 100644 index 0000000000000000000000000000000000000000..f68346e5a2df863e1e6741532042db4c173014e0 Binary files /dev/null and b/ringtones/default.wav differ diff --git a/ringtones/default.wav.LICENSE b/ringtones/default.wav.LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..98b99bfcbd12cb78da0d4c1fcefb3960b0cac4e9 --- /dev/null +++ b/ringtones/default.wav.LICENSE @@ -0,0 +1,4 @@ +Original file name: 171324__swidmark__ringtone.wav +Download location: https://freesound.org/people/swidmark/sounds/171324 +Uploader: https://freesound.org/people/swidmark +License: CC0 1.0 Universal (CC0 1.0) (https://creativecommons.org/publicdomain/zero/1.0/) diff --git a/ringtones/konga.ul b/ringtones/konga.ul new file mode 100644 index 0000000000000000000000000000000000000000..2191150e71526b6cbd1f19a76b0ee0ce955463d5 --- /dev/null +++ b/ringtones/konga.ul @@ -0,0 +1,11 @@ +�������������������������������������������������������������������������������������~����������~�������������������~������������������������~~�������������������������������~���}~{|~u}�w~z~z����iu�������k���i�z���r�j��������������������������������� +I�/$�����������������������% $5Ȭ�"��A/hnѡ������������PD? ;�������MH�ů�����������;1!"#.����cLG��Z<%.=ϾO0,,%'/Cཱུ���\7.$"$))+,//58<Xʺ��������������������������������������������qA84446>AA<2//4;>>=6/*'""$*,.+&"!#(++--+++*-.3>QS���nd������������������������������������������f���\D91//.)'*.26BA84.0/5;<41;>BEAOp˼�������qѾ���������Ȼ�����������������������e����XL>B]����OD;36//153/00,)).<GOU:18>N]SNNTVTID<??ELOD:;18=?Z~������J?Lu�����[EW�_Q��Ǿ��NMWx�ֻ�����\EROe���hF<:BD��YOOT_OPOJL��������\2/,087>@GKOF�bFD??=<<B]u��˼�jSj�����û���Ⱦ���������YS��^UGO�ý����ONLMEI�������xLL6/17COYfY���ECh���Ƿ��������T@CL`v�j^�����������Ƹ�����]�Z����RDCKt�kc��������|I>>FO`����nJCCENLGbmWJ>EIWWX[`���L=>:9<=Mr�����¿����̻������LK\���_SGE@GF_��ü����rW`��������Z<77AM����o�`REOkcb�����f@?FJOMKRPN^`e}����YXg�p�������NF:7>FGGDTu���ɾ������e\����������������������vh__\RSE?:9=::=U������{^gi\m]ZjVM]��������������������dNLSloYJGIUR]���������������������unk�ʼ����MJA<;=EMY\JG?<?EC?>@GFMa�������Ľ���NKFIPV^���z������������ne]t��l^dkbUKD>?IR[ZY`ov}�tv�iXU^m�����ÿ��������d\iprX]\XPK??>>===??CJSgho���u^s����y[W_����gVWY[\n��������˾�����YOq���jXUZ����^QHDHIKNdniv�b\a~��YZWX~�������_YW_dfWScz�������������rk\dq�v`]_geo{bVQOLKO_��������j����������������^WSNDCJKMJMSs���TMGHl���������������q]Xl������\WZTKGGJJKLNMPRLNVVOJJORU\���������ſ�����������p�����m]SXXZWNMOX\_e`ZXajcZSOQ_�������kWQKMQOPR_da^Z_m_XOMMRZYZk{���������in���������������xj]ds}yrjd]cdaTTKE>ACGKS[UOO[m���zc\Z_����������������������������z`YMLU[k���sVMFHGHIMPYi|�������o��������������������������jUOLNQOJKLKLR]c]VUSVTW[et�����xhi�������qy���������������������407=>LS5J��������U������( ')1�������;$& 03˟�L!#,������.6����-$N�����M.*8ì���0!����:&$'G��������D))7��������K9ϫ����L(&*+8Ӿ����H>6-3H��K:)#%0����r0$#$1��q?&$.=M���?-,+->ƫ�������Ȫ���H/.:Ͷ�������v.-:l�����I-.78I�ƹ���PE7469==61/358Ga���~?/$$+5Xϻ������������YC<=T�������ORTu�������Ͽ�����������������]@?J_Ƽ����C:55;99IohdK@FFLYlO9568;;FZ̾���QGDEI߿��þ��f�¾���������������jUM\ʽ�����YOQTR�½���wMIN����Z91..28Q�����U<-.07Q���QB9<>Eh����UJ?9=bµ����<89=�ø�����eOJD\f����h`Uj�ļ���NHJKX�¼���KC87:M����jKBFBLRT����L>?D]���vDB>>BO�Ž���J;78<I�ȿ���tnb��Ⱥ���G>;I忲���������������K<<DL�������NIMbͺ���L40/4Fa�����mD=<<J^t������yRFEN��qKDDO��������UE?F��ú���������������fJA@GV`q�SPY������mYL@61/1>CN\hg���a]_O_��[KIM^�����gIMKK\��Ƚ�������`^lml����ɽ������_HHNl����gOMDE\ndvfn���xWH?=7103EU������cMCDJWZf_bapk|f������gK?=DL�����_=4:=FOYOSQq����ټ�������˼���������ƿ�������X5--5<w�����UG<84873.,'$&(/8@BGA73-*.2?_ķ����SBGU����nH>AL�����������������������ǽ�����������������k������_D1+('(,6?KILG?;;;99:<=><;?ADPa�y^XID>=Lc�½��������ĺ������ey~����������ž����o]PQ[}������tC<78<AQc�p_^u������]J?>:<?CRYZYSOJFGKY]������jbZ]|��������������������������iYRVn�����������iWQLLQSgdz������VLIHM]^SKFFIIOOVV_b\TY^_n���ml`_UOQWp�����������~�����������������{l��������zTQXj������{{`^UMR^YONMLLS_{}kVJJJJN]j����j]NFHIOPSXUTaf~������eSRYc��������gho�����������������������������{VNZc��������pbjhZOPQPTV[[i���dYOOSY_ibh����qm\XX^]^lwx|�}y�����������������mico|��������������m`[^jonq���hYOMOUhwt|ne\^hjn�����kWV_n��ha]\Z^^\^o�������y`bn���������������nnnw���������bYZg�����u\Y^Zcl�����rs���zxmm_[Y[YNLS[^_f]NLQTg���������������p]SPRW]b|�����������������������sg_jj���������px}��ۼ������l�n�n�/0223FA34;?=;<;�÷���ƹ��������������\NNV`}XLA8679;>=<?Ol�����ȿ�������f^Od�Ⱦ��������|ROKE=?Nz����PG=;=?@AIV�����������aRPHHOd�þ������������r^RQ[m����}cYSLMMJJQ_{����ƿ�����zZMPs����������jWNHFFEJLNOMNVXTRNKFFJOZinit�����������}ssz�������������ia]_gmgeho�����������������������e][]l|�vfaYXchyr�mib^__`mehjhin��������tomnu���������oqpz�������w}nnojnwmb``is��������������{njewpp������������|gZY`hbj�����iWWURY[[cfgnwz���{svpivlp������{h`_cfp������ndmjim������yjrn^]bd���lv��������ui^^ft��������ccdgd_a]ce|��z�tu}xx{fxr�~���nyibgrqq������|��������~kilv���|r����{�����susx~�w����}niq����zdnjhcmw�������kd[\_nu��{��le^a`_^\]\^h���������{yqnro��y{����������}mnig������][aeg~~�����vu|�}�v�uqj��xj_]diq_h�����yx�zqd\\^kx�����}v|���vje_\Y[\i��������ln~�������h`j}�������|~o���ysolbicchjnqnhhmpumjw���ym_a\`^a^\fv|xy���������nkbls���������vy���oiuzy�������mi^b{�������tmkq~�������ytv���|mjhjca`dkbfcifcefix�����yxq�|qtw���zxww�������zffnn{�����������������zmorz�����������rhd^`fhijpojlqhed_^[\]\]_``br�������zk_^_f�������������{ypichz�������������{}v�������������}ufgfjkorssyswo`[[]_]]^^cfgt�������uha`agt{���������~uuonp����������������viifhflwxpwqxuwuv�������������������{wv~��yukgeeefed^a__cegu�����{��vnlo{�������xvqr������������vrrww}~wx����������}wwt�~{|���������|oihh{�����unlnty|yrvqqompz���x|oojhegmv���~yyz~�����~~tvp{������������������z}{��������zqnor������{tpphc`bckooqt�������{|yv����������{v|����zrpsrtzvnniiiimpu~������������������������~xpommntqqqkgedhly��|}vkgijpw������������������������}wumlkltv�}��~�}|~����������������������������}uvw{���|�}vnmlklkihjjkkkmv|�����}~�����~~��������������}|���������~xsw}|�~yvuvwx}�����������������}�{���zwnmpifmjlinkn��lrul���swk�l{ll�����mmp��j���������omxvoxtY�_k��jPf�����������_c>S'# +8�N� $�����R�������������������E50m&/-F�T�U(&#Ҧ�����������������������P3<�)$*\Z08:C()/+ />*,%$A�鷲��S�i�۬�������������������za/*3<=,!(318Z����������������������������U]UK@/..23))$ !&# %# "%=ͽ��nY]imϴ��������������������·����l9=H<D81-# !#+2.,-)))&"%+1BW�WE_ǯ����������������������������u?:0187?.+)+/24(*((,-,-,.FeZwf>?=Yо���������¹�������������j��LA<==IY�nIo<A9<J<Yd\YHG@AJ����[_S����z�ƻ���\��������OH߾�����_^CE6��{�IbC>UA>@>?�����[LOUU�����r��g������dOK?K����M�lKS>=D����[F;?;?c���\������ZǺ��ٿ������p��ƿ��I�OCS��wN91-@_osGX@:7;=<o���^Sk���������ܷ�����������ÿ��s�����S_�`MCV����WH?7<8.3;EKOOC@CSe���eMUv��ķ�������Ŀ��ҽ��|[NMX��Yt\@FB>:;:PFKERg]J<BcVw�����cmlOvo����aMk����LG>>���ʹ��~LM�b\\X^W|XbW`�����TNY��������iWU�`k�����LJ<?^]yKF^[�|^mTUgxf��WTBLPѼ���\��k��r�ͽ����d��������kMWXT`_u���Y_P?J?GN]REB=A?Dl�TJDLGS������������ɾ��������������������SeNFC>?768<BBIJTNOOI<<?EOg������p��������������������lWMHFgWdiYK=<=KTYg�lNLB<?Vv���iPk�Ļ����l�kZ_�ʾ������hZ��^G@EBKe�oWNNwsk�\__[�XYck���������������bUp��������������^OMLBCGORTUMMWNIGDGI[tfNFMx��û������������������miJ??ALH]aI??EMN���iMHX�����i]O]]�u�����_VKMd���PNPg�����ib�����������hO����iTIIJX]aTS\Z\e^Zbino�t`_������i]}���������nd^[f��UIORYa]x�jXSWW[UXhfp������������������x����SRKJPYaeielhd]][NSv���l��������k����`������vhx�z�vd^e^ZVf���bno\_`}db}��������������������njk����dZ_ja^beVUY[OMNOUn����������������������������cvY[Z[d_[YOICFKXyoZQS\Zt��������������������������������zUTSNNONPUSMQX]VPU^OIKMKWs����~��������������������������mz[X^UMIJHHISSLLJKKMOOQZr��������������������������{d[\f�ePKNIHLOOMOMJLOY[]d����~bs��������������������o������ma]ZXX[X\ejZUMMUPTOKMO]inmshbs}�������������������������|���f_WOOIOPOMOP~�ÿ����������������������ƻ����"#&$&&E�6%'%-7Ȫ�����������������ļ��O5'***&+&,0=?5<b�1!4:B13*%$.4;A3*%*6¹�bc����ͽ����������A,,/=�������I;49=D�ǻ���������A2+-5/*)('*'/;<;70.29M[]I?HQL<>O�;����MDB5,*$!"'0>@Ki������μ�������������������������������ŷ��������������Y>:64<CKF5/../42/,(&(*'#"$'/53.(%%',./00/.-.126C�徹��¿�������������������������������������OI=91/.,*)'%#!$%$%&'+-0357877::55=BIKSg��������������������������������������������`[MA@?CA=<<<=EJC>;:7779:==><;@@AAFo����\z������������������xfYQLKISOU_{{ddZUh�vdZNK?Nqol������dMLY\Z������zRNLHLN_ZOHFMO�fONINRVLFIMSy�h`nl_[F?ALYusenxgRik_Zlvkl�������û��Ǿ���������[\[h�������cJKTQMRRy����ucZUURKKP��q_cu_Wk\LJTn�������xUa����ƾ����������������������{�|mqo����zOMR[Rcn�[KFBFMOMLSY`^]][SJIM]op~�����~��ȿ�����_Zd����������s{[c�����������lONMWk�����WTWf�w_^YZTUT[Z|������q]\��������gZIIP^����W^]ZQNNULPY]p�p]VZi���������������������z������������{��zhypy�ma__WUNP[mrz��n^[neSKQW_�b\VNMIGIRTPPJHKPNJJO���������������������������������������_SPS[XUPQU[Z`ik�nm`VYYellf]_`eZZ]Zj��������RNMKLNTVagf^c_n���x_Za_p��������������vjdkkz������tnx�����|��b_m�|e_jeb^VKIIKLMLMU][k�����mjjd��������������zbftrb[]\XYTOORRRONMMPT\g�������������eiq}����������������m�������\S]ir{^WX]tolj`ZVWWVPQ[_\[agai|�����������������}������������{y��������tecXVQPSSV[_YW[_][]jp������w�����zomhss�����veYZTMOTWYY^k{����zj���������������������������fca\VXVSVVVWWYXRZ_YXTWZ[Z\_h���������������������������klsnkc]_binsxjnp��nh``eo�����vjb]XX\bihgoe_c`iqkhdco��������������ux�~�������}z�����{oeklm`]Z[[^bb_b^VTXZX[eb_^u��������uv���������������ykl���������yk^YTX\ky���jc^WXXWZ]]`kyxx�����r�����������������j�y��smm�x������2/L���V:;�������$ 60�����)������ + +#ɶ���! +#�����3ї���f&8�������F<+&6ʷ����0*:���/]���������$"'*:J�Ϭ���TFɬ��?E-'<�������8R�����Q4.&-�������79Ǭ���@+#"/E챞�����������B.=���B8Ȝ�����/9�����7%)<Ȫ����U/*(,=VSH><Vٷ������9>��������^���U:37/-,0���5-,-/,.8O�����>@˲���O������N:B����OEN�ú����X?6/,+3X����Ͻ��[PF���GBc�������e.+=W��D;436=X{SLFC85<JhgN>2((/:�ȱ���X<--;Fmy�������Ŵ��i9/..9Oī����{+*+2F����ϼ��o����LB@58Aį����5)!$3Mȸ���U:.-..03@�����_����hF:-.6N̽����JE?89=\�ļ�n_����������>>N�÷��kLC?GR�������d=>HQsŹ���������ν��k<47Alɹ�����MFEV�����^86=DS������C4<<iİ���O71/<W�������S:>CUƸ������]JCNڷ��J84=n������Y9..9Z�����o<9?EJ_�p���MA;<M���[F88O�º����[I41.2Do����������XL���YOKM������]MQHH^������W[���~iWJFDDHE�������W>5:Qϼ���I?<9Ht�����������jB:/.9W�Ƽ����VG=;AL������ngPc��ȼ�zC>;E�������jSLILKI`�����KHNv���bE=9;F�������A55Fb������M5,*0>�˹����OI[k��lR>;>JvϺ�����^A38=BԼ�����J:<G^�����C?EFGR����rL:>L㾾��VB426;R۽�����ND>Eo����������ſ���O=98=L]�ż����ZXS\oVQRIEFMt�¾���ZB>K^�����L768C_t������GD==??Mt����������\E>?@@D\���������PF>?FLYl^X���������Y@87?L�ž���TLFHR\�����eSMS`�����������wuqJ?:?I��ƾ����O>65?N���l��������x`D=>Bj�¼�����D@CN����TJGMe�����[XPc�������^KJIKO_�������VNMSRP\p��eVMN[{���~_^_SMSi�ļ���tIFM[��������}zml����bUURb�����mYOLOc������m^SOMZZm��zeYf������ZGBFMOZn������f\POKP[����������YSJMf���������OJHN_���������lsaQMUp���������kVPSVgo�������vZSQRVWh������jXTMKOMWo�������|oYTOQX`����������lh^[_k�x�hn����^OMVi�����{�����������SWh���������[VU_�����|VNJLTk��ona\\]i�����{_\]i��������eZZd�����re��������dYSQ\hk}���vigc[NN`�����h[Zc����������������kTOKVic�����lkcNN[cl����es�����zePV_h������oi\`kjo�i�����cP^\WYU]Xodޮ����������+/"2 >6� k�����NO����������������������'*' 0$'2<o0(Ī���˶��������8h�������?,|�.l���,-,"(/-' -̼¼���������������������������y<K^'"%( '(-:J^P������������������������������b:;?1(($! ((#++7G��^�����������������������������Y<6(#"##"$%#&+/0J�Z��������������������������������BJB=.(,+)'% #&&% (/77;A8D�ɾ�������������������e�����]mYG;32GJUJ?:F;U�����������ҿ�������Ű̸�̻���\I<BK���QG7*(32.9EE>E</..?8LX_U=HcNZVHN̻��������������ǻ�����EK@=O;_���JH99?>:8i˽�eO7C�g�Ƽ�l��¾���Ž��������QOgf7.=<>[�KE0(*+?�V??GC@N��|�Ŀ��z��ú�����μ������ڿ�����e_XbW�����?@F\YmpQh��wnA;?@C551//<Lp[@H<?Xig��ȶ���Ŀ����Ż�µ���������ɽ�Ͻ���KOQH\N{��I89@@>:CLINBK=C@;BEYh;Hf���x>98G�������ZU�Ľ�ƽ���u�e�o���II?J�whYNN�������������gcQ`���T[������������hICIMzo�[GF=HIIYiSHR^TH227O`����[\]Ou�����������v������YJEON�����YT[ozoOYQ]^��]�����ɺ��ĺ�������������f�WOLA@78473765<;>@B<?<CK<@?>B?[K�ƿ���¸���������ɻ��������������WZKBJ>EKMGCB69<FLFIB;?Dc������~��������RT^Zz�Ⱦ��RKTL\ZkUGCEVOYRVWOVVCGMW����������ü���������������������flTHF@=<;8=@<7988>ENQKCBRa�n�����¼��¾������������]YP]e�[G?@JLGj�I?:AO����y`hw�my]n����]`mݿ���`���Ż�������������Z[NB>ORaNF>78;DED?@HDIKNy�����t���»�����ľ�����þ�������p[INSNLAGDCHNZh[XaTURgwYV[k�����|b����������lYO^g{s\SS[^^XRONPac^YNVMT\dy�q[f��������������ǿ���������y�hubZ^_l_f^cpZMGLKNPWXJGNZY����ve����ykr�����r]������������_��������od����_�ho�����fr�_a[_k`�d\[NMVo��idn�����������zlj�����yw�����l_TQU[jpq_W\TYWYYW[OPX_vsp���pvqj�������������������������kp�����`bcjf`YMONKMT]TLIHSV]YUWez�������������������������~^Z^j��YY_ZY\[_YT[WYXYd\g�����b�������������������fgWg�yndmshh^^]tqm�t`ZZOTT[]PPKVXZclrkj��������������ͥ���ICL����I,&$$&$ܭ�����ZF~��ô�4$ "$'�������-&$)6=ũ�]-))2浤����L('*5������4)06ֽ�����L/ (/N괶��.#%%5è��N*+/A�������C,)):O������j<3G����E. $'7K����bGLHC㻵���JB;00<Ȭ�����YKO�����>58=Qjuí���:,()),:u�̹���EE\ɾ�X1-1;���������>/1Iί����H6<>=qؿ���TF>89BOTM@<>FMb¼����F/%&5O���������������wH;=Rپ�����a?0./9c��]PC>BJ����`��ZFG\���½�f@>K绯����d<867:DȺ������biUA;@UQIBGl�����W?619P��Ǿ���KJNX`�������bMRTz��nKFJV�ž��vJLD?ESs�������]XW��WE=>?Ga��Ǹ���M@>:<ES}������r[m��r\\JFO�Ž���Z?66?W��ƽ��cNB><>Gd����������pXMAFLX�ʿ���]`OF>CMc�������h\NIV|��LHLU�����WTU]n��������VV\WWr��������������L=8<Mg�������]JFHKMS}�]ROXmr�uXblr[Pl�Ǻ���yM;<AL�ľ�����WGAARc�������~O@AOVSHEGRcɽ�����d?<<?Z�ȿ��������j]f����_OMQ\���bSO[��������_C>:<LS_r�������kRQi��WOSy������\WTLMXi�������`XHDDBBJWlw������p\G?BIm�����pgRLZn����������q\J?;?Lz�������dNFELNVW`w����������tPLHMz�¿����ZRORY^������aT[flwwhULHFJ}������XC?HR�������\?:<?O�Ϳ��������iaXHADLa�ƾ�����`@<?BO������XJCGZ`����VOU\[[�����jLHS_�����eLDAHMn�������[[UYWXcmzt���������PD<<>Hl�������`THFKSb������������\QLLh������^IDDKTd������]OJFELW����������~ZLIIFLV��������mKGGJYl������������x[MLMVk�����|eSMO\m������of^[[\d�����������_NFIL[u�������VEAAGQVem�������jURNLOT_��������\QPTm������zmlj�����o��������mcVOIHN[�������gROKIMV������������aVVYVj�������^OHISg��������o]V[lkccfkm������ZTNOYj�������r[TQVZo���������vvf]PMQWk������i[POQUZg�������xlmmgfadt���������[TOT^o��������c`_[Zj����������kZTUV_h�������mXRPS^c�������|ohc``_i���������}ia[Z_l�������whj__^_djw��������ga[_v����������}no�����������oh^\]]]_x�����wcUOMOUan������|�utsnfj����������g^[[e���������kdbejt|������qlfb^_dmnhn������d[Z^y������������wz{jd^^m������i^_^TWcr������{s~viihf�����������tnfp��������m^da�Ƶ������������������������f�m��� !T�n.*'.�����������������������/*"+,%')/B��<&P���- *8;P������������C50)""I��������ļ�������������B2*%)F������g���6)(7iU>-'+-( &-/I�����N>+% $&)%&&)+.:ر��������������������������������������������[<-()*)-47*!#&/63*%!$!!! #'4Enǿ���ʹ�����������������������������������������_�sK=,% #""!!(-9HU_NKXWVKMZǰ�����������������������������������������ʿ�����cI::40///+(&""(/250***+-../3364303/.39743.1:=Wt~�����~HS��������������������������������������eGB@ER��QY^V^NQLWSkw_O\REFF:1102029:<=FUUID@=<>>CYXw����\MT�����Ȼ���������������Ƚ�����¹������������Ļ�Ǿ��|S:658>CDHEGMG==KPONMTx������hA95467<>Ar����������Ż��������Ǽ���TL`����Ž�������WKLQX~����nKFJKMGCKMHJACUnb\TY^�VE<;98AAPf����������ǽ������cIIi����~TNMMW��ǿ��������������h[M>=>Nx����lpVQFKYVZ����m]JGECA?DBACPYk�����\OQg}�������ZKC>CMPUYedw��ƽ������u_r��Ͻ������d^u��������aUNPKEC@>>><99?\���w_f_PSSXYbr�b_���������������������cYRWowdPNSj|���������������������r��~������XOKECAFEOSQLE>=CBDDBCLNbj������������YNKKTZbr�u�������������s``����|��f\MEDJMWd`^oyo�����q]VZci����ƿ������^XQ^kn^RRPPNLFFJIA??@??HL\a�����v�����m[_n����e]��������������������go|��sWOR^j����ngZVOSYXTRVTMMTZ\YOOMU\lw����t_TV^uf_ip�����������������oyt��v�zt��dUTONWb��������v�����������������lWXOJJNNONPYccfWJGGKp������������xuwcYY[p����wc[`VOSSU[]\acee[^_\VXXW]_ik���������������������jj����dX]efi]SPQR\e`\ZZ_^YUPS[u������r^SROQVVXX]][[\nzkf[Z\]b`r����������������������������^XZ^bkolhn{�|eYWNEDEFJQ_Z[\p}���vh``_���������������}whq���������zg^USZh�����xn_RURQUW[jv��������ln����������������������yrn]VTUSROKLMNU]hpwg\\^ZZkv�t��o~ku�uz���ϯ���U4),O@��* ���������ȱ����Z6�������+���$5������%!����� 7�����m.'2��������f!D��������"@��������8-�����O$$Qâ���^:1,(9���K)9����8 `��R( *CB�����]!*E��������˪����0!(M���������/"*=�����V&%(+E��8,$")+'" %)3L����W! 2��������¼��x��N+%*;��������K.+4O�������Ȳ����������Ⱦ�����R-,<ʩ����o(4���[@;-+,&(*))5^�����:'# 'Wǹ�����HO�ʺ��������ý�������ű�������YE8:Zǽ�����]>:8?>1%! %*7A|���5&%,38>?NYD=<Q��QAH35Uƨ�����<42B���������O>98Jժ���������VJ8/:?SŶ����:=1,&(9J�ɿ���K?80,2GWZ8/5C��^g:.244>��Ž���n?JFCMZɼ������������?3-?嶫�������x[YaU����ODLS^UK>GZVA=L]�����?%+@�ӻ���M.+),=H[\�ν���D::EKH88?Kȯ�������922=λ����������bVt˽���@=@G���D=>a�Ϳ���eN<.&$&-:?Uo�̾��zSFFUzL:8>kȿ���vB=?9=cܼ��������[MYLIO^��ҹ������?/0:I̽���WC97>x��������bOE>4,)*8BT�n�»�E,&#).4CXZIHFGK��M������λ�������������������KBBM�����H825K������7,())*7;BB:-$"6������T;;=<760+%$)*8Z�������CF�մ���������ɽ��������������������̼����I/,*+.3CM��[>/+**/57>>92.035:>A</'!"-6dȽ���qgLCJZw̿�ʿ������������¯��������Ź��������I;:78=]�����nr��T>0,('$'+18DIR|G3'"!#'-:>KI=<If������VE=;?R��ÿ����ʾ���������������������������]JNX��ĺ����`<70069:<<APUKGA<6/.+*++/2:Cr��mA4//4<SYRI?>AADOo�þ����������������ķ�������������������������zG?<958DU���`D4.,-279::;??;941/1;943568>Vt��L><;>Nzʽ���������������������������ǿ���������^NLSTo�����{YMMRSH?;6788?HHDFB<7/-04<EYZ`m[WKEKKDDLVV]y���������������������������������������������������x[IC@AGS^t�]WZPNMFE@=;;<;??DKNHC>;8:=FKMXZj����xo��������������������ǻ������������������������gUUW[cz����iWB=98=DECBC<;@EACEEDDFFMMYmt}xufZXZ\TOZy������k���¿���������������XR_����������ys������zZ]acZPOHDA?DHQ]�Ŵ�L�OsX���x�.))'')3,(*23///Qʰ���Ϸ���������������TU�}����@62211666=N��º���������U@?>B�Ƶ��������d=<;80.7E_���V>81/339:BLf^Vl���������o_f�˻�������Ǿ������jXVb�������]M>=96;>EJUk�˿�������L?@XԾ�����m_^RD><AHLJEB?>BDA@=<<<AHU^��������ʿ���������������������^SNNU]lbef�zjp����lKEHOXl������v[GCFJZ����}_SMNWSUPNIHHMU^_USRTY���������eUQh��Ŀ������s[ju������xn}���}ie_NLLOSUdbgi_gv�������}]\t�������k\_^gh`RMFJKKOXw����YJJFGKJQR\b��������������������������������lPMNPY|�����o_VNEDIJes�cgo���lUSWZUONMWjq���fTQNNPOPOY[}����m�~���������������������������ZRTp�������^TNNMJLMl��������]KKJMYgv����pibYb�~r�����doz����yzys�gUOWa�����k]TWcjkj���������������������v�t�y}s�����]QMKKOv���n\W\ab�s�����ls��ffo���o��{_UMMXaZg�����ierg_VW_g���������iiimuuuoe][Zl��������_`fl����e^NMT]ecfk�tj[XR_{�d`don����|he^[\aejr�������\WOSMU]i������ukkccpup^ZVfs���������|����tdfjh�������}gZ_l������e^_d��������p]YXZjlx���}e[XY\XY^r����ww���ylijfppq����������������g][bu�������}����������l_[Zduz������lc^YTRORY_go�m_bi_dc\[VUY`~�ohfo���������nfgv�����������������kbdmc^f��������}kfdh������������odY\aj|������h[QNQX__``^cc]`m������f\XZ^n}�����uwx�z{}���������������������ld^^as��������mafx{���������������ullhghhge\ZTPOPOOOOPT\_j������komkfi����������}~���������zvzx}����������x�������}z~y�yxqymmop|��}vc_\`fikkc^YWWZbiln����nbcjlxx��|{zvhim�����������������������������������������������~oibabr������wf`YWUTY\ejcbceifcbbgmqsmt�����|{�{�������xpmo{��������������������������������wrsyrvowz}tomhf`]YXY\binjgc^[XY^bu������pjeekw��������~�|{tzurq}��������zvm{����������������������������lfijprqorulf\[YZ[]_cmrnmdeadeghnjpw��������������������������������ynnuz����snmnty��������������������yvqmhfdaa_bghllkiljefinw�{xtztoy{����������������������|�����������yzou�y������n�Y[Tgfy���՜����� ����� ���-*��� + +o�����!5�����������������ȿ�?!0!+A!"'$(7"#Ϣ�������������A,_Ϋ���������NR��3!6U�( #7Z6@�������ſ����������������������/*1>)"$*&$&%-::gϺ��������������������������I4%$&(#$%& (.?CE::�����������������������������VCA0,2451,-#% "&%)1*-=F��T=/3߲�������������������������d��eIJBA<//$" $"))-0+)!!.>;LBFWHV�������������������������zy�i=:/3+)7:<:?1313:49FUR=9:49G�ŷ�̼�����������kw��ɭ���W;.4I?GK��MND:3EA9]5G=7ceZUXH����g�ij�����������������W^WPCoI@4(3/.342/SQL\;807BV����B������������������������Ke_EHB�?8*!#,2/$-&(*,,+6<A52/7eź�����������������������������_VZ<1,,/023.,,-/,+'('&$#"%.>�ǹ������˯���������������������sP�X7CH:;>7-+&,'*,2<?;/0??DANx}������ƻ����λ�������D���]oa==AH�����];7//-1:Fb�}RGS������ɿ��������Ƽ���n����e^�\_O@A=>CIDE>1.,11C�`\OBDO]���������yj���������Ƽ�������WLXNK^OOIM?60,--4=KLNEIJLSNU]Qz���ɾ�����ÿþ������������oeO_NW]SRE;533266<IZ��MFDEJ?KORVQjLkú�������������nV�jx����dOHfPTXZC@;8JLNVZWHK@:Ie���eKLN�Ϳ��������ǿ���I<JQ��Ÿ��UDLEKO[B>=@TW`����}cHGFZ~���������������������Tb��_q�����b]MA@CEFBBEJKFKVQ|����YEPU�������Ⱥ������ghX�������VKHHDE?;24=BK��_>:>E���������������dXSf�ɴ���UJKR�ÿ��VQ��������SXSEE[l�l[KCEFOT_MNYY�}_�������{������������������}ok^����LGJHIBHTROan������[SVi\Xc������������\m������UOOKLRQLVZ[]c|ex�e[KGIG]m��������i]���o��k�������r�cMNdnabdvfg����u|n�c`^g^an��kbo}j�����x�����aXUZSX|�������uq����i]n�������eUo���h��������c^XKILU^afiPLDCN[�_RYj����������������������������``gh���t^aZXNTLGE>?EHV\f��~VROO]�lhu|�����������������������wm�`nq_g_\KKKDEHJEBDEQ_jmc^yt�������Ͽ������������������ceo�_MMKIGMMLIKKIMOSNLQZ_m��f�������������������ʹ�����������������������������"+��-*.+Jʦ���������������������/%+,*$#*4���( ('$ (9i���-($*=ENΧ�����������EBK9, &>������|nlѿ������������e�?<J˿��cO?:7;2/*($(7I��E3+(# '<�и����V;3)" ,/38I[`[\Y�Ƿ�����������������ò��������������������������;.*+-9O���T8,+,-0/-)##!#+1.&""')(*+*,+++,/>Kݻ�����������������������������������������n?9473553*#!&*+**,-.45504:>=>Guɽ������������������������������������������ebJNTWUMA846=FKLF=3-)'$$'),*,+)''*4?FI?HSi���������������������ſ����������Ƚ�����k_OJ>8>M]�dO@@C??FRVW^B:9:?IS_�_K;69=M\_�����OUMRY��������I=9<GMRY�v[Qn��t�cYOFIS��Ⱦ����������������������o]��bY\[SKI??GPOLGD?A?:5225876:??;;8317?NX\n�����˺�������������������������������������PC?>AAJKK?=968>>?@HM[dcgYH:97:@CW�����tj_^l^������������������������»���������;�����fH@@FMLKIDB??>AEXg{fp_QGCCKPSWSW^UI=99<Lb������eNMNck������_^bhf`_�vee^g��ɾ���������������mgl�����������������[MGIOOYqbb^^dWI?ACJNMMONMME@?<:6558>??H_���������������������������������������k]fmjZMIGGDDKNOYYb[Y[VVZOIHHKLGC@@FMPk�����NJGBCDJL]nfdb]W^WLLRZ���������¾�������ln�����nw~�c~������|gWOOR__YVXQLLE?BEJNYWTPLIJMN^akemo{������Ƽ�������hjwvk}|��jRNNONKKJKOQv��������������|o�����eVQOQ_t��������������_RNSSVTNJKMOQRUVSSORQUZfaWSOLMR_}�����������������������������������������fNJHHIKLLJFFFA@BHPX����aUUcf������������������j`ooihi~�����o_Yk�����������������p�������~icaWUX^ZZ^^ZYSNLMLHDFIKRU]^s����v�������������������k`[[q�������f]\Y[f��������������ye_ZZbiimifd^_]]a^YX[_mtg_]_q��������~sm{��������������lbimgd^]\]kmc[WSKILNOYbowqv�����������������������������������{qc\WQNOW[k}�~^TMIGGIKOSX^bffrv���m��������������������������z_^ZY\YVY^\bginj_YWZYYa^ji�oin\]XP�ngd[j����������������ƒ���7..rJ�{:ŗ������A:L:=��F*�������# +%���(2�����[ +[�����=,�������"������ 쐑�� ̔����R( #������N(1����F$6ī���,'-:L������-&*&,Ǩ����:A�������, (8J�>J�����/+- ,Xߪ����ƻ���R,!.�������5+������%!/E������<%&-I[?2/>W{�������$ �����������WU��9"&>������1"ޯ��P5+:m�������r:8O�ĸ���;+,?������m$)8������S74HL/#%=庿��������6))D��������S@FY����M?N]>../3EUrB60>_����J8?DBG\��̶����KIJN���J953<Fgҭ����>>/'(3E������i��Ź�dD-,1]������=#%8���b,##-��������a�\H:$%(-C֫����b;,&&<{�������MTI>Uľ�A5=Q�����Q5/5<ϳ�����t7268<D{�;��ȹ�����;)!#,=Ư�����A;58>AI{��~B>Iz���IMm��Y�mŲ���X5'*5V��������?376@Ln�ĺ����N4,;?KAD_�θ�������2+&)>W������nv[H?@@̷��J4/4A˵��s;4>H��ɺ���`3+(1=IYʿ������SHReJ3-/Eɯ����P84//:Iں�����EA:773/6L��ʵ����dE=+)8ؾ�����U>77?Lb�˿������];/$#->n������R=0.68@Ib��������a_�VH@9<Nɲ����J:;<Brf������K?BU����TG:7:Kĵ����R/,2>q�������.'%(5K϶�����MSJ>=?40/3E߷������N,&).=b������>48O|ž��E<Geoc�����T7/6?������V5/02?rǼ����w_IE>;I`n�t�ÿ�����O1)(-6cų�����T>505Bs��{Z^e������iQ<:Gw�����m;804;Eʽ����G<7558D|������ɿ��P>85/2<�˸�����=527?I����_AAS]ɻ����F?9<?Ea������nOW������qRKMOZk������������V@457:Fh������M6/.0:?am��������aSMBC@?FN����fF;<Hd�����_IKJb�����dcj������{VD96<U�������J;977BZƿ����zc_~�lYFA@>L�ƻ����Q?79?X��������dWJQx�m_U[Yo�����G?==JS�Ĺ�����E<9?E_�������i`e���TKQWjp������ZNJKW^l����iVMO`�����TQLFRm�����rH>>FP��������\Y[SMZ�����������_KKMOUdm�˿���]GBCQ[����������hTKDBFZ��������tZFCDIf��������oOLHHNVu�������x[MEFPn��������l\TX�����������n]XW_]b_m�������M@??CJb������dituj\ON^���������SMDBLg������_^UY\bw����zlj_Z]ahnw���]Wi�����sNR_����������������rXHDIRl�����q^SCCKVf����nw���tf\ZUYiy��������ePTUVay�����q�q\SZQMRYo������md^]SNs�������nT[_N^n��ܟ����� �����짶�>[!� +m�����&������������������ܬ��?:)K�! 'BE/7F+*���ղ������^43CXױ�������S*'G�F+8BAʼ�^!'' 2иж�������������������������������~=��<3&( #,(%),2>պ�������������������������JMU����pJ>;><50+-)%+&1C}ƻ��|��Ȳ���������������������p�N�L=30401.(& #5>8?A98>ݫ�����������������������������m�QOaRn60('""%().+(#'3CFK=6:48H亭���ȿ������������g�L79=9?62'%""-76.3*/-0A;Naȿ���������������������������������lBET;;:<3-.-'!&#$.(+)'+(++++=OMQI?>JX]���������ź����]Z[IK��bK3LIDMG;8��ɺooF�\��Ŀ�ɮ���������������������Ľ�}=?@5AQC//()&##)+,6;?F;4=K�϶�������������������������ſ�SVlC85=G<:1./2/53//08:20,/;o�Ĺ�����ϼ���������������ȸ��dhOA:I?/41(,,-+,,61;9>FD:4:�fis��ź��������������������Xʽ����X?::HFQNG799083=:JLPG:69@LLOJ>AOWGF[Lr�����~fQG}Կ����������������cR�ھ������������ο��XMAf���¿���OqSOWYc�dbSMH<A7:AD9:2.02C]��RGFAJTZ��q��������������̼�������������W�g����ID><<@FO�����ZLGCMSk���_cHM��Ŀ������Zi�m�hUq`\�xO@=;:KFNGH>845<CMPO><<8:DVm���g��Ļ�����������»�������Ž��o]�z���hQECWM[QVPKMJ@D?BW~���f_ORaTunVUPOb����X]i�rbh����v~ZKORLLGIMOWMMWb�����oS��Ǿ�����ü���������������R@=<>E^L?:8>CDa�I=8>J����oMKOf|�ih��\PNZfڿ���Zam�Ƽ���g\�����������TJcm�rVUMHLVVVMNgs��t����������������������������jal�{dI>@CIELXQEEGBKIKJGGKY���n|������������ͽ�����o������������������eSZSdg���_TXYhVPY^V[ql]^�����YQWPKITYQX\�rff��^Y\cye^ee_o���yhv�������g�������}���������������������������^S����nrk`hh�fUKLNJNOV[Z\UHHC@JZ�XOY\u�������tir������������������������j`lYXNHHJNJObd|�����b[X^�����������������~����������od__TTNOPROFHJGHOWNKKFMY[\Y]����������������������������v]^n��]XSNQUZ\SQPMMLMNNSlvz�iQYTg����������������h^Y^{����ggnf_`�d����B9>[Q�S<(!#%���������������i&%%&/�������) $2:ϭ�6"*4ǭ����2'/�����}-#-2ί������9&&+:[�����@%%'>����E().9�������?$!%,A˭�����90O����M3#%-.Dϴ�������]ٳ����I95)*4������I:8<վ��\9,/7>hQȲ���P,+,,3P˺�����zeָ���<./:V��������.&(4v����Y:.066L�����]J=9;Dh��[GMV{߹�����C0$&6M�����������bT_vV9/0>V¹����M=/,.5aƼ��VBK�ñ������w|���ø���C@Wθ�����Q:.,,-9V������WJOB529IMF@G���F;7<��Ŀ����OMNXg����p�~_LHJMNSULDEW�����]HIFCJf��ɾ���������vLB?BKY��ĺ���K<:68>DLXg\m�aOFNVkWGI<:B^½���[B9:Jy��������SIA?FVƾ��������^LE<AIU������OVKA;;IZ��������mWNY���fV`������UWbn�������oUADGAACP_f�h��������eD:6>Hl̾������]TT_c����������������g��Ǿ����?866C]�������H>;<HJZ^������K@@IUXHDMZ�ƺ�����xC>=Dl����������oWSU����nLHIR���s^Wl���������SC>>HY^���¼����OQ_�kNJKe�����xVMJA@KT��þ��~XO@???BIc���������|XBAN]�����lYMGNYat��������ZK?:68Kd��������TLGOQ]h������������zXJEKV������WMIGIMN\�����VOV^inpaRNKIT�������iLEOp�������[>::=Nn�»���xrh[ONI?::ANz������jN;9=BO�������LGKV�����kbw��t�����}NJUe������MDBDJU�������aVNRON[cjll��������YC<;<I^�ƿ����[MDCEKT_f^��������b\LHHT������XGDEMXi������o\VNKNa�����������_MHFDIU���Ŀ���XJBCGL_����{��������YLKIPh������kUONWs�������]ZTUY`v����������\NFGKQl�������ZK@?FXh����������^WNJNO_{�������]KGIWl���u_]XWU[]ajhfq������{xi_QLLOo�������zXUMKS^������������[TSRO\�������XHBDM^��������~gYZtxgm���������YSMNZi�������lTNJKOXo��������lneYLKO\}�������i]XUZ\s��������olked^]jt~������nXJGIM[p������hVWROQ_����������m_VV[av��������]ROR\f�������lc_\\][cq��������wd]XZ`l��������qnbddgou���������o[UXf���������k_Y[hk��{������o^iachw�������pmhfghmx�������ukihimnv��������oifglp~�������~ukhilw���������~xtont}������ \ No newline at end of file diff --git a/setavatardialog.cpp b/setavatardialog.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2d0d3878f79356d968bab4bf1b56f680ccb3c0c3 --- /dev/null +++ b/setavatardialog.cpp @@ -0,0 +1,224 @@ +/************************************************************************** +* Copyright (C) 2018 by Savoir-faire Linux * +* Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see <https://www.gnu.org/licenses/>. * +**************************************************************************/ + +#include <QtMultimedia\QCameraInfo> +#include <QFileDialog> +#include <QAbstractScrollArea> +#include <QScreen> +#include <QWindow> +#include <QtMultimedia\QCameraImageCapture> +#include <QBuffer> + +#include "setavatardialog.h" +#include "ui_setavatardialog.h" + +#include "lrcinstance.h" +#include "accountlistmodel.h" +#include "currentaccountcombobox.h" + +SetAvatarDialog::SetAvatarDialog(QWidget* parent) + : QDialog(parent), + ui(new Ui::SetAvatarDialog), + videoWidget_(new QCameraViewfinder(this)), + camera_(new QCamera) +{ + ui->setupUi(this); + + connect(ui->cancelButton, &QPushButton::clicked, [&]() { + done(0); + } + ); + + connect(ui->saveButton, &QPushButton::clicked, this, &SetAvatarDialog::saveAvatar); + + connect(ui->selectFileButton, &QPushButton::clicked, this, &SetAvatarDialog::openFileManager); + + connect(ui->takePictureButton, &QPushButton::clicked, this, &SetAvatarDialog::captureImage); + + connect(ui->cameraButton, &QPushButton::clicked, this, &SetAvatarDialog::pictureMode); + + ui->graphicsView->setAvatarSize(avatarSize_); + + videoWidget_->setGeometry(ui->graphicsView->x(), ui->graphicsView->y(), + ui->graphicsView->width(), ui->graphicsView->height()); + + pictureMode(); + startCamera(); + + ui->horizontalLayout_2->update(); +} + +SetAvatarDialog::~SetAvatarDialog() +{ + disconnect(this); + delete mediaPlayer_; + delete videoWidget_; + delete imageCapture_; + delete camera_; + delete ui; +} + +void +SetAvatarDialog::startCamera() +{ + imageCapture_ = new QCameraImageCapture(camera_, this); + camera_->setCaptureMode(QCamera::CaptureViewfinder); + connect(imageCapture_, SIGNAL(imageSaved(int, const QString&)), + this, SLOT(imageCaptureSlot(int, const QString&))); +} + +bool +SetAvatarDialog::checkCamAvailable() +{ + if (QCameraInfo::availableCameras().count() > 0) { + return true; + } + else { + return false; + } +} + +// no support yet for back-facing camera [todo]; no support for portrait mode [todo] +void +SetAvatarDialog::pictureMode() +{ + if (checkCamAvailable()) { + camera_ = new QCamera(QCamera::FrontFace); + camera_->setViewfinder(videoWidget_); + + ui->graphicsView->hide(); + videoWidget_->show(); + + camera_->start(); + + ui->saveButton->hide(); + ui->cameraButton->hide(); + + ui->takePictureButton->show(); + ui->selectFileButton->show(); + } + else { + openFileManager(); // no camera detected so open file manager + } +} + +void +SetAvatarDialog::editMode() +{ + camera_->unlock(); + camera_->stop(); + + ui->takePictureButton->hide(); + + ui->saveButton->show(); + ui->cameraButton->show(); + ui->selectFileButton->show(); + + videoWidget_->hide(); + ui->graphicsView->show(); + configureAvatarScene(rawPixmap_); +} + +void +SetAvatarDialog::openFileManager() +{ + rawPixmap_.load(QFileDialog::getOpenFileName(this, + tr("Open Image"), "", tr("Image Files (*.png *.jpg *.bmp)"))); + editMode(); +} + +void +SetAvatarDialog::configureAvatarScene(const QPixmap& pixMap) +{ + if (!pixMap.isNull()) { + const int margin = 8; + QPen pen; + pen.setStyle(Qt::NoPen); + + graphicsScene_.clear(); + + graphicsScene_.addPixmap(pixMap); + graphicsScene_.addRect(-(pixMap.width()*margin - avatarSize_) / 2, + -(pixMap.height() * margin - avatarSize_) / 2, pixMap.width() * margin, pixMap.height() * margin, pen, QBrush()); + ui->graphicsView->setScene(&graphicsScene_); + } +} + +void +SetAvatarDialog::captureImage() +{ + startCamera(); + + camera_->setCaptureMode(QCamera::CaptureStillImage); + imageCapture_->setCaptureDestination(QCameraImageCapture::CaptureToFile); + + if (imageCapture_->isCaptureDestinationSupported(QCameraImageCapture::CaptureToFile)) { + camera_->searchAndLock(); + camera_->start(); + imageCapture_->capture(); + } +} + +// save avatar image and exit SetAvatarDialog +void +SetAvatarDialog::saveAvatar() +{ + avatarSize_ *= 2; + + QRect avatarRect((ui->graphicsView->width() - avatarSize_)/2 + ui->graphicsView->x(), (ui->graphicsView->height() - avatarSize_)/2 + ui->graphicsView->y(), + avatarSize_, avatarSize_); + + QRegion avatarRegion(avatarRect.x() - ui->graphicsView->x(), avatarRect.y() - ui->graphicsView->y(), + avatarSize_, avatarSize_, QRegion::Ellipse); + ui->graphicsView->setMask(avatarRegion); + + finalAvatarPixmap_ = grab(avatarRect); + + done(0); +} + +void +SetAvatarDialog::done(int exCode) +{ + QDialog::done(exCode); + if (!finalAvatarPixmap_.isNull()) { + QByteArray ba; + QBuffer bu(&ba); + finalAvatarPixmap_.save(&bu, "PNG"); + emit pixmapSignal(ba.toBase64().toStdString()); + } + else { + emit pixmapSignal(std::string()); + } + camera_->unlock(); + camera_->stop(); +} + +void +SetAvatarDialog::imageCaptureSlot(int useless, const QString& text) +{ + Q_UNUSED(useless); + + rawPixmap_ = rawPixmap_.fromImage(QImage(text)); + + if (!rawPixmap_.isNull()){ + editMode(); + } + QFile file(text); + file.remove(); // erase file +} diff --git a/setavatardialog.h b/setavatardialog.h new file mode 100644 index 0000000000000000000000000000000000000000..97780b00cce828df4e4be13f02164e4ef9b4820f --- /dev/null +++ b/setavatardialog.h @@ -0,0 +1,82 @@ +/************************************************************************** +* Copyright (C) 2018 by Savoir-faire Linux * +* Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 3 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program. If not, see <https://www.gnu.org/licenses/>. * +**************************************************************************/ + +#pragma once + +#include <QPushButton> + +#include <QAction> +#include <QDialog> +#include <QRegion> +#include <QtMultimedia\QCamera> +#include <QGraphicsScene> +#include <QtMultimedia\QMediaPlayer> +#include <QtMultimedia\QCameraImageCapture> +#include <QtMultimediaWidgets\QCameraViewfinder> +#include <QtMultimedia\QCameraImageCapture> + + +#include "accountlistmodel.h" +#include "avatargraphicsview.h" +#include "settingswidget.h" + +namespace Ui { + class SetAvatarDialog; +} + +class SetAvatarDialog : public QDialog +{ + Q_OBJECT + SetAvatarDialog(const SetAvatarDialog& cpy); + +public: + SetAvatarDialog(QWidget* parent = nullptr); + ~SetAvatarDialog(); + +signals: + void pixmapSignal(const std::string& avatarInBase64String); + +private slots: + void done(int exCode); + void imageCaptureSlot(int useless, const QString& text); + void pictureMode(); + void captureImage(); + void openFileManager(); + void saveAvatar(); + +private: + Ui::SetAvatarDialog* ui; + void startCamera(); + + void configureAvatarScene(const QPixmap& pixMap); + void editMode(); + + bool checkCamAvailable(); + + int avatarSize_ = 130; + + QMediaPlayer* mediaPlayer_; + + QCameraViewfinder* videoWidget_; + QCameraImageCapture* imageCapture_; + QCamera* camera_; + QGraphicsScene graphicsScene_; + + QPixmap rawPixmap_; + QPixmap finalAvatarPixmap_; +}; \ No newline at end of file diff --git a/setavatardialog.ui b/setavatardialog.ui new file mode 100644 index 0000000000000000000000000000000000000000..b91ca9c65eac80ce79792a2039c58d5d34f25957 --- /dev/null +++ b/setavatardialog.ui @@ -0,0 +1,226 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>SetAvatarDialog</class> + <widget class="QDialog" name="SetAvatarDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>530</width> + <height>373</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>530</width> + <height>373</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>530</width> + <height>373</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>800</width> + <height>590</height> + </size> + </property> + <property name="windowTitle"> + <string>Change Your Avatar Image</string> + </property> + <property name="styleSheet"> + <string notr="true">background: white;</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0,1"> + <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="AvatarGraphicsView" name="graphicsView" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>500</width> + <height>300</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="cursor"> + <cursorShape>CrossCursor</cursorShape> + </property> + <property name="mouseTracking"> + <bool>true</bool> + </property> + <property name="styleSheet"> + <string notr="true"/> + </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> + </layout> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>5</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>10</number> + </property> + <item> + <widget class="QPushButton" name="saveButton"> + <property name="minimumSize"> + <size> + <width>80</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background: rgb(245, 245, 245); border: 0px; border-radius: 3px;</string> + </property> + <property name="text"> + <string>Save</string> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="takePictureButton"> + <property name="minimumSize"> + <size> + <width>80</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background: rgb(245, 245, 245); border: 0px; border-radius: 3px;</string> + </property> + <property name="text"> + <string>Take Picture</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="cameraButton"> + <property name="minimumSize"> + <size> + <width>80</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background: rgb(245, 245, 245); border: 0px; border-radius: 3px;</string> + </property> + <property name="text"> + <string>Camera</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="selectFileButton"> + <property name="minimumSize"> + <size> + <width>80</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background: rgb(245, 245, 245); border: 0px; border-radius: 3px;</string> + </property> + <property name="text"> + <string>Select A File</string> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="cancelButton"> + <property name="minimumSize"> + <size> + <width>80</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background: rgb(245, 245, 245); border: 0px; border-radius: 3px;</string> + </property> + <property name="text"> + <string>Cancel</string> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + </layout> + </widget> + <customwidgets> + <customwidget> + <class>AvatarGraphicsView</class> + <extends>QWidget</extends> + <header>avatargraphicsview.h</header> + </customwidget> + </customwidgets> + <resources/> + <connections/> +</ui> diff --git a/settingsitemwidget.cpp b/settingsitemwidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..dfee4f4714b5581e4309b2919b20c04bae02128b --- /dev/null +++ b/settingsitemwidget.cpp @@ -0,0 +1,134 @@ +/**************************************************************************** + * Copyright (C) 2018 Savoir-faire Linux * + * Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <https://www.gnu.org/licenses/>. * + ***************************************************************************/ + +#include "settingsitemwidget.h" + +#include "lrcinstance.h" +#include "api/newdevicemodel.h" +#include "ringthemeutils.h" + + +SettingsItemWidget::SettingsItemWidget(int height, int index, bool banned, QListWidget* parent) + : QListWidgetItem(parent), + banned_(banned), + index_(index), + height_(height), + nameEdit_(new QLineEdit(parent)), + idlabel_(new QLabel(parent)), + button_(new QPushButton(parent)) +{ + setFlags(Qt::NoItemFlags); + // for all items: + button_->setGeometry(parent->width() - 50, verMargin_ + height_ * index_, 30, 36); + nameEdit_->setStyleSheet("border: 0px; border-radius: 3px; background: transparent;"); + idlabel_->setStyleSheet("border: 0px; border-radius: 3px; background: transparent;"); + button_->setStyleSheet("border: 0px; border-radius: 3px; background: transparent;"); + button_->setIconSize(QSize(22, 22)); + + nameEdit_->setGeometry(horMargin_, verMargin_ + height_ * index_, 300, 22); + nameEdit_->setReadOnly(true); + + idlabel_->setGeometry(horMargin_, verMargin_ + 20 + height_ * index_, 400, 22); + idlabel_->setTextInteractionFlags(Qt::NoTextInteraction); + + // end all items + + if (index_ % 2) { + setBackgroundColor(Qt::white); + } + else { + setBackgroundColor(RingTheme::smartlistHighlight_); + } + + if (!banned_) { // populate the device list + auto deviceList = LRCInstance::getCurrentAccountInfo().deviceModel->getAllDevices(); + auto it = deviceList.begin(); + std::advance(it, index_); + + nameEdit_->setText(QString::fromStdString(it->name)); + idlabel_->setText(QString::fromStdString(it->id)); + + if (!index_) { + button_->setIcon(QPixmap(":/images/icons/round-edit-24px.svg")); + button_->setToolTip(QObject::tr("Edit Device Name")); + + QObject::connect(button_, &QPushButton::pressed, [this]() { toggleEditable(); }); + } + else { + button_->setIcon(QPixmap(":/images/icons/round-remove_circle-24px.svg")); + button_->setToolTip(QObject::tr("Unlink Device From Account")); + } + nameEdit_->show(); + idlabel_->show(); + button_->show(); + } + else { // populate the banned contacts list + auto bannedContactList = LRCInstance::getCurrentAccountInfo().contactModel->getBannedContacts(); + auto it = bannedContactList.begin(); + std::advance(it, index_); + + auto contactInfo = LRCInstance::getCurrentAccountInfo().contactModel->getContact(*it); + + nameEdit_->setText(QString::fromStdString(contactInfo.registeredName)); + idlabel_->setText(QString::fromStdString(contactInfo.profileInfo.uri)); + button_->setIcon(QPixmap(":/images/icons/round-undo-24px.svg")); + button_->setToolTip(QObject::tr("Unblock Contact")); + + nameEdit_->show(); + idlabel_->show(); + button_->show(); + } + + QObject::connect(nameEdit_, &QLineEdit::editingFinished, [this]() { finishEdit(); }); +} + +SettingsItemWidget::~SettingsItemWidget() +{ + delete nameEdit_; + delete idlabel_; + delete button_; +} + +void +SettingsItemWidget::toggleEditable() +{ + if (!editable_) { + nameEdit_->setReadOnly(false); + nameEdit_->setStyleSheet("border: 0px; border-radius: 3px; background: white;"); + nameEdit_->setFocus(); + button_->setIcon(QPixmap(":/images/icons/round-save_alt-24px.svg")); + } + else { + finishEdit(); + } + editable_ =! editable_; +} + +void +SettingsItemWidget::finishEdit() +{ + if (!index_) { + nameEdit_->setReadOnly(true); + nameEdit_->setStyleSheet("border: 0px; border-radius: 3px; background: transparent;"); + button_->setIcon(QPixmap(":/images/icons/round-edit-24px.svg")); + + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + confProps.deviceName = nameEdit_->text().toStdString(); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); + } +} diff --git a/settingsitemwidget.h b/settingsitemwidget.h new file mode 100644 index 0000000000000000000000000000000000000000..44c4d9d288e9f4bbcd6c3793545de34cc8696e94 --- /dev/null +++ b/settingsitemwidget.h @@ -0,0 +1,50 @@ +/**************************************************************************** + * Copyright (C) 2018 Savoir-faire Linux * + * Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2.1 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + ***************************************************************************/ +#include <QListWidgetItem> +#include <QLineEdit> +#include <QLabel> +#include <QPushButton> + + + +class SettingsItemWidget : public QListWidgetItem +{ +public: + SettingsItemWidget(int height, int index, bool banned, QListWidget* parent = nullptr); + ~SettingsItemWidget(); + + QPushButton* button_; + +private: + bool selected_ = false; + bool banned_ = false; + const int index_; + const int height_; + + const int horMargin_ = 15; + const int verMargin_ = 8; + + QLineEdit* nameEdit_; + QLabel* idlabel_; + + void toggleEditable(); + void finishEdit(); + + bool editable_ = false; +}; + diff --git a/settingswidget.cpp b/settingswidget.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e372699b08fa467363ec6a184b98a2c4217b71e3 --- /dev/null +++ b/settingswidget.cpp @@ -0,0 +1,926 @@ +/*************************************************************************** + * Copyright (C) 2018 by Savoir-faire Linux * + * Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * + * Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>* + * Author: Anthony L�onard <anthony.leonard@savoirfairelinux.com> * + * Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <https://www.gnu.org/licenses/>. * + **************************************************************************/ +#include <QPixmap> +#include <QTimer> +#include <QModelIndex> +#include <QFileDialog> +#include <QInputDialog> +#include <QStandardPaths> +#include <QMessageBox> + +// account settings +#include "api/newdevicemodel.h" +#include "settingsitemwidget.h" + +#include "settingswidget.h" +#include "ui_settingswidget.h" + +#include "ui_advancedsettingswidget.h" + +#include "passworddialog.h" + +#include "regnamedialog.h" +#include "ui_regnamedialog.h" + +#include "setavatardialog.h" +#include "ui_setavatardialog.h" + +#include "deleteaccountdialog.h" +#include "ui_deleteaccountdialog.h" + + +// general Settings +#include "winsparkle.h" +#include "media/recordingmodel.h" + +// av setttings +#include "audio/settings.h" +#include "audio/outputdevicemodel.h" +#include "audio/inputdevicemodel.h" + +#include "video/devicemodel.h" +#include "video/channel.h" +#include "video/resolution.h" +#include "video/rate.h" +#include "video/previewmanager.h" + +#include "callmodel.h" + + + + +SettingsWidget::SettingsWidget(QWidget* parent) + : NavWidget(parent), + ui(new Ui::SettingsWidget), + scrollArea_(new QScrollArea), + deviceModel_(&Video::DeviceModel::instance()), + gif(new QMovie(":/images/ajax-loader.gif")) +{ + ui->setupUi(this); + + ui->accountSettingsButton->setAutoFillBackground(true); + ui->generalSettingsButton->setAutoFillBackground(true); + ui->avSettingsButton->setAutoFillBackground(true); + + ui->accountSettingsButton->setChecked(true); + + ui->exitSettingsButton->setIconSize(QSize(24, 24)); + ui->exitSettingsButton->setIcon(QPixmap(":/images/icons/round-close-24px.svg")); + + + // display name (aka alias) + ui->displayNameLineEdit->setAlignment(Qt::AlignHCenter); + ui->displayNameLineEdit->setPlaceholderText(tr("Enter the displayed name")); + + + setSelected(Button::accountSettingsButton); + + ui->currentRegisteredID->setReadOnly(true); + ui->currentRegisteredID->setStyleSheet("border : 0px;"); + + ui->currentRingID->setReadOnly(true); + + avatarSize_ = ui->currentAccountAvatar->width(); + + ui->currentAccountAvatar->setIconSize(QSize(avatarSize_, avatarSize_)); + + // create ellipse-selectable avatar image + QRegion avatarClickableRegion(-1, -1, + ui->currentAccountAvatar->width() + 2, ui->currentAccountAvatar->height() + 2, QRegion::Ellipse); + ui->currentAccountAvatar->setMask(avatarClickableRegion); + + QString styleS( + "QPushButton{" + " background-color: rgb(245, 245, 245);" + " border: 0px;" + "}" + " QPushButton:hover{" + " background-color: rgb(250, 250, 250);" + " border: 0px;" + " }" + + "QPushButton:checked{" + " background-color: white;" + " border: 0px;" + "}" + ); + + ui->accountSettingsButton->setStyleSheet(styleS); + ui->generalSettingsButton->setStyleSheet(styleS); + ui->avSettingsButton->setStyleSheet(styleS); + + ui->advancedAccountSettingsPButton->setIcon(QPixmap(":/images/icons/round-arrow_drop_down-24px.svg")); + ui->linkDevPushButton->setIcon(QPixmap(":/images/icons/round-add-24px.svg")); + ui->blockedContactsBtn->setIcon(QPixmap(":/images/icons/round-arrow_drop_up-24px.svg")); + + ui->advancedSettingsOffsetLabel->show(); + + setConnections(); +} + +void +SettingsWidget::leaveSettingsSlot() +{ + emit NavigationRequested(ScreenEnum::CallScreen); + if (advancedSettingsDropped_) { + toggleAdvancedSettings(); + } + + if (avSettingsHaveAppeared) { + ui->videoWidget->previewStopped(); + ui->videoWidget->renderingStopped(); + avSettingsHaveAppeared = false; + } +} + +SettingsWidget::~SettingsWidget() +{ + delete advancedSettingsWidget_; + delete scrollArea_; + delete ui; +} + +// called at every callwidget -> settingsWidget navigation +void +SettingsWidget::updateSettings(int size) +{ + setSelected(Button::accountSettingsButton); + resize(size); + updateAccountInfoDisplayed(); +} + +void +SettingsWidget::resize(int size) +{ + ui->rightSettingsWidget->setGeometry(size, 0, this->width() - size, this->height()); + ui->accountSettingsButton->setFixedWidth(size); +} + +void +SettingsWidget::setSelected(Button sel) +{ + switch (sel) + { + case Button::accountSettingsButton: + if (advancedSettingsDropped_) { toggleAdvancedSettings(); } + + ui->stackedWidget->setCurrentWidget(ui->currentAccountSettingsScrollWidget); + if (pastButton_ == Button::generalSettingsButton) { + ui->accountSettingsButton->setChecked(true); + ui->generalSettingsButton->setChecked(false); + break; + } + else { + ui->accountSettingsButton->setChecked(true); + ui->avSettingsButton->setChecked(false); + break; + } + case Button::generalSettingsButton: + ui->stackedWidget->setCurrentWidget(ui->generalSettings); + populateGeneralSettings(); + if (pastButton_ == Button::avSettingsButton) { + ui->generalSettingsButton->setChecked(true); + ui->avSettingsButton->setChecked(false); + break; + } + else { + ui->generalSettingsButton->setChecked(true); + ui->accountSettingsButton->setChecked(false); + break; + } + case Button::avSettingsButton: + ui->stackedWidget->setCurrentWidget(ui->avSettings); + if (!avSettingsHaveAppeared) { populateAVSettings(); } + if (pastButton_ == Button::accountSettingsButton) { + ui->avSettingsButton->setChecked(true); + ui->accountSettingsButton->setChecked(false); + break; + } + else { + ui->avSettingsButton->setChecked(true); + ui->generalSettingsButton->setChecked(false); + break; + } + } + pastButton_ = sel; +} + +// called to update current settings information when navigating to settingsWidget +void +SettingsWidget::updateAccountInfoDisplayed() +{ + ui->currentRegisteredID->setText(QString::fromStdString(LRCInstance::getCurrentAccountInfo().registeredName)); + ui->currentRingID->setText(QString::fromStdString(LRCInstance::getCurrentAccountInfo().profileInfo.uri)); + + ui->currentRegisteredID->setReadOnly(true); + +// if no registered name is found for account + if (LRCInstance::getCurrentAccountInfo().registeredName.empty()) { + ui->currentRegisteredID->setReadOnly(false); + } + else { + ui->currentRegisteredID->setReadOnly(true); + setRegNameUi(RegName::BLANK); + } + + ui->currentAccountAvatar->setIcon(LRCInstance::getCurrAccPixmap(). + scaledToHeight(avatarSize_, Qt::SmoothTransformation)); + + ui->accountEnableCheckBox->setChecked(LRCInstance::getCurrentAccountInfo().enabled); + + ui->displayNameLineEdit->setText(QString::fromStdString(LRCInstance::getCurrentAccountInfo().profileInfo.alias)); + + updateAndShowDevicesSlot(); + if (!LRCInstance::getCurrentAccountInfo().contactModel->getBannedContacts().size()){ + ui->blockedContactsBtn->hide(); + } else { + ui->blockedContactsBtn->show(); + } + bannedContactsShown_ = false; +} + +void +SettingsWidget::passwordClicked() +{ + PasswordDialog passwdDialog(this); + passwdDialog.exec(); +} + +void +SettingsWidget::toggleAdvancedSettings() +{ + if (advancedSettingsDropped_) { + ui->advancedAccountSettingsPButton->setIcon(QPixmap(":/images/icons/round-arrow_drop_down-24px.svg")); + ui->currentAccountSettingsScrollLayout->removeWidget(advancedSettingsWidget_); + ui->scrollBarLabel->show(); + ui->advancedSettingsOffsetLabel->hide(); + delete advancedSettingsWidget_; + } + else { // will show advanced settings next + ui->advancedAccountSettingsPButton->setIcon(QPixmap(":/images/icons/round-arrow_drop_up-24px.svg")); + advancedSettingsWidget_ = new AdvancedSettingsWidget(ui->scrollAreaWidgetContents); + advancedSettingsWidget_->setMaximumWidth(ui->scrollAreaWidgetContents->width() - 10); + ui->currentAccountSettingsScrollLayout->addWidget(advancedSettingsWidget_); + ui->advancedSettingsOffsetLabel->show(); + ui->scrollBarLabel->hide(); + } + advancedSettingsDropped_ = !advancedSettingsDropped_; +} + +void +SettingsWidget::toggleBannedContacts() +{ + if (bannedContactsShown_) { // will show linked devices next + updateAndShowDevicesSlot(); + } + else { // will show banned contacts next + updateAndShowBannedContactsSlot(); + } +} + +void +SettingsWidget::resizeEvent(QResizeEvent* event) +{ + QWidget::resizeEvent(event); + scrollArea_->resize(ui->currentAccountSettingsScrollWidget->width(), this->height()); +} + +void +SettingsWidget::avatarClicked() +{ + SetAvatarDialog avatarDialog(this); + + // return new avatar pixmap from setAvatarDialog + connect(&avatarDialog, &SetAvatarDialog::pixmapSignal, [&](const std::string& pixString) { + if (!pixString.empty()) { + LRCInstance::setCurrAccAvatar(pixString); + updateAccountInfoDisplayed(); + } + } + ); + avatarDialog.exec(); +} + +void +SettingsWidget::verifyRegisteredNameSlot() +{ + if (!LRCInstance::getCurrentAccountInfo().registeredName.empty()) { + setRegNameUi(RegName::BLANK); + } + else { + registeredName_ = ui->currentRegisteredID->text().simplified(); + + if (!registeredName_.isEmpty()) { + if (validateRegNameForm(registeredName_)) { // name has valid form + setRegNameUi(RegName::SEARCHING); + QTimer::singleShot(300, this, SLOT(beforeNameLookup())); + } else { // name does not have valid form + setRegNameUi(RegName::INVALIDFORM); + } + } else { + setRegNameUi(RegName::BLANK); + } + } +} + +// returns true if name is valid registered name +bool +SettingsWidget::validateRegNameForm(const QString& regName) +{ + QRegularExpression regExp(" "); + if (regName.size() > 2 && !regName.contains(regExp)) { + return true; + } + else { + return false; + } +} + +void +SettingsWidget::receiveRegNameSlot(const std::string& accountID, + lrc::api::account::LookupStatus status, const std::string& address, const std::string& name) +{ + Q_UNUSED(accountID); Q_UNUSED(address); + afterNameLookup(status, name); +} + +void +SettingsWidget::beforeNameLookup() +{ + NameDirectory::instance().lookupName(nullptr, QString(), registeredName_); +} + +void +SettingsWidget::afterNameLookup(lrc::api::account::LookupStatus status, const std::string& regName) +{ + if (registeredName_.toStdString() == regName && regName.length() > 2) { + if (status == lrc::api::account::LookupStatus::NOT_FOUND) { + setRegNameUi(RegName::FREE); + } + else { + setRegNameUi(RegName::TAKEN); + } + } + else { + setRegNameUi(RegName::BLANK); + } +} + +void SettingsWidget::setRegNameUi(RegName stat) +{ + disconnect(gif, SIGNAL(frameChanged(int)), this, SLOT(setButtonIconSlot(int))); + disconnect(ui->regNameButton, &QPushButton::clicked, this, &SettingsWidget::regNameRegisteredSlot); + + switch (stat) { + case RegName::BLANK: + ui->currentRegisteredID->setStyleSheet("padding-left: 5px; border: 0px; border-radius: 3px; border: 1px solid rgb(245, 245, 245);"); + regNameBtn_ = false; + ui->currentRegisteredID->setToolTip(tr("")); + ui->regNameButton->setIcon(QPixmap()); + ui->regNameButton->setEnabled(false); + break; + + case RegName::INVALIDFORM: + ui->currentRegisteredID->setStyleSheet("padding-left: 5px; border: 1px solid red; border-radius: 3px;"); + regNameBtn_ = false; + ui->currentRegisteredID->setToolTip(tr("A registered name should not have any spaces and must be at least three letters long")); + ui->regNameButton->setIcon(QPixmap(":/images/icons/round-error-24px.svg")); + ui->regNameButton->setToolTip(tr("A registered name should not have any spaces and must be at least three letters long")); + ui->regNameButton->setEnabled(true); + break; + + case RegName::TAKEN: + ui->currentRegisteredID->setStyleSheet("padding-left: 5px; border: 1px solid orange; border-radius: 3px;"); + regNameBtn_ = false; + ui->currentRegisteredID->setToolTip(tr("This name is already taken")); + ui->regNameButton->setIcon(QPixmap(":/images/icons/round-error-24px.svg")); + ui->regNameButton->setToolTip(tr("This registered name is already taken")); + ui->regNameButton->setEnabled(true); + break; + + case RegName::FREE: + ui->currentRegisteredID->setStyleSheet("padding-left: 5px; border: 1px solid green; border-radius: 3px;"); + regNameBtn_ = true; + ui->currentRegisteredID->setToolTip(tr("This name is available")); + ui->regNameButton->setIcon(QPixmap(":/images/icons/round-check_circle-24px.svg")); + ui->regNameButton->setToolTip(tr("Register this name")); + ui->regNameButton->setEnabled(true); + + connect(ui->regNameButton, &QPushButton::clicked, this, &SettingsWidget::regNameRegisteredSlot); + + break; + + case RegName::SEARCHING: + ui->currentRegisteredID->setStyleSheet("padding-left: 5px; border: 1px solid rgb(2, 187, 213); border-radius: 3px;"); + regNameBtn_ = false; + ui->currentRegisteredID->setToolTip(tr("")); + + connect(gif, SIGNAL(frameChanged(int)), this, SLOT(setButtonIconSlot(int))); + gif->start(); + ui->regNameButton->setEnabled(false); + + break; + } +} +void SettingsWidget::setButtonIconSlot(int frame) +{ + Q_UNUSED(frame); + ui->regNameButton->setIcon(QIcon(gif->currentPixmap())); +} + +void +SettingsWidget::regNameRegisteredSlot() +{ + if (!regNameBtn_) { return; } + + RegNameDialog regNameDialog(registeredName_, this); + if (regNameDialog.exec() == QDialog::Accepted) { // if user confirms regName choice + ui->currentRegisteredID->setReadOnly(true); + } + else { + ui->currentRegisteredID->setText(""); + registeredName_ = ""; + } + setRegNameUi(RegName::BLANK); +} + +void +SettingsWidget::setAccEnableSlot(int state) +{ + LRCInstance::editableAccountModel()->enableAccount(LRCInstance::getCurrAccId(), (bool)state); + + auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId()); + LRCInstance::editableAccountModel()->setAccountConfig(LRCInstance::getCurrAccId(), confProps); +} + +void +SettingsWidget::delAccountSlot() +{ + DeleteAccountDialog delDialog(this); + delDialog.exec(); + + if (!LRCInstance::accountModel().getAccountList().size()) { + emit NavigationRequested(ScreenEnum::WizardScreen); + } +} + +void +SettingsWidget::removeDeviceSlot(int index) +{ + if (!index) { return; } + + auto deviceList = LRCInstance::getCurrentAccountInfo().deviceModel->getAllDevices(); + auto it = deviceList.begin(); + + std::advance(it, index); + QString psswd; + + bool ok = false; + if (LRCInstance::getCurrAccConfig().archiveHasPassword) { + psswd = QInputDialog::getText(this, tr("Remove Device"), + tr("Enter the password on this device to confirm the removal of this device"), QLineEdit::Password, + QDir::home().dirName(), &ok); + } + else { + psswd = ""; + QMessageBox devDel; + devDel.setText(tr("Please confirm that you wish to remove this device")); + devDel.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); + devDel.setDefaultButton(QMessageBox::Cancel); + if (devDel.exec() == QMessageBox::Ok) { goto delete_; } + } + + if (ok) { + delete_: + LRCInstance::getCurrentAccountInfo().deviceModel->revokeDevice(it->id, psswd.toStdString()); + updateAndShowDevicesSlot(); + } +} + +void +SettingsWidget::unban(int index) +{ + auto bannedContactList = LRCInstance::getCurrentAccountInfo().contactModel->getBannedContacts(); + auto it = bannedContactList.begin(); + std::advance(it, index); + + auto contactInfo = LRCInstance::getCurrentAccountInfo().contactModel->getContact(*it); + + LRCInstance::getCurrentAccountInfo().contactModel->addContact(contactInfo); + updateAndShowBannedContactsSlot(); +} + +void +SettingsWidget::exportAccountSlot() +{ + QFileDialog dialog(this); + QString dir = QFileDialog::getExistingDirectory(this, tr("Export Account Here"), + QDir::homePath() + "/Desktop", QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + + if (!dir.isEmpty()) { + LRCInstance::accountModel().exportToFile(LRCInstance::getCurrAccId(), (dir + "/export.gz").toStdString()); + } +} + +void +SettingsWidget::updateAndShowDevicesSlot() +{ + ui->settingsListWidget->clear(); + + ui->label->setText(tr("Linked Devices")); + ui->blockedContactsBtn->setText(tr("Blocked Contacts")); + ui->linkDevPushButton->show(); + + auto deviceList = LRCInstance::getCurrentAccountInfo().deviceModel->getAllDevices(); + + int i = 0; + + for (auto it = deviceList.begin(); it != deviceList.end(); ++it, ++i) { + SettingsItemWidget* item = new SettingsItemWidget(itemHeight_, i, false, ui->settingsListWidget); + item->setSizeHint(QSize(ui->settingsListWidget->width(), itemHeight_)); + ui->settingsListWidget->addItem(item); + + if (i) { + connect(item->button_, &QPushButton::clicked, [this, i]() { + removeDeviceSlot(i); + } + ); + } + } + bannedContactsShown_ = false; +} + +void +SettingsWidget::updateAndShowBannedContactsSlot() +{ + ui->settingsListWidget->clear(); + + ui->label->setText(tr("Blocked Contacts")); + ui->blockedContactsBtn->setText(tr("Linked Devices")); + ui->linkDevPushButton->hide(); + + auto bannedContactList = LRCInstance::getCurrentAccountInfo().contactModel->getBannedContacts(); + + int i = 0; + + for (auto it = bannedContactList.begin(); it != bannedContactList.end(); ++it, ++i) { + SettingsItemWidget* item = new SettingsItemWidget(itemHeight_, i, true, ui->settingsListWidget); + item->setSizeHint(QSize(ui->settingsListWidget->width(), itemHeight_)); + ui->settingsListWidget->addItem(item); + + connect(item->button_, &QPushButton::clicked, [this, i]() { + unban(i); + } + ); + } + bannedContactsShown_ = true; + if (!bannedContactList.size()) { updateAndShowDevicesSlot(); ui->blockedContactsBtn->hide(); } +} + +void +SettingsWidget::showLinkDevSlot() +{ + if (!advancedSettingsWidget_) { delete advancedSettingsWidget_; } + + linkDevWidget = new LinkDevWidget(ui->scrollAreaWidgetContents); + linkDevWidget->setMinimumWidth(600); + + ui->accountHorLayout->insertWidget(1, linkDevWidget); + + linkDevWidget->show(); + ui->centralWidget->hide(); + + connect(linkDevWidget->cancelBtn(), &QPushButton::clicked, this, &SettingsWidget::showCurrentAccountSlot); + connect(linkDevWidget->endCancelBtn(), &QPushButton::clicked, this, &SettingsWidget::showCurrentAccountSlot); +} + +void +SettingsWidget::showCurrentAccountSlot() +{ + disconnect(linkDevWidget); + + delete linkDevWidget; + ui->centralWidget->show(); +} + +void +SettingsWidget::setConnections() +{ + // exitSettingsButton + connect(ui->exitSettingsButton, &QPushButton::clicked, this, &SettingsWidget::leaveSettingsSlot); + + connect(ui->accountSettingsButton, &QPushButton::clicked, [this]() { + setSelected(Button::accountSettingsButton); } + ); + + connect(ui->generalSettingsButton, &QPushButton::clicked, [this]() { + setSelected(Button::generalSettingsButton); } + ); + + connect(ui->avSettingsButton, &QPushButton::clicked, [this]() { + setSelected(Button::avSettingsButton); } + ); + + connect(ui->passwdPushButton, &QPushButton::clicked, [this]() { + passwordClicked(); } + ); + + connect(ui->currentAccountAvatar, &QPushButton::clicked, [this]() { + avatarClicked(); } + ); + + connect(ui->advancedAccountSettingsPButton, &QPushButton::clicked, this, &SettingsWidget::toggleAdvancedSettings); + + connect(ui->currentRegisteredID, &QLineEdit::textChanged, this, &SettingsWidget::verifyRegisteredNameSlot); + + connect(&LRCInstance::accountModel(), &lrc::api::NewAccountModel::registeredNameFound, + this, &SettingsWidget::receiveRegNameSlot); + + //connect "export account" button + connect(ui->btnExportAccount, &QPushButton::clicked, this, &SettingsWidget::exportAccountSlot); + + // connect "delete account" button + connect(ui->btnDeletAccount, &QPushButton::clicked, this, &SettingsWidget::delAccountSlot); + + // connect "banned contacts" button + connect(ui->blockedContactsBtn, &QPushButton::clicked, this, &SettingsWidget::toggleBannedContacts); + + // connect "link device" button + connect(ui->linkDevPushButton, &QPushButton::clicked, this, &SettingsWidget::showLinkDevSlot); + + // update banned accounts automatically + connect(LRCInstance::getCurrentAccountInfo().contactModel.get(), &lrc::api::ContactModel::modelUpdated, + this, &SettingsWidget::updateAndShowBannedContactsSlot); + + // update linked devices automatically + QObject::connect(LRCInstance::getCurrentAccountInfo().deviceModel.get(), &lrc::api::NewDeviceModel::deviceUpdated, + this, &SettingsWidget::updateAndShowDevicesSlot); + + // account settings setters { + connect(ui->accountEnableCheckBox, &QCheckBox::stateChanged, this, &SettingsWidget::setAccEnableSlot); + + connect(ui->displayNameLineEdit, &QLineEdit::textChanged, [this](const QString& displayName) { + LRCInstance::setCurrAccDisplayName(displayName.toStdString()); + } + ); + + // general settings + + connect(ui->notificationCheckBox, &QCheckBox::stateChanged, this, &SettingsWidget::setNotificationsSlot); + + connect(ui->closeOrMinCheckBox, &QCheckBox::stateChanged, this, &SettingsWidget::setClosedOrMinSlot); + + connect(ui->downloadButton, &QPushButton::clicked, this, &SettingsWidget::openDownloadFolderSlot); + + connect(ui->alwaysRecordingCheckBox, &QCheckBox::stateChanged, this, &SettingsWidget::setAlwaysRecordingSlot); + + connect(ui->checkUpdateButton, &QPushButton::clicked, this, &SettingsWidget::checkForUpdateSlot); + + connect(ui->intervalUpdateCheckSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &SettingsWidget::setUpdateIntervalSlot); + + connect(ui->autoUpdateCheckBox, &QCheckBox::stateChanged, this, &SettingsWidget::setUpdateAutomaticSlot); + + // audio / visual settings + + connect(ui->recordPathButton, &QPushButton::clicked, this, &SettingsWidget::openRecordFolderSlot); +} + + +// ************************* General Settings ************************* + +void SettingsWidget::populateGeneralSettings() +{ + settings_ = new QSettings; + + // settings + ui->downloadButton->setText(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)); + ui->closeOrMinCheckBox->setChecked(settings_->value(SettingsKey::closeOrMinimized).toBool()); + ui->notificationCheckBox->setChecked(settings_->value(SettingsKey::enableNotifications).toBool()); + + //recordings + ui->alwaysRecordingCheckBox->setChecked(media::RecordingModel::instance().isAlwaysRecording()); + + if (media::RecordingModel::instance().recordPath().isEmpty()) { + QString recordPath = QDir::toNativeSeparators(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); + media::RecordingModel::instance().setRecordPath(recordPath); + } + ui->recordPathButton->setText(media::RecordingModel::instance().recordPath()); + + + ui->autoUpdateCheckBox->setChecked(win_sparkle_get_automatic_check_for_updates()); + ui->intervalUpdateCheckSpinBox->setValue(win_sparkle_get_update_check_interval() / 86400); + +} + +void +SettingsWidget::setNotificationsSlot(int state) +{ + if (state == Qt::CheckState::Unchecked) { + settings_->setValue(SettingsKey::enableNotifications, false); + } else { + settings_->setValue(SettingsKey::enableNotifications, true); + } +} + +void +SettingsWidget::setClosedOrMinSlot(int state) +{ + if (state == Qt::CheckState::Unchecked) { + settings_->setValue(SettingsKey::closeOrMinimized, false); + } + else { + settings_->setValue(SettingsKey::closeOrMinimized, true); + } +} + +void +SettingsWidget::checkForUpdateSlot() +{ + win_sparkle_check_update_with_ui(); +} + +void +SettingsWidget::setUpdateIntervalSlot(int value) +{ + win_sparkle_set_update_check_interval(value * 86400); +} + +void +SettingsWidget::setUpdateAutomaticSlot(int state) +{ + if (state == Qt::CheckState::Unchecked) { + win_sparkle_set_automatic_check_for_updates(false); + ui->intervalUpdateCheckSpinBox->setEnabled(false); + } else { + win_sparkle_set_automatic_check_for_updates(true); + ui->intervalUpdateCheckSpinBox->setEnabled(true); + } +} + +void +SettingsWidget::openDownloadFolderSlot() +{ + QString dir = QFileDialog::getExistingDirectory(this, tr("Select A Folder For Your Downloads"), + QStandardPaths::writableLocation(QStandardPaths::DownloadLocation), QFileDialog::ShowDirsOnly + | QFileDialog::DontResolveSymlinks); + + if (!dir.isEmpty()) { + QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) = dir; + ui->downloadButton->setText(dir); + } +} + +void +SettingsWidget::setAlwaysRecordingSlot(int state) +{ + if (state == Qt::CheckState::Unchecked) { + media::RecordingModel::instance().setAlwaysRecording(false); + } else { + media::RecordingModel::instance().setAlwaysRecording(true); + } +} + +void +SettingsWidget::openRecordFolderSlot() +{ + QString dir = QFileDialog::getExistingDirectory(this, tr("Select A Folder For Your Recordings"), + media::RecordingModel::instance().recordPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); + + if (!dir.isEmpty()) { + media::RecordingModel::instance().setRecordPath(dir); + ui->recordPathButton->setText(media::RecordingModel::instance().recordPath()); + } +} + + +// ************************* Audio/Visual Settings ************************* + +void +SettingsWidget::populateAVSettings() +{ + ui->deviceBox->setModel(deviceModel_); + connect(deviceModel_, SIGNAL(currentIndexChanged(int)), + this, SLOT(deviceIndexChanged(int))); + + if (ui->deviceBox->count() > 0) { + ui->deviceBox->setCurrentIndex(0); + deviceBoxCurrentIndexChangedSlot(0); + } + + // Audio settings + auto inputModel = Audio::Settings::instance().inputDeviceModel(); + auto outputModel = Audio::Settings::instance().outputDeviceModel(); + + ui->outputComboBox->setModel(outputModel); + ui->inputComboBox->setModel(inputModel); + if (ui->outputComboBox->count() > 0) { + ui->outputComboBox->setCurrentIndex(0); + } + if (ui->inputComboBox->count() > 0) { + ui->inputComboBox->setCurrentIndex(0); + } + + connect(ui->outputComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), + this, &SettingsWidget::outputDevIndexChangedSlot); + connect(ui->inputComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), + this, &SettingsWidget::inputdevIndexChangedSlot); + + connect(ui->deviceBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, + &SettingsWidget::deviceBoxCurrentIndexChangedSlot); + connect(ui->sizeBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, + &SettingsWidget::sizeBoxCurrentIndexChangedSlot); + + isLoading_ = true; + avSettingsHaveAppeared = true; + + showPreview(); +} + +void +SettingsWidget::showPreview() +{ + if (!CallModel::instance().getActiveCalls().size()) { + ui->previewUnavailableLabel->hide(); + ui->videoWidget->show(); + Video::PreviewManager::instance().startPreview(); + ui->videoWidget->setIsFullPreview(true); + } else { + ui->previewUnavailableLabel->show(); + ui->videoWidget->hide(); + } +} + +void +SettingsWidget::deviceBoxCurrentIndexChangedSlot(int index) +{ + if (index < 0) { + return; + } + + if (!isLoading_) + deviceModel_->setActive(index); + + auto device = deviceModel_->activeDevice(); + + ui->sizeBox->clear(); + + isLoading_ = true; + if (device->channelList().size() > 0) { + for (auto resolution : device->channelList()[0]->validResolutions()) { + ui->sizeBox->addItem(resolution->name()); + } + } + ui->sizeBox->setCurrentIndex( + device->channelList()[0]->activeResolution()->relativeIndex()); + isLoading_ = false; +} + +void +SettingsWidget::sizeBoxCurrentIndexChangedSlot(int index) +{ + auto device = deviceModel_->activeDevice(); + + if (index < 0) return; + + device->channelList()[0]->setActiveResolution(device->channelList()[0]->validResolutions()[index]); +} + +void +SettingsWidget::deviceIndexChanged(int index) +{ + ui->deviceBox->setCurrentIndex(index); + + ui->videoLayout->update(); +} + +void +SettingsWidget::outputDevIndexChangedSlot(int index) +{ + auto outputModel = Audio::Settings::instance().outputDeviceModel(); + outputModel->selectionModel()->setCurrentIndex(outputModel->index(index), QItemSelectionModel::ClearAndSelect); +} + +void +SettingsWidget::inputdevIndexChangedSlot(int index) +{ + auto inputModel = Audio::Settings::instance().inputDeviceModel(); + inputModel->selectionModel()->setCurrentIndex(inputModel->index(index), QItemSelectionModel::ClearAndSelect); +} \ No newline at end of file diff --git a/settingswidget.h b/settingswidget.h new file mode 100644 index 0000000000000000000000000000000000000000..5fb68d145f5be3e0536dd927787c443f5503dd3b --- /dev/null +++ b/settingswidget.h @@ -0,0 +1,158 @@ +/*************************************************************************** + * Copyright (C) 2018 by Savoir-faire Linux * + * Author: Isa Nanic <isa.nanic@savoirfairelinux.com> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <https://www.gnu.org/licenses/>. * + **************************************************************************/ + +#pragma once +#include <QScrollArea> +#include <QSettings> +#include <QMovie> + +#include "navwidget.h" +#include "accountdetails.h" +#include "accountstatedelegate.h" +#include "lrcinstance.h" + +#include "advancedsettingswidget.h" +#include "bannedlistmodel.h" + +#include "linkdevwidget.h" +#include "ui_linkdevwidget.h" + + // general settings +#include "api/datatransfermodel.h" +#include "typedefs.h" + +// av settings +#include "video/devicemodel.h" + + +namespace Ui { + class SettingsWidget; +} + +class SettingsWidget : public NavWidget +{ + Q_OBJECT + SettingsWidget(const SettingsWidget& cpy); + +public: + explicit SettingsWidget(QWidget* parent = nullptr); + ~SettingsWidget(); + void resize(int size); + +public slots: + void updateSettings(int size); + +private: + enum Button {accountSettingsButton, generalSettingsButton, avSettingsButton}; + enum RegName {BLANK, INVALIDFORM, TAKEN, FREE, SEARCHING}; + enum List {DevList, BannedContacts}; + + void setSelected(Button sel); + void updateAccountInfoDisplayed(); + + void resizeEvent(QResizeEvent* event); + bool avSettingsHaveAppeared = false; + + Ui::SettingsWidget* ui; + + // ************************* Account Settings ************************* + void passwordClicked(); + void avatarClicked(); + + void afterNameLookup(lrc::api::account::LookupStatus status, const std::string& regName); + QString registeredName_; + + bool validateRegNameForm(const QString& regName); + + AdvancedSettingsWidget* advancedSettingsWidget_; + QScrollArea* scrollArea_; + Button pastButton_ = Button::generalSettingsButton; + bool advancedSettingsDropped_ = false; + bool bannedContactsShown_ = false; + + int avatarSize_; + + void setRegNameUi(RegName stat); + bool regNameBtn_ = false; + + const int itemHeight_ = 55; + + void removeDeviceSlot(int index); + void unban(int index); + + void setConnections(); + QMovie* gif; + + LinkDevWidget* linkDevWidget; + + +private slots: + void leaveSettingsSlot(); + void verifyRegisteredNameSlot(); + void beforeNameLookup(); + void receiveRegNameSlot(const std::string& accountID, lrc::api::account::LookupStatus status, + const std::string& address, const std::string& name); + void regNameRegisteredSlot(); + void setAccEnableSlot(int state); + void delAccountSlot(); + + void toggleAdvancedSettings(); + void toggleBannedContacts(); + void exportAccountSlot(); + + void updateAndShowDevicesSlot(); + void updateAndShowBannedContactsSlot(); + + void showLinkDevSlot(); + void showCurrentAccountSlot(); + + void setButtonIconSlot(int frame); + + + + // ************************* General Settings ************************* +private: + void populateGeneralSettings(); + + QSettings* settings_; + +private slots: + void setNotificationsSlot(int state); + void checkForUpdateSlot(); + void setClosedOrMinSlot(int state); + void openDownloadFolderSlot(); + void setAlwaysRecordingSlot(int state); + void openRecordFolderSlot(); + void setUpdateIntervalSlot(int value); + void setUpdateAutomaticSlot(int state); + + // ************************* Audio/Visual Settings ************************* +private: + void populateAVSettings(); + Video::DeviceModel* deviceModel_; + void showPreview(); + bool isLoading_; + +private slots: + void deviceIndexChanged(int index); + void deviceBoxCurrentIndexChangedSlot(int index); + void sizeBoxCurrentIndexChangedSlot(int index); + void outputDevIndexChangedSlot(int index); + void inputdevIndexChangedSlot(int index); + +}; diff --git a/settingswidget.ui b/settingswidget.ui new file mode 100644 index 0000000000000000000000000000000000000000..636aee8e65815a445ad0b2ce2d95b9c4c2450ad3 --- /dev/null +++ b/settingswidget.ui @@ -0,0 +1,2820 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>SettingsWidget</class> + <widget class="QWidget" name="SettingsWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>936</width> + <height>860</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <property name="styleSheet"> + <string notr="true">background: white;</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="leftSettingsWidget" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background: rgb(245, 245,245);</string> + </property> + <layout class="QVBoxLayout" name="leftVerticalLayout" stretch="0,0,0,1,0,0,0,5"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <spacer name="verticalSpacer_5"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>15</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>9</number> + </property> + <item> + <spacer name="horizontalSpacer_8"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="label_10"> + <property name="font"> + <font> + <pointsize>14</pointsize> + <underline>false</underline> + </font> + </property> + <property name="text"> + <string>Settings</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="exitSettingsButton"> + <property name="minimumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>30</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton {background: white; border: 0px; border-radius: 8px;} +QPushButton:hover {background: rgb(237,237, 237); border: 0px; border-radius: 8px;} +QPushButton:pressed {background: rgb(230,230, 230); border: 0px; border-radius: 8px;}</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_4"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>15</height> + </size> + </property> + </spacer> + </item> + <item> + <spacer name="verticalSpacer_6"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="accountSettingsButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>200</width> + <height>60</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>60</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>12</pointsize> + </font> + </property> + <property name="mouseTracking"> + <bool>true</bool> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string>Account</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="flat"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="generalSettingsButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>200</width> + <height>60</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>60</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>12</pointsize> + </font> + </property> + <property name="mouseTracking"> + <bool>true</bool> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string>General</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="flat"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="avSettingsButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>200</width> + <height>60</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>60</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>12</pointsize> + </font> + </property> + <property name="mouseTracking"> + <bool>true</bool> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string>Audio / Video</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="default"> + <bool>false</bool> + </property> + <property name="flat"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="rightSettingsWidget" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QStackedWidget" name="stackedWidget"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>500</width> + <height>850</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>80000</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background: white;</string> + </property> + <property name="currentIndex"> + <number>1</number> + </property> + <widget class="QWidget" name="generalSettings"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>600</width> + <height>850</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <layout class="QVBoxLayout" name="verticalLayout" stretch="0"> + <property name="leftMargin"> + <number>9</number> + </property> + <property name="rightMargin"> + <number>9</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_5" stretch="2,0,3"> + <item> + <spacer name="horizontalSpacer_16"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>50</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QWidget" name="widget" native="true"> + <property name="minimumSize"> + <size> + <width>580</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>580</width> + <height>16777215</height> + </size> + </property> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <item> + <layout class="QVBoxLayout" name="verticalLayout_4" stretch="1,0,0,0,0,0,0,0,0,0,0,0,0,0,3"> + <item> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="label_4"> + <property name="font"> + <font> + <pointsize>13</pointsize> + </font> + </property> + <property name="text"> + <string>System</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_19"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_19"> + <property name="leftMargin"> + <number>40</number> + </property> + <property name="topMargin"> + <number>5</number> + </property> + <item> + <widget class="QCheckBox" name="notificationCheckBox"> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="toolTip"> + <string>enable notifications checkbox</string> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(77, 77, 77);</string> + </property> + <property name="text"> + <string>Enable desktop notifications</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_20"> + <property name="leftMargin"> + <number>40</number> + </property> + <item> + <widget class="QCheckBox" name="closeOrMinCheckBox"> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="toolTip"> + <string>keep minimized on close checkbox</string> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(77, 77, 77);</string> + </property> + <property name="text"> + <string>Keep minimized on close</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_11"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>15</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_22"> + <property name="leftMargin"> + <number>50</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="label_3"> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string>Download folder</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_18"> + <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="downloadButton"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="minimumSize"> + <size> + <width>150</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton {background: rgb(245, 245, 245); border: 0px; border-radius: 3px; padding: 5px;} +QPushButton:hover {background: rgb(237,237, 237); border: 0px; border-radius: 3px;} +QPushButton:pressed {background: rgb(230,230, 230); border: 0px; border-radius: 3px;}</string> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset> + <normaloff>images/icons/round-folder-24px.svg</normaloff>images/icons/round-folder-24px.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_18"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_11"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_28"> + <item> + <widget class="QLabel" name="label_2"> + <property name="font"> + <font> + <pointsize>12</pointsize> + </font> + </property> + <property name="text"> + <string>Recordings</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_20"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_29"> + <property name="leftMargin"> + <number>50</number> + </property> + <property name="topMargin"> + <number>5</number> + </property> + <item> + <widget class="QLabel" name="label_5"> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string>Save in</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_12"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="recordPathButton"> + <property name="minimumSize"> + <size> + <width>150</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton {background: rgb(245, 245, 245); border: 0px; border-radius: 3px; padding: 5px;} +QPushButton:hover {background: rgb(237,237, 237); border: 0px; border-radius: 3px;} +QPushButton:pressed {background: rgb(230,230, 230); border: 0px; border-radius: 3px;}</string> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset> + <normaloff>images/icons/round-folder-24px.svg</normaloff>images/icons/round-folder-24px.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_30"> + <property name="leftMargin"> + <number>20</number> + </property> + <item> + <widget class="QCheckBox" name="alwaysRecordingCheckBox"> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string>Always Recording</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_14"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="label_6"> + <property name="font"> + <font> + <pointsize>12</pointsize> + </font> + </property> + <property name="text"> + <string>Updates</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_21"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <property name="leftMargin"> + <number>40</number> + </property> + <property name="topMargin"> + <number>5</number> + </property> + <item> + <widget class="QCheckBox" name="autoUpdateCheckBox"> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="acceptDrops"> + <bool>false</bool> + </property> + <property name="toolTip"> + <string>Autamatic update checks checkbox</string> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(77, 77, 77);</string> + </property> + <property name="text"> + <string>Check for updates automatically every</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="intervalUpdateCheckSpinBox"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="maximumSize"> + <size> + <width>60</width> + <height>16777215</height> + </size> + </property> + <property name="toolTip"> + <string>Interval between update checks in days selector</string> + </property> + <property name="suffix"> + <string> days</string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="value"> + <number>3</number> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_17"> + <property name="topMargin"> + <number>0</number> + </property> + <item> + <spacer name="horizontalSpacer_5"> + <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="checkUpdateButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>9</pointsize> + </font> + </property> + <property name="toolTip"> + <string>Check for updates now button</string> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton {background: rgb(245, 245, 245); border: 0px; border-radius: 3px; padding: 5px;} +QPushButton:hover {background: rgb(237,237, 237); border: 0px; border-radius: 3px;} +QPushButton:pressed {background: rgb(230,230, 230); border: 0px; border-radius: 3px;}</string> + </property> + <property name="text"> + <string>Check for updates now</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <spacer name="accountSettingsBottom"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_17"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>50</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </widget> + <widget class="QWidget" name="currentAccountSettingsScrollWidget"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>600</width> + <height>860</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QScrollArea" name="scrollArea"> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + <property name="verticalScrollBarPolicy"> + <enum>Qt::ScrollBarAsNeeded</enum> + </property> + <property name="horizontalScrollBarPolicy"> + <enum>Qt::ScrollBarAlwaysOff</enum> + </property> + <property name="sizeAdjustPolicy"> + <enum>QAbstractScrollArea::AdjustIgnored</enum> + </property> + <property name="widgetResizable"> + <bool>true</bool> + </property> + <widget class="QWidget" name="scrollAreaWidgetContents"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>701</width> + <height>883</height> + </rect> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_12" stretch="0"> + <item> + <layout class="QHBoxLayout" name="accountHorLayout" stretch="2,0,0,3"> + <item> + <spacer name="horizontalSpacer_6"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>460</width> + <height>811</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QWidget" name="centralWidget" native="true"> + <property name="minimumSize"> + <size> + <width>600</width> + <height>0</height> + </size> + </property> + <layout class="QVBoxLayout" name="currentAccountSettingsScrollLayout" stretch="2,0,0,0,0,0,0,0,0,3,0,2"> + <item> + <spacer name="verticalSpacer_7"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <spacer name="horizontalSpacer_19"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>600</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_56"> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QVBoxLayout" name="verticalLayout_17"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>10</number> + </property> + <item> + <widget class="QPushButton" name="currentAccountAvatar"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>160</width> + <height>160</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>160</width> + <height>160</height> + </size> + </property> + <property name="font"> + <font> + <stylestrategy>PreferAntialias</stylestrategy> + </font> + </property> + <property name="cursor"> + <cursorShape>PointingHandCursor</cursorShape> + </property> + <property name="styleSheet"> + <string notr="true">border: none;</string> + </property> + <property name="text"> + <string/> + </property> + <property name="iconSize"> + <size> + <width>160</width> + <height>160</height> + </size> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_18"> + <property name="topMargin"> + <number>10</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_58" stretch="0,40"> + <property name="spacing"> + <number>0</number> + </property> + <property name="sizeConstraint"> + <enum>QLayout::SetDefaultConstraint</enum> + </property> + <item> + <widget class="QWidget" name="widget_4" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>110</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>110</width> + <height>16777215</height> + </size> + </property> + <layout class="QVBoxLayout" name="verticalLayout_19"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_16"> + <property name="bottomMargin"> + <number>5</number> + </property> + <item> + <spacer name="horizontalSpacer_14"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>1</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="label_11"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>40</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>8</pointsize> + <weight>50</weight> + <bold>false</bold> + </font> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="text"> + <string>Account</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_60"> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <spacer name="horizontalSpacer_42"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>1</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="currentRegisteredIDLabel"> + <property name="minimumSize"> + <size> + <width>90</width> + <height>32</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>32</height> + </size> + </property> + <property name="text"> + <string>Registered Name</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_59"> + <property name="bottomMargin"> + <number>3</number> + </property> + <item> + <spacer name="horizontalSpacer_41"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>1</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="currentRingIDMessage"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>150</width> + <height>40</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>8</pointsize> + <stylestrategy>PreferAntialias</stylestrategy> + </font> + </property> + <property name="text"> + <string>RingID</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <item> + <spacer name="horizontalSpacer_25"> + <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="label_7"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>30</height> + </size> + </property> + <property name="text"> + <string>Password</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_28"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>8</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_20"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>10</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_14"> + <property name="bottomMargin"> + <number>5</number> + </property> + <item> + <widget class="QCheckBox" name="accountEnableCheckBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>40</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>140</width> + <height>40</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>9</pointsize> + </font> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string>Enable</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_15"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>1</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_61"> + <item> + <widget class="QLineEdit" name="currentRegisteredID"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>250</width> + <height>32</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>144444</width> + <height>32</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>9</pointsize> + <stylestrategy>PreferAntialias</stylestrategy> + </font> + </property> + <property name="mouseTracking"> + <bool>true</bool> + </property> + <property name="styleSheet"> + <string notr="true">padding-left: 10; border: 1px solid black;</string> + </property> + <property name="text"> + <string/> + </property> + <property name="frame"> + <bool>false</bool> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + <property name="readOnly"> + <bool>false</bool> + </property> + <property name="placeholderText"> + <string>Type here to register a username</string> + </property> + <property name="clearButtonEnabled"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="regNameButton"> + <property name="minimumSize"> + <size> + <width>32</width> + <height>32</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>32</width> + <height>32</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="iconSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + <property name="flat"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_9"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>1</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_62"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="currentRingID"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>290</width> + <height>40</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>40</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>9</pointsize> + <stylestrategy>PreferAntialias</stylestrategy> + </font> + </property> + <property name="layoutDirection"> + <enum>Qt::RightToLeft</enum> + </property> + <property name="styleSheet"> + <string notr="true">border: 0px; padding: 1px;</string> + </property> + <property name="text"> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_10"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>1</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_63"> + <property name="leftMargin"> + <number>5</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <item> + <widget class="QPushButton" name="passwdPushButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>134</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>134</width> + <height>30</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>9</pointsize> + <underline>false</underline> + </font> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton {background: rgb(245, 245, 245); border: 0px; border-radius: 3px;} +QPushButton:hover {background: rgb(237,237, 237); border: 0px; border-radius: 3px;} +QPushButton:pressed {background: rgb(230,230, 230); border: 0px; border-radius: 3px;}</string> + </property> + <property name="text"> + <string>Change Password</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_7"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_8"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>8</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </item> + </layout> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_64" stretch="0,0"> + <property name="spacing"> + <number>10</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="displayNameLineEdit"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>180</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>180</width> + <height>50</height> + </size> + </property> + <property name="font"> + <font> + <stylestrategy>PreferAntialias</stylestrategy> + </font> + </property> + <property name="styleSheet"> + <string notr="true">border: 0px; border-radius: 3px; background: rgb(245, 245, 245);</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_45"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>400</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QGridLayout" name="gridLayout_8"> + <property name="topMargin"> + <number>30</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item row="1" column="0"> + <spacer name="verticalSpacer_30"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>32</height> + </size> + </property> + </spacer> + </item> + <item row="0" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_65"> + <property name="spacing"> + <number>50</number> + </property> + <property name="leftMargin"> + <number>50</number> + </property> + <property name="topMargin"> + <number>20</number> + </property> + <property name="rightMargin"> + <number>50</number> + </property> + <property name="bottomMargin"> + <number>20</number> + </property> + <item> + <widget class="QPushButton" name="btnExportAccount"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">border: 0px; border-radius: 3px; background: #e8f5e9;</string> + </property> + <property name="text"> + <string>Export Account</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="btnDeletAccount"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">border: 0px; border-radius: 3px; background:#ffebee;</string> + </property> + <property name="text"> + <string>Delete Account</string> + </property> + <property name="flat"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label"> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>30</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>11</pointsize> + </font> + </property> + <property name="text"> + <string>Linked Devices</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_66"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>1</number> + </property> + <property name="bottomMargin"> + <number>3</number> + </property> + <item> + <spacer name="horizontalSpacer_46"> + <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="label_12"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="linkDevPushButton"> + <property name="minimumSize"> + <size> + <width>150</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>80000</width> + <height>30</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">border: 0px; border-radius: 3px; background: rgb(245, 245, 245); +padding: 5px; +</string> + </property> + <property name="text"> + <string>Link Another Device</string> + </property> + <property name="iconSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QListWidget" name="settingsListWidget"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>600</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>200</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">border: 1px solid grey;</string> + </property> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + <property name="editTriggers"> + <set>QAbstractItemView::NoEditTriggers</set> + </property> + <property name="showDropIndicator" stdset="0"> + <bool>false</bool> + </property> + <property name="alternatingRowColors"> + <bool>false</bool> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::NoSelection</enum> + </property> + <property name="uniformItemSizes"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_67"> + <property name="topMargin"> + <number>5</number> + </property> + <item> + <widget class="QPushButton" name="blockedContactsBtn"> + <property name="minimumSize"> + <size> + <width>120</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>180</width> + <height>25</height> + </size> + </property> + <property name="layoutDirection"> + <enum>Qt::RightToLeft</enum> + </property> + <property name="styleSheet"> + <string notr="true">border: 0px; border-radius: 3px; background: rgb(245, 245, 245); +padding-right: 20px; +padding-left: 15px; +</string> + </property> + <property name="text"> + <string>Blocked Contacts</string> + </property> + <property name="iconSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_47"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="advancedSettingsOffsetLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>4</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>4</height> + </size> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_10"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>15</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_68" stretch="1,0,1"> + <property name="topMargin"> + <number>4</number> + </property> + <property name="bottomMargin"> + <number>15</number> + </property> + <item> + <spacer name="horizontalSpacer_48"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="advancedAccountSettingsPButton"> + <property name="minimumSize"> + <size> + <width>180</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>600</width> + <height>30</height> + </size> + </property> + <property name="layoutDirection"> + <enum>Qt::RightToLeft</enum> + </property> + <property name="styleSheet"> + <string notr="true">border: 0px; border-radius: 3px; background: rgb(245, 245, 245); +padding-right: 20px; +padding-left: 15px; +</string> + </property> + <property name="text"> + <string>Advanced Account Settings</string> + </property> + <property name="iconSize"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_49"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_9"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QLabel" name="scrollBarLabel"> + <property name="minimumSize"> + <size> + <width>4</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>4</width> + <height>16777215</height> + </size> + </property> + <property name="toolTip"> + <string notr="true"/> + </property> + <property name="whatsThis"> + <string notr="true"/> + </property> + <property name="text"> + <string/> + </property> + <property name="textFormat"> + <enum>Qt::PlainText</enum> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>697</width> + <height>811</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </widget> + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="avSettings"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <layout class="QGridLayout" name="gridLayout_3"> + <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 row="0" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="2,0,3"> + <property name="spacing"> + <number>0</number> + </property> + <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="QWidget" name="widget_2" native="true"> + <property name="minimumSize"> + <size> + <width>580</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>580</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <layout class="QVBoxLayout" name="verticalLayout_8" stretch="2,0,0,0,0,0,0,5"> + <item> + <spacer name="verticalSpacer_23"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_9"> + <item> + <widget class="QLabel" name="label_16"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>30</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>13</pointsize> + </font> + </property> + <property name="text"> + <string>Audio</string> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_12"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>20</number> + </property> + <item> + <spacer name="verticalSpacer_13"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_32"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="label_18"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>200</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>11</pointsize> + </font> + </property> + <property name="text"> + <string>Microphone</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_20"> + <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="QComboBox" name="inputComboBox"> + <property name="minimumSize"> + <size> + <width>320</width> + <height>0</height> + </size> + </property> + <property name="toolTip"> + <string>Audio input device selector</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_31"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="label_17"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>100</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>11</pointsize> + </font> + </property> + <property name="text"> + <string>Output Device</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_13"> + <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="QComboBox" name="outputComboBox"> + <property name="minimumSize"> + <size> + <width>320</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>200</width> + <height>16777215</height> + </size> + </property> + <property name="toolTip"> + <string>Choose the output device</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_22"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>30</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_9"> + <item> + <widget class="QLabel" name="label_19"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>30</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>30</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>13</pointsize> + </font> + </property> + <property name="text"> + <string>Video</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_13"> + <property name="leftMargin"> + <number>20</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_33"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="label_20"> + <property name="font"> + <font> + <pointsize>11</pointsize> + </font> + </property> + <property name="text"> + <string>Device</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_21"> + <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="QComboBox" name="deviceBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>320</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="toolTip"> + <string>Video device selector</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_34"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="label_21"> + <property name="font"> + <font> + <pointsize>11</pointsize> + </font> + </property> + <property name="text"> + <string>Resolution</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_22"> + <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="QComboBox" name="sizeBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>320</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="toolTip"> + <string>Video device resolution selector</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_3"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="videoLayout" stretch="1,0,1"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <spacer name="horizontalSpacer_23"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="VideoWidget" name="videoWidget" native="true"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>520</width> + <height>300</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="baseSize"> + <size> + <width>550</width> + <height>300</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_24"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="previewUnavailableLabel"> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string>Preview unavailable during call</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_24"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_11"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </item> + </layout> + </widget> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + <customwidgets> + <customwidget> + <class>VideoWidget</class> + <extends>QWidget</extends> + <header>videowidget.h</header> + <container>1</container> + </customwidget> + </customwidgets> + <resources/> + <connections/> +</ui> diff --git a/smartlistmodel.h b/smartlistmodel.h index 1da0a655d5da9837c7fe1e05aaf85127e55d1b5d..a37cbb126c7e5249e8827eebc703f37875070045 100644 --- a/smartlistmodel.h +++ b/smartlistmodel.h @@ -66,5 +66,4 @@ public: private: const AccountInfo& acc_; - }; diff --git a/smartlistview.h b/smartlistview.h index 126c1a23b41e181bb0ccdcd41b212d7bd05dbe40..ac1360047c0a5db1af6c21cb3073d66cc0f8aa8e 100644 --- a/smartlistview.h +++ b/smartlistview.h @@ -42,5 +42,4 @@ signals: void btnAcceptInviteClicked(const QModelIndex& index) const; void btnBlockInviteClicked(const QModelIndex& index) const; void btnIgnoreInviteClicked(const QModelIndex& index) const; - }; diff --git a/stylesheet.css b/stylesheet.css index 63150a8306c184d522c0887e00069a153b1e2879..1b5294da08b14010730008d6b3ef8e9933f20335 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -266,10 +266,6 @@ QToolButton#qrButton:checked { background-color: rgb(237, 237, 237); } -QPushButton#deleteAccountBtn, QToolButton#addAccountButton{ - background: transparent; -} - QPushButton#btnvideo{ background-color: #3AC0D2; border-radius: 15px; @@ -315,7 +311,7 @@ QWidget#messagingPage, QWidget#contactRequestPage{ } QPushButton#nextButton, QPushButton#playButton, QPushButton#clearHistoryButton, QPushButton#doTransferButton, -QPushButton#checkUpdateButton, QPushButton#photoButton, QPushButton#takePhotoButton, QPushButton#importButton, +QPushButton#photoButton, QPushButton#takePhotoButton, QPushButton#importButton, QPushButton#existingPushButton, QPushButton#newAccountButton, QPushButton#previousButton, QPushButton#exportButton, QPushButton#cancelAddButton, QPushButton#exportOnRingButton, QPushButton#addDeviceButton, QPushButton#exportEndedOkButton, QPushButton#errorPushButton, QPushButton#registerButton, QPushButton#acceptCRButton, QPushButton#discardCRButton, QPushButton#deleteCancelBtn, @@ -326,7 +322,7 @@ QPushButton#dhtImportBtn, QPushButton#fileImportBtn, QPushButton#changePassBtn, font: 14px; } -QPushButton#blockCRButton, QPushButton#deleteAcceptBtn, QPushButton#debanButton, QPushButton#deleteButton, QPushButton#deleteBanBtn, +QPushButton#blockCRButton, QPushButton#debanButton, QPushButton#deleteBanBtn, QPushButton#cancelChangeBtn { background-color: rgb(251, 72, 71); border: 0px; @@ -335,7 +331,7 @@ QPushButton#cancelChangeBtn { } QPushButton#nextButton:hover, QPushButton#playButton:hover, QPushButton#clearHistoryButton:hover, -QPushButton#checkUpdateButton:hover, QPushButton#doTransferButton:hover, QPushButton#photoButton:hover, +QPushButton#doTransferButton:hover, QPushButton#photoButton:hover, QPushButton#takePhotoButton:hover, QPushButton#importButton:hover, QPushButton#existingPushButton:hover, QPushButton#newAccountButton:hover, QPushButton#previousButton:hover, QPushButton#exportButton:hover, QPushButton#cancelAddButton:hover, QPushButton#exportOnRingButton:hover, @@ -352,7 +348,7 @@ QPushButton#deleteButton:hover, QPushButton#deleteBanBtn:hover, QPushButton#canc } QPushButton#nextButton:pressed, QPushButton#playButton:pressed, QPushButton#clearHistoryButton:pressed, -QPushButton#checkUpdateButton:pressed, QPushButton#doTransferButton:pressed, QPushButton#photoButton:pressed, +QPushButton#doTransferButton:pressed, QPushButton#photoButton:pressed, QPushButton#takePhotoButton:pressed, QPushButton#importButton:pressed, QPushButton#existingPushButton:pressed, QPushButton#newAccountButton:pressed, QPushButton#previousButton:pressed, QPushButton#exportButton:pressed, QPushButton#cancelAddButton:pressed, QPushButton#exportOnRingButton:pressed, @@ -692,3 +688,18 @@ QLabel#accountIdLabel{ QLabel#accountAliasLabel{ font-weight: bold; } + +/* setAvatarDialog { */ +QPushButton#pictureButton:default, QPushButton#fileButton:default { + background-color: rgb(0, 192, 213,); +} + +QPushButton#pictureButton:checked, QPushButton#fileButton:checked { + background-color: rgb(0, 0, 213); +} +/* } setAvatarDialog */ + + +/* SettingsWidget { */ + +/* } SettingsWidget */ \ No newline at end of file diff --git a/utils.cpp b/utils.cpp index 870da114db25ddfc3e1344fbfe291c75122d9cbb..ad5a1b364fd1ab5413017cab23fee50a7757f1da 100644 --- a/utils.cpp +++ b/utils.cpp @@ -129,7 +129,6 @@ Utils::GetRingtonePath() { QString ringtonePath = QString::fromWCharArray(workingDirectory); ringtonePath += QStringLiteral("\\ringtones\\default.wav"); - return ringtonePath; #else return QString("/usr/local");