File indexing completed on 2022-11-29 20:24:10

0001 /* This file is part of the KDE project
0002    Copyright (C) 2000 David Faure <faure@kde.org>
0003    Copyright (C) 2002-2003 Alexander Kellett <lypanov@kde.org>
0004 
0005    This program is free software; you can redistribute it and/or
0006    modify it under the terms of the GNU General Public License as
0007    published by the Free Software Foundation; either version 2 of
0008    the License, or (at your option) version 3.
0009 
0010    This program is distributed in the hope that it will be useful,
0011    but WITHOUT ANY WARRANTY; without even the implied warranty of
0012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013    GNU General Public License for more details.
0014 
0015    You should have received a copy of the GNU General Public License
0016    along with this program.  If not, see <http://www.gnu.org/licenses/>
0017 */
0018 
0019 #ifndef __testlink_h
0020 #define __testlink_h
0021 
0022 #include <QObject>
0023 
0024 #include <KBookmark>
0025 #include <kio/job.h>
0026 
0027 #include "bookmarkiterator.h"
0028 class KBookmarkModel;
0029 
0030 class TestLinkItrHolder : public BookmarkIteratorHolder
0031 {
0032 public:
0033     TestLinkItrHolder(QObject *parent, KBookmarkModel *model);
0034 };
0035 
0036 class TestLinkItr : public BookmarkIterator
0037 {
0038     Q_OBJECT
0039 
0040 public:
0041     TestLinkItr(BookmarkIteratorHolder *holder, const QList<KBookmark> &bks);
0042     ~TestLinkItr() override;
0043 
0044     void cancel() override;
0045 
0046 public Q_SLOTS:
0047     void slotJobResult(KJob *job);
0048 
0049 private:
0050     void setStatus(const QString &text);
0051     void doAction() override;
0052     bool isApplicable(const KBookmark &bk) const override;
0053 
0054     KIO::TransferJob *m_job;
0055     QString m_oldStatus;
0056 };
0057 
0058 #endif