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