Salome HOME
To print user friendly message at Python modules import error.
[tools/install.git] / src / SALOME_XmlHandler.hxx
1 //  File      : SALOME_XmlHandler.hxx
2 //  Created   : Thu Dec 18 12:01:00 2002
3 //  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
4 //  Project   : SALOME
5 //  Module    : Installation Wizard
6 //  Copyright : 2002-2008 CEA
7
8 #ifndef __SALOME_XmlHandler
9 #define __SALOME_XmlHandler
10
11 #include <qdom.h>
12 #include <qmap.h>
13 #include <qstringlist.h>
14
15 typedef QMap<QString, QStringList> MapDependencies;
16
17 /*!
18   Class StructureParser: parses xml-description file and populates the list of the products
19 */
20 class ProductsView;
21 class SALOME_InstallWizard;
22 class QLineEdit;
23 class QDom;
24
25 class StructureParser
26 {
27 public:
28   // constructor
29   StructureParser( SALOME_InstallWizard* wizard = 0 );
30
31   // set control widgets
32   void setProductsLists( ProductsView* mview, ProductsView* pview );
33   void setTargetDir( QLineEdit* dir );
34   void setTempDir( QLineEdit* dir );
35
36   // parse 'config' part of the XML file
37   void getConfigInfo( const QDomElement &elem );
38   // parse 'buttons' part of the XML file
39   void getButtonsInfo( const QDomNode &node );
40   // parse 'products' part of the XML file
41   void getProductsInfo( const QDomNode &node );
42   // parse 'dependencies' part of the XML file
43   void getDependenciesInfo( QDomNode &node, MapDependencies &depends );
44   // read XML configuration file
45   void readXmlFile(QString theFileName);
46
47 private:
48   SALOME_InstallWizard* myWizard;    // Salome Pro installation wizard's main window
49   ProductsView*         myModules;   // modules list view
50   ProductsView*         myPrereqs;   // prerequisites list view
51   QLineEdit*            myTargetDir; // target directory widget
52   QLineEdit*            myTempDir;   // temp directory widget
53 };
54
55 #endif