1.1.13
by Jonathan Riddell
Import upstream version 4.0.80 |
1 |
/* This file is part of the KDE project
|
2 |
Copyright (C) 2000 David Faure <faure@kde.org>
|
|
3 |
Copyright (C) 2002-2003 Alexander Kellett <lypanov@kde.org>
|
|
4 |
||
5 |
This program is free software; you can redistribute it and/or
|
|
6 |
modify it under the terms of the GNU General Public License as
|
|
7 |
published by the Free Software Foundation; either version 2 of
|
|
8 |
the License, or (at your option) version 3.
|
|
9 |
||
10 |
This program is distributed in the hope that it will be useful,
|
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 |
GNU General Public License for more details.
|
|
14 |
||
15 |
You should have received a copy of the GNU General Public License
|
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
17 |
*/
|
|
18 |
||
19 |
#ifndef __testlink_h
|
|
20 |
#define __testlink_h
|
|
21 |
||
22 |
#include <QtCore/QObject> |
|
23 |
||
24 |
#include <kio/job.h> |
|
25 |
#include <kbookmark.h> |
|
26 |
||
27 |
#include "bookmarkiterator.h" |
|
28 |
||
29 |
class TestLinkItrHolder : public BookmarkIteratorHolder { |
|
30 |
public: |
|
31 |
static TestLinkItrHolder* self() { |
|
32 |
if (!s_self) { s_self = new TestLinkItrHolder(); }; return s_self; |
|
33 |
}
|
|
34 |
void addAffectedBookmark( const QString & address ); |
|
35 |
protected: |
|
36 |
virtual void doItrListChanged(); |
|
37 |
private: |
|
38 |
TestLinkItrHolder(); |
|
39 |
static TestLinkItrHolder *s_self; |
|
40 |
QString m_affectedBookmark; |
|
41 |
};
|
|
42 |
||
43 |
class TestLinkItr : public BookmarkIterator |
|
44 |
{
|
|
45 |
Q_OBJECT
|
|
46 |
||
47 |
public: |
|
48 |
TestLinkItr(QList<KBookmark> bks); |
|
49 |
~TestLinkItr(); |
|
50 |
virtual TestLinkItrHolder* holder() const { return TestLinkItrHolder::self(); } |
|
51 |
||
52 |
public Q_SLOTS: |
|
53 |
void slotJobResult(KJob *job); |
|
54 |
||
55 |
private: |
|
56 |
void setStatus(const QString & text); |
|
57 |
virtual void doAction(); |
|
58 |
virtual bool isApplicable(const KBookmark &bk) const; |
|
59 |
||
60 |
KIO::TransferJob *m_job; |
|
61 |
QString m_oldStatus; |
|
62 |
};
|
|
63 |
||
64 |
#endif
|