summaryrefslogtreecommitdiffstats
path: root/gui/ConsoleWindow.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-11-23 01:41:28 +0100
committerPetr Mrázek <peterix@gmail.com>2013-11-23 01:41:28 +0100
commit4124faf474908e4d79d93b0f624bf8fd81bd9972 (patch)
tree335087d96ddab6b862c187969749134be6b4d96e /gui/ConsoleWindow.h
parent7f5eb5d61ad5c94da5e3a0443ffbcd9088285496 (diff)
downloadMultiMC-4124faf474908e4d79d93b0f624bf8fd81bd9972.tar
MultiMC-4124faf474908e4d79d93b0f624bf8fd81bd9972.tar.gz
MultiMC-4124faf474908e4d79d93b0f624bf8fd81bd9972.tar.lz
MultiMC-4124faf474908e4d79d93b0f624bf8fd81bd9972.tar.xz
MultiMC-4124faf474908e4d79d93b0f624bf8fd81bd9972.zip
Fix console window (now not a QDialog)
It now opens and coloses as expected, depending on user preferences and the status of the various processes involved. Console window geometry and state are remembered between runs.
Diffstat (limited to 'gui/ConsoleWindow.h')
-rw-r--r--gui/ConsoleWindow.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/gui/ConsoleWindow.h b/gui/ConsoleWindow.h
index 65786c7e..e0a47bc6 100644
--- a/gui/ConsoleWindow.h
+++ b/gui/ConsoleWindow.h
@@ -15,7 +15,7 @@
#pragma once
-#include <QDialog>
+#include <QMainWindow>
#include "logic/MinecraftProcess.h"
namespace Ui
@@ -23,7 +23,7 @@ namespace Ui
class ConsoleWindow;
}
-class ConsoleWindow : public QDialog
+class ConsoleWindow : public QMainWindow
{
Q_OBJECT
@@ -38,6 +38,9 @@ public:
*/
void setMayClose(bool mayclose);
+signals:
+ void isClosing();
+
public
slots:
/**
@@ -67,13 +70,16 @@ slots:
void on_closeButton_clicked();
void on_btnKillMinecraft_clicked();
void onEnded(BaseInstance *instance, int code, QProcess::ExitStatus status);
+ void onLaunchFailed(BaseInstance *instance);
+
+ // FIXME: add handlers for the other MinecraftProcess signals (pre/post launch command
+ // failures)
protected:
void closeEvent(QCloseEvent *);
private:
- Ui::ConsoleWindow *ui;
- MinecraftProcess *proc;
- bool m_mayclose;
+ Ui::ConsoleWindow *ui = nullptr;
+ MinecraftProcess *proc = nullptr;
+ bool m_mayclose = true;
};
-