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