[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/designer/src/reports Instance.py TreeView....
From: |
Jason Cater |
Subject: |
gnue/designer/src/reports Instance.py TreeView.... |
Date: |
Tue, 17 Dec 2002 17:39:13 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/12/17 17:39:12
Modified files:
designer/src/reports: Instance.py TreeView.py
Added files:
designer/src/reports/Labels: __init__.py
designer/src/reports/Standard: __init__.py
Log message:
piddling with reports
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/reports/Instance.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/reports/TreeView.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/reports/Labels/__init__.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/reports/Standard/__init__.py?rev=1.1
Patches:
Index: gnue/designer/src/reports/Instance.py
diff -c gnue/designer/src/reports/Instance.py:1.5
gnue/designer/src/reports/Instance.py:1.6
*** gnue/designer/src/reports/Instance.py:1.5 Fri Nov 22 20:48:02 2002
--- gnue/designer/src/reports/Instance.py Tue Dec 17 17:39:12 2002
***************
*** 39,44 ****
--- 39,45 ----
from gnue.designer.DataSourceEditor import DataSourceEditor
from gnue.designer.SchemaViewer import SchemaViewer
from gnue.designer.TriggerEditor import TriggerEditor
+ from gnue.designer.EventEditor import EventEditor
from gnue.reports import GRReport, GRParser, GRLayout
***************
*** 56,61 ****
--- 57,66 ----
def loadBuffer(self, buffer):
report = GRParser.loadFile (buffer, self, initialize=0)
report.name = 'report'
+
+ # Find which filter is in use... yes, this is ugly
+ self.filter = report.findChildOfType('GRLayout')._findNamespace()
+
return report
***************
*** 63,85 ****
report = GRReport.GRReport()
report.title = "Untitled report"
report.name = 'report'
return report
! def inventoryObject(self, object):
! pass
! def createVisualEditor(self):
! return LayoutEditor(self, self)
def createTools(self):
! self.addTool(_('propertyEditor'), _('Property Inspector'), PropertyEditor)
! ## TODO: Causing a segfault with Wizards!!!!
! self.addTool(_('treeEditor'), _('Object Navigator'), TreeView)
! self.addTool('triggerEditor', _('Event Editor'), TriggerEditor)
- self.addTool(_('schemaViewer'), _('Schema Navigator'), SchemaViewer)
def createWizards(self):
self.loadWizards(wizards)
--- 68,105 ----
report = GRReport.GRReport()
report.title = "Untitled report"
report.name = 'report'
+ GRSources.GRSources(report)._buildObject()
+ GRParameters.GRParameters(report)._buildObject()
+ GRLayout.GRLayout(report)._buildObject()
+
+ self.__initStandard(
+ report._buildObject()
return report
! # TODO: This needs to somehow pull from gnue.designer.reports.(Standard)
! def __initStandard(self, report):
! report._layout._xmlchildnamespace = self.filter = 'GNUe:Reports:Standard'
! return report
!
! def inventoryObject(self, object):
! pass
def createTools(self):
! # self.addTool('visualEditor', _('Layout Editor'), LayoutEditor, 'F11')
! self.addTool('propertyEditor', _('Property Inspector'), PropertyEditor,
'F10')
! self.addTool('treeEditor', _('Object Navigator'), TreeView, 'F8')
! self.addTool('schemaViewer', _('Schema Navigator'), SchemaViewer)
! self.addToolSeparator()
! self.addTool('datasourceEditor',_('Data Source Editor'), DataSourceEditor)
! #self.addTool('groupEditor', _('Group Editor'), GroupEditor, 'F5')
! #self.addTool('fieldEditor', _('Field Editor'), FieldEditor, 'F6')
! self.addToolSeparator()
! self.addTool('eventEditor', _('Trigger Inspector'), EventEditor, 'F7')
! self.addTool('triggerEditor', _('Code Editor'), TriggerEditor, 'F12')
def createWizards(self):
self.loadWizards(wizards)
Index: gnue/designer/src/reports/TreeView.py
diff -c gnue/designer/src/reports/TreeView.py:1.2
gnue/designer/src/reports/TreeView.py:1.3
*** gnue/designer/src/reports/TreeView.py:1.2 Sat Sep 7 10:59:16 2002
--- gnue/designer/src/reports/TreeView.py Tue Dec 17 17:39:12 2002
***************
*** 1,73 ****
! #
! # 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-2002 Free Software Foundation
! #
! # FILE:
! # reports/TreeView.py
! #
! # DESCRIPTION:
! #
! # NOTES:
! #
! # TODO: all the SetItemImage lines in this file have been commented out as on
win32 it was segfaulting
!
! import sys, os
! from wxPython.wx import *
! from gnue.common import GDebug
! from gnue.reports import GRReport, GRLayout, GRSources, GRParameters,
GRSortOptions
! from gnue.designer.PopupMenu import ObjectMenu
! from gnue.designer.Icons import treeIconMap, treeIconList
! from gnue.designer.TreeView import TreeView as BaseTreeView
!
! class TreeView (BaseTreeView):
! def __init__(self, instance, root, parent):
!
! self.rootDescr = 'Report'
! BaseTreeView.__init__(self, instance, root, parent)
!
! self.SetPyData(self.rootObject._treeItem, self.rootObject)
!
! self.rootObject.walk(self.inventoryObject)
!
! def inventoryObject (self, object):
! if object != self.rootObject:
! # TODO: icons for reports wanted (btami)
! icon = 'properties'
! parentTreeItem = object._parent._treeItem
! if isinstance(object, GRParameters.GRParameters):
! icon = 'properties'
! elif isinstance(object, GRSortOptions.GRSortOptions):
! icon = 'properties'
! elif isinstance(object, GRSources.GRSources):
! icon = 'datasource'
! elif isinstance(object, GRLayout.GRLayout):
! icon = 'page'
! elif object._type == 'GRSsection':
! icon = 'block'
! elif object._type == 'GRSumm':
! icon = 'entry'
! elif object._type == 'GRFiled':
! icon = 'entry'
!
! object._treeItem = self.AppendItem(parentTreeItem,
! "%s" % object.getDescription())
! self.SetPyData(object._treeItem, object)
! self.SetItemImage(object._treeItem, treeIconMap[icon])
!
!
--- 1,73 ----
! #
! # 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-2002 Free Software Foundation
! #
! # FILE:
! # reports/TreeView.py
! #
! # DESCRIPTION:
! #
! # NOTES:
! #
! # TODO: all the SetItemImage lines in this file have been commented out as on
win32 it was segfaulting
!
! import sys, os
! from wxPython.wx import *
! from gnue.common import GDebug
! from gnue.reports import GRReport, GRLayout, GRSources, GRParameters,
GRSortOptions
! from gnue.designer.PopupMenu import ObjectMenu
! from gnue.designer.Icons import treeIconMap, treeIconList
! from gnue.designer.TreeView import TreeView as BaseTreeView
!
! class TreeView (BaseTreeView):
! def __init__(self, instance, root, parent):
!
! self.rootDescr = 'Report'
! BaseTreeView.__init__(self, instance, root, parent)
!
! self.tree.SetPyData(self.rootObject._treeItem, self.rootObject)
!
! self.rootObject.walk(self.inventoryObject)
!
! def inventoryObject (self, object):
! if object != self.rootObject:
! # TODO: icons for reports wanted (btami)
! icon = 'properties'
! parentTreeItem = object._parent._treeItem
! if isinstance(object, GRParameters.GRParameters):
! icon = 'properties'
! elif isinstance(object, GRSortOptions.GRSortOptions):
! icon = 'properties'
! elif isinstance(object, GRSources.GRSources):
! icon = 'datasource'
! elif isinstance(object, GRLayout.GRLayout):
! icon = 'page'
! elif object._type == 'GRSsection':
! icon = 'block'
! elif object._type == 'GRSumm':
! icon = 'entry'
! elif object._type == 'GRFiled':
! icon = 'entry'
!
! object._treeItem = self.AppendItem(parentTreeItem,
! "%s" % object.getDescription())
! self.tree.SetPyData(object._treeItem, object)
! self.tree.SetItemImage(object._treeItem, treeIconMap[icon])
!
!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/designer/src/reports Instance.py TreeView....,
Jason Cater <=