EGD-4036 Application windows - added register mechanism

* Moved ApplicationLauncher to separate files - declutering
* WindowsStore renamed to WindowsFactory - Store needs to be splitted toavoid antipattern
* Options window build dynamically onBeforeShow
* Dialog windows dynamically built
This commit is contained in:
Adam Dobrowolski
2020-10-03 08:33:29 +02:00
committed by Adam
parent a2ba217b06
commit 7b4a706cd6
59 changed files with 907 additions and 703 deletions

View File

@@ -78,14 +78,12 @@ namespace app
void ApplicationNotes::createUserInterface()
{
gui::AppWindow *window = nullptr;
window = new gui::NotesMainWindow(this);
windows.insert(std::pair<std::string, gui::AppWindow *>(window->getName(), window));
window = new gui::NotesEditWindow(this);
windows.insert(std::pair<std::string, gui::AppWindow *>(window->getName(), window));
windowsFactory.attach(gui::name::window::main_window, [](Application *app, const std::string &name) {
return std::make_unique<gui::NotesMainWindow>(app);
});
windowsFactory.attach(gui::name::window::main_window, [](Application *app, const std::string &name) {
return std::make_unique<gui::NotesEditWindow>(app);
});
}
void ApplicationNotes::destroyUserInterface()