20 #ifndef TULIPPROJECT_H
21 #define TULIPPROJECT_H
25 #include <QStringList>
30 #include <tulip/tulipconf.h>
75 TulipProject(
const QString &);
78 virtual ~TulipProject();
86 static TulipProject *newProject();
106 static TulipProject *restoreProject(
const QString &path);
127 QStringList entryList(
const QString &path, QDir::Filters filters = QDir::NoFilter, QDir::SortFlags sort = QDir::NoSort);
136 QStringList entryList(
const QString &path,
const QStringList &nameFilters, QDir::Filters filters = QDir::NoFilter, QDir::SortFlags sort = QDir::NoSort);
144 bool exists(
const QString &path);
152 bool mkpath(
const QString &path);
160 bool isDir(
const QString &path);
168 bool removeFile(
const QString &path);
177 bool removeDir(
const QString &path);
186 bool removeAllDir(
const QString &path);
195 bool copy(
const QString& source,
const QString& destination);
204 bool touch(
const QString& path);
214 std::fstream *stdFileStream(
const QString &path, std::ios_base::openmode=std::fstream::in | std::fstream::out | std::fstream::app);
226 QIODevice *fileStream(
const QString &path, QIODevice::OpenMode mode=QIODevice::ReadWrite);
262 QString absoluteRootPath()
const;
268 Q_PROPERTY(QString name READ name WRITE setName)
272 QString name()
const;
277 Q_PROPERTY(QString description READ description WRITE setDescription)
281 QString description()
const;
286 Q_PROPERTY(QString author READ author WRITE setAuthor)
290 QString author()
const;
300 Q_PROPERTY(QString perspective READ perspective WRITE setPerspective)
304 QString perspective()
const;
310 QString version()
const;
316 QString toAbsolutePath(
const QString &relativePath);
322 void setName(
const QString &);
326 void setDescription(
const QString &);
330 void setAuthor(
const QString &);
334 void setPerspective(
const QString &);
337 static QString temporaryPath();
339 bool writeMetaInfos();
340 bool readMetaInfos();
342 bool removeAllDirPrivate(
const QString &path);
347 QString _projectFile;
352 QString _description;
353 QString _perspective;
361 #endif // TULIPPROJECT_H