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