misc.h
author insilmaril
Tue Jan 03 09:44:41 2006 +0000 (2006-01-03)
changeset 169 aa48c7b52549
parent 164 d442a66e9121
child 176 f75489896084
permissions -rw-r--r--
1.7.6 New features for floatimages and fixes
     1 #ifndef MISC_H
     2 #define MISC_H
     3 
     4 #include <qpoint.h>
     5 #include <qdir.h>
     6 #include <iostream>
     7 
     8 using namespace std;
     9 
    10 enum LoadMode {NewMap,ImportAdd,ImportReplace};
    11 enum SaveMode {PartOfMap,CompleteMap,UndoCommand};
    12 
    13 /////////////////////////////////////////////////////////////////////////////
    14 QString qpointToString (const QPoint &p);
    15 extern ostream &operator<< (ostream &stream, QPoint const &p);
    16 float getAngle(const QPoint &);
    17 QPoint normalise (const QPoint &);
    18 QString maskPath (QString );
    19 QString convertToRel (const QString &,const QString &);
    20 QString makeUniqueDir (QString);
    21 void removeDir(QDir);
    22 void makeSubDirs (const QString &);
    23 QString quotemeta(const QString&);	
    24 int max (int,int);
    25 class BranchObj;
    26 class MapEditor;
    27 
    28 /////////////////////////////////////////////////////////////////////////////
    29 class xmlObj
    30 {
    31 public:
    32     xmlObj();
    33     QString singleElement(QString,QString);
    34     QString beginElement(QString,QString);
    35     QString beginElement(QString);
    36     QString endElement  (QString);
    37     QString attribut    (QString,QString);
    38     QString valueElement(QString,QString);
    39     QString valueElement(QString,QString,QString);
    40     void incIndent();
    41     void decIndent();
    42     static int actindent;
    43 
    44 protected:  
    45     QString indent();
    46     int indentwidth;
    47 };
    48 
    49 /////////////////////////////////////////////////////////////////////////////
    50 
    51 #include <qlabel.h>
    52 #include <qfiledialog.h>
    53 #include <qpixmap.h>
    54 
    55 class ImagePreview : public QLabel, public QFilePreview
    56 {
    57 public:
    58     ImagePreview( QWidget * );
    59     void previewUrl( const QUrl & );
    60 };
    61 
    62 #endif