2017-06-07 10:09:24 +02:00
|
|
|
#pragma once
|
2016-12-29 17:31:07 +01:00
|
|
|
|
2018-06-26 14:09:39 +02:00
|
|
|
#include "widgets/BaseWindow.hpp"
|
2017-04-18 02:07:14 +02:00
|
|
|
|
2017-12-17 17:09:50 +01:00
|
|
|
#include <pajlada/settings/setting.hpp>
|
2017-12-23 22:17:38 +01:00
|
|
|
#include <pajlada/signals/signal.hpp>
|
2018-07-05 11:42:40 +02:00
|
|
|
#include <pajlada/signals/signalholder.hpp>
|
2017-01-18 04:52:47 +01:00
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
namespace chatterino {
|
2017-06-13 21:13:58 +02:00
|
|
|
|
2018-06-28 20:03:04 +02:00
|
|
|
class Theme;
|
2018-08-11 22:23:06 +02:00
|
|
|
class UpdateDialog;
|
|
|
|
class SplitNotebook;
|
|
|
|
class Channel;
|
|
|
|
|
|
|
|
enum class WindowType { Main, Popup, Attached };
|
2017-01-18 21:30:23 +01:00
|
|
|
|
2018-01-14 21:55:36 +01:00
|
|
|
class Window : public BaseWindow
|
2016-12-29 17:31:07 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2018-08-11 22:23:06 +02:00
|
|
|
explicit Window(WindowType type);
|
2017-01-28 22:35:23 +01:00
|
|
|
|
2018-08-11 22:23:06 +02:00
|
|
|
WindowType getType();
|
2018-05-23 04:22:17 +02:00
|
|
|
SplitNotebook &getNotebook();
|
2017-01-28 22:35:23 +01:00
|
|
|
|
2018-04-03 02:55:32 +02:00
|
|
|
pajlada::Signals::NoArgSignal closed;
|
2017-12-14 00:25:06 +01:00
|
|
|
|
2017-06-26 16:41:20 +02:00
|
|
|
protected:
|
2018-06-21 22:02:35 +02:00
|
|
|
void showEvent(QShowEvent *) override;
|
2018-04-03 02:55:32 +02:00
|
|
|
void closeEvent(QCloseEvent *event) override;
|
|
|
|
bool event(QEvent *event) override;
|
2017-06-26 16:41:20 +02:00
|
|
|
|
2017-01-28 22:35:23 +01:00
|
|
|
private:
|
2018-07-05 11:42:40 +02:00
|
|
|
void addCustomTitlebarButtons();
|
2018-07-06 17:02:26 +02:00
|
|
|
void addDebugStuff();
|
|
|
|
void addShortcuts();
|
|
|
|
void addLayout();
|
|
|
|
void onAccountSelected();
|
2019-06-09 16:13:06 +02:00
|
|
|
void addMenuBar();
|
2018-07-05 11:42:40 +02:00
|
|
|
|
2018-08-11 22:23:06 +02:00
|
|
|
WindowType type_;
|
2018-05-25 13:53:55 +02:00
|
|
|
|
2018-08-11 22:23:06 +02:00
|
|
|
SplitNotebook *notebook_;
|
2018-08-08 15:35:54 +02:00
|
|
|
EffectLabel *userLabel_ = nullptr;
|
2018-08-11 22:23:06 +02:00
|
|
|
std::shared_ptr<UpdateDialog> updateDialogHandle_;
|
2017-06-26 16:41:20 +02:00
|
|
|
|
2018-07-05 12:52:36 +02:00
|
|
|
pajlada::Signals::SignalHolder signalHolder_;
|
2018-07-05 11:42:40 +02:00
|
|
|
|
2018-05-23 11:59:37 +02:00
|
|
|
friend class Notebook;
|
2016-12-29 17:31:07 +01:00
|
|
|
};
|
2017-01-28 22:35:23 +01:00
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
} // namespace chatterino
|