Device Emulation (contd.): Inform user that src/dst mac resolve requires a corresponding device
This commit is contained in:
parent
72bab2737f
commit
c3fe9b0334
@ -5,8 +5,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>391</width>
|
<width>400</width>
|
||||||
<height>116</height>
|
<height>200</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
@ -178,7 +178,17 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" >
|
<item row="3" column="0" colspan="5" >
|
||||||
|
<widget class="QLabel" name="resolveInfo" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Please ensure that a corresponding device is configured on the port to enable source/destination mac address resolution. A corresponding device is one which has VLANs and source/gateway IP corresponding to this stream.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0" >
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
@ -28,6 +28,12 @@ MacConfigForm::MacConfigForm(QWidget *parent)
|
|||||||
QRegExp reMac("([0-9,a-f,A-F]{2,2}[:-]){5,5}[0-9,a-f,A-F]{2,2}");
|
QRegExp reMac("([0-9,a-f,A-F]{2,2}[:-]){5,5}[0-9,a-f,A-F]{2,2}");
|
||||||
|
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
resolveInfo->hide();
|
||||||
|
#if 0
|
||||||
|
// not working for some reason
|
||||||
|
resolveInfo->setPixmap(resolveInfo->style()->standardIcon(
|
||||||
|
QStyle::SP_MessageBoxInformation).pixmap(128));
|
||||||
|
#endif
|
||||||
leDstMac->setValidator(new QRegExpValidator(reMac, this));
|
leDstMac->setValidator(new QRegExpValidator(reMac, this));
|
||||||
leSrcMac->setValidator(new QRegExpValidator(reMac, this));
|
leSrcMac->setValidator(new QRegExpValidator(reMac, this));
|
||||||
leDstMacCount->setValidator(new QIntValidator(1, MAX_MAC_ITER_COUNT, this));
|
leDstMacCount->setValidator(new QIntValidator(1, MAX_MAC_ITER_COUNT, this));
|
||||||
@ -63,6 +69,9 @@ void MacConfigForm::on_cmbDstMacMode_currentIndexChanged(int index)
|
|||||||
leDstMacStep->setEnabled(true);
|
leDstMacStep->setEnabled(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
resolveInfo->setVisible(
|
||||||
|
cmbDstMacMode->currentIndex() == OstProto::Mac::e_mm_resolve
|
||||||
|
|| cmbSrcMacMode->currentIndex() == OstProto::Mac::e_mm_resolve);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacConfigForm::on_cmbSrcMacMode_currentIndexChanged(int index)
|
void MacConfigForm::on_cmbSrcMacMode_currentIndexChanged(int index)
|
||||||
@ -84,6 +93,9 @@ void MacConfigForm::on_cmbSrcMacMode_currentIndexChanged(int index)
|
|||||||
leSrcMacStep->setEnabled(true);
|
leSrcMacStep->setEnabled(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
resolveInfo->setVisible(
|
||||||
|
cmbDstMacMode->currentIndex() == OstProto::Mac::e_mm_resolve
|
||||||
|
|| cmbSrcMacMode->currentIndex() == OstProto::Mac::e_mm_resolve);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacConfigForm::loadWidget(AbstractProtocol *proto)
|
void MacConfigForm::loadWidget(AbstractProtocol *proto)
|
||||||
|
Loading…
Reference in New Issue
Block a user