file.h
author insilmaril
Tue Sep 05 11:53:54 2006 +0000 (2006-09-05)
changeset 370 97f5d07bf47d
parent 235 402f4cde3ea6
child 393 053b8645e3e9
permissions -rw-r--r--
fixed default shortcut in findwindow
insilmaril@195
     1
#ifndef FILE_H
insilmaril@195
     2
#define FILE_H
insilmaril@195
     3
insilmaril@195
     4
#include <qdir.h>
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@195
    23
#include <qlabel.h>
insilmaril@366
    24
#include <q3filedialog.h>
insilmaril@195
    25
#include <qpixmap.h>
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