file.h
author insilmaril
Wed May 02 15:31:18 2007 +0000 (2007-05-02)
changeset 485 aff86e2f2a4a
parent 366 e95081c21da2
child 502 f3465a5f0dc4
permissions -rw-r--r--
Mainly documentation fixes
     1 #ifndef FILE_H
     2 #define FILE_H
     3 
     4 #include <QDir>
     5 
     6 enum LoadMode {NewMap,ImportAdd,ImportReplace};
     7 enum SaveMode {PartOfMap,CompleteMap,UndoCommand};
     8 enum ErrorCode {success,aborted,nozip};
     9 
    10 
    11 /////////////////////////////////////////////////////////////////////////////
    12 QString maskPath (QString );
    13 QString convertToRel (const QString &,const QString &);
    14 QString makeUniqueDir (bool &,QString);
    15 void removeDir(QDir);
    16 void makeSubDirs (const QString &);
    17 ErrorCode zipDir (const QDir &,const QString&);
    18 ErrorCode unzipDir (const QDir &,const QString&);
    19 bool loadStringFromDisk (const QString &, QString &);
    20 bool saveStringToDisk (const QString &, const QString &s);
    21 
    22 /////////////////////////////////////////////////////////////////////////////
    23 #include <QLabel>
    24 #include <q3filedialog.h>
    25 #include <QPixmap>
    26 
    27 class ImagePreview : public QLabel, public Q3FilePreview
    28 {
    29 public:
    30     ImagePreview( QWidget * );
    31     void previewUrl( const Q3Url & );
    32 protected:
    33 	Q3FileDialog *fdia;
    34 };
    35 
    36 
    37 //////////////////////////////////////////////////////////
    38 // Helper function to select image format while in SaveDialogs
    39 
    40 class ImageIO
    41 {
    42 public:
    43 	ImageIO ();
    44 	QStringList getFilters();
    45 	QString getType ( QString );
    46 
    47 private:	
    48 	QStringList imageFilters;
    49 	QStringList imageTypes;
    50 };
    51 
    52 #endif