misc.h
author insilmaril
Mon Feb 12 09:28:46 2007 +0000 (2007-02-12)
changeset 426 e0a3449f4458
parent 408 c2a05fa925a1
child 617 7ee5bf3647d3
permissions -rw-r--r--
1.8.66 Various fixes
     1 #ifndef MISC_H
     2 #define MISC_H
     3 
     4 #include <qpoint.h>
     5 #include <qdir.h>
     6 #include <iostream>
     7 
     8 using namespace std;
     9 
    10 
    11 /////////////////////////////////////////////////////////////////////////////
    12 QString qpointToString (const QPoint &p);
    13 QString qpointfToString (const QPointF &p);
    14 extern ostream &operator<< (ostream &stream, QPoint const &p);
    15 extern ostream &operator<< (ostream &stream, QPointF const &p);
    16 qreal getAngle(const QPointF &);
    17 QPointF normalise (const QPointF &);
    18 QString quotemeta(const QString&);	
    19 qreal max (qreal,qreal);
    20 class BranchObj;
    21 class MapEditor;
    22 
    23 /////////////////////////////////////////////////////////////////////////////
    24 class xmlObj
    25 {
    26 public:
    27     xmlObj();
    28     QString singleElement(QString,QString);			// name,attr
    29     QString beginElement(QString,QString);			// name,attr
    30     QString beginElement(QString);					// name
    31     QString endElement  (QString);					// name
    32     QString attribut    (QString,QString);			// name, val
    33     QString valueElement(QString,QString);			// name, val
    34     QString valueElement(QString,QString,QString);	// name, attr, val
    35     void incIndent();
    36     void decIndent();
    37     static int actindent;
    38 
    39 protected:  
    40     QString indent();
    41     int indentwidth;
    42 };
    43 
    44 #endif