00001 ############################################################################## 00002 # 00003 # Copyright (c) 2006 TINY SPRL. (http://tiny.be) All Rights Reserved. 00004 # Copyright (c) 2007-2008 Albert Cervera i Areny <albert@nan-tic.com> 00005 # 00006 # WARNING: This program as such is intended to be used by professional 00007 # programmers who take the whole responsability of assessing all potential 00008 # consequences resulting from its eventual inadequacies and bugs 00009 # End users who are looking for a ready-to-use solution with commercial 00010 # garantees and support are strongly adviced to contract a Free Software 00011 # Service Company 00012 # 00013 # This program is Free Software; you can redistribute it and/or 00014 # modify it under the terms of the GNU General Public License 00015 # as published by the Free Software Foundation; either version 2 00016 # of the License, or (at your option) any later version. 00017 # 00018 # This program is distributed in the hope that it will be useful, 00019 # but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 # GNU General Public License for more details. 00022 # 00023 # You should have received a copy of the GNU General Public License 00024 # along with this program; if not, write to the Free Software 00025 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00026 # 00027 ############################################################################## 00028 00029 from PyQt4.QtGui import * 00030 from PyQt4.QtCore import * 00031 00032 from Koo.View.AbstractView import * 00033 00034 class ChartView( AbstractView ) : 00035 def __init__(self, parent=None ): 00036 AbstractView.__init__( self, parent ) 00037 self.widget = None 00038 layout = QVBoxLayout( self ) 00039 self.title= '' 00040 self.model = None 00041 00042 def viewType(self): 00043 return 'graph' 00044 00045 def setWidget( self, widget ): 00046 self.widget = widget 00047 self.layout().addWidget( self.widget ) 00048 00049 def __getitem__(self, name): 00050 return None 00051 00052 def display(self, currentModel, models): 00053 self.widget.display(models) 00054