file.h
author insilmaril
Thu Nov 08 15:28:03 2007 +0000 (2007-11-08)
changeset 619 b48f072a347a
parent 568 b44cc0d3ed4a
child 831 25a950c2eb98
permissions -rw-r--r--
1.11.2 split up of xml helper functions. started to work on attributes
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@568
     8
enum FileType {VymMap, FreemindMap};
insilmaril@205
     9
enum ErrorCode {success,aborted,nozip};
insilmaril@195
    10
insilmaril@195
    11
insilmaril@195
    12
/////////////////////////////////////////////////////////////////////////////
insilmaril@195
    13
QString maskPath (QString );
insilmaril@195
    14
QString convertToRel (const QString &,const QString &);
insilmaril@522
    15
insilmaril@522
    16
QString browseDirectory (QWidget *parent=NULL, const QString &caption="");
insilmaril@522
    17
bool reallyWriteDirectory(const QString &dir);
insilmaril@522
    18
insilmaril@607
    19
QString makeTmpDir (bool &ok, QString prefix);
insilmaril@607
    20
bool isInTmpDir (QString fn);
insilmaril@607
    21
QString makeUniqueDir (bool &ok, QString);
insilmaril@195
    22
void removeDir(QDir);
insilmaril@502
    23
void copyDir (QDir src,QDir dst);
insilmaril@195
    24
void makeSubDirs (const QString &);
insilmaril@205
    25
ErrorCode zipDir (const QDir &,const QString&);
insilmaril@205
    26
ErrorCode unzipDir (const QDir &,const QString&);
insilmaril@195
    27
bool loadStringFromDisk (const QString &, QString &);
insilmaril@195
    28
bool saveStringToDisk (const QString &, const QString &s);
insilmaril@195
    29
insilmaril@195
    30
/////////////////////////////////////////////////////////////////////////////
insilmaril@393
    31
#include <QLabel>
insilmaril@366
    32
#include <q3filedialog.h>
insilmaril@393
    33
#include <QPixmap>
insilmaril@195
    34
insilmaril@366
    35
class ImagePreview : public QLabel, public Q3FilePreview
insilmaril@195
    36
{
insilmaril@195
    37
public:
insilmaril@195
    38
    ImagePreview( QWidget * );
insilmaril@366
    39
    void previewUrl( const Q3Url & );
insilmaril@235
    40
protected:
insilmaril@366
    41
	Q3FileDialog *fdia;
insilmaril@366
    42
};
insilmaril@366
    43
insilmaril@366
    44
insilmaril@366
    45
//////////////////////////////////////////////////////////
insilmaril@366
    46
// Helper function to select image format while in SaveDialogs
insilmaril@366
    47
insilmaril@366
    48
class ImageIO
insilmaril@366
    49
{
insilmaril@366
    50
public:
insilmaril@366
    51
	ImageIO ();
insilmaril@366
    52
	QStringList getFilters();
insilmaril@366
    53
	QString getType ( QString );
insilmaril@366
    54
insilmaril@366
    55
private:	
insilmaril@366
    56
	QStringList imageFilters;
insilmaril@366
    57
	QStringList imageTypes;
insilmaril@195
    58
};
insilmaril@195
    59
insilmaril@195
    60
#endif