7#include "startuptasksmodel.h"
8#include "abstracttasksmodel.h"
10#include <config-X11.h>
12#include "waylandstartuptasksmodel.h"
14#include "xstartuptasksmodel.h"
17#include <KWindowSystem>
21class Q_DECL_HIDDEN StartupTasksModel::Private
24 Private(StartupTasksModel *q);
27 static int instanceCount;
28 static AbstractTasksModel *sourceTasksModel;
30 void initSourceTasksModel();
33 StartupTasksModel *
const q;
36int StartupTasksModel::Private::instanceCount = 0;
37AbstractTasksModel *StartupTasksModel::Private::sourceTasksModel =
nullptr;
39StartupTasksModel::Private::Private(StartupTasksModel *q)
45StartupTasksModel::Private::~Private()
50 delete sourceTasksModel;
51 sourceTasksModel =
nullptr;
55void StartupTasksModel::Private::initSourceTasksModel()
58 sourceTasksModel =
new WaylandStartupTasksModel();
63 sourceTasksModel =
new XStartupTasksModel();
67 q->setSourceModel(sourceTasksModel);
70StartupTasksModel::StartupTasksModel(
QObject *parent)
72 , d(new Private(this))
74 d->initSourceTasksModel();
77StartupTasksModel::~StartupTasksModel()
83 if (d->sourceTasksModel) {
84 return d->sourceTasksModel->roleNames();
92 return mapToSource(index);
97#include "moc_startuptasksmodel.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.