Stream stats UX improvements

* Enable button only when one or more port is selected
* Reorder the button to make it first in the stats group
* Show some helpful text instead of a blank window when no stream stats
are available
This commit is contained in:
Srivats P 2017-12-06 20:47:26 +05:30
parent bfd31179dc
commit 92d4c260a0
3 changed files with 40 additions and 26 deletions

View File

@ -108,6 +108,7 @@ void PortStatsWindow::when_tvPortStats_selectionChanged(
tbViewCapture->setDisabled(isEmpty);
tbClear->setDisabled(isEmpty);
tbGetStreamStats->setDisabled(isEmpty);
tbResolveNeighbors->setDisabled(isEmpty);
tbClearNeighbors->setDisabled(isEmpty);

View File

@ -78,6 +78,22 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="tbGetStreamStats" >
<property name="toolTip" >
<string>Fetch Selected Port Stream Stats</string>
</property>
<property name="statusTip" >
<string>Fetches stream statistics from the selected port(s)</string>
</property>
<property name="text" >
<string>Fetch Stream Stats</string>
</property>
<property name="icon" >
<iconset resource="ostinato.qrc" >:/icons/stream_stats.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="tbClear">
<property name="toolTip">
@ -112,22 +128,6 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="tbGetStreamStats" >
<property name="toolTip" >
<string>Fetch Selected Port Stream Stats</string>
</property>
<property name="statusTip" >
<string>Fetches stream statistics from the selected port(s)</string>
</property>
<property name="text" >
<string>Fetch Stream Stats</string>
</property>
<property name="icon" >
<iconset resource="ostinato.qrc" >:/icons/stream_stats.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_3">
<property name="orientation">

View File

@ -1,7 +1,8 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>StreamStatsWindow</class>
<widget class="QWidget" name="StreamStatsWindow" >
<property name="geometry" >
<widget class="QWidget" name="StreamStatsWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@ -9,27 +10,39 @@
<height>452</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>Stream Statistics</string>
</property>
<layout class="QHBoxLayout" >
<layout class="QHBoxLayout">
<item>
<widget class="QTableView" name="streamStats" >
<property name="contextMenuPolicy" >
<widget class="XTableView" name="streamStats">
<property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum>
</property>
<property name="whatsThis">
<string>Oops! We don't seem to have any stream statistics for the requested port(s)
Wait a little bit to see if they appear, otherwise verify your stream stats configuration</string>
</property>
</widget>
</item>
</layout>
<action name="actionShowByteCounters" >
<property name="checkable" >
<action name="actionShowByteCounters">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text" >
<property name="text">
<string>Show Byte Counters</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
<class>XTableView</class>
<extends>QTableView</extends>
<header>xtableview.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>