7#include "windowtasksmodel.h"
11#include "waylandtasksmodel.h"
13#include "xwindowtasksmodel.h"
16#include <KWindowSystem>
20class Q_DECL_HIDDEN WindowTasksModel::Private
23 Private(WindowTasksModel *q);
26 static int instanceCount;
27 static AbstractTasksModel *sourceTasksModel;
29 void initSourceTasksModel();
32 WindowTasksModel *
const q;
35int WindowTasksModel::Private::instanceCount = 0;
36AbstractTasksModel *WindowTasksModel::Private::sourceTasksModel =
nullptr;
38WindowTasksModel::Private::Private(WindowTasksModel *q)
44WindowTasksModel::Private::~Private()
49 delete sourceTasksModel;
50 sourceTasksModel =
nullptr;
54void WindowTasksModel::Private::initSourceTasksModel()
57 sourceTasksModel =
new WaylandTasksModel();
62 sourceTasksModel =
new XWindowTasksModel();
66 q->setSourceModel(sourceTasksModel);
69WindowTasksModel::WindowTasksModel(
QObject *parent)
71 , d(new Private(this))
73 d->initSourceTasksModel();
76WindowTasksModel::~WindowTasksModel()
82 if (d->sourceTasksModel) {
83 return d->sourceTasksModel->roleNames();
91 return mapToSource(index);
96#include "moc_windowtasksmodel.cpp"
static bool isPlatformX11()
static bool isPlatformWayland()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:38 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.