File indexing completed on 2024-05-12 04:50:59
0001 /* 0002 SPDX-FileCopyrightText: 2005-2009 Sebastian Trueg <trueg@k3b.org> 0003 SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef _K3B_AUDIO_CDTRACK_DRAG_H_ 0009 #define _K3B_AUDIO_CDTRACK_DRAG_H_ 0010 0011 #include "k3btoc.h" 0012 #include "k3bdevice.h" 0013 #include "k3b_export.h" 0014 0015 #include <KCDDB/CDInfo> 0016 0017 class QMimeData; 0018 0019 namespace K3b { 0020 class LIBK3B_EXPORT AudioCdTrackDrag 0021 { 0022 public: 0023 AudioCdTrackDrag(); 0024 AudioCdTrackDrag( const Device::Toc& toc, 0025 const QList<int>& trackNumbers, 0026 const KCDDB::CDInfo& cddb, 0027 Device::Device* lastDev = 0 ); 0028 0029 Device::Toc toc() const { return m_toc; } 0030 QList<int> trackNumbers() const { return m_trackNumbers; } 0031 KCDDB::CDInfo cddbEntry() const { return m_cddb; } 0032 Device::Device* device() const { return m_device; } 0033 0034 void populateMimeData( QMimeData* ); 0035 0036 static QStringList mimeDataTypes(); 0037 0038 static bool canDecode( const QMimeData* s ); 0039 static AudioCdTrackDrag fromMimeData( const QMimeData* s ); 0040 0041 private: 0042 Device::Toc m_toc; 0043 QList<int> m_trackNumbers; 0044 KCDDB::CDInfo m_cddb; 0045 Device::Device* m_device; 0046 }; 0047 } 0048 0049 #endif