mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-18 20:50:09 +08:00
add brutal upload ui
This commit is contained in:
parent
6da8f7ce05
commit
808c060a25
@ -272,23 +272,61 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="brutal_speed_l">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Server to Client TCP Brutal Speed</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TCP Brutal Speed</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="brutal_speed"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="brutal_speed_u">
|
||||
<property name="text">
|
||||
<string>Mb/s</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<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>
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="brutal_speed_l">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Server to Client TCP Brutal Speed</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Brutal Download Speed</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="brutal_speed_u">
|
||||
<property name="text">
|
||||
<string>Mb/s</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="brutal_d_speed"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Brutal Upload Speed</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="brutal_u_speed"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Mb/s</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@ -320,7 +320,8 @@ void DialogEditProfile::typeSelected(const QString &newType) {
|
||||
auto mux = ent->outbound->GetMux();
|
||||
ui->multiplex->setCurrentIndex(mux->getMuxState());
|
||||
ui->brutal_enable->setChecked(mux->brutal->enabled);
|
||||
ui->brutal_speed->setText(Int2String(mux->brutal->down_mbps));
|
||||
ui->brutal_d_speed->setText(Int2String(mux->brutal->down_mbps));
|
||||
ui->brutal_u_speed->setText(Int2String(mux->brutal->up_mbps));
|
||||
}
|
||||
|
||||
// 左边 bean
|
||||
@ -433,7 +434,8 @@ bool DialogEditProfile::onEnd() {
|
||||
auto mux = ent->outbound->GetMux();
|
||||
mux->saveMuxState(ui->multiplex->currentIndex());
|
||||
mux->brutal->enabled = ui->brutal_enable->isChecked();
|
||||
mux->brutal->down_mbps = ui->brutal_speed->text().toInt();
|
||||
mux->brutal->down_mbps = ui->brutal_d_speed->text().toInt();
|
||||
mux->brutal->up_mbps = ui->brutal_u_speed->text().toInt();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user