Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-windows
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-windows
Commits
ffae0a80
Commit
ffae0a80
authored
Aug 12, 2019
by
Ming Rui Zhang
Committed by
Andreas Traczyk
Aug 13, 2019
Browse files
Options
Downloads
Patches
Plain Diff
advancedSIPSetting: add published addresses section into sip settings
Change-Id: I9bd5a3d50694b0226d1743c7b474d02d29396122
parent
0fc72ba7
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
advancedsipsettingwidget.cpp
+39
-0
39 additions, 0 deletions
advancedsipsettingwidget.cpp
advancedsipsettingwidget.h
+6
-0
6 additions, 0 deletions
advancedsipsettingwidget.h
advancedsipsettingwidget.ui
+200
-1
200 additions, 1 deletion
advancedsipsettingwidget.ui
with
245 additions
and
1 deletion
advancedsipsettingwidget.cpp
+
39
−
0
View file @
ffae0a80
...
@@ -96,6 +96,14 @@ AdvancedSIPSettingsWidget::AdvancedSIPSettingsWidget(QWidget* parent)
...
@@ -96,6 +96,14 @@ AdvancedSIPSettingsWidget::AdvancedSIPSettingsWidget(QWidget* parent)
ui
->
lineEditSTUNAddressSIP
->
setEnabled
((
bool
)
state
);
ui
->
lineEditSTUNAddressSIP
->
setEnabled
((
bool
)
state
);
});
});
// published address
connect
(
ui
->
checkBoxCustomAddressPort
,
&
QAbstractButton
::
clicked
,
this
,
&
AdvancedSIPSettingsWidget
::
setUseCustomAddressAndPort
);
connect
(
ui
->
checkBoxCustomAddressPort
,
&
QAbstractButton
::
clicked
,
[
this
](
int
state
)
{
ui
->
lineEditSIPCustomAddress
->
setEnabled
((
bool
)
state
);
ui
->
customPortSIPSpinBox
->
setEnabled
((
bool
)
state
);
});
connect
(
ui
->
lineEditSIPCustomAddress
,
&
QLineEdit
::
editingFinished
,
this
,
&
AdvancedSIPSettingsWidget
::
lineEditSIPCustomAddressLineEditTextChanged
);
// codecs
// codecs
connect
(
ui
->
audioListWidgetSIP
,
&
QListWidget
::
itemChanged
,
this
,
&
AdvancedSIPSettingsWidget
::
audioCodecsStateChange
);
connect
(
ui
->
audioListWidgetSIP
,
&
QListWidget
::
itemChanged
,
this
,
&
AdvancedSIPSettingsWidget
::
audioCodecsStateChange
);
connect
(
ui
->
videoListWidgetSIP
,
&
QListWidget
::
itemChanged
,
this
,
&
AdvancedSIPSettingsWidget
::
videoCodecsStateChange
);
connect
(
ui
->
videoListWidgetSIP
,
&
QListWidget
::
itemChanged
,
this
,
&
AdvancedSIPSettingsWidget
::
videoCodecsStateChange
);
...
@@ -194,6 +202,13 @@ void AdvancedSIPSettingsWidget::updateAdvancedSIPSettings()
...
@@ -194,6 +202,13 @@ void AdvancedSIPSettingsWidget::updateAdvancedSIPSettings()
ui
->
networkInterfaceSpinBox
->
setValue
(
config
.
localPort
);
ui
->
networkInterfaceSpinBox
->
setValue
(
config
.
localPort
);
connect
(
ui
->
networkInterfaceSpinBox
,
QOverload
<
int
>::
of
(
&
QSpinBox
::
valueChanged
),
this
,
&
AdvancedSIPSettingsWidget
::
networkInterfaceSpinBoxValueChanged
);
connect
(
ui
->
networkInterfaceSpinBox
,
QOverload
<
int
>::
of
(
&
QSpinBox
::
valueChanged
),
this
,
&
AdvancedSIPSettingsWidget
::
networkInterfaceSpinBoxValueChanged
);
// published address
ui
->
checkBoxCustomAddressPort
->
setChecked
(
config
.
publishedSameAsLocal
);
ui
->
lineEditSIPCustomAddress
->
setText
(
QString
::
fromStdString
(
config
.
publishedAddress
));
ui
->
customPortSIPSpinBox
->
setValue
(
config
.
publishedPort
);
connect
(
ui
->
customPortSIPSpinBox
,
QOverload
<
int
>::
of
(
&
QSpinBox
::
valueChanged
),
this
,
&
AdvancedSIPSettingsWidget
::
customPortSIPSpinBoxValueChanged
);
// codecs
// codecs
ui
->
videoCheckBoxSIP
->
setChecked
(
config
.
Video
.
videoEnabled
);
ui
->
videoCheckBoxSIP
->
setChecked
(
config
.
Video
.
videoEnabled
);
disconnect
(
ui
->
audioListWidgetSIP
,
&
QListWidget
::
itemChanged
,
this
,
&
AdvancedSIPSettingsWidget
::
audioCodecsStateChange
);
disconnect
(
ui
->
audioListWidgetSIP
,
&
QListWidget
::
itemChanged
,
this
,
&
AdvancedSIPSettingsWidget
::
audioCodecsStateChange
);
...
@@ -578,3 +593,27 @@ AdvancedSIPSettingsWidget::networkInterfaceSpinBoxValueChanged(const int& value)
...
@@ -578,3 +593,27 @@ AdvancedSIPSettingsWidget::networkInterfaceSpinBoxValueChanged(const int& value)
confProps
.
localPort
=
value
;
confProps
.
localPort
=
value
;
LRCInstance
::
accountModel
().
setAccountConfig
(
LRCInstance
::
getCurrAccId
(),
confProps
);
LRCInstance
::
accountModel
().
setAccountConfig
(
LRCInstance
::
getCurrAccId
(),
confProps
);
}
}
void
AdvancedSIPSettingsWidget
::
setUseCustomAddressAndPort
(
bool
state
)
{
auto
confProps
=
LRCInstance
::
accountModel
().
getAccountConfig
(
LRCInstance
::
getCurrAccId
());
confProps
.
publishedSameAsLocal
=
state
;
LRCInstance
::
accountModel
().
setAccountConfig
(
LRCInstance
::
getCurrAccId
(),
confProps
);
}
void
AdvancedSIPSettingsWidget
::
lineEditSIPCustomAddressLineEditTextChanged
()
{
auto
confProps
=
LRCInstance
::
accountModel
().
getAccountConfig
(
LRCInstance
::
getCurrAccId
());
confProps
.
publishedAddress
=
ui
->
lineEditSIPCustomAddress
->
text
().
toStdString
();
LRCInstance
::
accountModel
().
setAccountConfig
(
LRCInstance
::
getCurrAccId
(),
confProps
);
}
void
AdvancedSIPSettingsWidget
::
customPortSIPSpinBoxValueChanged
(
const
int
&
value
)
{
auto
confProps
=
LRCInstance
::
accountModel
().
getAccountConfig
(
LRCInstance
::
getCurrAccId
());
confProps
.
publishedPort
=
value
;
LRCInstance
::
accountModel
().
setAccountConfig
(
LRCInstance
::
getCurrAccId
(),
confProps
);
}
This diff is collapsed.
Click to expand it.
advancedsipsettingwidget.h
+
6
−
0
View file @
ffae0a80
...
@@ -85,6 +85,12 @@ private slots:
...
@@ -85,6 +85,12 @@ private slots:
void
setTURNRealm
();
void
setTURNRealm
();
void
setSTUNAddress
();
void
setSTUNAddress
();
// published address
void
setUseCustomAddressAndPort
(
bool
state
);
void
lineEditSIPCustomAddressLineEditTextChanged
();
void
customPortSIPSpinBoxValueChanged
(
const
int
&
value
);
// codecs
// codecs
void
updateAudioCodecs
();
void
updateAudioCodecs
();
void
updateVideoCodecs
();
void
updateVideoCodecs
();
...
...
This diff is collapsed.
Click to expand it.
advancedsipsettingwidget.ui
+
200
−
1
View file @
ffae0a80
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<x>
0
</x>
<x>
0
</x>
<y>
0
</y>
<y>
0
</y>
<width>
731
</width>
<width>
731
</width>
<height>
1
424
</height>
<height>
1
532
</height>
</rect>
</rect>
</property>
</property>
<property
name=
"windowTitle"
>
<property
name=
"windowTitle"
>
...
@@ -1113,6 +1113,205 @@
...
@@ -1113,6 +1113,205 @@
</item>
</item>
</layout>
</layout>
</item>
</item>
<item>
<spacer
name=
"verticalSpacer_10"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Minimum
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_6"
>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QLabel"
name=
"label_4"
>
<property
name=
"font"
>
<font>
<pointsize>
13
</pointsize>
</font>
</property>
<property
name=
"text"
>
<string>
Published Address
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"verticalSpacer_9"
>
<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>
10
</height>
</size>
</property>
</spacer>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_17"
>
<property
name=
"leftMargin"
>
<number>
20
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<item>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<item
row=
"1"
column=
"0"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_28"
>
<item>
<spacer
name=
"horizontalSpacer_2"
>
<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=
"QLabel"
name=
"label_24"
>
<property
name=
"font"
>
<font>
<pointsize>
10
</pointsize>
</font>
</property>
<property
name=
"text"
>
<string>
Address
</string>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"0"
column=
"1"
>
<spacer
name=
"horizontalSpacer_27"
>
<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=
"2"
>
<widget
class=
"QSpinBox"
name=
"customPortSIPSpinBox"
>
<property
name=
"font"
>
<font>
<pointsize>
10
</pointsize>
</font>
</property>
<property
name=
"maximum"
>
<number>
65536
</number>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<spacer
name=
"horizontalSpacer_3"
>
<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=
"QLabel"
name=
"label_27"
>
<property
name=
"font"
>
<font>
<pointsize>
10
</pointsize>
</font>
</property>
<property
name=
"text"
>
<string>
Port
</string>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"0"
column=
"0"
>
<widget
class=
"ToggleSwitch"
name=
"checkBoxCustomAddressPort"
native=
"true"
>
<property
name=
"font"
>
<font>
<pointsize>
10
</pointsize>
</font>
</property>
<property
name=
"text"
stdset=
"0"
>
<string>
Use Custom Address/Port
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"2"
>
<widget
class=
"QLineEdit"
name=
"lineEditSIPCustomAddress"
>
<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=
"font"
>
<font>
<pointsize>
10
</pointsize>
</font>
</property>
<property
name=
"echoMode"
>
<enum>
QLineEdit::PasswordEchoOnEdit
</enum>
</property>
<property
name=
"placeholderText"
>
<string/>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</item>
<item>
<item>
<spacer
name=
"verticalSpacer_6"
>
<spacer
name=
"verticalSpacer_6"
>
<property
name=
"orientation"
>
<property
name=
"orientation"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment