misc.h
author insilmaril
Thu Aug 07 10:56:52 2008 +0000 (2008-08-07)
branchrelease-1-12-maintained
changeset 47 326e3336e9b0
child 97 0b048b6bb6f4
permissions -rw-r--r--
Changed speed of animation a bit
     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_LINK    20
    11 #define Z_FRAME   50
    12 #define Z_SELBOX  60
    13 #define Z_ICON    80
    14 #define Z_TEXT   100
    15 
    16 enum LoadMode {NewMap,ImportAdd,ImportReplace};
    17 enum SaveMode {PartOfMap,CompleteMap};
    18 
    19 /////////////////////////////////////////////////////////////////////////////
    20 extern ostream &operator<< (ostream &stream, QPoint const &p);
    21 float getAngle(const QPoint &);
    22 QPoint normalise (const QPoint &);
    23 QString maskPath (QString );
    24 QString convertToRel (const QString &,const QString &);
    25 QString quotemeta(const QString&);	
    26 int max (int,int);
    27 class BranchObj;
    28 class MapEditor;
    29 
    30 /////////////////////////////////////////////////////////////////////////////
    31 class xmlObj
    32 {
    33 public:
    34     xmlObj();
    35     QString singleElement(QString,QString);
    36     QString beginElement(QString,QString);
    37     QString beginElement(QString);
    38     QString endElement  (QString);
    39     QString attribut    (QString,QString);
    40     QString valueElement(QString,QString);
    41     QString valueElement(QString,QString,QString);
    42     void incIndent();
    43     void decIndent();
    44     static int actindent;
    45 
    46 protected:  
    47     QString indent();
    48     int indentwidth;
    49 };
    50 
    51 /////////////////////////////////////////////////////////////////////////////
    52 
    53 #include <qlabel.h>
    54 #include <qfiledialog.h>
    55 #include <qpixmap.h>
    56 
    57 class ImagePreview : public QLabel, public QFilePreview
    58 {
    59 public:
    60     ImagePreview( QWidget * );
    61     void previewUrl( const QUrl & );
    62 };
    63 
    64 #endif