BluezQt

mediaplayertrack.h
1/*
2 * BluezQt - Asynchronous BlueZ wrapper library
3 *
4 * SPDX-FileCopyrightText: 2015 David Rosca <nowrep@gmail.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8
9#ifndef BLUEZQT_MEDIAPLAYERTRACK_H
10#define BLUEZQT_MEDIAPLAYERTRACK_H
11
12#include <QSharedPointer>
13#include <QString>
14
15#include "bluezqt_export.h"
16
17namespace BluezQt
18{
19/**
20 * @class BluezQt::MediaPlayerTrack mediaplayertrack.h <BluezQt/MediaPlayerTrack>
21 *
22 * Media player track.
23 *
24 * This class represents a track in media player.
25 */
26class BLUEZQT_EXPORT MediaPlayerTrack
27{
28public:
29 /**
30 * Creates a new invalid MediaPlayerTrack object.
31 */
32 explicit MediaPlayerTrack();
33
34 /**
35 * Destroys a MediaPlayerTrack object.
36 */
37 virtual ~MediaPlayerTrack();
38
39 /**
40 * Copy constructor.
41 *
42 * @param other
43 */
45
46 /**
47 * Copy assignment operator.
48 *
49 * @param other
50 */
51 MediaPlayerTrack &operator=(const MediaPlayerTrack &other);
52
53 /**
54 * Returns whether the track is valid.
55 *
56 * @return true if track is valid
57 */
58 bool isValid() const;
59
60 /**
61 * Returns a title of the track.
62 *
63 * @return track title
64 */
65 QString title() const;
66
67 /**
68 * Returns an artist of the track.
69 *
70 * @return track artist
71 */
72 QString artist() const;
73
74 /**
75 * Returns an album of the track.
76 *
77 * @return track album
78 */
79 QString album() const;
80
81 /**
82 * Returns a genre of the track.
83 *
84 * @return track genre
85 */
86 QString genre() const;
87
88 /**
89 * Returns a total number of tracks.
90 *
91 * @return total number of tracks
92 */
93 quint32 numberOfTracks() const;
94
95 /**
96 * Returns a track number of the track.
97 *
98 * @return track number
99 */
100 quint32 trackNumber() const;
101
102 /**
103 * Returns a duration of the track.
104 *
105 * @return track duration
106 */
107 quint32 duration() const;
108
109private:
110 BLUEZQT_NO_EXPORT explicit MediaPlayerTrack(const QVariantMap &properties);
111
113
114 friend class MediaPlayerPrivate;
115};
116
117} // namespace BluezQt
118
119Q_DECLARE_METATYPE(BluezQt::MediaPlayerTrack)
120
121#endif // BLUEZQT_MEDIAPLAYERTRACK_H
Media player track.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Sep 27 2024 11:47:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.