File indexing completed on 2024-05-12 17:07:26
0001 /* 0002 SPDX-FileCopyrightText: 2009 Ben Cooksley <ben@eclipse.endoftheinternet.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QMap> 0010 #include <QObject> 0011 #include <QString> 0012 0013 #include <Solid/DeviceInterface> 0014 0015 class SolidActionData : public QObject 0016 { 0017 Q_OBJECT 0018 0019 public: 0020 QList<QString> propertyList(Solid::DeviceInterface::Type devInterface); 0021 QList<QString> propertyInternalList(Solid::DeviceInterface::Type devInterface); 0022 QString propertyInternal(Solid::DeviceInterface::Type devInterface, QString property); 0023 QString propertyName(Solid::DeviceInterface::Type devInterface, QString property); 0024 int propertyPosition(Solid::DeviceInterface::Type devInterface, QString property); 0025 0026 QList<QString> interfaceList(); 0027 QList<Solid::DeviceInterface::Type> interfaceTypeList(); 0028 Solid::DeviceInterface::Type interfaceFromName(const QString &name); 0029 QString nameFromInterface(Solid::DeviceInterface::Type devInterface); 0030 int interfacePosition(Solid::DeviceInterface::Type devInterface); 0031 0032 static SolidActionData *instance(); 0033 0034 private: 0035 SolidActionData(bool includeFiles); 0036 QString generateUserString(QString className); 0037 QList<QMetaObject> fillInterfaceList(); 0038 0039 QMap<Solid::DeviceInterface::Type, QMap<QString, QString>> values; 0040 QMap<Solid::DeviceInterface::Type, QString> types; 0041 };