diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2016-10-17 07:57:24 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2016-10-17 07:57:24 -0700 |
commit | 58bed0d449c663701a348461d1f9e6b6f4b94c18 (patch) | |
tree | 506ee6c2e3030a49612c0642657d31c8437b6316 /gr-qtgui/python/qtgui/util.py.cmakein | |
parent | d806c4f416302f09292bbc5fb96647382368424d (diff) | |
parent | 6431a11b26cec7162e520d4eba0efbd2cfb4ba5c (diff) |
Merge branch 'master' into next
Conflicts:
gr-qtgui/python/qtgui/CMakeLists.txt
gr-qtgui/python/qtgui/range.py.cmakein
grc/core/generator/flow_graph.tmpl
Diffstat (limited to 'gr-qtgui/python/qtgui/util.py.cmakein')
-rw-r--r-- | gr-qtgui/python/qtgui/util.py.cmakein | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gr-qtgui/python/qtgui/util.py.cmakein b/gr-qtgui/python/qtgui/util.py.cmakein new file mode 100644 index 0000000000..ca2b3b37c5 --- /dev/null +++ b/gr-qtgui/python/qtgui/util.py.cmakein @@ -0,0 +1,34 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Copyright 2016 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +@PY_QT_IMPORT@ +from gnuradio import gr + +def check_set_qss(): + app = QtGui.qApp + qssfile = gr.prefs().get_string("qtgui","qss","") + if(len(qssfile)>0): + try: + app.setStyleSheet(open(qssfile).read()) + except: + print "WARNING: bad QSS file, %s"%(qssfile) |