mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-11 15:41:41 +02:00
bugfix 2567
This commit is contained in:
@@ -83,7 +83,17 @@ void IPServiceDialog::loadFWObject(FWObject *o)
|
||||
m_dialog->timestamp->setChecked( s->getBool("ts") );
|
||||
m_dialog->all_fragments->setChecked( s->getBool("fragm") );
|
||||
m_dialog->short_fragments->setChecked( s->getBool("short_fragm") );
|
||||
|
||||
if(s->getBool("use_dscp"))
|
||||
{
|
||||
m_dialog->use_dscp->setCheckable ( true );
|
||||
m_dialog->code_label->setText("DSCP code:");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dialog->use_tos->setCheckable ( true );
|
||||
m_dialog->code_label->setText("TOS code:");
|
||||
}
|
||||
m_dialog->code->setText(s->getStr("dscp_tos_code").c_str());
|
||||
m_dialog->comment->setText( QString::fromUtf8(s->getComment().c_str()) );
|
||||
|
||||
//apply->setEnabled( false );
|
||||
@@ -125,6 +135,14 @@ void IPServiceDialog::loadFWObject(FWObject *o)
|
||||
void IPServiceDialog::changed()
|
||||
{
|
||||
//apply->setEnabled( true );
|
||||
if (m_dialog->use_dscp->isChecked())
|
||||
{
|
||||
m_dialog->code_label->setText("DSCP code:");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_dialog->code_label->setText("TOS code:");
|
||||
}
|
||||
emit changed_sign();
|
||||
}
|
||||
|
||||
@@ -158,7 +176,9 @@ void IPServiceDialog::applyChanges()
|
||||
obj->setBool("ts", m_dialog->timestamp->isChecked() );
|
||||
obj->setBool("fragm", m_dialog->all_fragments->isChecked() );
|
||||
obj->setBool("short_fragm", m_dialog->short_fragments->isChecked() );
|
||||
|
||||
obj->setBool("use_dscp", m_dialog->use_dscp->isChecked());
|
||||
obj->setBool("use_tos", m_dialog->use_tos->isChecked());
|
||||
obj->setStr("dscp_tos_code", m_dialog->code->text().toUtf8().constData());
|
||||
mw->updateObjName(obj,QString::fromUtf8(oldname.c_str()));
|
||||
|
||||
init=true;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>652</width>
|
||||
<height>203</height>
|
||||
<height>244</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
@@ -320,7 +320,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<item row="7" column="0" colspan="2" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -389,6 +389,33 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<widget class="QRadioButton" name="use_dscp" >
|
||||
<property name="text" >
|
||||
<string>Use DSCP</string>
|
||||
</property>
|
||||
<property name="checked" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2" >
|
||||
<widget class="QRadioButton" name="use_tos" >
|
||||
<property name="text" >
|
||||
<string>Use TOS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<widget class="QLabel" name="code_label" >
|
||||
<property name="text" >
|
||||
<string>DSCP code:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="code" />
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -421,8 +448,8 @@
|
||||
<slot>changed()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<x>109</x>
|
||||
<y>75</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>20</x>
|
||||
@@ -437,8 +464,8 @@
|
||||
<slot>changed()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<x>174</x>
|
||||
<y>129</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>20</x>
|
||||
@@ -453,8 +480,8 @@
|
||||
<slot>changed()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<x>251</x>
|
||||
<y>81</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>20</x>
|
||||
@@ -469,8 +496,8 @@
|
||||
<slot>changed()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<x>251</x>
|
||||
<y>109</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>20</x>
|
||||
@@ -485,8 +512,8 @@
|
||||
<slot>changed()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<x>251</x>
|
||||
<y>137</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>20</x>
|
||||
@@ -501,8 +528,8 @@
|
||||
<slot>changed()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<x>251</x>
|
||||
<y>165</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>20</x>
|
||||
@@ -517,8 +544,8 @@
|
||||
<slot>changed()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<x>251</x>
|
||||
<y>193</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>20</x>
|
||||
@@ -533,8 +560,8 @@
|
||||
<slot>changed()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<x>251</x>
|
||||
<y>221</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>20</x>
|
||||
@@ -549,8 +576,8 @@
|
||||
<slot>changed()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<x>425</x>
|
||||
<y>71</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>20</x>
|
||||
@@ -565,8 +592,8 @@
|
||||
<slot>libChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<x>109</x>
|
||||
<y>98</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>20</x>
|
||||
@@ -574,5 +601,37 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>use_dscp</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>IPServiceDialog_q</receiver>
|
||||
<slot>changed()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>65</x>
|
||||
<y>157</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>193</x>
|
||||
<y>-4</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>use_tos</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>IPServiceDialog_q</receiver>
|
||||
<slot>changed()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>40</x>
|
||||
<y>178</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>293</x>
|
||||
<y>0</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
||||
Reference in New Issue
Block a user