diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2016-03-13 19:16:22 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2016-03-14 07:38:26 +0000 |
commit | 033223c21d258f07c9f1d6b6ce228a6443e97a10 (patch) | |
tree | 29d43afe5df7c34945b1595292e3ea2081246fad /ui | |
parent | 13517e61db481c44daf951ae0789ed21e8684e34 (diff) | |
download | wireshark-033223c21d258f07c9f1d6b6ce228a6443e97a10.tar.gz |
Qt: Add FunnelTextDialog geometry state
Use "Funnel <title>" as dialog name to avoid a user defined dialog
title to be equal to a existing dialog title.
Change-Id: I3d21c87de8fe5852f37a18b4751fb4d4428ce6ea
Reviewed-on: https://code.wireshark.org/review/14450
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/funnel_text_dialog.cpp | 9 | ||||
-rw-r--r-- | ui/qt/funnel_text_dialog.h | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/ui/qt/funnel_text_dialog.cpp b/ui/qt/funnel_text_dialog.cpp index 0cf9a311bc..2e76af4f0d 100644 --- a/ui/qt/funnel_text_dialog.cpp +++ b/ui/qt/funnel_text_dialog.cpp @@ -37,13 +37,16 @@ static QHash<QObject *, funnel_bt_t*> text_button_to_funnel_button_; -FunnelTextDialog::FunnelTextDialog() : - QDialog(NULL), +FunnelTextDialog::FunnelTextDialog(const QString &title) : + GeometryStateDialog(NULL), ui(new Ui::FunnelTextDialog), close_cb_(NULL), close_cb_data_(NULL) { ui->setupUi(this); + if (!title.isEmpty()) { + loadGeometry(0, 0, QString("Funnel %1").arg(title)); + } funnel_text_window_.funnel_text_dialog = this; @@ -71,7 +74,7 @@ void FunnelTextDialog::reject() struct _funnel_text_window_t *FunnelTextDialog::textWindowNew(const QString title) { - FunnelTextDialog *ftd = new FunnelTextDialog(); + FunnelTextDialog *ftd = new FunnelTextDialog(title); ftd->setWindowTitle(wsApp->windowTitleString(title)); ftd->show(); return &ftd->funnel_text_window_; diff --git a/ui/qt/funnel_text_dialog.h b/ui/qt/funnel_text_dialog.h index 4e74142d08..278ae2ab0b 100644 --- a/ui/qt/funnel_text_dialog.h +++ b/ui/qt/funnel_text_dialog.h @@ -25,6 +25,7 @@ #include <glib.h> #include "epan/funnel.h" +#include "geometry_state_dialog.h" #include <QDialog> @@ -37,12 +38,12 @@ struct _funnel_text_window_t { FunnelTextDialog* funnel_text_dialog; }; -class FunnelTextDialog : public QDialog +class FunnelTextDialog : public GeometryStateDialog { Q_OBJECT public: - explicit FunnelTextDialog(); + explicit FunnelTextDialog(const QString &title = QString()); ~FunnelTextDialog(); void reject(); |