Solid
genericinterface.h
Go to the documentation of this file.
00001 /* 00002 Copyright 2006-2007 Kevin Ottens <ervin@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) version 3, or any 00008 later version accepted by the membership of KDE e.V. (or its 00009 successor approved by the membership of KDE e.V.), which shall 00010 act as a proxy defined in Section 6 of version 3 of the license. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 #ifndef SOLID_GENERICINTERFACE_H 00022 #define SOLID_GENERICINTERFACE_H 00023 00024 #include <QtCore/QMap> 00025 #include <QtCore/QVariant> 00026 00027 #include <solid/solid_export.h> 00028 #include <solid/deviceinterface.h> 00029 00030 namespace Solid 00031 { 00032 class GenericInterfacePrivate; 00033 class Device; 00034 00044 class SOLID_EXPORT GenericInterface : public DeviceInterface 00045 { 00046 Q_OBJECT 00047 Q_ENUMS(PropertyChange) 00048 Q_DECLARE_PRIVATE(GenericInterface) 00049 friend class Device; 00050 00051 public: 00060 enum PropertyChange { PropertyModified, PropertyAdded, PropertyRemoved }; 00061 00062 private: 00071 explicit GenericInterface(QObject *backendObject); 00072 00073 public: 00077 virtual ~GenericInterface(); 00078 00079 00086 static Type deviceInterfaceType() { return DeviceInterface::GenericInterface; } 00087 00100 QVariant property(const QString &key) const; 00101 00112 QMap<QString, QVariant> allProperties() const; 00113 00126 bool propertyExists(const QString &key) const; 00127 00128 Q_SIGNALS: 00137 void propertyChanged(const QMap<QString,int> &changes); 00138 00146 void conditionRaised(const QString &condition, const QString &reason); 00147 }; 00148 } 00149 00150 #endif
KDE 4.6 API Reference