KCompactDisc
#include <kcompactdisc.h>

Signals | |
void | balanceChanged (unsigned int balance) |
void | discChanged (unsigned int tracks) |
void | discInformation (KCompactDisc::DiscInfo info) |
void | discStatusChanged (KCompactDisc::DiscStatus status) |
void | loopPlaylistChanged (bool) |
void | playoutPositionChanged (unsigned int position) |
void | playoutTrackChanged (unsigned int track) |
void | randomPlaylistChanged (bool) |
void | volumeChanged (unsigned int volume) |
Public Slots | |
void | doCommand (KCompactDisc::DiscCommand) |
void | eject () |
void | loop () |
void | metadataLookup () |
void | next () |
void | pause () |
void | play () |
void | playPosition (unsigned int position) |
void | playTrack (unsigned int track) |
void | prev () |
void | random () |
void | setAutoMetadataLookup (bool) |
void | setBalance (unsigned int balance) |
void | setLoopPlaylist (bool) |
void | setRandomPlaylist (bool) |
void | setVolume (unsigned int volume) |
void | stop () |
Public Member Functions | |
KCompactDisc (InformationMode=KCompactDisc::Synchronous) | |
const QString & | deviceModel () |
const QString & | deviceName () |
const QString & | deviceRevision () |
const QUrl | deviceUrl () |
const QString & | deviceVendor () |
const QString & | discArtist () |
unsigned | discId () |
unsigned | discLength () |
unsigned | discPosition () |
const QList< unsigned > & | discSignature () |
KCompactDisc::DiscStatus | discStatus () |
QString | discStatusString (KCompactDisc::DiscStatus status) |
const QString & | discTitle () |
bool | isAudio (unsigned track) |
bool | isNoDisc () |
bool | isPaused () |
bool | isPlaying () |
bool | setDevice (const QString &device, unsigned volume=50, bool digitalPlayback=true, const QString &audioSystem=QString(), const QString &audioDevice=QString()) |
unsigned | track () |
QString | trackArtist () |
QString | trackArtist (unsigned track) |
unsigned | trackLength () |
unsigned | trackLength (unsigned track) |
unsigned | trackPosition () |
unsigned | tracks () |
QString | trackTitle () |
QString | trackTitle (unsigned track) |
![]() | |
QObject (QObject *parent) | |
bool | blockSignals (bool block) |
const QObjectList & | children () const const |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
bool | disconnect (const QObject *receiver, const char *method) const const |
void | dumpObjectInfo () |
void | dumpObjectInfo () const const |
void | dumpObjectTree () |
void | dumpObjectTree () const const |
QList< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
bool | inherits (const char *className) const const |
void | installEventFilter (QObject *filterObj) |
bool | isWidgetType () const const |
bool | isWindowType () const const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const const |
QVariant | property (const char *name) const const |
Q_CLASSINFO (Name, Value) | |
Q_DISABLE_COPY (Class) | |
Q_DISABLE_COPY_MOVE (Class) | |
Q_DISABLE_MOVE (Class) | |
Q_EMIT Q_EMIT | |
Q_ENUM (...) | |
Q_ENUM_NS (...) | |
Q_ENUMS (...) | |
Q_FLAG (...) | |
Q_FLAG_NS (...) | |
Q_FLAGS (...) | |
Q_GADGET Q_GADGET | |
Q_INTERFACES (...) | |
Q_INVOKABLE Q_INVOKABLE | |
Q_NAMESPACE Q_NAMESPACE | |
Q_NAMESPACE_EXPORT (EXPORT_MACRO) | |
Q_OBJECT Q_OBJECT | |
Q_PROPERTY (...) | |
Q_REVISION Q_REVISION | |
Q_SET_OBJECT_NAME (Object) | |
Q_SIGNAL Q_SIGNAL | |
Q_SIGNALS Q_SIGNALS | |
Q_SLOT Q_SLOT | |
Q_SLOTS Q_SLOTS | |
T | qFindChild (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
QList< T > | qFindChildren (const QObject *obj, const QString &name) |
T | qobject_cast (QObject *object) |
T | qobject_cast (const QObject *object) |
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
void | removeEventFilter (QObject *obj) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const const |
int | startTimer (int interval, Qt::TimerType timerType) |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType) |
QThread * | thread () const const |
Static Public Member Functions | |
static const QStringList | audioSystems () |
static const QStringList | cdromDeviceNames () |
static const QString | cdromDeviceUdi (const QString &) |
static const QUrl | cdromDeviceUrl (const QString &) |
static const QString | defaultCdromDeviceName () |
static const QString | defaultCdromDeviceUdi () |
static const QUrl | defaultCdromDeviceUrl () |
static QString | urlToDevice (const QUrl &url) |
![]() | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions | |
KCompactDisc (KCompactDiscPrivate &dd, QObject *parent) | |
![]() | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Protected Attributes | |
KCompactDiscPrivate * | d_ptr |
Additional Inherited Members | |
![]() | |
objectName | |
![]() | |
typedef | QObjectList |
Detailed Description
KCompactDisc - A CD drive interface for the KDE Project.
The disc interface is modelled by these slots:
- See also
- playTrack(unsigned int track): Play specified track.
- playPosition(unsigned int position): seek to specified position.
- next(): Play next track in the playlist.
- prev(): Play previous track in the playlist.
- pause(): Toggle between pause/resume.
- stop(): Stop playout:
- eject(): Stop playout and eject disc or Close tray and try to read TOC from disc.
The progress of playout is modelled by these signals:
- See also
- playoutPositionChanged(unsigned int position): A position in a track.
- playoutTrackChanged(unsigned int track): A playout of this track is started.
The shape of playlist is controlled by these accessors.
- See also
- setRandomPlaylist(bool): Shuffle the playlist.
- setLoopPlaylist(bool): Couple begin and end of playlist.
The disc lifecycle is modelled by these signals:
- See also
- discChanged(...): A new disc was inserted.
- discStatusString(KCompactDisc::Playing): A disc started playout.
- discStatusString(KCompactDisc::Paused): A disc was paused.
- discStatusString(KCompactDisc::Stopped): The disc stopped.
- discStatusString(KCompactDisc::NoDisc): The disc is removed. No disc in tray or data disc.
- discStatusString(KCompactDisc::NotReady): The disc is present. But playout is not possible.
- discInformation(KCompactDisc::DiscInfo info): A content for disc information is arrived.
The volume control is modelled by these slots:
- See also
- setVolume(unsigned int volume): A new volume value.
- setBalance(unsigned int balance): A new balance value.
And these signals:
- See also
- volumeChanged(unsigned int volume): A current volume value.
- balanceChanged(unsigned int balance): A current balance value.
All times in this interface are in seconds. Valid track numbers are positive numbers; zero is not a valid track number.
Definition at line 86 of file kcompactdisc.h.
Member Function Documentation
|
static |
All installed audio backends.
Definition at line 130 of file kcompactdisc.cpp.
|
signal |
New balance.
|
static |
All present CDROM devices.
Definition at line 145 of file kcompactdisc.cpp.
The Udi of named CDROM device for this system.
Definition at line 189 of file kcompactdisc.cpp.
The Url of named CDROM device for this system.
Definition at line 164 of file kcompactdisc.cpp.
|
static |
The default CDROM device for this system.
Definition at line 150 of file kcompactdisc.cpp.
|
static |
The Udi of default CDROM device for this system.
Definition at line 182 of file kcompactdisc.cpp.
|
static |
The Url of default CDROM device for this system.
Definition at line 157 of file kcompactdisc.cpp.
const QString & KCompactDisc::deviceModel | ( | ) |
SCSI parameter MODEL of current CDROM device.
- Returns
- Null string if no usable device set.
Definition at line 213 of file kcompactdisc.cpp.
const QString & KCompactDisc::deviceName | ( | ) |
Current CDROM device.
- Returns
- Null string if no usable device set.
Definition at line 225 of file kcompactdisc.cpp.
const QString & KCompactDisc::deviceRevision | ( | ) |
SCSI parameter REVISION of current CDROM device.
- Returns
- Null string if no usable device set.
Definition at line 219 of file kcompactdisc.cpp.
const QUrl KCompactDisc::deviceUrl | ( | ) |
Current device as QUrl.
Definition at line 231 of file kcompactdisc.cpp.
const QString & KCompactDisc::deviceVendor | ( | ) |
SCSI parameter VENDOR of current CDROM device.
- Returns
- Null string if no usable device set.
Definition at line 207 of file kcompactdisc.cpp.
const QString & KCompactDisc::discArtist | ( | ) |
Artist for whole disc.
- Returns
- Disc artist or null string.
Definition at line 249 of file kcompactdisc.cpp.
|
signal |
A new Disc is inserted.
unsigned KCompactDisc::discId | ( | ) |
Current disc, 0 if no disc or impossible to calculate id.
Definition at line 237 of file kcompactdisc.cpp.
|
signal |
A new Disc information is arrived.
unsigned KCompactDisc::discLength | ( | ) |
Known length of disc.
- Returns
- Disc length in seconds.
Definition at line 265 of file kcompactdisc.cpp.
unsigned KCompactDisc::discPosition | ( | ) |
Current position on the disc.
- Returns
- Position in seconds.
Definition at line 273 of file kcompactdisc.cpp.
const QList< unsigned > & KCompactDisc::discSignature | ( | ) |
CDDB signature of disc, empty if no disc or not possible to deliver.
Definition at line 243 of file kcompactdisc.cpp.
KCompactDisc::DiscStatus KCompactDisc::discStatus | ( | ) |
|
signal |
A Disc status changed.
QString KCompactDisc::discStatusString | ( | KCompactDisc::DiscStatus | status | ) |
const QString & KCompactDisc::discTitle | ( | ) |
|
slot |
Pipe GUI command.
Definition at line 438 of file kcompactdisc.cpp.
|
slot |
Open/close tray.
Definition at line 423 of file kcompactdisc.cpp.
bool KCompactDisc::isAudio | ( | unsigned | track | ) |
- Returns
- if the track is actually an audio track.
Definition at line 368 of file kcompactdisc.cpp.
bool KCompactDisc::isNoDisc | ( | ) |
Is status no disc.
Definition at line 362 of file kcompactdisc.cpp.
bool KCompactDisc::isPaused | ( | ) |
Is status pausing.
Definition at line 356 of file kcompactdisc.cpp.
bool KCompactDisc::isPlaying | ( | ) |
Is status playing.
Definition at line 350 of file kcompactdisc.cpp.
|
slot |
Switch endless playout on/off.
Definition at line 428 of file kcompactdisc.cpp.
|
slot |
Start playout of next track.
Definition at line 403 of file kcompactdisc.cpp.
|
slot |
Pause/resume playout.
Definition at line 413 of file kcompactdisc.cpp.
|
slot |
Start playout.
Definition at line 398 of file kcompactdisc.cpp.
|
signal |
A new position in a track.
This signal is delivered at approximately 1 second intervals while a track is playing. At first sight, this might seem overzealous, but it is likely that any CD player UI will use this to track the second-by-second position, so we may as well do it for them.
- Parameters
-
position Position within track in seconds.
|
signal |
A new track is started.
- Parameters
-
track Track number.
|
slot |
Start playout or seek to given position of track.
Definition at line 387 of file kcompactdisc.cpp.
|
slot |
Start playout of track.
Definition at line 376 of file kcompactdisc.cpp.
|
slot |
Start playout of previous track.
Definition at line 408 of file kcompactdisc.cpp.
|
slot |
Switch random playout on/off.
Definition at line 433 of file kcompactdisc.cpp.
|
slot |
Set balance.
Definition at line 552 of file kcompactdisc.cpp.
bool KCompactDisc::setDevice | ( | const QString & | device, |
unsigned | volume = 50 , |
||
bool | digitalPlayback = true , |
||
const QString & | audioSystem = QString() , |
||
const QString & | audioDevice = QString() |
||
) |
- Parameters
-
device Name of CD device, e.g. /dev/cdrom. volume Playback volume. digitalPlayback Select digital or analog playback. audioSystem For digital playback, system to use, e.g. "phonon". audioDevice For digital playback, device to use.
- Returns
- true if the device seemed usable.
Definition at line 529 of file kcompactdisc.cpp.
|
slot |
Set volume.
Definition at line 545 of file kcompactdisc.cpp.
|
slot |
Stop playout.
Definition at line 418 of file kcompactdisc.cpp.
unsigned KCompactDisc::track | ( | ) |
QString KCompactDisc::trackArtist | ( | ) |
Artist of current track.
- Returns
- Track artist or null string.
Definition at line 290 of file kcompactdisc.cpp.
QString KCompactDisc::trackArtist | ( | unsigned | track | ) |
Artist of given track.
- Returns
- Track artist or null string.
Definition at line 296 of file kcompactdisc.cpp.
unsigned KCompactDisc::trackLength | ( | ) |
Length of current track.
- Returns
- Track length in seconds.
Definition at line 318 of file kcompactdisc.cpp.
unsigned KCompactDisc::trackLength | ( | unsigned | track | ) |
Length of given track.
- Parameters
-
track Track number.
- Returns
- Track length in seconds.
Definition at line 324 of file kcompactdisc.cpp.
unsigned KCompactDisc::trackPosition | ( | ) |
Current track position.
- Returns
- Track position in seconds.
Definition at line 338 of file kcompactdisc.cpp.
unsigned KCompactDisc::tracks | ( | ) |
Number of tracks.
Definition at line 344 of file kcompactdisc.cpp.
QString KCompactDisc::trackTitle | ( | ) |
Title of current track.
- Returns
- Track title or null string.
Definition at line 304 of file kcompactdisc.cpp.
QString KCompactDisc::trackTitle | ( | unsigned | track | ) |
Title of given track.
- Returns
- Track title or null string.
Definition at line 310 of file kcompactdisc.cpp.
If the url is a media:/ or system:/ URL returns the device it represents, otherwise returns device.
Definition at line 107 of file kcompactdisc.cpp.
|
signal |
New volume.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jan 20 2021 23:26:02 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.