Krita Source Code Documentation
Loading...
Searching...
No Matches
KisWindowLayoutManager.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2018 Jouni Pentikäinen <joupent@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KISWINDOWLAYOUTMANAGER_H
8#define KISWINDOWLAYOUTMANAGER_H
9
10#include <QObject>
11#include <QUuid>
12#include <QVector>
13#include <QSize>
14
16
17class QScreen;
18class KisDocument;
19
20class KisWindowLayoutManager : public QObject
21{
22 Q_OBJECT
23
24public:
25 struct Display
26 {
28
29 bool matches(QScreen* screen) const;
30 };
31
33 {
34 QString name;
35
38
39 bool matches(QList<QScreen*> screens) const;
40 };
41
42 explicit KisWindowLayoutManager();
44
46
52 void setPrimaryWorkspaceFollowsFocus(bool enabled, QUuid primaryWindow);
53 QUuid primaryWindowId() const;
54
59 void setShowImageInAllWindowsEnabled(bool showInAll);
60
61 void activeDocumentChanged(KisDocument *document);
62
64
65private Q_SLOTS:
66 void slotFocusChanged(QWidget*, QWidget*);
67 void slotScreensChanged();
68
69private:
70 struct Private;
71 QScopedPointer<Private> d;
72};
73
74#endif
void setShowImageInAllWindowsEnabled(bool showInAll)
void setPrimaryWorkspaceFollowsFocus(bool enabled, QUuid primaryWindow)
void setLastUsedLayout(KisWindowLayoutResource *layout)
static KisWindowLayoutManager * instance()
void slotFocusChanged(QWidget *, QWidget *)
void activeDocumentChanged(KisDocument *document)
QScopedPointer< Private > d
bool matches(QList< QScreen * > screens) const
bool matches(QScreen *screen) const