summaryrefslogtreecommitdiff
path: root/ui/qt/funnel_string_dialog.h
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2015-09-03 14:29:06 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2015-09-04 17:33:46 +0000
commit0a68c9d2578ea3432de78c52e4c53bf660eadfb6 (patch)
tree15aa85eb45a4e8f54f9c1eb5cacfff046e6b47a3 /ui/qt/funnel_string_dialog.h
parenta69a515f287f1e8a43b5b9034eebdfc56a29a1c9 (diff)
downloadwireshark-0a68c9d2578ea3432de78c52e4c53bf660eadfb6.tar.gz
Qt: Destruct FunnelStringDialog when done.
To be able to close all open dialogs (emit a close signal) from a C function this change introduces a FunnelStringDialogHelper class to handle this. Change-Id: Id50e949e5e2b56401ce9228f8fa9ba17dddbd7fb Reviewed-on: https://code.wireshark.org/review/10372 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/qt/funnel_string_dialog.h')
-rw-r--r--ui/qt/funnel_string_dialog.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/ui/qt/funnel_string_dialog.h b/ui/qt/funnel_string_dialog.h
index 1086bcadd0..847dc5b060 100644
--- a/ui/qt/funnel_string_dialog.h
+++ b/ui/qt/funnel_string_dialog.h
@@ -32,6 +32,7 @@ class QLineEdit;
namespace Ui {
class FunnelStringDialog;
+class FunnelStringDialogHelper;
}
class FunnelStringDialog : public QDialog
@@ -43,7 +44,10 @@ public:
~FunnelStringDialog();
// Funnel ops
- static FunnelStringDialog *stringDialogNew(const QString title, const QStringList field_name_list, funnel_dlg_cb_t dialog_cb, void* dialog_cb_data);
+ static void stringDialogNew(const QString title, const QStringList field_name_list, funnel_dlg_cb_t dialog_cb, void* dialog_cb_data);
+
+ void accept();
+ void reject();
private slots:
void on_buttonBox_accepted();
@@ -55,6 +59,17 @@ private:
QList<QLineEdit *> field_edits_;
};
+class FunnelStringDialogHelper : public QObject
+{
+ Q_OBJECT;
+
+public slots:
+ void emitCloseDialogs();
+
+signals:
+ void closeDialogs();
+};
+
extern "C" {
void string_dialog_new(const gchar* title, const gchar** fieldnames, funnel_dlg_cb_t dialog_cb, void* dialog_cb_data);
void string_dialogs_close(void);