File indexing completed on 2024-05-12 04:51:35

0001 /*
0002     SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 #ifndef _K3B_AUDIO_PROJECT_CDDB_PLUGIN_H_
0006 #define _K3B_AUDIO_PROJECT_CDDB_PLUGIN_H_
0007 
0008 #include "k3bprojectplugin.h"
0009 
0010 #include <QPointer>
0011 #include <QScopedPointer>
0012 
0013 namespace K3b {
0014     class Cddb;
0015     class AudioDoc;
0016     class ProgressDialog;
0017 }
0018 
0019 class QWidget;
0020 class QProgressDialog;
0021 class KJob;
0022 
0023 class K3bAudioProjectCddbPlugin : public K3b::ProjectPlugin
0024 {
0025     Q_OBJECT
0026 
0027 public:
0028     K3bAudioProjectCddbPlugin( QObject* parent, const QVariantList& );
0029     ~K3bAudioProjectCddbPlugin() override;
0030 
0031     int pluginSystemVersion() const override { return K3B_PLUGIN_SYSTEM_VERSION; }
0032 
0033     void activate( K3b::Doc* doc, QWidget* parent ) override;
0034 
0035 private Q_SLOTS:
0036     void slotCddbQueryFinished( KJob* );
0037 
0038 private:
0039     QScopedPointer<QProgressDialog> m_progress;
0040     QPointer<K3b::AudioDoc> m_doc;
0041     QPointer<QWidget> m_parentWidget;
0042 
0043     bool m_canceled;
0044 };
0045 
0046 #endif