X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fqtui.cpp;h=a5727d646f8dd6d270286d9e2d6fe21e35fd0e0c;hp=8cb8347106e5c7dd2dd67b94bc66775d99b33487;hb=38880d99a159fd670915d910bcb2c4280b3efc51;hpb=ed2415135359b4f8a3f75f2634e028500c08c1fe diff --git a/src/qtui/qtui.cpp b/src/qtui/qtui.cpp index 8cb83471..a5727d64 100644 --- a/src/qtui/qtui.cpp +++ b/src/qtui/qtui.cpp @@ -20,17 +20,18 @@ #include "qtui.h" +#include "abstractnotificationbackend.h" #include "actioncollection.h" #include "chatlinemodel.h" #include "mainwin.h" -#include "abstractnotificationbackend.h" +#include "networkmodelactionprovider.h" #include "qtuimessageprocessor.h" +#include "qtuisettings.h" #include "qtuistyle.h" #include "types.h" -#include "uisettings.h" #include "util.h" -ActionCollection *QtUi::_actionCollection = 0; +QHash QtUi::_actionCollections; MainWin *QtUi::_mainWin = 0; QList QtUi::_notificationBackends; QList QtUi::_notifications; @@ -41,9 +42,10 @@ QtUi::QtUi() : AbstractUi() { qWarning() << "QtUi has been instantiated again!"; return; } - _actionCollection = new ActionCollection(this); - UiSettings uiSettings; + _actionProvider = new NetworkModelActionProvider(this); + + QtUiSettings uiSettings; loadTranslation(uiSettings.value("Locale", QLocale::system()).value()); _mainWin = new MainWin(); @@ -63,6 +65,15 @@ void QtUi::init() { _mainWin->init(); } +ActionCollection *QtUi::actionCollection(const QString &category) { + if(_actionCollections.contains(category)) + return _actionCollections.value(category); + ActionCollection *coll = new ActionCollection(mainWindow()); + coll->addAssociatedWidget(mainWindow()); + _actionCollections.insert(category, coll); + return coll; +} + MessageModel *QtUi::createMessageModel(QObject *parent) { return new ChatLineModel(parent); }