Mercurial > minori
diff include/gui/window.h @ 114:ab191e28e69d
*: add initial torrent stuff
WOAH!
these checkboxes are a pain in my fucking ass
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 07 Nov 2023 08:03:42 -0500 |
parents | 80f49f623d30 |
children | c8375765f0fc |
line wrap: on
line diff
--- a/include/gui/window.h Mon Nov 06 13:48:11 2023 -0500 +++ b/include/gui/window.h Tue Nov 07 08:03:42 2023 -0500 @@ -2,11 +2,15 @@ #define __window_h #include "core/config.h" #include <QMainWindow> +#include <memory> -class QWidget; -class QStackedWidget; -class QCloseEvent; -class SideBar; +/* *could* be forward-declared, but this causes + any file that #includes this to have to #include + these as well due to unique_ptr */ +#include <QWidget> +#include <QStackedWidget> +#include <QCloseEvent> +#include "gui/widgets/sidebar.h" class MainWindow final : public QMainWindow { Q_OBJECT @@ -23,9 +27,9 @@ void closeEvent(QCloseEvent* event) override; private: - QWidget* main_widget = nullptr; - QStackedWidget* stack = nullptr; - SideBar* sidebar = nullptr; + std::unique_ptr<QWidget> main_widget = nullptr; + std::unique_ptr<QStackedWidget> stack = nullptr; + std::unique_ptr<SideBar> sidebar = nullptr; }; #endif // __window_h