20 #ifndef TULIPPROJECT_H 21 #define TULIPPROJECT_H 25 #include <QStringList> 30 #include <tulip/tulipconf.h> 86 TulipProject(
const QString &);
89 ~TulipProject()
override;
97 static TulipProject *newProject();
109 static TulipProject *openProject(
const QString &file,
tlp::PluginProgress *progress =
nullptr);
131 static TulipProject *restoreProject(
const QString &path);
146 void setProjectFile(
const QString &projectFile);
167 QStringList entryList(
const QString &path, QDir::Filters filters = QDir::NoFilter,
168 QDir::SortFlags sort = QDir::NoSort);
177 QStringList entryList(
const QString &path,
const QStringList &nameFilters,
178 QDir::Filters filters = QDir::NoFilter,
179 QDir::SortFlags sort = QDir::NoSort);
187 bool exists(
const QString &path);
195 bool mkpath(
const QString &path);
203 bool isDir(
const QString &path);
212 bool removeFile(
const QString &path);
222 bool removeDir(
const QString &path);
232 bool removeAllDir(
const QString &path);
241 bool copy(
const QString &source,
const QString &destination);
251 bool touch(
const QString &path);
262 std::fstream *stdFileStream(
const QString &path, std::ios_base::openmode = std::fstream::in |
278 QIODevice *fileStream(
const QString &path, QIODevice::OpenMode mode = QIODevice::ReadWrite);
316 QString absoluteRootPath()
const;
323 Q_PROPERTY(QString name READ name WRITE setName)
327 QString name()
const;
332 Q_PROPERTY(QString description READ description WRITE setDescription)
336 QString description()
const;
341 Q_PROPERTY(QString author READ author WRITE setAuthor)
345 QString author()
const;
357 Q_PROPERTY(QString perspective READ perspective WRITE setPerspective)
361 QString perspective()
const;
367 QString version()
const;
374 QString toAbsolutePath(
const QString &relativePath);
377 void projectFileChanged(
const QString &projectFile);
383 void setName(
const QString &);
387 void setDescription(
const QString &);
391 void setAuthor(
const QString &);
395 void setPerspective(
const QString &);
398 static QString temporaryPath();
400 bool writeMetaInfo();
403 bool removeAllDirPrivate(
const QString &path,
bool removeRootDir =
true);
408 QString _projectFile;
413 QString _description;
414 QString _perspective;
421 #endif // TULIPPROJECT_H
QString lastError() const
Returns the last error raised.
QString projectFile() const
Returns the archive file associated with this project.
The TulipProject object handles the content of a Tulip project.
PluginProcess subclasses are meant to notify about the progress state of some process (typically a pl...
bool isValid() const
Checks if the object is a valid TulipProject.