diff options
Diffstat (limited to 'grc/python/flow_graph.tmpl')
-rw-r--r-- | grc/python/flow_graph.tmpl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl index 163e7f76aa..78604c30c8 100644 --- a/grc/python/flow_graph.tmpl +++ b/grc/python/flow_graph.tmpl @@ -77,6 +77,9 @@ class $(class_name)(gr.top_block, Qt.QWidget): self.top_grid_layout = Qt.QGridLayout() self.top_layout.addLayout(self.top_grid_layout) + self.settings = Qt.QSettings("GNU Radio", "$class_name") + self.restoreGeometry(self.settings.value("geometry").toByteArray()) + #elif $generate_options == 'no_gui' class $(class_name)(gr.top_block): @@ -217,6 +220,16 @@ gr.io_signaturev($(len($io_sigs)), $(len($io_sigs)), [$(', '.join($size_strs))]) #end for ######################################################## +# QT sink close method reimplementation +######################################################## +#if $generate_options == 'qt_gui' + def closeEvent(self, event): + self.settings = Qt.QSettings("GNU Radio", "$class_name") + self.settings.setValue("geometry", self.saveGeometry()) + event.accept() +#end if + +######################################################## ##Create Callbacks ## Write a set method for this variable that calls the callbacks ######################################################## @@ -288,6 +301,7 @@ if __name__ == '__main__': tb.show() qapp.exec_() tb.stop() + tb = None #to clean up Qt widgets #elif $generate_options == 'no_gui' tb = $(class_name)($(', '.join($params_eq_list))) #set $run_options = $flow_graph.get_option('run_options') |