summaryrefslogtreecommitdiff
path: root/grc/grc_gnuradio
diff options
context:
space:
mode:
authorJosh Blum2011-01-21 15:20:45 -0800
committerJosh Blum2011-03-01 17:02:06 -0800
commitf0537a7da4571bd6aaab273a0588eaef04121648 (patch)
tree6b894b17c0085cb287c9f5f0b0a7c7b679f46b58 /grc/grc_gnuradio
parent2c263e9640f2812b241d724286aaa1f13c57935f (diff)
downloadgnuradio-f0537a7da4571bd6aaab273a0588eaef04121648.tar.gz
gnuradio-f0537a7da4571bd6aaab273a0588eaef04121648.tar.bz2
gnuradio-f0537a7da4571bd6aaab273a0588eaef04121648.zip
grc: moved wxgui blocks and python into gr-wxgui/grc
Prefixed wxgui blocks with WX GUI in the block names. Added category to wxgui variables blocks (not in the main block tree.xml)
Diffstat (limited to 'grc/grc_gnuradio')
-rw-r--r--grc/grc_gnuradio/Makefile.am6
-rw-r--r--grc/grc_gnuradio/wxgui/__init__.py22
-rw-r--r--grc/grc_gnuradio/wxgui/panel.py49
-rw-r--r--grc/grc_gnuradio/wxgui/top_block_gui.py74
4 files changed, 0 insertions, 151 deletions
diff --git a/grc/grc_gnuradio/Makefile.am b/grc/grc_gnuradio/Makefile.am
index 63bb72822..c53d07b4e 100644
--- a/grc/grc_gnuradio/Makefile.am
+++ b/grc/grc_gnuradio/Makefile.am
@@ -42,9 +42,3 @@ usrp_python_PYTHON = \
usrp/common.py \
usrp/dual_usrp.py \
usrp/simple_usrp.py
-
-wxgui_pythondir = $(grc_gnuradio_prefix)/wxgui
-wxgui_python_PYTHON = \
- wxgui/__init__.py \
- wxgui/panel.py \
- wxgui/top_block_gui.py
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()