From ac99ec8a7614286e6b1da6ad5adec99faac37230 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Wed, 24 Jun 2015 09:24:21 +0200 Subject: [PATCH] added static method to the FilterOptionsDialog in order to be able to directly get an filter object without having to create an dialog object in advance explicitly --- pylot/core/util/widgets.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index e69b2a92..a5e61da5 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -978,6 +978,13 @@ class FilterOptionsDialog(QDialog): def getFilterOptions(self): return self.filterOptions + @staticmethod + def getFilterObject(): + dlg = FilterOptionsDialog() + if dlg.exec_(): + return dlg.getFilterOptions() + return None + def accept(self): self.updateUi() QDialog.accept(self)