// Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
// Project : SALOME
// Module : Installation Wizard
-// Copyright : 2002-2007 CEA
+// Copyright : 2002-2009 CEA
#ifndef __SALOME_XmlHandler
#define __SALOME_XmlHandler
-#include <qxml.h>
+#include <qdom.h>
+#include <qmap.h>
+#include <qstringlist.h>
+
+typedef QMap<QString, QStringList> MapDependencies;
/*!
Class StructureParser: parses xml-description file and populates the list of the products
class ProductsView;
class SALOME_InstallWizard;
class QLineEdit;
+class QDom;
-class StructureParser: public QXmlDefaultHandler
+class StructureParser
{
public:
// constructor
StructureParser( SALOME_InstallWizard* wizard = 0 );
// set control widgets
- void setProductsList( ProductsView* view );
+ void setProductsLists( ProductsView* mview, ProductsView* pview );
void setTargetDir( QLineEdit* dir );
void setTempDir( QLineEdit* dir );
- // begins parsing of the xml dom-element
- bool startElement( const QString&,
- const QString&,
- const QString& ,
- const QXmlAttributes& );
- // finishes parsing of the xml dom-element of the xml dom-element
- bool endElement( const QString&,
- const QString&,
- const QString& );
+ // parse 'config' part of the XML file
+ void getConfigInfo( const QDomElement &elem );
+ // parse 'buttons' part of the XML file
+ void getButtonsInfo( const QDomNode &node );
+ // parse 'products' part of the XML file
+ void getProductsInfo( const QDomNode &node );
+ // parse 'dependencies' part of the XML file
+ void getDependenciesInfo( QDomNode &node, MapDependencies &depends );
+ // read XML configuration file
+ void readXmlFile(QString theFileName);
private:
SALOME_InstallWizard* myWizard; // Salome Pro installation wizard's main window
- ProductsView* myTree; // products list view
+ ProductsView* myModules; // modules list view
+ ProductsView* myPrereqs; // prerequisites list view
QLineEdit* myTargetDir; // target directory widget
QLineEdit* myTempDir; // temp directory widget
};