summaryrefslogtreecommitdiffstats
path: root/gui/pages/OtherLogsPage.h
blob: e89b3bce53c9d3e8da22f614022e57d76aba8a53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once

#include <QWidget>

#include "BasePage.h"

namespace Ui {
class OtherLogsPage;
}

class RecursiveFileSystemWatcher;

class BaseInstance;

class OtherLogsPage : public QWidget, public BasePage
{
	Q_OBJECT

public:
	explicit OtherLogsPage(BaseInstance *instance, QWidget *parent = 0);
	~OtherLogsPage();

	QString id() const override { return "logs"; }
	QString displayName() const override { return tr("Other logs"); }
	QIcon icon() const override  { return QIcon(); } // TODO
	QString helpPage() const override { return "Minecraft-Logs"; }
	void opened() override;
	void closed() override;

private
slots:
	void on_selectLogBox_currentIndexChanged(const int index);
	void on_btnReload_clicked();
	void on_btnPaste_clicked();
	void on_btnCopy_clicked();
	void on_btnDelete_clicked();

private:
	Ui::OtherLogsPage *ui;
	BaseInstance *m_instance;
	RecursiveFileSystemWatcher *m_watcher;
	QString m_currentFile;

	void setControlsEnabled(const bool enabled);
};