[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/designer/src Instance.py reports/TreeView.py
From: |
Jason Cater |
Subject: |
gnue/designer/src Instance.py reports/TreeView.py |
Date: |
Sat, 07 Sep 2002 10:59:16 -0400 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/09/07 10:59:16
Modified files:
designer/src : Instance.py
designer/src/reports: TreeView.py
Log message:
improved support for reports [patches by btami]
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/Instance.py.diff?cvsroot=OldCVS&tr1=1.62&tr2=1.63&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/designer/src/reports/TreeView.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gnue/designer/src/Instance.py
diff -c gnue/designer/src/Instance.py:1.62 gnue/designer/src/Instance.py:1.63
*** gnue/designer/src/Instance.py:1.62 Wed Aug 7 19:29:18 2002
--- gnue/designer/src/Instance.py Sat Sep 7 10:59:16 2002
***************
*** 270,275 ****
--- 270,285 ----
def __inventory (self, object):
if object != self.rootObject:
+
+ # just a hack for designer.reports.TreeView.py (btami)
+ if object._xmlnamespace:
+ if object.name:
+ object._description = object.name + "(out:)"
+ else:
+ object._description = object._xmltag + "(out:)"
+
+ # Assign an ID if none exists
+ # TODO: in the future, I want to change these to id=".." instead of
name=".."
if hasattr(object, 'name'):
if (object.name == None or ( \
object.name[:3] == "__<" and \
Index: gnue/designer/src/reports/TreeView.py
diff -c gnue/designer/src/reports/TreeView.py:1.1
gnue/designer/src/reports/TreeView.py:1.2
*** gnue/designer/src/reports/TreeView.py:1.1 Tue Jul 30 12:55:29 2002
--- gnue/designer/src/reports/TreeView.py Sat Sep 7 10:59:16 2002
***************
*** 1,95 ****
! #
! # 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.rootObject._treeItemReportParameters = \
! self.AppendItem(self.rootObject._treeItem, _("Parameters"))
! self.SetItemImage(self.rootObject._treeItemReportParameters,
treeIconMap['properties'])
! self.rootObject._treeItemReportSortoptions = \
! self.AppendItem(self.rootObject._treeItem, _("Sortoptions"))
! self.SetItemImage(self.rootObject._treeItemReportSortoptions,
treeIconMap['properties'])
! self.rootObject._treeItemDataSources = \
! self.AppendItem(self.rootObject._treeItem, _("Data Sources"))
! self.SetItemImage(self.rootObject._treeItemDataSources,
treeIconMap['datasource'])
! self.rootObject._treeItemReportLayout = \
! self.AppendItem(self.rootObject._treeItem, _("Report Layout"))
! self.SetItemImage(self.rootObject._treeItemReportLayout,
treeIconMap['page'])
! self.SetPyData(self.rootObject._treeItem, self.rootObject)
!
! self.SetPyData(self.rootObject._treeItemReportParameters,
ObjectMenu(self.instance,None))
! self.SetPyData(self.rootObject._treeItemReportSortoptions,
ObjectMenu(self.instance,None))
! self.SetPyData(self.rootObject._treeItemDataSources,
ObjectMenu(self.instance,None))
! self.SetPyData(self.rootObject._treeItemReportLayout,
ObjectMenu(self.instance,None))
!
! self.rootObject.walk(self.inventoryObject)
!
!
! def inventoryObject (self, object):
! if object != self.rootObject:
! icon = 'properties'
! try:
! parentTreeItem = object._parent._treeItem
! except AttributeError:
! parentTreeItem = None
! if isinstance(object, GRParameters.GRParameter):
! parentTreeItem = self.rootObject._treeItemReportParameters
! icon = 'properties'
! elif isinstance(object, GRSortOptions.GRSortOption):
! parentTreeItem = self.rootObject._treeItemReportSortoptions
! icon = 'properties'
! elif isinstance(object, GRSources.GRDataSource):
! parentTreeItem = self.rootObject._treeItemDataSources
! icon = 'datasource'
! elif isinstance(object, GRLayout.GRSection):
! parentTreeItem = self.rootObject._treeItemReportLayout
! icon = 'page'
! elif object._type == 'GRSumm':
! icon = 'block'
! 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.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])
!
!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/designer/src Instance.py reports/TreeView.py,
Jason Cater <=