20 #ifndef TULIPPROJECT_H
21 #define TULIPPROJECT_H
25 #include <QtCore/QDir>
26 #include <QtCore/QString>
27 #include <QtCore/QStringList>
28 #include <QtCore/QDate>
29 #include <QtCore/QObject>
30 #include <QtCore/QIODevice>
32 #include <tulip/tulipconf.h>
33 #include <tulip/PluginProgress.h>
74 TulipProject(
const QString &);
77 virtual ~TulipProject();
85 static TulipProject *newProject();
105 static TulipProject *restoreProject(
const QString &path);
126 QStringList entryList(
const QString &path, QDir::Filters filters = QDir::NoFilter, QDir::SortFlags sort = QDir::NoSort);
135 QStringList entryList(
const QString &path,
const QStringList &nameFilters, QDir::Filters filters = QDir::NoFilter, QDir::SortFlags sort = QDir::NoSort);
143 bool exists(
const QString &path);
151 bool mkpath(
const QString &path);
159 bool isDir(
const QString &path);
167 bool removeFile(
const QString &path);
176 bool removeDir(
const QString &path);
185 bool removeAllDir(
const QString &path);
194 bool copy(
const QString& source,
const QString& destination);
203 bool touch(
const QString& path);
213 std::fstream *stdFileStream(
const QString &path, std::ios_base::openmode=std::fstream::in | std::fstream::out | std::fstream::app);
225 QIODevice *fileStream(
const QString &path, QIODevice::OpenMode mode=QIODevice::ReadWrite);
261 QString absoluteRootPath()
const;
267 Q_PROPERTY(QString name READ name WRITE setName)
271 QString name()
const;
276 Q_PROPERTY(QString description READ description WRITE setDescription)
280 QString description()
const;
285 Q_PROPERTY(QString author READ author WRITE setAuthor)
289 QString author()
const;
299 Q_PROPERTY(QString perspective READ perspective WRITE setPerspective)
303 QString perspective()
const;
309 QString version()
const;
315 QString toAbsolutePath(
const QString &relativePath);
321 void setName(
const QString &);
325 void setDescription(
const QString &);
329 void setAuthor(
const QString &);
333 void setPerspective(
const QString &);
336 static QString temporaryPath();
338 bool writeMetaInfos();
339 bool readMetaInfos();
341 bool removeAllDirPrivate(
const QString &path);
346 QString _projectFile;
351 QString _description;
352 QString _perspective;
360 #endif // TULIPPROJECT_H