41 #ifndef __OPENFLUID_BASE_PROJECTMANAGER_HPP__
42 #define __OPENFLUID_BASE_PROJECTMANAGER_HPP__
51 namespace openfluid {
namespace base {
63 QSettings* mp_PrjFile;
68 std::string m_Description;
69 std::string m_Authors;
70 std::string m_CreationDate;
71 std::string m_LastModDate;
72 bool m_IsIncOutputDir;
74 std::string m_OutputDir;
75 std::string m_InputDir;
79 static QString m_GroupName;
84 static std::string getNow();
86 static std::string getFilePathFromProjectPath(std::string ProjectPath);
88 static std::string getInputDirFromProjectPath(std::string ProjectPath);
90 static std::string getOuputDirFromProjectPath(std::string ProjectPath);
92 static bool checkProject(
const std::string& ProjectPath);
111 {
return m_Description; };
114 { m_Description = Description; };
117 {
return m_Authors; };
120 { m_Authors = Authors; };
123 {
return m_CreationDate; };
126 { m_CreationDate = CreationDate; };
129 { m_CreationDate = getNow(); };
132 {
return m_LastModDate; };
135 { m_LastModDate = LastModDate; };
138 {
return m_OutputDir; };
141 {
return m_InputDir; };
144 {
return m_IsIncOutputDir; };
147 { m_IsIncOutputDir = Inc; };
149 bool open(
const std::string& Path);
151 bool create(
const std::string& Path,
const std::string& Name,
152 const std::string& Description,
const std::string& Authors,
156 {
return m_IsOpened; };
162 static bool isProject(
const std::string& Path);
164 static bool getProjectInfos(
const std::string& Path,
165 std::string& Name, std::string& Description, std::string& Authors,
166 std::string& CreationDate, std::string& LastModDate);
168 void updateOutputDir();
170 QVariant getConfigValue(
const QString& Group,
const QString& Key)
const;
172 void setConfigValue(
const QString& Group,
const QString& Key,
const QVariant& Value);
void setLastModDate(const std::string &LastModDate)
Definition: ProjectManager.hpp:134
void setIncrementalOutputDir(const bool Inc)
Definition: ProjectManager.hpp:146
std::string getPath() const
Definition: ProjectManager.hpp:101
std::string getAuthors() const
Definition: ProjectManager.hpp:116
std::string getName() const
Definition: ProjectManager.hpp:104
std::string getLastModDate() const
Definition: ProjectManager.hpp:131
std::string getCreationDate() const
Definition: ProjectManager.hpp:122
void setCreationDate(const std::string &CreationDate)
Definition: ProjectManager.hpp:125
bool isOpened() const
Definition: ProjectManager.hpp:155
void setDescription(const std::string &Description)
Definition: ProjectManager.hpp:113
void setName(const std::string &Name)
Definition: ProjectManager.hpp:107
std::string getInputDir() const
Definition: ProjectManager.hpp:140
std::string getDescription() const
Definition: ProjectManager.hpp:110
void setCreationDateAsNow()
Definition: ProjectManager.hpp:128
#define OPENFLUID_API
Definition: dllexport.hpp:87
std::string getOutputDir() const
Definition: ProjectManager.hpp:137
bool isIncrementalOutputDir() const
Definition: ProjectManager.hpp:143
void setAuthors(const std::string &Authors)
Definition: ProjectManager.hpp:119
Definition: ProjectManager.hpp:57