file.h
author insilmaril
Mon Aug 27 11:16:56 2007 +0000 (2007-08-27)
changeset 591 29ebf5baff1d
parent 522 ec0f18c8c0fa
child 607 53c66cb9f5bd
permissions -rw-r--r--
Updated pdfs in ./doc
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@366
    19
QString makeUniqueDir (bool &,QString);
insilmaril@195
    20
void removeDir(QDir);
insilmaril@502
    21
void copyDir (QDir src,QDir dst);
insilmaril@195
    22
void makeSubDirs (const QString &);
insilmaril@205
    23
ErrorCode zipDir (const QDir &,const QString&);
insilmaril@205
    24
ErrorCode unzipDir (const QDir &,const QString&);
insilmaril@195
    25
bool loadStringFromDisk (const QString &, QString &);
insilmaril@195
    26
bool saveStringToDisk (const QString &, const QString &s);
insilmaril@195
    27
insilmaril@195
    28
/////////////////////////////////////////////////////////////////////////////
insilmaril@393
    29
#include <QLabel>
insilmaril@366
    30
#include <q3filedialog.h>
insilmaril@393
    31
#include <QPixmap>
insilmaril@195
    32
insilmaril@366
    33
class ImagePreview : public QLabel, public Q3FilePreview
insilmaril@195
    34
{
insilmaril@195
    35
public:
insilmaril@195
    36
    ImagePreview( QWidget * );
insilmaril@366
    37
    void previewUrl( const Q3Url & );
insilmaril@235
    38
protected:
insilmaril@366
    39
	Q3FileDialog *fdia;
insilmaril@366
    40
};
insilmaril@366
    41
insilmaril@366
    42
insilmaril@366
    43
//////////////////////////////////////////////////////////
insilmaril@366
    44
// Helper function to select image format while in SaveDialogs
insilmaril@366
    45
insilmaril@366
    46
class ImageIO
insilmaril@366
    47
{
insilmaril@366
    48
public:
insilmaril@366
    49
	ImageIO ();
insilmaril@366
    50
	QStringList getFilters();
insilmaril@366
    51
	QString getType ( QString );
insilmaril@366
    52
insilmaril@366
    53
private:	
insilmaril@366
    54
	QStringList imageFilters;
insilmaril@366
    55
	QStringList imageTypes;
insilmaril@195
    56
};
insilmaril@195
    57
insilmaril@195
    58
#endif