ui: reworked StartScreen and ProjectSettupScreen UI flow

* realigned buttons and elements
* fixed retina styles for mac
* removed MessageLoadSource and subsequent functionality
* edit existing project through menu
* browsing paths from the line item in QtDirectoryListBox
* grow QtDirectoryListBox instead of scroll
* take any file or directory as valid path
* fixed new project setup screen background
* fixed screen handling on cancelation
This commit is contained in:
Eberhard Graether
2015-09-04 10:54:37 +02:00
parent 1b445d4c3a
commit 5ab627b735
30 changed files with 688 additions and 338 deletions
+19 -6
View File
@@ -1,5 +1,22 @@
#include "settings/ProjectSettings.h"
std::vector<std::string> ProjectSettings::getDefaultHeaderExtensions()
{
std::vector<std::string> defaultValues;
defaultValues.push_back(".h");
defaultValues.push_back(".hpp");
return defaultValues;
}
std::vector<std::string> ProjectSettings::getDefaultSourceExtensions()
{
std::vector<std::string> defaultValues;
defaultValues.push_back(".cpp");
defaultValues.push_back(".cxx");
defaultValues.push_back(".cc");
return defaultValues;
}
std::shared_ptr<ProjectSettings> ProjectSettings::s_instance;
std::shared_ptr<ProjectSettings> ProjectSettings::getInstance()
@@ -67,16 +84,12 @@ std::vector<std::string> ProjectSettings::getCompilerFlags() const
std::vector<std::string> ProjectSettings::getHeaderExtensions() const
{
std::vector<std::string> defaultValues;
defaultValues.push_back(".h");
return getValues("source/Extensions/HeaderExtensions", defaultValues);
return getValues("source/Extensions/HeaderExtensions", getDefaultHeaderExtensions());
}
std::vector<std::string> ProjectSettings::getSourceExtensions() const
{
std::vector<std::string> defaultValues;
defaultValues.push_back(".cpp");
return getValues("source/Extensions/SourceExtensions", defaultValues);
return getValues("source/Extensions/SourceExtensions", getDefaultSourceExtensions());
}
bool ProjectSettings::setHeaderExtensions(const std::vector<std::string> &headerExtensions)
+3
View File
@@ -10,6 +10,9 @@ class ProjectSettings
: public Settings
{
public:
static std::vector<std::string> getDefaultHeaderExtensions();
static std::vector<std::string> getDefaultSourceExtensions();
static std::shared_ptr<ProjectSettings> getInstance();
~ProjectSettings();
+5 -5
View File
@@ -57,16 +57,16 @@ void Settings::clear()
m_filePath = FilePath();
}
Settings::Settings()
{
clear();
}
const FilePath& Settings::getFilePath() const
{
return m_filePath;
}
Settings::Settings()
{
clear();
}
void Settings::setFilePath(const FilePath& filePath)
{
m_filePath = filePath;
+2 -1
View File
@@ -18,10 +18,11 @@ public:
virtual void save(const FilePath& filePath);
void clear();
const FilePath& getFilePath() const;
protected:
Settings();
const FilePath& getFilePath() const;
void setFilePath(const FilePath& filePath);
template<typename T>