Solid
genericinterface.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef SOLID_GENERICINTERFACE_H
00021 #define SOLID_GENERICINTERFACE_H
00022
00023 #include <QtCore/QMap>
00024 #include <QtCore/QVariant>
00025
00026 #include <solid/solid_export.h>
00027 #include <solid/deviceinterface.h>
00028
00029 namespace Solid
00030 {
00031 class GenericInterfacePrivate;
00032 class Device;
00033
00043 class SOLID_EXPORT GenericInterface : public DeviceInterface
00044 {
00045 Q_OBJECT
00046 Q_ENUMS(PropertyChange)
00047 Q_DECLARE_PRIVATE(GenericInterface)
00048 friend class Device;
00049
00050 public:
00059 enum PropertyChange { PropertyModified, PropertyAdded, PropertyRemoved };
00060
00061 private:
00070 explicit GenericInterface(QObject *backendObject);
00071
00072 public:
00076 virtual ~GenericInterface();
00077
00078
00085 static Type deviceInterfaceType() { return DeviceInterface::GenericInterface; }
00086
00099 QVariant property(const QString &key) const;
00100
00111 QMap<QString, QVariant> allProperties() const;
00112
00125 bool propertyExists(const QString &key) const;
00126
00127 Q_SIGNALS:
00136 void propertyChanged(const QMap<QString,int> &changes);
00137
00145 void conditionRaised(const QString &condition, const QString &reason);
00146 };
00147 }
00148
00149 #endif