[GRASS-SVN] r46789 - in grass-addons/grass7/gui/wxpython/wx.stream: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jun 26 12:14:36 EDT 2011


Author: martinl
Date: 2011-06-26 09:14:36 -0700 (Sun, 26 Jun 2011)
New Revision: 46789

Added:
   grass-addons/grass7/gui/wxpython/wx.stream/Makefile
   grass-addons/grass7/gui/wxpython/wx.stream/gui_modules/
   grass-addons/grass7/gui/wxpython/wx.stream/gui_modules/rstream.py
Log:
initial code for wx.stream (template)


Added: grass-addons/grass7/gui/wxpython/wx.stream/Makefile
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.stream/Makefile	                        (rev 0)
+++ grass-addons/grass7/gui/wxpython/wx.stream/Makefile	2011-06-26 16:14:36 UTC (rev 46789)
@@ -0,0 +1,31 @@
+MODULE_TOPDIR = ../..
+
+#SUBDIRS = docs images
+
+include $(MODULE_TOPDIR)/include/Make/Dir.make
+include $(MODULE_TOPDIR)/include/Make/Python.make
+
+ifeq ($(GRASS_VERSION_MAJOR), 7)
+ETCDIR = $(ETC)/gui/wxpython
+else
+ETCDIR = $(ETC)/wxpython
+endif
+
+#SRCFILES := $(wildcard gui_modules/* xml/*)
+SRCFILES := $(wildcard gui_modules/*)
+DSTFILES := $(patsubst %,$(ETCDIR)/%,$(SRCFILES)) $(patsubst %.py,$(ETCDIR)/%.pyc,$(filter %.py,$(SRCFILES)))
+
+#DSTDIRS := $(patsubst %,$(ETCDIR)/%,gui_modules xml)
+DSTDIRS := $(patsubst %,$(ETCDIR)/%,gui_modules)
+
+default: $(DSTFILES)
+	$(MAKE) parsubdirs
+
+$(ETCDIR)/%: % | $(DSTDIRS)
+	$(INSTALL_DATA) $< $@
+
+$(DSTDIRS): %: | $(ETCDIR)
+	$(MKDIR) $@
+
+$(ETCDIR):
+	$(MKDIR) $@


Property changes on: grass-addons/grass7/gui/wxpython/wx.stream/Makefile
___________________________________________________________________
Added: svn:mime-type
   + text/x-makefile
Added: svn:eol-style
   + native

Added: grass-addons/grass7/gui/wxpython/wx.stream/gui_modules/rstream.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.stream/gui_modules/rstream.py	                        (rev 0)
+++ grass-addons/grass7/gui/wxpython/wx.stream/gui_modules/rstream.py	2011-06-26 16:14:36 UTC (rev 46789)
@@ -0,0 +1,35 @@
+import os
+import sys
+
+sys.path.append(os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython', 'gui_modules'))
+
+import globalvar
+
+import wx
+
+class RStreamFrame(wx.Frame):
+    def __init__(self, parent = None, id = wx.ID_ANY,
+                 title = _("GRASS GIS r.stream Utility"), **kwargs):
+        """!Main window of r.stream GUI
+        
+        @param parent parent window
+        @param id window id
+        @param title window title
+        
+        @param kwargs wx.Frames' arguments
+        """
+        self.parent = parent
+        
+        wx.Frame.__init__(self, parent = parent, id = id, title = title, name = "RStream", **kwargs)
+
+def main():
+    app = wx.PySimpleApp()
+    wx.InitAllImageHandlers()
+    frame = RStreamFrame()
+    frame.Show()
+    
+    app.MainLoop()
+
+if __name__ == "__main__":
+    main()
+


Property changes on: grass-addons/grass7/gui/wxpython/wx.stream/gui_modules/rstream.py
___________________________________________________________________
Added: svn:mime-type
   + text/x-python
Added: svn:eol-style
   + native



More information about the grass-commit mailing list