Commit db026419 authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk

settingwidget: modify for giving SIP account a unique account setting page

Change-Id: I3fc19411d1d39124205e0dab92c6c2ca7a30a8b3
parent 600208bd
This diff is collapsed.
/***************************************************************************
* Copyright (C) 2019-2019 by Savoir-faire Linux *
* Author: Isa Nanic <isa.nanic@savoirfairelinux.com>
* Author: Mingrui Zhang <mingrui.zhang@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 AdvancedSIPSettingsWidget;
}
class AdvancedSIPSettingsWidget : public QWidget
{
Q_OBJECT
AdvancedSIPSettingsWidget(const AdvancedSIPSettingsWidget& cpy);
public:
AdvancedSIPSettingsWidget(QWidget* parent = nullptr);
~AdvancedSIPSettingsWidget();
void updateAdvancedSIPSettings();
private:
Ui::AdvancedSIPSettingsWidget* ui;
private slots:
// call settings
void setAutoAnswerCalls(bool state);
void setEnableRingtone(bool state);
void openFileCustomRingtone();
// 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
This diff is collapsed.
......@@ -61,7 +61,8 @@ HEADERS += aboutdialog.h \
shmclient.h \
videooverlay.h \
utils.h \
webchathelpers.h
webchathelpers.h \
advancedsipsettingwidget.h
FORMS += contactdialog.ui \
videoview.ui \
animatedoverlay.ui \
......@@ -83,7 +84,8 @@ FORMS += contactdialog.ui \
advancedsettingswidget.ui \
callwidget.ui \
settingswidget.ui \
videooverlay.ui
videooverlay.ui \
advancedsipsettingwidget.ui
SOURCES += aboutdialog.cpp \
bannedcontactswidget.cpp \
idlabel.cpp \
......@@ -128,5 +130,6 @@ SOURCES += aboutdialog.cpp \
videooverlay.cpp \
utils.cpp \
videoview.cpp \
webchathelpers.cpp
webchathelpers.cpp \
advancedsipsettingwidget.cpp
RESOURCES += ressources.qrc
......@@ -3,7 +3,8 @@
* Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
* Author: Anthony Lonard <anthony.leonard@savoirfairelinux.com> *
* Author: Olivier Soldano <olivier.soldano@savoirfairelinux.com> *
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> *
* Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
* Author: Mingrui Zhang <mingrui.zhang@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 *
......
......@@ -76,5 +76,7 @@
<file>images/icons/round-error-24px.svg</file>
<file>images/icons/round-save_alt-24px.svg</file>
<file>images/jami_eclipse_spinner.gif</file>
<file>images/icons/showHide.PNG</file>
<file>images/icons/showHideTwo.PNG</file>
</qresource>
</RCC>
......@@ -223,6 +223,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="advancedsettingswidget.cpp" />
<ClCompile Include="advancedsipsettingwidget.cpp" />
<ClCompile Include="avatargraphicsview.cpp" />
<ClCompile Include="bannedlistmodel.cpp" />
<ClCompile Include="animationhelpers.cpp" />
......@@ -394,6 +395,10 @@
<IncludePath Condition="'$(Configuration)|$(Platform)'=='ReleaseCompile|x64'">.\GeneratedFiles\$(ConfigurationName)\.;.\GeneratedFiles;.;$(ProjectDir)..\ring-daemon\contrib\msvc\include;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\ring-lrc\src;$(ProjectDir)..\lrc\src;$(ProjectDir)winsparkle\include;$(ProjectDir)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\QtWebChannel;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release</IncludePath>
<Define Condition="'$(Configuration)|$(Platform)'=='ReleaseCompile|x64'">COMPILE_ONLY;_WINDOWS;UNICODE;_UNICODE;WIN32;WIN64;ENABLE_AUTOUPDATE;QT_NO_DEBUG;NDEBUG</Define>
</QtMoc>
<QtMoc Include="advancedsipsettingwidget.h">
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;$(ProjectDir)..\ring-daemon\contrib\msvc\include;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\ring-lrc\src;$(ProjectDir)..\lrc\src;$(ProjectDir)winsparkle\include;$(ProjectDir)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\QtWebChannel;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release</IncludePath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='ReleaseCompile|x64'">.\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;$(ProjectDir)..\ring-daemon\contrib\msvc\include;$(ProjectDir)..\daemon\contrib\msvc\include;$(ProjectDir)..\ring-lrc\src;$(ProjectDir)..\lrc\src;$(ProjectDir)winsparkle\include;$(ProjectDir)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\QtWebChannel;$(QTDIR)\include\QtCore;$(QTDIR)\mkspecs\win32-msvc;.\release</IncludePath>
</QtMoc>
<ClInclude Include="pixbufmanipulator.h" />
<QtMoc Include="ringbutton.h">
</QtMoc>
......@@ -557,6 +562,7 @@
<QtUic Include="advancedsettingswidget.ui">
<SubType>Designer</SubType>
</QtUic>
<QtUic Include="advancedsipsettingwidget.ui" />
<QtUic Include="animatedoverlay.ui">
<SubType>Designer</SubType>
</QtUic>
......
......@@ -195,6 +195,9 @@
<ClCompile Include="bezierconnectorwidget.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="advancedsipsettingwidget.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<QtMoc Include="aboutdialog.h">
......@@ -326,6 +329,9 @@
<QtMoc Include="lrcinstance.h">
<Filter>Header Files</Filter>
</QtMoc>
<QtMoc Include="advancedsipsettingwidget.h">
<Filter>Header Files</Filter>
</QtMoc>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="debug\moc_predefs.h.cbt">
......@@ -605,6 +611,9 @@
<QtUic Include="newwizardwidget.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="advancedsipsettingwidget.ui">
<Filter>Form Files</Filter>
</QtUic>
</ItemGroup>
<ItemGroup>
<None Include="images\FontAwesome.otf">
......
This diff is collapsed.
/***************************************************************************
* Copyright (C) 2019-2019 by Savoir-faire Linux *
* Author: Isa Nanic <isa.nanic@savoirfairelinux.com> *
* Copyright (C) 2019-2019 by Savoir-faire Linux *
* Author: Isa Nanic <isa.nanic@savoirfairelinux.com>
* Author: Mingrui Zhang <mingrui.zhang@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 *
......@@ -24,20 +25,22 @@
#include "lrcinstance.h"
#include "advancedsettingswidget.h"
#include "advancedsipsettingwidget.h"
#include "bannedlistmodel.h"
#include "linkdevwidget.h"
#include "ui_linkdevwidget.h"
// general settings
// general settings
#include "api/datatransfermodel.h"
#include "typedefs.h"
// av settings
#include "video/devicemodel.h"
namespace Ui {
class SettingsWidget;
namespace Ui
{
class SettingsWidget;
}
class SettingsWidget : public NavWidget
......@@ -69,7 +72,12 @@ private:
Ui::SettingsWidget* ui;
// ************************* Account Settings *************************
// ************************* SIP Account/Account Settings *************************
lrc::api::account::ConfProperties_t confProps_;
bool showOrHide_{false};
void showhideButtonClicked();
void passwordClicked();
void avatarClicked();
......@@ -84,7 +92,12 @@ private:
bool advancedSettingsDropped_ = false;
bool bannedContactsShown_ = false;
AdvancedSIPSettingsWidget* advancedSIPSettingsWidget_;
QScrollArea* scrollSIPArea_;
bool advancedSIPSettingsDropped_ = false;
int avatarSize_;
int avatarSIPSize_;
void setRegNameUi(RegName stat);
bool regNameBtn_ = false;
......@@ -109,6 +122,7 @@ private slots:
void setAccEnableSlot(int state);
void delAccountSlot();
void toggleAdvancedSIPSettings();
void toggleAdvancedSettings();
void toggleBannedContacts();
void exportAccountSlot();
......
This diff is collapsed.
......@@ -45,7 +45,8 @@ QWidget#smartListOuterWidget {
}
QPushButton#btnConversations, QPushButton#btnInvites,
QPushButton#btnExportAccount, QPushButton#btnDeletAccount {
QPushButton#btnExportAccount, QPushButton#btnDeletAccount,
QPushButton#btnSIPDeletAccount {
border-radius: 0px;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
......@@ -60,12 +61,13 @@ QPushButton#btnExportAccount, QPushButton#btnDeletAccount {
}
QPushButton#btnConversations:hover, QPushButton#btnInvites:hover,
QPushButton#btnExportAccount:hover, QPushButton#btnDeletAccount:hover {
background-color: rgb(237, 237, 237);
border-top: 2px solid rgb(237, 237, 237);
border-right: 2px solid rgb(237, 237, 237);
border-bottom: 2px solid rgb(237, 237, 237);
border-left: 2px solid rgb(237, 237, 237);
QPushButton#btnExportAccount:hover, QPushButton#btnDeletAccount:hover,
QPushButton#btnSIPDeletAccount:hover {
background-color: rgb(188, 185, 184);
border-top: 2px solid rgb(188, 185, 184);
border-right: 2px solid rgb(188, 185, 184);
border-bottom: 2px solid rgb(188, 185, 184);
border-left: 2px solid rgb(188, 185, 184);
}
QPushButton#btnConversations:checked, QPushButton#btnInvites:checked,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment