commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r8085 - in trunk/gnue-designer/src/reports: . Char


From: btami
Subject: [gnue] r8085 - in trunk/gnue-designer/src/reports: . Char
Date: Sat, 29 Oct 2005 02:32:06 -0500 (CDT)

Author: btami
Date: 2005-10-29 02:32:05 -0500 (Sat, 29 Oct 2005)
New Revision: 8085

Added:
   trunk/gnue-designer/src/reports/Char/Incubator.py
   trunk/gnue-designer/src/reports/Char/LayoutEditor.py
Modified:
   trunk/gnue-designer/src/reports/Char/FilterSupport.py
   trunk/gnue-designer/src/reports/Instance.py
Log:
started Char reports filter support

Modified: trunk/gnue-designer/src/reports/Char/FilterSupport.py
===================================================================
--- trunk/gnue-designer/src/reports/Char/FilterSupport.py       2005-10-27 
20:40:32 UTC (rev 8084)
+++ trunk/gnue-designer/src/reports/Char/FilterSupport.py       2005-10-29 
07:32:05 UTC (rev 8085)
@@ -27,7 +27,38 @@
 #
 
 from gnue.designer.reports.FilterSupport import FilterSupport as 
_BaseFilterSupport
+from Incubator import Incubator as _Incubator
+from LayoutEditor import LayoutEditor
 
+
 class FilterSupport(_BaseFilterSupport):
   NAMESPACE = 'GNUe:Reports:Char'
+  INCUBATORCLASS = _Incubator
 
+  def init(self):
+    # EventAware provided by ToolBase
+    self.instance.registerEventListeners({
+                       'ObjectCreated'       : self.onCreateObject,
+                       'ObjectModified'      : self.onModifyObject,
+                       'ObjectDeleted'       : self.onDeleteObject,
+                      })
+
+
+  def addTools(self):
+    self.instance.addTool('visualEditor',   _('Layout Editor'), LayoutEditor,
+                      hotkey='F11', menuGroup=301)
+
+
+  def onCreateObject(self, event):
+    pass
+
+
+  def onModifyObject(self, event):
+    pass
+
+
+  def onDeleteObject(self, event):
+    pass
+
+
+

Added: trunk/gnue-designer/src/reports/Char/Incubator.py
===================================================================
--- trunk/gnue-designer/src/reports/Char/Incubator.py   2005-10-27 20:40:32 UTC 
(rev 8084)
+++ trunk/gnue-designer/src/reports/Char/Incubator.py   2005-10-29 07:32:05 UTC 
(rev 8085)
@@ -0,0 +1,39 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise 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 2, or (at your option) any later version.
+#
+# GNU Enterprise 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 program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2001-2005 Free Software Foundation
+#
+# FILE:
+# reports/Incubator.py
+#
+# DESCRIPTION:
+# Creates objects to be added to the object
+#
+# NOTES:
+#
+
+from gnue.common.apps import GDebug
+from gnue.common.definitions import GParserHelpers
+from gnue.reports.base import GRParser, GRReport
+from gnue.designer.reports.Incubator import Incubator as BaseReportIncubator
+
+class Incubator(BaseReportIncubator):
+
+  elements = GRParser.getXMLelements()
+
+

Added: trunk/gnue-designer/src/reports/Char/LayoutEditor.py
===================================================================
--- trunk/gnue-designer/src/reports/Char/LayoutEditor.py        2005-10-27 
20:40:32 UTC (rev 8084)
+++ trunk/gnue-designer/src/reports/Char/LayoutEditor.py        2005-10-29 
07:32:05 UTC (rev 8085)
@@ -0,0 +1,85 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise 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 2, or (at your option) any later version.
+#
+# GNU Enterprise 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 program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2002-2005 Free Software Foundation
+#
+# FILE:
+# reports/LayoutEditor.py
+#
+# DESCRIPTION:
+# The visual editor for Designer
+#
+# NOTES:
+#
+
+from wxPython.wx import *
+from gnue.designer.base.ToolBase import ToolBase
+from gnue.forms.uidrivers.wx import UIdriver as UIwxpython
+
+
+class LayoutEditor (ToolBase):
+
+  runtime_section = "ReportsLayoutEditor"
+  default_dock = 'right-0'
+  uses_feedback_bar = 1
+  uses_toolbar = 0 #1
+
+  def init(self):
+    self.backcolor = wxWHITE
+    self.panel = wxPanel(self,-1,style=wxSIMPLE_BORDER, pos=wxPoint(6,6))
+    self.panelColor = self.GetBackgroundColour()
+    self._instance = self.instance
+    self.rootObject = self.instance.rootObject
+    self._app = self.instance._app
+    self.rootObject.walk(self.inventoryObject)
+
+    # EventAware provided by ToolBase
+    self.registerEventListeners({
+                       'ObjectSelected'      : self.onSetCurrentObject,
+                       'ObjectCreated'       : self.onCreateObject,
+                       'ObjectModified'      : self.onModifyObject,
+                       'ObjectDeleted'       : self.onDeleteObject,
+                      })
+
+    EVT_SIZE(self, self.onSize)
+
+
+  def inventoryObject(self, object):
+    pass
+
+  def onSetCurrentObject (self, event):
+    object = event.object
+    handler = event.originator
+
+  def onCreateObject (self, event):
+    object = event.object
+    handler = event.originator
+
+  def onModifyObject (self, event):
+    object = event.object
+    handler = event.originator
+    modifications = event.modifications
+
+  def onDeleteObject (self, event):
+    object = event.object
+    handler = event.originator
+
+  def onSize(self, event):
+    x,y = self.GetClientSizeTuple()
+    self.panel.SetSize((x-12,y-12))
+

Modified: trunk/gnue-designer/src/reports/Instance.py
===================================================================
--- trunk/gnue-designer/src/reports/Instance.py 2005-10-27 20:40:32 UTC (rev 
8084)
+++ trunk/gnue-designer/src/reports/Instance.py 2005-10-29 07:32:05 UTC (rev 
8085)
@@ -34,7 +34,6 @@
 import wizards
 
 # Tool support...
-from LayoutEditor import LayoutEditor
 from TreeView import TreeView
 from gnue.designer.base.tools.PropertyEditor import PropertyEditor
 from gnue.designer.base.tools.DataSourceEditor import DataSourceEditor
@@ -113,6 +112,7 @@
       usingDefault = 1
 
     self.filter = filtersupport.FilterSupport(self, report)
+
     if usingDefault:
       self.filter.setNamespace(namespace)
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]