KWayland

plasmawindowmodel.h
1 /*
2  SPDX-FileCopyrightText: 2015 Eike Hein <hein.org>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #ifndef WAYLAND_PLASMAWINDOWMODEL_H
7 #define WAYLAND_PLASMAWINDOWMODEL_H
8 
9 #include <QAbstractListModel>
10 
11 #include <KWayland/Client/kwaylandclient_export.h>
12 
13 namespace KWayland
14 {
15 namespace Client
16 {
17 
18 class PlasmaWindowManagement;
19 class Surface;
20 
43 class KWAYLANDCLIENT_EXPORT PlasmaWindowModel : public QAbstractListModel
44 {
45  Q_OBJECT
46 
47 public:
49  AppId = Qt::UserRole + 1,
50  IsActive,
51  IsFullscreenable,
52  IsFullscreen,
53  IsMaximizable,
54  IsMaximized,
55  IsMinimizable,
56  IsMinimized,
57  IsKeepAbove,
58  IsKeepBelow,
59 #if KWAYLANDCLIENT_ENABLE_DEPRECATED_SINCE(5, 53)
60 
64 #else
65  VirtualDesktop_DEPRECATED_DO_NOT_USE,
66 #endif
67  IsOnAllDesktops,
68  IsDemandingAttention,
69  SkipTaskbar,
114  };
115  Q_ENUM(AdditionalRoles)
116 
117  explicit PlasmaWindowModel(PlasmaWindowManagement *parent);
118  virtual ~PlasmaWindowModel();
119 
120  QHash<int, QByteArray> roleNames() const override;
121 
122  QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
123  int rowCount(const QModelIndex &parent = QModelIndex()) const override;
124 
128  QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const override;
129 
130 
134  Q_INVOKABLE void requestActivate(int row);
135 
139  Q_INVOKABLE void requestClose(int row);
140 
145  Q_INVOKABLE void requestMove(int row);
146 
151  Q_INVOKABLE void requestResize(int row);
152 
156  Q_INVOKABLE void requestVirtualDesktop(int row, quint32 desktop);
157 
162  Q_INVOKABLE void requestToggleKeepAbove(int row);
163 
168  Q_INVOKABLE void requestToggleKeepBelow(int row);
169 
173  Q_INVOKABLE void requestToggleMinimized(int row);
174 
178  Q_INVOKABLE void requestToggleMaximized(int row);
179 
185  Q_INVOKABLE void setMinimizedGeometry(int row, Surface *panel, const QRect &geom);
186 
191  Q_INVOKABLE void requestToggleShaded(int row);
192 
193 private:
194  class Private;
195  QScopedPointer<Private> d;
196 };
197 
198 }
199 }
200 
201 #endif
Exposes the window list and window state as a Qt item model.
Wrapper for the wl_surface interface.
Definition: surface.h:44
UserRole
Wrapper for the org_kde_plasma_window_management interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 14 2020 22:49:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.