Warning, file /plasma/plasma-nm/libs/models/kcmidentitymodel.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     SPDX-FileCopyrightText: 2016-2018 Jan Grulich <jgrulich@redhat.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef PLASMA_NM_KCM_IDENTITY_MODEL_H
0008 #define PLASMA_NM_KCM_IDENTITY_MODEL_H
0009 
0010 #include "plasmanm_internal_export.h"
0011 
0012 #include <QIdentityProxyModel>
0013 #include <QModelIndex>
0014 
0015 #include <qqmlregistration.h>
0016 
0017 class PLASMANM_INTERNAL_EXPORT KcmIdentityModel : public QIdentityProxyModel
0018 {
0019     Q_OBJECT
0020     QML_ELEMENT
0021 public:
0022     explicit KcmIdentityModel(QObject *parent = nullptr);
0023     ~KcmIdentityModel() override;
0024 
0025     enum KcmItemRole {
0026         KcmConnectionIconRole = Qt::UserRole + 100,
0027         KcmConnectionTypeRole,
0028         KcmVpnConnectionExportable,
0029     };
0030 
0031     QHash<int, QByteArray> roleNames() const override;
0032     QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
0033     Qt::ItemFlags flags(const QModelIndex &index) const override;
0034 
0035     int columnCount(const QModelIndex &parent = QModelIndex()) const override;
0036     QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
0037 
0038     QModelIndex mapToSource(const QModelIndex &proxyIndex) const override;
0039 };
0040 
0041 #endif // PLASMA_NM_KCM_IDENTITY_MODEL_H