xmlwriter.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Lynn Hazan                                      *
00003  *   lynn.hazan@myrealbox.com                                              *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef XMLWRITER_H
00021 #define XMLWRITER_H
00022 
00023 // include files for KDE
00024 #include <kurl.h>
00025 
00026 //include files for the application
00027 #include "generalinformation.h"
00028 #include "fileinformation.h"
00029 #include "programinformation.h"
00030 #include "neuroscopevideoinfo.h"
00031 #include "channelcolors.h"
00032 
00033 //include files for QT
00034 #include <qvaluelist.h>
00035 #include <qmap.h>
00036 #include <qdom.h> 
00037 
00038 
00044 class XmlWriter{
00045 public:
00047   XmlWriter();
00049   ~XmlWriter();
00050  
00055   bool writeTofile(const KURL& url);
00056  
00060   void setGeneralInformation(GeneralInformation& generalInformation);
00061   
00066   void setAcquisitionSystemInformation(QMap<QString,float>& acquisitionSystemInfo);
00067 
00072   void setVideoInformation(QMap<QString,float>& videoInformation);
00073 
00078   void setLfpInformation(int lfpSamplingRate);
00079   
00084  void setFilesInformation(QValueList<FileInformation>& files);
00085   
00091   void setAnatomicalDescription(QMap<int, QValueList<int> >& anatomicalGroups,QMap<QString, QMap<int,QString> >& attributes);
00092  
00098   void setSpikeDetectionInformation(QMap<int, QValueList<int> >& spikeGroups,QMap<int, QMap<QString,QString> >& information);
00099   
00100 
00105   void setMiscellaneousInformation(float screenGain);
00106 
00111   void setNeuroscopeVideoInformation(NeuroscopeVideoInfo& videoInfo);
00112     
00118   void setNeuroscopeSpikeInformation(int nbSamples,int peakSampleIndex);
00119   
00127   void setChannelDisplayInformation(QValueList<ChannelColors>& colorList,QMap<int,int>& channelDefaultOffsets);
00128     
00132  void setProgramsInformation(QValueList<ProgramInformation>& programs); 
00133 
00137  void setUnitsInformation(QMap<int, QValueList<QString> >& units); 
00138 
00139 private:
00140 
00142   QDomDocument doc;
00143 
00145   QDomElement root;   
00146 
00148   QDomElement generalInfo;
00149   
00151   QDomElement acquisitionSystem;
00152 
00154   QDomElement video;
00155   
00157   QDomElement lfp;
00158 
00160   QDomElement files;
00161   
00163   QDomElement anatomicalDescription;
00164 
00166   QDomElement spikeDetection;
00167   
00169   QDomElement miscellaneous;
00170     
00172   QDomElement spikes;
00173                                                                                                                                        
00175   QDomElement neuroscopeVideo;
00176   
00178   QDomElement channels;
00179   
00181   QDomElement channelDefaultOffsets;
00182  
00184   QDomElement programs;
00185 
00187   QDomElement units;
00188   
00189   static const QString parameterVersion;   
00190 };
00191 
00192 #endif

Generated on Sat Sep 15 16:04:45 2007 for ndmanager.kdevelop by  doxygen 1.5.1