00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __testlink_h
00021 #define __testlink_h
00022
00023 #include <tqobject.h>
00024
00025 #include <kio/job.h>
00026 #include <kbookmark.h>
00027
00028 #include "listview.h"
00029 #include "bookmarkiterator.h"
00030
00031 class TestLinkItrHolder : public BookmarkIteratorHolder {
00032 public:
00033 static TestLinkItrHolder* self() {
00034 if (!s_self) { s_self = new TestLinkItrHolder(); }; return s_self;
00035 }
00036 void addAffectedBookmark( const TQString & address );
00037 void resetToValue(const TQString &url, const TQString &val);
00038 const TQString getMod(const TQString &url) const;
00039 const TQString getOldVisit(const TQString &url) const;
00040 void setMod(const TQString &url, const TQString &val);
00041 void setOldVisit(const TQString &url, const TQString &val);
00042 static TQString calcPaintStyle(const TQString &, KEBListViewItem::PaintStyle&,
00043 const TQString &, const TQString &);
00044 protected:
00045 virtual void doItrListChanged();
00046 private:
00047 TestLinkItrHolder();
00048 static TestLinkItrHolder *s_self;
00049 TQMap<TQString, TQString> m_modify;
00050 TQMap<TQString, TQString> m_oldModify;
00051 TQString m_affectedBookmark;
00052 };
00053
00054 class TestLinkItr : public BookmarkIterator
00055 {
00056 Q_OBJECT
00057
00058 public:
00059 TestLinkItr(TQValueList<KBookmark> bks);
00060 ~TestLinkItr();
00061 virtual TestLinkItrHolder* holder() const { return TestLinkItrHolder::self(); }
00062
00063 public slots:
00064 void slotJobResult(KIO::Job *job);
00065 void slotJobData(KIO::Job *job, const TQByteArray &data);
00066
00067 private:
00068 virtual void doAction();
00069 virtual bool isApplicable(const KBookmark &bk) const;
00070
00071 KIO::TransferJob *m_job;
00072 bool m_errSet;
00073 };
00074
00075 #endif