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:
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user