diff options
author | Johnathan Corgan | 2011-03-14 20:07:36 -0700 |
---|---|---|
committer | Johnathan Corgan | 2011-03-14 20:07:36 -0700 |
commit | 22deb62a872413bdeff63e4fb565b4bcce2c6508 (patch) | |
tree | 79571572f1f130b5153019d70d31b2c868cf0b97 /grc/grc_gnuradio/wxgui | |
parent | f3d373492fe415ced2bbf0be3f8e6da66576fcdc (diff) | |
parent | 4d5096c8b084c5832256dc2cd8bb617ee93d94a4 (diff) | |
download | gnuradio-22deb62a872413bdeff63e4fb565b4bcce2c6508.tar.gz gnuradio-22deb62a872413bdeff63e4fb565b4bcce2c6508.tar.bz2 gnuradio-22deb62a872413bdeff63e4fb565b4bcce2c6508.zip |
Merge remote branch 'jblum/mergeme/qtgui/grc' into next
* jblum/mergeme/qtgui/grc: (27 commits)
qtgui: removed python directory that was added, never used
qtgui-grc: added suport in main template for theme icon
qtgui-grc: minor tweaks to the various things
qtgui-grc: added read-only thermo widget to range block
qtgui-grc: fix for list option working in chooser block
qtgui-grc: added check for pyqwt in config
grc: added function args to probe block and documentation
grc: rework the probe blocks and how they fit into grc
qtgui-grc: moved slider to range, added knob and gui tweaks
qtgui-grc: use a vboxlayout for the top_layout
qtgui-grc: made slider widget components (counter/slider) optional
qtgui-grc: add engineering notation to entry and label + other tweaks
qtgui-grc: enable start/stop control through qt widgets
qtgui-grc: rename the text entry and label blocks
grc-qtgui: creaded check box widget with qtgui, cleanup label code
grc-qtgui: added variable text box and static text widgets
grc-qtgui: pick correct signal overload for variable chooser
grc-qtgui: added radio button support, tweaks, more options
grc-qtgui: work on variable chooser block
grc: work on generator for gui flowgraphs to simplify generation
...
Diffstat (limited to 'grc/grc_gnuradio/wxgui')
-rw-r--r-- | grc/grc_gnuradio/wxgui/__init__.py | 22 | ||||
-rw-r--r-- | grc/grc_gnuradio/wxgui/panel.py | 49 | ||||
-rw-r--r-- | grc/grc_gnuradio/wxgui/top_block_gui.py | 74 |
3 files changed, 0 insertions, 145 deletions
diff --git a/grc/grc_gnuradio/wxgui/__init__.py b/grc/grc_gnuradio/wxgui/__init__.py deleted file mode 100644 index 81427253b..000000000 --- a/grc/grc_gnuradio/wxgui/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2008, 2009 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. -# - -from top_block_gui import top_block_gui -from panel import Panel diff --git a/grc/grc_gnuradio/wxgui/panel.py b/grc/grc_gnuradio/wxgui/panel.py deleted file mode 100644 index e62133cac..000000000 --- a/grc/grc_gnuradio/wxgui/panel.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2009 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. -# - -import wx - -class Panel(wx.Panel): - def __init__(self, parent, orient=wx.VERTICAL): - wx.Panel.__init__(self, parent) - self._box = wx.BoxSizer(orient) - self._grid = wx.GridBagSizer(5, 5) - self.Add(self._grid) - self.SetSizer(self._box) - - def GetWin(self): return self - - def Add(self, win): - """ - Add a window to the wx vbox. - @param win the wx window - """ - self._box.Add(win, 0, wx.EXPAND) - - def GridAdd(self, win, row, col, row_span=1, col_span=1): - """ - Add a window to the wx grid at the given position. - @param win the wx window - @param row the row specification (integer >= 0) - @param col the column specification (integer >= 0) - @param row_span the row span specification (integer >= 1) - @param col_span the column span specification (integer >= 1) - """ - self._grid.Add(win, wx.GBPosition(row, col), wx.GBSpan(row_span, col_span), wx.EXPAND) diff --git a/grc/grc_gnuradio/wxgui/top_block_gui.py b/grc/grc_gnuradio/wxgui/top_block_gui.py deleted file mode 100644 index 333ccf1c1..000000000 --- a/grc/grc_gnuradio/wxgui/top_block_gui.py +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright 2008, 2009 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. -# - -import wx -from gnuradio import gr -import panel - -default_gui_size = (200, 100) - -class top_block_gui(gr.top_block): - """gr top block with wx gui app and grid sizer.""" - - def __init__(self, title='', size=default_gui_size): - """ - Initialize the gr top block. - Create the wx gui elements. - @param title the main window title - @param size the main window size tuple in pixels - @param icon the file path to an icon or None - """ - #initialize - gr.top_block.__init__(self) - self._size = size - #create gui elements - self._app = wx.App() - self._frame = wx.Frame(None, title=title) - self._panel = panel.Panel(self._frame) - self.Add = self._panel.Add - self.GridAdd = self._panel.GridAdd - self.GetWin = self._panel.GetWin - - def SetIcon(self, *args, **kwargs): self._frame.SetIcon(*args, **kwargs) - - def Run(self, start=True): - """ - Setup the wx gui elements. - Start the gr top block. - Block with the wx main loop. - """ - #set minimal window size - self._frame.SetSizeHints(*self._size) - #create callback for quit - def _quit(event): - self.stop(); self.wait() - self._frame.Destroy() - #setup app - self._frame.Bind(wx.EVT_CLOSE, _quit) - self._sizer = wx.BoxSizer(wx.VERTICAL) - self._sizer.Add(self._panel, 0, wx.EXPAND) - self._frame.SetSizerAndFit(self._sizer) - self._frame.SetAutoLayout(True) - self._frame.Show(True) - self._app.SetTopWindow(self._frame) - #start flow graph - if start: self.start() - #blocking main loop - self._app.MainLoop() |