aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2020-01-12 14:45:39 -0800
committerAnders Broman <a.broman58@gmail.com>2020-01-13 07:42:55 +0000
commite7a8c94aa7c423b1362ee0c3ccaeb7bf73343e74 (patch)
tree80d9a3e5d69b3933f101e6d1317ba9066697e4f9 /ui
parent3579779dd68f1a5a3f11fdf3d6e55baa90b74be2 (diff)
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>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/io_graph_dialog.cpp15
-rw-r--r--ui/qt/io_graph_dialog.ui63
2 files changed, 45 insertions, 33 deletions
diff --git a/ui/qt/io_graph_dialog.cpp b/ui/qt/io_graph_dialog.cpp
index b0940c9966..08df37fef0 100644
--- a/ui/qt/io_graph_dialog.cpp
+++ b/ui/qt/io_graph_dialog.cpp
@@ -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);
diff --git a/ui/qt/io_graph_dialog.ui b/ui/qt/io_graph_dialog.ui
index d6e5752e5a..6f4977de03 100644
--- a/ui/qt/io_graph_dialog.ui
+++ b/ui/qt/io_graph_dialog.ui
@@ -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>