1 /* This file is part of the KDE project
3 Copyright (C) 2008 Javier Goday <jgoday @ gmail.com>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 #ifndef LINKIMPORTER_H
11 #define LINKIMPORTER_H
13 #include "kget_export.h"
20 class KLocalizedString
;
23 * Import a list of urls from a file (local or remote)
25 class KGET_EXPORT LinkImporter
: public QThread
29 LinkImporter(const KUrl
&source
, QObject
*parent
);
30 LinkImporter(QObject
*parent
);
34 * Check for urls in clipboard
36 void checkClipboard(const QString
&clipboardContent
);
39 * Start reading the url contents
44 * copy the remote file out of the thread
46 void copyRemoteFile();
49 * Returns a list with the links of the selected url m_url
51 QList
<QString
> links()
57 void error(const KLocalizedString
&);
58 void progress(int progress
);
61 void slotReadFile(const QUrl
&url
);
65 * Checks if an url is valid and adds it to the transfers lists
67 void addTransfer(QString
&link
);
71 QList
<QString
> m_transfers
;