23 #ifndef _TelepathyQt_feature_h_HEADER_GUARD_
24 #define _TelepathyQt_feature_h_HEADER_GUARD_
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
30 #include <TelepathyQt/Global>
35 #include <QSharedDataPointer>
41 class TP_QT_EXPORT
Feature :
public QPair<QString, uint>
45 Feature(
const QString &className, uint
id,
bool critical =
false);
49 bool isValid()
const {
return mPriv.constData() != 0; }
53 bool isCritical()
const;
57 friend struct Private;
58 QSharedDataPointer<Private> mPriv;
61 class TP_QT_EXPORT
Features :
public QSet<Feature>
71 return Features() << feature1 << feature2;
76 return Features(features) << feature;
82 Q_FOREACH (
const Feature &feature, features) {
83 int h =
qHash(feature);
The Feature class represents a feature that can be enabled on demand.
Definition: feature.h:41
Features(const Feature &feature)
Definition: feature.h:65
Features(const QSet< Feature > &s)
Definition: feature.h:66
Features()
Definition: feature.h:64
Features operator|(const Feature &feature1, const Feature &feature2)
Definition: feature.h:69
bool isValid() const
Definition: feature.h:49
uint qHash(const ChannelClassSpec &spec)
Definition: channel-class-spec.h:283
The Features class represents a list of Feature.
Definition: feature.h:61