Document windowcontroller
This commit is contained in:
@@ -6,6 +6,11 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class WindowController
|
||||||
|
*
|
||||||
|
* A singleton class to help manage the NeoChat window.
|
||||||
|
*/
|
||||||
class WindowController : public QObject
|
class WindowController : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -13,14 +18,35 @@ class WindowController : public QObject
|
|||||||
public:
|
public:
|
||||||
static WindowController &instance();
|
static WindowController &instance();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the window that the will be managed.
|
||||||
|
*/
|
||||||
void setWindow(QWindow *window);
|
void setWindow(QWindow *window);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the window that the will be managed.
|
||||||
|
*/
|
||||||
QWindow *window() const;
|
QWindow *window() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Restore any saved window geometry if available.
|
||||||
|
*/
|
||||||
void restoreGeometry();
|
void restoreGeometry();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Save the current window geometry.
|
||||||
|
*/
|
||||||
void saveGeometry();
|
void saveGeometry();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Show the window and raise to the top.
|
||||||
|
*/
|
||||||
void showAndRaiseWindow(const QString &startupId);
|
void showAndRaiseWindow(const QString &startupId);
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
|
/**
|
||||||
|
* @brief Triggered if the managed window is changed.
|
||||||
|
*/
|
||||||
void windowChanged();
|
void windowChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user