iARSWidget_8h-source.html

iARSWidget.h

00001 /*************************************************************
00002  *
00003  *    IAEM-iARS project
00004  *
00005  * File: iARSWidget.h
00006  *
00007  * Description: Include file for iARSWidget
00008  *
00009  * Created: 24.3.2003
00010  * Author: Christopher Frauenberger (frauenberger@iem.at)
00011  * Version: $Id: iARSWidget.h,v 1.18 2004/09/21 09:57:33 frauenberger Exp $
00012  *
00013  * Copyright (C) IEM 2003, Christopher Frauenberger [frauenberger@iem.at]
00014  *
00015  * This library is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU Lesser General Public
00017  * License as published by the Free Software Foundation; either
00018  * version 2.1 of the License, or (at your option) any later version.
00019  * 
00020  * This library is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00023  * Lesser General Public License for more details.
00024  * 
00025  * You should have received a copy of the GNU Lesser General Public
00026  * License along with this library; if not, write to the Free Software
00027  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00028  *
00029  * IEM - Institute of Electronic Music and Acoustics, Graz
00030  * Inffeldgasse 10/3, 8010 Graz, Austria
00031  * http://iem.at 
00032  *************************************************************/
00033 
00034 #ifndef _IARSWIDGET_H_
00035 #define _IARSWIDGET_H_
00036 
00037 #include "iARS.h"
00038 #include "iARSControlElement.h"
00039 #include "PdComm.h"
00040 #include <qbuffer.h>
00041 #include <qxml.h>
00042 #include <qmenubar.h>
00043 #include <qvgroupbox.h>
00044 #include <qhgroupbox.h>
00045 #include <qhbox.h>
00046 #include <qvbox.h>
00047 #include <qdom.h>
00048 #include <qtextstream.h>
00049 #include <qurl.h>
00050 #include <qpushbutton.h>
00051 #include <qpopupmenu.h>
00052 #include <qpainter.h>
00053 #include <qtimer.h>
00054 #include <qmessagebox.h>
00055 #include <qfiledialog.h>
00056 #include <qfile.h>
00057 #include <qlayout.h>
00058 
00060 
00066 class iARSWidget : public QNPWidget, public QXmlDefaultHandler {
00067 
00068   Q_OBJECT
00069 
00070  public:
00072   iARSWidget(QString*);
00073 
00075   void buildGUI(QString*); 
00076 
00078   //void paintEvent(QPaintEvent*);
00079 
00081   void enterInstance();
00082 
00084   void leaveInstance();
00085   
00086  private:
00087 
00089   QSize size;
00090 
00092   PdComm *pdcomm;
00093 
00095   const char* pdhost;
00096   
00098   int pdport; 
00099 
00101   QString streamURI;
00102 
00104   QString guispec;
00105 
00107   QString data;
00108 
00110   QXmlSimpleReader *xmlReader;
00111   
00113   QXmlInputSource *xmlInput;
00114 
00116   QTimer *timer;
00117 
00119   vector<iARSControlElement*> controls;
00120 
00122   QVGroupBox *top;
00123 
00125   QMenuBar *menu; 
00126 
00128   bool startDocument();
00129 
00131   bool endDocument();
00132    
00134   bool startElement( const QString&, const QString&, const QString&,
00135                      const QXmlAttributes&);
00136 
00138   bool characters( const QString&);
00139   
00141   bool endElement( const QString&, const QString&, const QString&);
00142 
00144   stack<QWidget*> parent;
00145 
00147   void getDomElements(const QDomElement&);
00148 
00150   map<QString,QDomNode> domElementMap;
00151 
00153   bool playing;
00154   
00155 public slots:
00157   void guiEvents(QString, XmlRpc::XmlRpcValue);
00158 
00160   void pdPolling(); 
00161 
00163   void load();
00164   
00166   void save();
00167   
00169   void dspon();
00170 
00172   void dspoff();
00173 
00175   void about();
00176 
00177 };
00178 
00179 
00180 #endif
00181 

Generated on Thu Nov 25 15:57:06 2004 for iARS(internetAudioRenderingSystem) by  doxygen 1.3.9.1