summaryrefslogtreecommitdiffstats
path: root/gui/ConsoleWindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/ConsoleWindow.h')
-rw-r--r--gui/ConsoleWindow.h45
1 files changed, 7 insertions, 38 deletions
diff --git a/gui/ConsoleWindow.h b/gui/ConsoleWindow.h
index 17c64392..97600baa 100644
--- a/gui/ConsoleWindow.h
+++ b/gui/ConsoleWindow.h
@@ -19,18 +19,15 @@
#include <QSystemTrayIcon>
#include "logic/MinecraftProcess.h"
-namespace Ui
-{
-class ConsoleWindow;
-}
-
+class QPushButton;
+class PageContainer;
class ConsoleWindow : public QMainWindow
{
Q_OBJECT
public:
explicit ConsoleWindow(MinecraftProcess *proc, QWidget *parent = 0);
- ~ConsoleWindow();
+ virtual ~ConsoleWindow() {};
/**
* @brief specify if the window is allowed to close
@@ -39,38 +36,12 @@ public:
*/
void setMayClose(bool mayclose);
-private:
- /**
- * @brief write a colored paragraph
- * @param data the string
- * @param color the css color name
- * this will only insert a single paragraph.
- * \n are ignored. a real \n is always appended.
- */
- void writeColor(QString text, const char *color, const char *background);
-
signals:
void isClosing();
-public
-slots:
- /**
- * @brief write a string
- * @param data the string
- * @param mode the WriteMode
- * lines have to be put through this as a whole!
- */
- void write(QString data, MessageLevel::Enum level = MessageLevel::MultiMC);
-
- /**
- * @brief clear the text widget
- */
- void clear();
-
private
slots:
void on_closeButton_clicked();
- void on_btnScreenshots_clicked();
void on_btnKillMinecraft_clicked();
void onEnded(InstancePtr instance, int code, QProcess::ExitStatus status);
@@ -79,18 +50,16 @@ slots:
// FIXME: add handlers for the other MinecraftProcess signals (pre/post launch command
// failures)
- void on_btnPaste_clicked();
void iconActivated(QSystemTrayIcon::ActivationReason);
void toggleConsole();
protected:
void closeEvent(QCloseEvent *);
private:
- Ui::ConsoleWindow *ui = nullptr;
- MinecraftProcess *proc = nullptr;
+ MinecraftProcess *m_proc = nullptr;
bool m_mayclose = true;
- int m_last_scroll_value = 0;
- bool m_scroll_active = true;
QSystemTrayIcon *m_trayIcon = nullptr;
- int m_saved_offset = 0;
+ PageContainer *m_container = nullptr;
+ QPushButton *m_closeButton = nullptr;
+ QPushButton *m_killButton = nullptr;
};