Qt: Add a splitter to the I/O Graphs dialog.

Add a vertical splitter, with the graph and hint label in the top part
and the graph list in the bottom.

Change-Id: Ib297b5c9c7da121b86bf3c5c4299985882ca5b8d
Reviewed-on: https://code.wireshark.org/review/35765
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Gerald Combs 2020-01-12 14:45:39 -08:00 committed by Anders Broman
parent 3579779dd6
commit e7a8c94aa7
2 changed files with 45 additions and 33 deletions

View File

@ -295,14 +295,14 @@ static void io_graph_free_cb(void* p) {
IOGraphDialog::IOGraphDialog(QWidget &parent, CaptureFile &cf, QString displayFilter) :
WiresharkDialog(parent, cf),
ui(new Ui::IOGraphDialog),
uat_model_(NULL),
uat_delegate_(NULL),
base_graph_(NULL),
tracer_(NULL),
uat_model_(nullptr),
uat_delegate_(nullptr),
base_graph_(nullptr),
tracer_(nullptr),
start_time_(0.0),
mouse_drags_(true),
rubber_band_(NULL),
stat_timer_(NULL),
rubber_band_(nullptr),
stat_timer_(nullptr),
need_replot_(false),
need_retap_(false),
auto_axes_(true),
@ -424,6 +424,9 @@ IOGraphDialog::IOGraphDialog(QWidget &parent, CaptureFile &cf, QString displayFi
ui->clearToolButton->setEnabled(uat_model_->rowCount() != 0);
ui->splitter->setStretchFactor(0, 95);
ui->splitter->setStretchFactor(1, 5);
//XXX - resize columns?
ProgressFrame::addToButtonBox(ui->buttonBox, &parent);

View File

@ -13,21 +13,28 @@
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCustomPlot" name="ioPlot" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>4</verstretch>
</sizepolicy>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="ElidedLabel" name="hintLabel">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
<widget class="QWidget" name="">
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0">
<item>
<widget class="QCustomPlot" name="ioPlot" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>90</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="ElidedLabel" name="hintLabel">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;h3&gt;Valuable and amazing time-saving keyboard shortcuts&lt;/h3&gt;
&lt;table&gt;&lt;tbody&gt;
@ -57,20 +64,22 @@
&lt;/tbody&gt;&lt;/table&gt;
&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="TabnavTreeView" name="graphUat">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="TabnavTreeView" name="graphUat">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</widget>
</item>
<item>