webimagefetcher.h 1.44 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/**
 * Copyright (C) 2004 Nathan Toone <nathan@toonetown.com>
 * Copyright (C) 2007 Michael Pyne <mpyne@kde.org>
 * Copyright (C) 2012 Martin Sandsmark <martin.sandsmark@kde.org>
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program.  If not, see <http://www.gnu.org/licenses/>.
 */
18

19 20
#ifndef JUK_WEBIMAGEFETCHER_H
#define JUK_WEBIMAGEFETCHER_H
21

22
#include <QObject>
23

24
class KJob;
25
class FileHandle;
26

27
class WebImageFetcher : public QObject
28
{
29
    Q_OBJECT
30

31
public:
Yuri Chornoivan's avatar
Yuri Chornoivan committed
32
    explicit WebImageFetcher(QObject *parent);
33
    ~WebImageFetcher();
34 35

    void setFile(const FileHandle &file);
36

37 38
public slots:
    void abortSearch();
39 40
    void searchCover();

41
signals:
42
    void signalCoverChanged(int coverId);
43

44
private slots:
45
    void slotWebRequestFinished(KJob *job);
46 47
    void slotImageFetched(KJob *job);
    void slotCoverChosen();
48
    void destroyDialog();
49

50
private:
51 52
    class Private;
    Private *d;
53
};
54

55
#endif
56 57

// vim: set et sw=4 tw=0 sta: