X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=main%2Fmain_mono.cpp;h=6bd0f336c831880e72278371f79e5fa0dbb17811;hp=9d3e5789415349ab4f2d7dfe12d9bad01be78d8e;hb=65919ad0ffef03335bf8358836c65a77cbed247d;hpb=bab358d776c74a37a54297125d50ba4c5117205d diff --git a/main/main_mono.cpp b/main/main_mono.cpp index 9d3e5789..6bd0f336 100644 --- a/main/main_mono.cpp +++ b/main/main_mono.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 2005 by The Quassel Team * * devel@quassel-irc.org * - * * + * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * @@ -22,24 +22,52 @@ #include -#include "quassel.h" -#include "logger.h" +#include "core.h" +#include "global.h" +#include "guiproxy.h" +#include "coreproxy.h" #include "mainwin.h" int main(int argc, char **argv) { - - Quassel::init(); - Logger *logger = new Logger(); - Quassel::setLogger(logger); - QApplication app(argc, argv); - QApplication::setOrganizationDomain("quassel-irc.org"); QApplication::setApplicationName("Quassel IRC"); QApplication::setOrganizationName("The Quassel Team"); + Global::runMode = Global::Monolithic; + global = new Global(); + guiProxy = new GUIProxy(); + coreProxy = new CoreProxy(); + core = new Core(); + MainWin mainWin; mainWin.show(); - return app.exec(); + int exitCode = app.exec(); + delete core; + delete guiProxy; + delete coreProxy; + delete global; + return exitCode; +} + +void CoreProxy::sendToGUI(CoreSignal sig, QVariant arg1, QVariant arg2, QVariant arg3) { + guiProxy->recv(sig, arg1, arg2, arg3); } + +GUIProxy::GUIProxy() { + if(guiProxy) qFatal("Trying to instantiate more than one CoreProxy object!"); +} + +void GUIProxy::send(GUISignal sig, QVariant arg1, QVariant arg2, QVariant arg3) { + coreProxy->recv(sig, arg1, arg2, arg3); +} + +// Dummy function definitions +// These are not needed, since we don't have a network connection to the core. +void GUIProxy::serverHasData() {} +void GUIProxy::connectToCore(QString, quint16) {} +void GUIProxy::disconnectFromCore() {} +void GUIProxy::updateCoreData(QString) {} +void GUIProxy::serverError(QAbstractSocket::SocketError) {} +