Draft: Big overhaul of the settings

This commit is contained in:
Carl Schwan
2021-06-04 23:46:31 +02:00
parent d9eaa95b9d
commit 23bd73c499
11 changed files with 467 additions and 69 deletions

View File

@@ -57,6 +57,9 @@
#include "userdirectorylistmodel.h"
#include "userlistmodel.h"
#include "webshortcutmodel.h"
#ifdef HAVE_COLORSCHEME
#include "colorschemer.h"
#endif
using namespace Quotient;
@@ -137,6 +140,14 @@ int main(int argc, char *argv[])
Login *login = new Login();
ChatBoxHelper chatBoxHelper;
#ifdef HAVE_COLORSCHEME
ColorSchemer colorScheme;
qmlRegisterSingletonInstance<ColorSchemer>("org.kde.neochat", 1, 0, "ColorSchemer", &colorScheme);
if (!config->colorScheme().isEmpty()) {
colorScheme.apply(config->colorScheme());
}
#endif
qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "Controller", &Controller::instance());
qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "Clipboard", &clipboard);
qmlRegisterSingletonInstance("org.kde.neochat", 1, 0, "Config", config);