KContacts

sound.h
1 /*
2  This file is part of the KContacts framework.
3  SPDX-FileCopyrightText: 2002 Tobias Koenig <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef KCONTACTS_SOUND_H
9 #define KCONTACTS_SOUND_H
10 
11 #include "kcontacts_export.h"
12 #include <QString>
13 #include <QSharedDataPointer>
14 
15 namespace KContacts {
44 class KCONTACTS_EXPORT Sound
45 {
46  friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Sound &);
47  friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Sound &);
48 
49 public:
50 
54  Sound();
55 
61  Sound(const QString &url);
62 
68  Sound(const QByteArray &data);
69 
73  Sound(const Sound &other);
74 
78  ~Sound();
79 
80  typedef QVector<Sound> List;
86  Sound &operator=(const Sound &other);
87 
95  Q_REQUIRED_RESULT bool operator==(const Sound &other) const;
96 
104  Q_REQUIRED_RESULT bool operator!=(const Sound &other) const;
105 
113  void setUrl(const QString &url);
114 
118  Q_REQUIRED_RESULT bool isEmpty() const;
119 
126  void setData(const QByteArray &data);
127 
135  Q_REQUIRED_RESULT bool isIntern() const;
136 
140  Q_REQUIRED_RESULT QString url() const;
141 
145  Q_REQUIRED_RESULT QByteArray data() const;
146 
150  Q_REQUIRED_RESULT QString toString() const;
151 
152 private:
153  class Private;
155 };
156 
160 KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Sound &sound);
161 
165 KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Sound &sound);
166 }
167 Q_DECLARE_TYPEINFO(KContacts::Sound, Q_MOVABLE_TYPE);
168 #endif
QDataStream & operator>>(QDataStream &in, KDateTime::Spec &spec)
QDataStream & operator<<(QDataStream &out, const KDateTime::Spec &spec)
Class that holds a Sound clip for a contact.
Definition: sound.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 4 2020 22:55:11 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.