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