UX: Add text hint about stream list

Remove text about how to create streams from Apply text hint. Make
hint text copy consistent across all hints
This commit is contained in:
Srivats P 2017-09-09 18:53:58 +05:30
parent abb48a1c12
commit 4d13ecf15d
2 changed files with 64 additions and 4 deletions

View File

@ -54,7 +54,7 @@
<string>&lt;p&gt;&lt;b&gt;How to use Ostinato&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The port list on the left contains all the ports on which you can transmit packets.&lt;/p&gt;
&lt;p&gt;Ports belong to a port group. Make sure the Port Group has a &lt;img src=&quot;:/icons/bullet_green.png&quot;/&gt; next to it, then double click the port group to show or hide the ports in the port group.&lt;/p&gt;
&lt;p&gt;To generate packets, you need to create and configure packet streams. A stream is a sequence of one or more same or similar packets.&lt;/p&gt;
&lt;p&gt;To generate packets, you need to create and configure packet streams. A stream is a sequence of one or more packets.&lt;/p&gt;
&lt;p&gt;To create a stream, select the port on which you want to send packets.&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;Don't see the port that you want (or any ports at all) inside the port group? &lt;a href=&quot;http://ostinato.org/docs/faq&quot;&gt;Get Help!&lt;/a&gt;&lt;/p&gt;</string>
@ -93,7 +93,7 @@
<string>&lt;p&gt;You have selected a port group in the port list on the left.&lt;/p&gt;
&lt;p&gt;You can transmit packets on any of the ports within the port group.&lt;/p&gt;
&lt;p&gt;Make sure the port group has a &lt;img src=&quot;:/icons/bullet_green.png&quot;/&gt; next to it and then double click the port group to show or hide the ports in the port group.&lt;/p&gt;
&lt;p&gt;To generate packets, you need to create and configure packet streams. A stream is a sequence of one or more same or similar packets.&lt;/p&gt;
&lt;p&gt;To generate packets, you need to create and configure packet streams. A stream is a sequence of one or more packets.&lt;/p&gt;
&lt;p&gt;To create a stream, select the port on which you want to send packets. &lt;/p&gt;</string>
</property>
<property name="alignment">
@ -152,7 +152,7 @@
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Right click in the blank area below to configure streams. Click Apply on the right to activate the changes</string>
<string>Configuration Changed? Click Apply on the right to activate the changes</string>
</property>
</widget>
</item>
@ -221,7 +221,7 @@
</layout>
</item>
<item>
<widget class="QTableView" name="tvStreamList">
<widget class="XTableView" name="tvStreamList">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
@ -231,6 +231,13 @@
<property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum>
</property>
<property name="whatsThis">
<string>This is the stream list for the selected port
A stream is a sequence of one or more packets
Right-click to create a stream</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
@ -373,6 +380,11 @@
<extends>QTreeView</extends>
<header>xtreeview.h</header>
</customwidget>
<customwidget>
<class>XTableView</class>
<extends>QTableView</extends>
<header>xtableview.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="ostinato.qrc"/>

48
client/xtableview.h Normal file
View File

@ -0,0 +1,48 @@
/*
Copyright (C) 2017 Srivats P.
This file is part of "Ostinato"
This is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
*/
#ifndef _X_TABLE_VIEW_H
#define _X_TABLE_VIEW_H
#include <QTableView>
#include <QPainter>
class XTableView : public QTableView
{
public:
XTableView(QWidget *parent) : QTableView(parent) {}
virtual ~XTableView() {}
protected:
virtual void paintEvent(QPaintEvent *event)
{
if (!model()->hasChildren()) {
QPainter painter(viewport());
style()->drawItemText(&painter, viewport()->rect(),
layoutDirection() | Qt::AlignCenter, palette(),
true, whatsThis(), QPalette::WindowText);
}
else
QTableView::paintEvent(event);
}
};
#endif