35 #ifndef __KDGANTTXMLTOOLS_H__
36 #define __KDGANTTXMLTOOLS_H__
44 #include <tqstringlist.h>
45 #include <tqdatetime.h>
47 namespace KDGanttXML {
48 TQString penStyleToString( TQt::PenStyle style );
49 TQt::PenStyle stringToPenStyle( const TQString& style );
50 TQString brushStyleToString( TQt::BrushStyle style );
51 TQt::BrushStyle stringToBrushStyle( const TQString& style );
53 void createBoolNode( TQDomDocument& doc, TQDomNode& parent,
54 const TQString& elementName, bool value );
55 void createSizeNode( TQDomDocument& doc, TQDomNode& parent,
56 const TQString& elementName, const TQSize& value );
57 void createIntNode( TQDomDocument& doc, TQDomNode& parent,
58 const TQString& elementName, int value );
59 void createDoubleNode( TQDomDocument& doc, TQDomNode& parent,
60 const TQString& elementName, double value );
61 void createStringNode( TQDomDocument& doc, TQDomNode& parent,
62 const TQString& elementName,
63 const TQString& text );
64 void createColorNode( TQDomDocument& doc, TQDomNode& parent,
65 const TQString& elementName, const TQColor& color );
66 void createBrushNode( TQDomDocument& doc, TQDomNode& parent,
67 const TQString& elementName, const TQBrush& brush );
68 void createPixmapNode( TQDomDocument& doc, TQDomNode& parent,
69 const TQString& elementName, const TQPixmap& pixmap );
70 void createRectNode( TQDomDocument& doc, TQDomNode& parent,
71 const TQString& elementName, const TQRect& rect );
72 void createStringListNodes( TQDomDocument& doc, TQDomNode& parent,
73 const TQString& elementName,
74 const TQStringList* list );
75 void createFontNode( TQDomDocument& doc, TQDomNode& parent,
76 const TQString& elementName, const TQFont& font );
78 void createPenNode( TQDomDocument& doc, TQDomNode& parent,
79 const TQString& elementName, const TQPen& pen );
80 void createDateTimeNode( TQDomDocument& doc, TQDomNode& parent,
81 const TQString& elementName,
82 const TQDateTime& datetime );
83 void createDateNode( TQDomDocument& doc, TQDomNode& parent,
84 const TQString& elementName, const TQDate& date );
85 void createTimeNode( TQDomDocument& doc, TQDomNode& parent,
86 const TQString& elementName, const TQTime& time );
87 bool readIntNode( const TQDomElement& element, int& value );
88 bool readStringNode( const TQDomElement& element, TQString& value );
89 bool readDoubleNode( const TQDomElement& element, double& value );
90 bool readBoolNode( const TQDomElement& element, bool& value );
91 bool readColorNode( const TQDomElement& element, TQColor& value );
92 bool readBrushNode( const TQDomElement& element, TQBrush& brush );
93 bool readPixmapNode( const TQDomElement& element, TQPixmap& pixmap );
94 bool readRectNode( const TQDomElement& element, TQRect& value );
95 bool readFontNode( const TQDomElement& element, TQFont& font );
96 bool readPenNode( const TQDomElement& element, TQPen& pen );
97 bool readDateTimeNode( const TQDomElement& element, TQDateTime& datetime );
98 bool readDateNode( const TQDomElement& element, TQDate& date );
99 bool readTimeNode( const TQDomElement& element, TQTime& time );
|