aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/lbm_uimflow_dialog.cpp
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2016-02-28 19:23:20 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2016-02-28 18:25:50 +0000
commit1a716800e37ae482901e9cce36c40005742dd78e (patch)
tree6dc88f72f082fa795646442e086363ff3d2f1b9f /ui/qt/lbm_uimflow_dialog.cpp
parentf0425e83a16acabfec103f52099a3f20ea7b35c2 (diff)
Qt: Add dialog geometry restore
Add GeometryStateDialog class to handle load and save dialog geometry. The QDialog class name will be used as window name. For shared classes the UAT name or the statistics title or abbr will be used. Change-Id: I5a019598307fb3861518f41e733de834788184d8 Reviewed-on: https://code.wireshark.org/review/14139 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui/qt/lbm_uimflow_dialog.cpp')
-rw-r--r--ui/qt/lbm_uimflow_dialog.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/ui/qt/lbm_uimflow_dialog.cpp b/ui/qt/lbm_uimflow_dialog.cpp
index b34c57b81e..a4dbbcd6c3 100644
--- a/ui/qt/lbm_uimflow_dialog.cpp
+++ b/ui/qt/lbm_uimflow_dialog.cpp
@@ -209,7 +209,7 @@ static void lbm_uimflow_get_analysis(capture_file * cfile, seq_analysis_info_t *
// - Help button and text
LBMUIMFlowDialog::LBMUIMFlowDialog(QWidget * parent, capture_file * cfile) :
- QDialog(parent),
+ GeometryStateDialog(parent),
m_ui(new Ui::LBMUIMFlowDialog),
m_capture_file(cfile),
m_num_items(0),
@@ -217,6 +217,8 @@ LBMUIMFlowDialog::LBMUIMFlowDialog(QWidget * parent, capture_file * cfile) :
m_node_label_width(20)
{
m_ui->setupUi(this);
+ if (parent) loadGeometry(parent->width(), parent->height() * 4 / 5);
+
QCustomPlot * sp = m_ui->sequencePlot;
m_sequence_diagram = new SequenceDiagram(sp->yAxis, sp->xAxis2, sp->yAxis2);
@@ -263,12 +265,6 @@ LBMUIMFlowDialog::LBMUIMFlowDialog(QWidget * parent, capture_file * cfile) :
QPushButton * save_bt = m_ui->buttonBox->button(QDialogButtonBox::Save);
save_bt->setText(tr("Save As" UTF8_HORIZONTAL_ELLIPSIS));
- // XXX Use recent settings instead
- if (parent)
- {
- resize(parent->width(), parent->height() * 4 / 5);
- }
-
connect(m_ui->horizontalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(hScrollBarChanged(int)));
connect(m_ui->verticalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(vScrollBarChanged(int)));
connect(sp->xAxis2, SIGNAL(rangeChanged(QCPRange)), this, SLOT(xAxisChanged(QCPRange)));