file.h
author insilmaril
Tue Jul 17 11:19:50 2007 +0000 (2007-07-17)
changeset 550 55236fe5a630
parent 502 f3465a5f0dc4
child 568 b44cc0d3ed4a
permissions -rw-r--r--
1.9.2 Bugfixes for exports
     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 
    15 QString browseDirectory (QWidget *parent=NULL, const QString &caption="");
    16 bool reallyWriteDirectory(const QString &dir);
    17 
    18 QString makeUniqueDir (bool &,QString);
    19 void removeDir(QDir);
    20 void copyDir (QDir src,QDir dst);
    21 void makeSubDirs (const QString &);
    22 ErrorCode zipDir (const QDir &,const QString&);
    23 ErrorCode unzipDir (const QDir &,const QString&);
    24 bool loadStringFromDisk (const QString &, QString &);
    25 bool saveStringToDisk (const QString &, const QString &s);
    26 
    27 /////////////////////////////////////////////////////////////////////////////
    28 #include <QLabel>
    29 #include <q3filedialog.h>
    30 #include <QPixmap>
    31 
    32 class ImagePreview : public QLabel, public Q3FilePreview
    33 {
    34 public:
    35     ImagePreview( QWidget * );
    36     void previewUrl( const Q3Url & );
    37 protected:
    38 	Q3FileDialog *fdia;
    39 };
    40 
    41 
    42 //////////////////////////////////////////////////////////
    43 // Helper function to select image format while in SaveDialogs
    44 
    45 class ImageIO
    46 {
    47 public:
    48 	ImageIO ();
    49 	QStringList getFilters();
    50 	QString getType ( QString );
    51 
    52 private:	
    53 	QStringList imageFilters;
    54 	QStringList imageTypes;
    55 };
    56 
    57 #endif