From 40c5e00ec2a10681d2280841c71d508ed4586ea3 Mon Sep 17 00:00:00 2001 From: Srivats P Date: Thu, 7 Sep 2017 20:45:43 +0530 Subject: [PATCH] (UX) Add textual hints for to the ports window Improves first run experience --- client/portswindow.cpp | 6 +- client/portswindow.ui | 332 ++++++++++++++++++++++++----------------- 2 files changed, 197 insertions(+), 141 deletions(-) diff --git a/client/portswindow.cpp b/client/portswindow.cpp index 76f7ee7..68d9e24 100644 --- a/client/portswindow.cpp +++ b/client/portswindow.cpp @@ -349,8 +349,8 @@ void PortsWindow::when_portView_currentChanged(const QModelIndex& currentIndex, if (!current.isValid()) { - qDebug("setting stacked widget to blank page"); - swDetail->setCurrentIndex(2); // blank page + qDebug("setting stacked widget to welcome page"); + swDetail->setCurrentIndex(0); // welcome page } else { @@ -360,7 +360,7 @@ void PortsWindow::when_portView_currentChanged(const QModelIndex& currentIndex, } else if (plm->isPort(current)) { - swDetail->setCurrentIndex(0); // port detail page + swDetail->setCurrentIndex(2); // port detail page updatePortRates(); connect(&(plm->port(current)), SIGNAL(portRateChanged(int, int)), SLOT(updatePortRates())); diff --git a/client/portswindow.ui b/client/portswindow.ui index cbab508..ca3331f 100644 --- a/client/portswindow.ui +++ b/client/portswindow.ui @@ -1,7 +1,8 @@ - + + PortsWindow - - + + 0 0 @@ -9,83 +10,138 @@ 352 - + Form - - - - + + + + Qt::Horizontal - + false - - - + + + 1 0 - + Qt::ActionsContextMenu - + QAbstractItemView::SingleSelection - - - + + + 2 0 - - 0 + + 2 - - - - 0 - - - 0 - - - 0 - - + + + + + + <p><b>How to use Ostinato</b></p> +<p>The port list on the left contains all the ports on which you can transmit packets.</p> +<p>Ports belong to a port group. Make sure the Port Group has a <img src=":/icons/bullet_green.png"/> next to it, then double click the port group to show or hide the ports in the port group.</p> +<p>To generate packets, you need to create and configure packet streams. A stream is a sequence of one or more same or similar packets.</p> +<p>To create a stream, select the port on which you want to send packets.</p> +<hr/> +<p>Don't see the port that you want (or any ports at all) inside the port group? <a href="http://ostinato.org/docs/faq">Get Help!</a></p> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + <p>You have selected a port group in the port list on the left.</p> +<p>You can transmit packets on any of the ports within the port group.</p> +<p>Make sure the port group has a <img src=":/icons/bullet_green.png"/> next to it and then double click the port group to show or hide the ports in the port group.</p> +<p>To generate packets, you need to create and configure packet streams. A stream is a sequence of one or more same or similar packets.</p> +<p>To create a stream, select the port on which you want to send packets. </p> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + Qt::Vertical + + + + 20 + 177 + + + + + + + + + 0 - - + + QFrame::Panel - + QFrame::Raised - - - 3 - - - 3 - - - 3 - - + + 3 - + Qt::Horizontal - + 40 20 @@ -94,8 +150,15 @@ - - + + + Right click in the blank area below to configure streams. Click Apply on the right to activate the changes + + + + + + Apply @@ -104,50 +167,50 @@ - - + + 0 - - + + Streams - + - + - - + + Avg pps - + true - + - - + + Avg bps - - + + false - + Qt::Horizontal - + 40 20 @@ -158,39 +221,39 @@ - - - + + + 0 1 - + Qt::ActionsContextMenu - + QFrame::StyledPanel - + 1 - + QAbstractItemView::ExtendedSelection - + QAbstractItemView::SelectRows - - + + Devices - + - + @@ -198,109 +261,102 @@ - - - - - - Select a port to configure streams - - - Qt::AlignCenter - - - - - - - - - :/icons/portgroup_add.png + + + + :/icons/portgroup_add.png:/icons/portgroup_add.png - + New Port Group - - - :/icons/portgroup_delete.png + + + + :/icons/portgroup_delete.png:/icons/portgroup_delete.png - + Delete Port Group - - - :/icons/portgroup_connect.png + + + + :/icons/portgroup_connect.png:/icons/portgroup_connect.png - + Connect Port Group - - - :/icons/portgroup_disconnect.png + + + + :/icons/portgroup_disconnect.png:/icons/portgroup_disconnect.png - + Disconnect Port Group - - - :/icons/stream_add.png + + + + :/icons/stream_add.png:/icons/stream_add.png - + New Stream - - - :/icons/stream_delete.png + + + + :/icons/stream_delete.png:/icons/stream_delete.png - + Delete Stream - - - :/icons/stream_edit.png + + + + :/icons/stream_edit.png:/icons/stream_edit.png - + Edit Stream - - + + true - + Exclusive Port Control (EXPERIMENTAL) - - + + Open Streams ... - - + + Save Streams ... - - + + Port Configuration ... - - - :/icons/stream_duplicate.png + + + + :/icons/stream_duplicate.png:/icons/stream_duplicate.png - + Duplicate Stream @@ -314,7 +370,7 @@ - + @@ -323,11 +379,11 @@ averagePacketsPerSec setEnabled(bool) - + 326 80 - + 454 79 @@ -339,11 +395,11 @@ averageBitsPerSec setEnabled(bool) - + 523 80 - + 651 88