File: misc.h

package info (click to toggle)
vym 1.10.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 5,376 kB
  • ctags: 1,926
  • sloc: cpp: 18,468; xml: 277; sh: 211; perl: 89; makefile: 26
file content (44 lines) | stat: -rw-r--r-- 1,220 bytes parent folder | download
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
43
44
#ifndef MISC_H
#define MISC_H

#include <qpoint.h>
#include <qdir.h>
#include <iostream>

using namespace std;


/////////////////////////////////////////////////////////////////////////////
QString qpointToString (const QPoint &p);
QString qpointfToString (const QPointF &p);
extern ostream &operator<< (ostream &stream, QPoint const &p);
extern ostream &operator<< (ostream &stream, QPointF const &p);
qreal getAngle(const QPointF &);
QPointF normalise (const QPointF &);
QString quotemeta(const QString&);	
qreal max (qreal,qreal);
class BranchObj;
class MapEditor;

/////////////////////////////////////////////////////////////////////////////
class xmlObj
{
public:
    xmlObj();
    QString singleElement(QString,QString);			// name,attr
    QString beginElement(QString,QString);			// name,attr
    QString beginElement(QString);					// name
    QString endElement  (QString);					// name
    QString attribut    (QString,QString);			// name, val
    QString valueElement(QString,QString);			// name, val
    QString valueElement(QString,QString,QString);	// name, attr, val
    void incIndent();
    void decIndent();
    static int actindent;

protected:  
    QString indent();
    int indentwidth;
};

#endif