ui: load source from directory via MenuBar

Added MenuBar action Project->New, which opens a directory dialog for choosing the new source directory to parse the
files from. The ConfigManager can be created empty now and setValue calls can be used to set values.

fortune cookie message = Your troubles will be faded by the luck you will soon have.
This commit is contained in:
Eberhard Graether
2014-07-09 16:41:11 +02:00
parent d12fd3edf3
commit f07f2051f2
15 changed files with 148 additions and 43 deletions
+18
View File
@@ -50,7 +50,25 @@ void Application::loadProject(const std::string& projectSettingsFilePath)
message.dispatch();
}
void Application::loadSource(const std::string& sourceDirectoryPath)
{
m_storage->clear();
m_project = Project::create(m_storage);
m_project->clearProjectSettings();
m_project->setSourceDirectoryPath(sourceDirectoryPath);
m_project->parseCode();
MessageActivateToken message(1);
message.dispatch();
}
void Application::handleMessage(MessageLoadProject* message)
{
loadProject(message->projectSettingsFilePath);
}
void Application::handleMessage(MessageLoadSource* message)
{
loadSource(message->sourceDirectoryPath);
}