File indexing completed on 2023-05-30 11:30:53

0001 /**
0002  * Copyright (C) 2004 Nathan Toone <nathan@toonetown.com>
0003  * Copyright (C) 2007 Michael Pyne <mpyne@kde.org>
0004  * Copyright (C) 2012 Martin Sandsmark <martin.sandsmark@kde.org>
0005  *
0006  * This program is free software; you can redistribute it and/or modify it under
0007  * the terms of the GNU General Public License as published by the Free Software
0008  * Foundation; either version 2 of the License, or (at your option) any later
0009  * version.
0010  *
0011  * This program is distributed in the hope that it will be useful, but WITHOUT ANY
0012  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
0013  * PARTICULAR PURPOSE. See the GNU General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU General Public License along with
0016  * this program.  If not, see <http://www.gnu.org/licenses/>.
0017  */
0018 
0019 #ifndef JUK_WEBIMAGEFETCHER_H
0020 #define JUK_WEBIMAGEFETCHER_H
0021 
0022 #include <QObject>
0023 
0024 class KJob;
0025 class FileHandle;
0026 
0027 class WebImageFetcher : public QObject
0028 {
0029     Q_OBJECT
0030 
0031 public:
0032     explicit WebImageFetcher(QObject *parent);
0033     ~WebImageFetcher();
0034 
0035     void setFile(const FileHandle &file);
0036 
0037 public slots:
0038     void abortSearch();
0039     void searchCover();
0040 
0041 signals:
0042     void signalCoverChanged(int coverId);
0043 
0044 private slots:
0045     void slotWebRequestFinished(KJob *job);
0046     void slotImageFetched(KJob *job);
0047     void slotCoverChosen();
0048     void destroyDialog();
0049 
0050 private:
0051     class Private;
0052     Private *d;
0053 };
0054 
0055 #endif
0056 
0057 // vim: set et sw=4 tw=0 sta: