summaryrefslogtreecommitdiffstats
path: root/juk/webimagefetcherdialog.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite2de64d6f1beb9e492daf5b886e19933c1fa41dd (patch)
tree9047cf9e6b5c43878d5bf82660adae77ceee097a /juk/webimagefetcherdialog.h
downloadtdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.tar.gz
tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'juk/webimagefetcherdialog.h')
-rw-r--r--juk/webimagefetcherdialog.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/juk/webimagefetcherdialog.h b/juk/webimagefetcherdialog.h
new file mode 100644
index 00000000..a4424a2f
--- /dev/null
+++ b/juk/webimagefetcherdialog.h
@@ -0,0 +1,90 @@
+/***************************************************************************
+ copyright : (C) 2004 Nathan Toone
+ email : nathan@toonetown.com
+ copyright : (C) 2007 Michael Pyne
+ email : michael.pyne@kdemail.net
+***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef WEBIMAGEFETCHERDIALOG_H
+#define WEBIMAGEFETCHERDIALOG_H
+
+#include <kiconview.h>
+#include <kio/job.h>
+
+#include "webimagefetcher.h"
+
+class KURL;
+
+class WebImageFetcherDialog : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ WebImageFetcherDialog(const WebImageList &urlList,
+ const FileHandle &file,
+ QWidget *parent = 0);
+
+ virtual ~WebImageFetcherDialog();
+
+ QPixmap result() const { return m_pixmap; }
+
+ void setLayout();
+ void setImageList(const WebImageList &urlList);
+ void setFile(const FileHandle &file);
+
+signals:
+ void coverSelected();
+ void newSearchRequested();
+
+public slots:
+ int exec();
+ void refreshScreen(WebImageList &list);
+
+protected slots:
+ void slotOk();
+ void slotCancel();
+ void slotUser1();
+ void showCreditURL(const QString &url);
+
+private:
+ QPixmap fetchedImage(uint index) const;
+ QPixmap pixmapFromURL(const KURL &url) const;
+
+ QPixmap m_pixmap;
+ WebImageList m_imageList;
+ KIconView *m_iconWidget;
+ FileHandle m_file;
+};
+
+namespace KIO
+{
+ class TransferJob;
+}
+
+class CoverIconViewItem : public QObject, public KIconViewItem
+{
+ Q_OBJECT
+
+public:
+ CoverIconViewItem(QIconView *parent, const WebImage &image);
+ ~CoverIconViewItem();
+
+private slots:
+ void imageData(KIO::Job *job, const QByteArray &data);
+ void imageResult(KIO::Job* job);
+
+private:
+ QByteArray m_buffer;
+ QGuardedPtr<KIO::TransferJob> m_job;
+};
+
+#endif