Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F633362
SettingNetworkForm.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
SettingNetworkForm.cpp
View Options
#include
"SettingNetworkForm.h"
#include
"ui_SettingNetworkForm.h"
#include
"SettingsDialog.h"
SettingNetworkForm
::
SettingNetworkForm
(
QWidget
*
parent
)
:
AbstractSettingForm
(
parent
),
ui
(
new
Ui
::
SettingNetworkForm
)
{
ui
->
setupUi
(
this
);
}
SettingNetworkForm
::~
SettingNetworkForm
()
{
delete
ui
;
}
void
SettingNetworkForm
::
exchange
(
bool
save
)
{
if
(
save
)
{
if
(
ui
->
radioButton_auto_detect
->
isChecked
())
{
settings
()
->
proxy_type
=
"auto"
;
}
else
if
(
ui
->
radioButton_manual
->
isChecked
())
{
settings
()
->
proxy_type
=
"manual"
;
}
else
{
settings
()
->
proxy_type
=
"none"
;
}
settings
()
->
proxy_server
=
ui
->
lineEdit_proxy_server
->
text
();
}
else
{
if
(
settings
()
->
proxy_type
==
"auto"
)
{
ui
->
radioButton_auto_detect
->
click
();
}
else
if
(
settings
()
->
proxy_type
==
"manual"
)
{
ui
->
radioButton_manual
->
click
();
}
else
{
ui
->
radioButton_no_proxy
->
click
();
}
ui
->
lineEdit_proxy_server
->
setText
(
settings
()
->
proxy_server
);
}
}
void
SettingNetworkForm
::
updateProxyServerLineEdit
()
{
bool
f
=
ui
->
radioButton_manual
->
isChecked
();
ui
->
lineEdit_proxy_server
->
setEnabled
(
f
);
}
void
SettingNetworkForm
::
on_radioButton_no_proxy_clicked
()
{
updateProxyServerLineEdit
();
}
void
SettingNetworkForm
::
on_radioButton_auto_detect_clicked
()
{
updateProxyServerLineEdit
();
}
void
SettingNetworkForm
::
on_radioButton_manual_clicked
()
{
updateProxyServerLineEdit
();
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Nov 15, 4:40 PM (1 d, 1 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
152482
Default Alt Text
SettingNetworkForm.cpp (1 KB)
Attached To
Mode
R77 Guitar
Attached
Detach File
Event Timeline