insilmaril@0
|
1 |
#ifndef MISC_H
|
insilmaril@0
|
2 |
#define MISC_H
|
insilmaril@0
|
3 |
|
insilmaril@0
|
4 |
#include <qpoint.h>
|
insilmaril@0
|
5 |
#include <iostream>
|
insilmaril@0
|
6 |
|
insilmaril@0
|
7 |
using namespace std;
|
insilmaril@0
|
8 |
|
insilmaril@0
|
9 |
#define Z_BBOX 0
|
insilmaril@97
|
10 |
#define Z_XLINK 10
|
insilmaril@0
|
11 |
#define Z_LINK 20
|
insilmaril@0
|
12 |
#define Z_FRAME 50
|
insilmaril@0
|
13 |
#define Z_SELBOX 60
|
insilmaril@0
|
14 |
#define Z_ICON 80
|
insilmaril@0
|
15 |
#define Z_TEXT 100
|
insilmaril@0
|
16 |
|
insilmaril@0
|
17 |
enum LoadMode {NewMap,ImportAdd,ImportReplace};
|
insilmaril@106
|
18 |
enum SaveMode {PartOfMap,CompleteMap,UndoCommand};
|
insilmaril@0
|
19 |
|
insilmaril@0
|
20 |
/////////////////////////////////////////////////////////////////////////////
|
insilmaril@0
|
21 |
extern ostream &operator<< (ostream &stream, QPoint const &p);
|
insilmaril@0
|
22 |
float getAngle(const QPoint &);
|
insilmaril@0
|
23 |
QPoint normalise (const QPoint &);
|
insilmaril@0
|
24 |
QString maskPath (QString );
|
insilmaril@0
|
25 |
QString convertToRel (const QString &,const QString &);
|
insilmaril@0
|
26 |
QString quotemeta(const QString&);
|
insilmaril@0
|
27 |
int max (int,int);
|
insilmaril@0
|
28 |
class BranchObj;
|
insilmaril@0
|
29 |
class MapEditor;
|
insilmaril@0
|
30 |
|
insilmaril@0
|
31 |
/////////////////////////////////////////////////////////////////////////////
|
insilmaril@0
|
32 |
class xmlObj
|
insilmaril@0
|
33 |
{
|
insilmaril@0
|
34 |
public:
|
insilmaril@0
|
35 |
xmlObj();
|
insilmaril@0
|
36 |
QString singleElement(QString,QString);
|
insilmaril@0
|
37 |
QString beginElement(QString,QString);
|
insilmaril@0
|
38 |
QString beginElement(QString);
|
insilmaril@0
|
39 |
QString endElement (QString);
|
insilmaril@0
|
40 |
QString attribut (QString,QString);
|
insilmaril@0
|
41 |
QString valueElement(QString,QString);
|
insilmaril@0
|
42 |
QString valueElement(QString,QString,QString);
|
insilmaril@0
|
43 |
void incIndent();
|
insilmaril@0
|
44 |
void decIndent();
|
insilmaril@0
|
45 |
static int actindent;
|
insilmaril@0
|
46 |
|
insilmaril@0
|
47 |
protected:
|
insilmaril@0
|
48 |
QString indent();
|
insilmaril@0
|
49 |
int indentwidth;
|
insilmaril@0
|
50 |
};
|
insilmaril@0
|
51 |
|
insilmaril@0
|
52 |
/////////////////////////////////////////////////////////////////////////////
|
insilmaril@0
|
53 |
|
insilmaril@0
|
54 |
#include <qlabel.h>
|
insilmaril@0
|
55 |
#include <qfiledialog.h>
|
insilmaril@0
|
56 |
#include <qpixmap.h>
|
insilmaril@0
|
57 |
|
insilmaril@0
|
58 |
class ImagePreview : public QLabel, public QFilePreview
|
insilmaril@0
|
59 |
{
|
insilmaril@0
|
60 |
public:
|
insilmaril@0
|
61 |
ImagePreview( QWidget * );
|
insilmaril@0
|
62 |
void previewUrl( const QUrl & );
|
insilmaril@0
|
63 |
};
|
insilmaril@0
|
64 |
|
insilmaril@0
|
65 |
#endif
|