From 0e4d87824e1b9e76e755c5bb0727c7c8226602ea Mon Sep 17 00:00:00 2001 From: James Graham Date: Fri, 5 May 2023 15:23:18 +0000 Subject: [PATCH] Document windowcontroller --- src/windowcontroller.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/windowcontroller.h b/src/windowcontroller.h index 06fa09a2a..a416bfbd0 100644 --- a/src/windowcontroller.h +++ b/src/windowcontroller.h @@ -6,6 +6,11 @@ #include #include +/** + * @class WindowController + * + * A singleton class to help manage the NeoChat window. + */ class WindowController : public QObject { Q_OBJECT @@ -13,14 +18,35 @@ class WindowController : public QObject public: static WindowController &instance(); + /** + * @brief Set the window that the will be managed. + */ void setWindow(QWindow *window); + + /** + * @brief Get the window that the will be managed. + */ QWindow *window() const; + /** + * @brief Restore any saved window geometry if available. + */ void restoreGeometry(); + + /** + * @brief Save the current window geometry. + */ void saveGeometry(); + + /** + * @brief Show the window and raise to the top. + */ void showAndRaiseWindow(const QString &startupId); Q_SIGNALS: + /** + * @brief Triggered if the managed window is changed. + */ void windowChanged(); private: