diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-03-24 15:36:00 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-03-24 15:36:00 +0100 |
commit | 40570c321069b832722b807227fd8ff9bbd7c10d (patch) | |
tree | c29a37baba94726c27ef2c19ab3d81980cb43abb /gui | |
parent | e4f86893a899ee86cfa6d238f891bec04977c966 (diff) | |
download | MultiMC-40570c321069b832722b807227fd8ff9bbd7c10d.tar MultiMC-40570c321069b832722b807227fd8ff9bbd7c10d.tar.gz MultiMC-40570c321069b832722b807227fd8ff9bbd7c10d.tar.lz MultiMC-40570c321069b832722b807227fd8ff9bbd7c10d.tar.xz MultiMC-40570c321069b832722b807227fd8ff9bbd7c10d.zip |
Fix settings objects, instances can be started from the GUI now
Diffstat (limited to 'gui')
-rw-r--r-- | gui/mainwindow.cpp | 20 | ||||
-rw-r--r-- | gui/mainwindow.h | 4 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 5a915e8c..408a61c5 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -39,6 +39,7 @@ #include "gui/taskdialog.h" #include "gui/browserdialog.h" #include "gui/aboutdialog.h" +#include "gui/consolewindow.h" #include "kcategorizedview.h" #include "kcategorydrawer.h" @@ -49,6 +50,7 @@ #include "logintask.h" #include <instance.h> +#include "minecraftprocess.h" #include "instancemodel.h" #include "instancedelegate.h" @@ -276,9 +278,27 @@ void MainWindow::doLogin ( QString inst, const QString& errorMsg ) void MainWindow::onLoginComplete ( QString inst, LoginResponse response ) { + // TODO: console + console = new ConsoleWindow(); + auto instance = instList.getInstanceById(inst); + if(instance) + { + proc = new MinecraftProcess(instance, response.username(), response.sessionID()); + + console->show(); + //connect(proc, SIGNAL(ended()), SLOT(onTerminated())); + connect(proc, SIGNAL(log(QString,MessageLevel::Enum)), console, SLOT(write(QString,MessageLevel::Enum))); + proc->launch(); + } + else + { + + } + /* QMessageBox::information ( this, "Login Successful", QString ( "Logged in as %1 with session ID %2. Instance: %3" ). arg ( response.username(), response.sessionID(), inst ) ); + */ } void MainWindow::onLoginFailed ( QString inst, const QString& errorMsg ) diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 5d990639..eec09972 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -26,6 +26,8 @@ class InstanceModel; class InstanceProxyModel; class KCategorizedView; class KCategoryDrawer; +class MinecraftProcess; +class ConsoleWindow; namespace Ui { @@ -94,6 +96,8 @@ private: InstanceModel * model; InstanceProxyModel * proxymodel; InstanceList instList; + MinecraftProcess *proc; + ConsoleWindow *console; }; #endif // MAINWINDOW_H |