1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/misc.h Tue Jul 04 12:10:56 2006 +0000
1.3 @@ -0,0 +1,64 @@
1.4 +#ifndef MISC_H
1.5 +#define MISC_H
1.6 +
1.7 +#include <qpoint.h>
1.8 +#include <iostream>
1.9 +
1.10 +using namespace std;
1.11 +
1.12 +#define Z_BBOX 0
1.13 +#define Z_LINK 20
1.14 +#define Z_FRAME 50
1.15 +#define Z_SELBOX 60
1.16 +#define Z_ICON 80
1.17 +#define Z_TEXT 100
1.18 +
1.19 +enum LoadMode {NewMap,ImportAdd,ImportReplace};
1.20 +enum SaveMode {PartOfMap,CompleteMap};
1.21 +
1.22 +/////////////////////////////////////////////////////////////////////////////
1.23 +extern ostream &operator<< (ostream &stream, QPoint const &p);
1.24 +float getAngle(const QPoint &);
1.25 +QPoint normalise (const QPoint &);
1.26 +QString maskPath (QString );
1.27 +QString convertToRel (const QString &,const QString &);
1.28 +QString quotemeta(const QString&);
1.29 +int max (int,int);
1.30 +class BranchObj;
1.31 +class MapEditor;
1.32 +
1.33 +/////////////////////////////////////////////////////////////////////////////
1.34 +class xmlObj
1.35 +{
1.36 +public:
1.37 + xmlObj();
1.38 + QString singleElement(QString,QString);
1.39 + QString beginElement(QString,QString);
1.40 + QString beginElement(QString);
1.41 + QString endElement (QString);
1.42 + QString attribut (QString,QString);
1.43 + QString valueElement(QString,QString);
1.44 + QString valueElement(QString,QString,QString);
1.45 + void incIndent();
1.46 + void decIndent();
1.47 + static int actindent;
1.48 +
1.49 +protected:
1.50 + QString indent();
1.51 + int indentwidth;
1.52 +};
1.53 +
1.54 +/////////////////////////////////////////////////////////////////////////////
1.55 +
1.56 +#include <qlabel.h>
1.57 +#include <qfiledialog.h>
1.58 +#include <qpixmap.h>
1.59 +
1.60 +class ImagePreview : public QLabel, public QFilePreview
1.61 +{
1.62 +public:
1.63 + ImagePreview( QWidget * );
1.64 + void previewUrl( const QUrl & );
1.65 +};
1.66 +
1.67 +#endif