Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/kernel.git] / src / SALOMEGUI / QAD_XmlHandler.h
1 //  File      : QAD_XmlHandler.h
2 //  Created   : Thu Jun 14 14:02:23 2001
3 //  Author    : Nicolas REJNERI
4 //  Project   : SALOME
5 //  Module    : SALOMEGUI
6 //  Copyright : Open CASCADE
7 //  $Header$
8
9 #include <qxml.h>
10 #include <qstringlist.h>
11 #include <qaction.h>
12 #include <qlist.h>
13 #include <qstack.h>
14 #include <map>
15
16 #include <TColStd_SequenceOfInteger.hxx>
17
18 class QAD_Desktop;
19 class QAD_Menus;
20
21 class QAD_XmlHandler : public QXmlDefaultHandler
22 {
23 public:
24   QAD_XmlHandler();
25   virtual ~QAD_XmlHandler();
26
27   bool startDocument();
28   bool startElement( const QString& namespaceURI, const QString& localName, 
29                      const QString& qName, const QXmlAttributes& atts );
30   bool endElement( const QString& namespaceURI, const QString& localName, const QString& qName );
31   bool characters( const QString& ch );
32   
33   QString errorString();
34   QString errorProtocol();
35   bool fatalError   (const QXmlParseException& exception);
36   QString givebib (const int mykey);
37   
38   void setMainWindow(QAD_Desktop*);
39   bool setComponent (const QString& aComponent);
40   
41   QList<QAD_Menus>            myMenusList;
42   TColStd_SequenceOfInteger   myIdList;
43   QAD_Menus*                  myMenus;
44
45   static map<int,QString>             _bibmap;
46
47 private:
48   QString            myErrorProt;
49   QString            myPathResources;
50
51   bool               myBackMenu;
52   QStack<QPopupMenu> myBackPopupMenus;
53
54   QAD_Desktop* myDesktop;
55 };