Home

Download

Features

Screenshots

Handbook

Browse Source

Authors

SourceForge.net Logo
Hosted by SourceForge.net

OSI Certified


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages   Search  

fungxmlhandler.cpp

00001 
00002 #include <qobject.h>
00003 
00004 #include "fungxmlhandler.h"
00005 #include "graph.h"
00006 
00007 FungXMLHandler::FungXMLHandler( Fung_main *main, QWidget *base ) : fung_main(main), ws(base), QXmlDefaultHandler()
00008 {
00009 }
00010 
00011 
00012 FungXMLHandler::~FungXMLHandler()
00013 {
00014 }
00015 
00016 bool FungXMLHandler::startDocument()
00017 {
00018     return TRUE;
00019 }
00020 
00021 bool FungXMLHandler::endDocument()
00022 {
00023     return TRUE;
00024 }
00025 
00026 bool FungXMLHandler::startElement( const QString &, const QString &, const QString &qName, const QXmlAttributes & attributes )
00027 {
00028     if (qName == "graph")
00029     {
00030         QWidget * new_graph = Graph::createGraph( ws, attributes.value("type").toInt() );
00031         QObject::connect( new_graph, SIGNAL(destroyed()), fung_main, SLOT(windowClosed()) ); //when graphs are destroyed we need to update the toolbar appropriately  
00032     }
00033 /*  qDebug("qName="+qName);
00034     for (int i=0; i<attributes.length(); i++)
00035         {
00036         qDebug(attributes.qName(i)+"="+attributes.value(attributes.qName(i)));
00037                 qDebug("uri="+attributes.uri(i));       
00038         } */
00039     return TRUE;
00040 }
00041 
00042 bool FungXMLHandler::endElement( const QString &, const QString &, const QString & ) 
00043 {
00044     return TRUE;
00045 }