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);
212 std::fstream *stdFileStream(
const QString &path);
222 QIODevice *fileStream(
const QString &path);
258 QString absoluteRootPath()
const;
264 Q_PROPERTY(QString name READ name WRITE setName)
268 QString name()
const;
273 Q_PROPERTY(QString description READ description WRITE setDescription)
277 QString description()
const;
282 Q_PROPERTY(QString author READ author WRITE setAuthor)
286 QString author()
const;
296 Q_PROPERTY(QString perspective READ perspective WRITE setPerspective)
300 QString perspective()
const;
306 QString version()
const;
312 QString toAbsolutePath(
const QString &relativePath);
318 void setName(
const QString &);
322 void setDescription(
const QString &);
326 void setAuthor(
const QString &);
330 void setPerspective(
const QString &);
333 static QString temporaryPath();
335 bool writeMetaInfos();
336 bool readMetaInfos();
338 bool removeAllDirPrivate(
const QString &path);
343 QString _projectFile;
348 QString _description;
349 QString _perspective;
357 #endif // TULIPPROJECT_H