1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
#ifndef MISC_H
#define MISC_H
#include <qpoint.h>
#include <qdir.h>
#include <iostream>
using namespace std;
/////////////////////////////////////////////////////////////////////////////
QString qpointToString (const QPoint &p);
extern ostream &operator<< (ostream &stream, QPoint const &p);
float getAngle(const QPoint &);
QPoint normalise (const QPoint &);
QString quotemeta(const QString&);
int max (int,int);
class BranchObj;
class MapEditor;
/////////////////////////////////////////////////////////////////////////////
class xmlObj
{
public:
xmlObj();
QString singleElement(QString,QString);
QString beginElement(QString,QString);
QString beginElement(QString);
QString endElement (QString);
QString attribut (QString,QString);
QString valueElement(QString,QString);
QString valueElement(QString,QString,QString);
void incIndent();
void decIndent();
static int actindent;
protected:
QString indent();
int indentwidth;
};
#endif
|