mirror-chatterino2/src/widgets/window.hpp
Rasmus Karlsson ae26b835b6 Perform initial refactoring work
Things that were once singletons are no longer singletons, but are
instead stored in the "Application" singleton

Some singletons still remain, and some renaming/renamespacing is left
2018-04-27 22:11:19 +02:00

60 lines
1 KiB
C++

#pragma once
#include "util/helpers.hpp"
#include "widgets/basewindow.hpp"
#include "widgets/notebook.hpp"
//#ifdef USEWINSDK
//#include <platform/borderless/qwinwidget.h>
//#endif
#include <pajlada/settings/setting.hpp>
#include <pajlada/signals/signal.hpp>
namespace chatterino {
namespace singletons {
class ThemeManager;
} // namespace singletons
namespace widgets {
class Window : public BaseWindow
{
Q_OBJECT
public:
enum WindowType { Main, Popup, Attached };
explicit Window(WindowType type);
void repaintVisibleChatWidgets(Channel *channel = nullptr);
Notebook &getNotebook();
void refreshWindowTitle(const QString &username);
pajlada::Signals::NoArgSignal closed;
WindowType getType();
protected:
void closeEvent(QCloseEvent *event) override;
bool event(QEvent *event) override;
private:
WindowType type;
float dpi;
void loadGeometry();
Notebook notebook;
friend class Notebook;
public:
void save();
};
} // namespace widgets
} // namespace chatterino