diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-07-29 14:27:49 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-07-29 14:27:49 -0400 |
commit | 35a1402fc4ed3f29e1693706886bc633aa35febb (patch) | |
tree | f60b414edf4581eba27ad89f36f33f123a073db7 /grc | |
parent | 7ada63b93577624c9ec0a8cb0dfabfd481af9260 (diff) | |
parent | eb4305b92f0128c47743b4e2df032a04052ac21d (diff) |
Merge branch 'qtsink_menus' into next
Diffstat (limited to 'grc')
-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 17feb01f65..6e504815a6 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): @@ -191,6 +194,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 ######################################################## @@ -262,6 +275,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') |