UI: ProjectSettingsUI

ProjectSettingsUI for creation of new Projects + StartScreen design update
This commit is contained in:
Andreas Stallinger
2015-08-03 17:24:24 +02:00
parent f823d0ddb4
commit e7a977dd5c
28 changed files with 764 additions and 91 deletions
+10 -1
View File
@@ -61,9 +61,18 @@ void Application::loadProject(const std::string& projectSettingsFilePath)
m_componentManager->refreshViews();
m_project = Project::create(m_storageCache.get());
m_project->loadProjectSettings(projectSettingsFilePath);
m_project->parseCode();
std::vector<std::string> recentProjects = ApplicationSettings::getInstance()->getRecentProjects();
recentProjects.erase(std::find(recentProjects.begin(),recentProjects.end(),projectSettingsFilePath));
recentProjects.insert(recentProjects.begin(),projectSettingsFilePath);
if(recentProjects.size() > 7)
{
recentProjects.pop_back();
}
ApplicationSettings::getInstance()->setRecentProjects(recentProjects);
ApplicationSettings::getInstance()->save("data/ApplicationSettings.xml");
}
void Application::loadSource(const std::string& sourceDirectoryPath)
+9
View File
@@ -100,3 +100,12 @@ void ApplicationSettings::setCodeSnippetExpandRange(int range)
ApplicationSettings::ApplicationSettings()
{
}
std::vector<std::string> ApplicationSettings::getRecentProjects() const {
std::vector<std::string> recentProjects;
return getValues("recentProjects/projectFilePath", recentProjects);
}
bool ApplicationSettings::setRecentProjects(const std::vector<std::string> &recentProjects) {
return setValues("recentProjects/projectFilePath", recentProjects);
}
+4
View File
@@ -29,6 +29,10 @@ public:
std::string getColorSchemePath() const;
void setColorSchemePath(const std::string& colorSchemePath);
//recent projects
std::vector<std::string> getRecentProjects() const;
bool setRecentProjects(const std::vector<std::string>& recentProjects);
// code
int getCodeTabWidth() const;
void setCodeTabWidth(int codeTabWidth);
+10
View File
@@ -78,3 +78,13 @@ std::vector<std::string> ProjectSettings::getSourceExtensions() const
defaultValues.push_back(".cpp");
return getValues("source/Extensions/SourceExtensions", defaultValues);
}
bool ProjectSettings::setHeaderExtensions(const std::vector<std::string> &headerExtensions)
{
return setValues("source/Extensions/HeaderExtensions", headerExtensions);
}
bool ProjectSettings::setSourceExtensions(const std::vector<std::string> &sourceExtensions)
{
return setValues("source/Extensions/SourceExtensions", sourceExtensions);
}
+3
View File
@@ -31,6 +31,9 @@ public:
std::vector<std::string> getHeaderExtensions() const;
std::vector<std::string> getSourceExtensions() const;
bool setHeaderExtensions(const std::vector<std::string>& headerExtensions);
bool setSourceExtensions(const std::vector<std::string>& sourceExtensions);
private:
ProjectSettings();
ProjectSettings(const ProjectSettings&);