#pragma once #include "util/helpers.hpp" #include "widgets/basewindow.hpp" #include "widgets/notebook.hpp" //#include "widgets/titlebar.hpp" //#ifdef USEWINSDK //#include //#endif #include #include #include namespace chatterino { namespace singletons { class ThemeManager; } namespace widgets { struct WindowGeometry { WindowGeometry(const std::string &settingPrefix) : x(fS("{}/geometry/x", settingPrefix)) , y(fS("{}/geometry/y", settingPrefix)) , width(fS("{}/geometry/width", settingPrefix)) , height(fS("{}/geometry/height", settingPrefix)) { } pajlada::Settings::Setting x; pajlada::Settings::Setting y; pajlada::Settings::Setting width; pajlada::Settings::Setting height; }; class Window : public BaseWindow { Q_OBJECT std::string settingRoot; WindowGeometry windowGeometry; public: explicit Window(const QString &windowName, singletons::ThemeManager &_themeManager, bool isMainWindow); void repaintVisibleChatWidgets(Channel *channel = nullptr); Notebook &getNotebook(); void refreshWindowTitle(const QString &username); boost::signals2::signal closed; protected: virtual void closeEvent(QCloseEvent *event) override; virtual bool event(QEvent *event) override; private: singletons::ThemeManager &themeManager; float dpi; void loadGeometry(); Notebook notebook; //TitleBar titleBar; friend class Notebook; public: void save(); }; } // namespace widgets } // namespace chatterino