File indexing completed on 2024-05-05 17:44:49
0001 /* 0002 SPDX-FileCopyrightText: 2016 Eike Hein <hein@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #include "abstracttasksmodel.h" 0008 0009 #include <QMetaEnum> 0010 0011 namespace TaskManager 0012 { 0013 AbstractTasksModel::AbstractTasksModel(QObject *parent) 0014 : QAbstractListModel(parent) 0015 { 0016 } 0017 0018 AbstractTasksModel::~AbstractTasksModel() 0019 { 0020 } 0021 0022 QHash<int, QByteArray> AbstractTasksModel::roleNames() const 0023 { 0024 QHash<int, QByteArray> roles = QAbstractItemModel::roleNames(); 0025 0026 QMetaEnum e = metaObject()->enumerator(metaObject()->indexOfEnumerator("AdditionalRoles")); 0027 0028 for (int i = 0; i < e.keyCount(); ++i) { 0029 roles.insert(e.value(i), e.key(i)); 0030 } 0031 0032 return roles; 0033 } 0034 0035 QModelIndex AbstractTasksModel::index(int row, int column, const QModelIndex &parent) const 0036 { 0037 return hasIndex(row, column, parent) ? createIndex(row, column, nullptr) : QModelIndex(); 0038 } 0039 0040 void AbstractTasksModel::requestActivate(const QModelIndex &index) 0041 { 0042 Q_UNUSED(index) 0043 } 0044 0045 void AbstractTasksModel::requestNewInstance(const QModelIndex &index) 0046 { 0047 Q_UNUSED(index) 0048 } 0049 0050 void AbstractTasksModel::requestOpenUrls(const QModelIndex &index, const QList<QUrl> &urls) 0051 { 0052 Q_UNUSED(index) 0053 Q_UNUSED(urls) 0054 } 0055 0056 void AbstractTasksModel::requestClose(const QModelIndex &index) 0057 { 0058 Q_UNUSED(index) 0059 } 0060 0061 void AbstractTasksModel::requestMove(const QModelIndex &index) 0062 { 0063 Q_UNUSED(index) 0064 } 0065 0066 void AbstractTasksModel::requestResize(const QModelIndex &index) 0067 { 0068 Q_UNUSED(index) 0069 } 0070 0071 void AbstractTasksModel::requestToggleMinimized(const QModelIndex &index) 0072 { 0073 Q_UNUSED(index) 0074 } 0075 0076 void AbstractTasksModel::requestToggleMaximized(const QModelIndex &index) 0077 { 0078 Q_UNUSED(index) 0079 } 0080 0081 void AbstractTasksModel::requestToggleKeepAbove(const QModelIndex &index) 0082 { 0083 Q_UNUSED(index) 0084 } 0085 0086 void AbstractTasksModel::requestToggleKeepBelow(const QModelIndex &index) 0087 { 0088 Q_UNUSED(index) 0089 } 0090 0091 void AbstractTasksModel::requestToggleFullScreen(const QModelIndex &index) 0092 { 0093 Q_UNUSED(index) 0094 } 0095 0096 void AbstractTasksModel::requestToggleShaded(const QModelIndex &index) 0097 { 0098 Q_UNUSED(index) 0099 } 0100 0101 void AbstractTasksModel::requestVirtualDesktops(const QModelIndex &index, const QVariantList &desktops) 0102 { 0103 Q_UNUSED(index) 0104 Q_UNUSED(desktops) 0105 } 0106 0107 void AbstractTasksModel::requestNewVirtualDesktop(const QModelIndex &index) 0108 { 0109 Q_UNUSED(index) 0110 } 0111 0112 void AbstractTasksModel::requestActivities(const QModelIndex &index, const QStringList &activities) 0113 { 0114 Q_UNUSED(index) 0115 Q_UNUSED(activities) 0116 } 0117 0118 void AbstractTasksModel::requestPublishDelegateGeometry(const QModelIndex &index, const QRect &geometry, QObject *delegate) 0119 { 0120 Q_UNUSED(index) 0121 Q_UNUSED(geometry) 0122 Q_UNUSED(delegate) 0123 } 0124 0125 }