diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 20:34:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 20:34:15 +0000 |
commit | 1c1403293485f35fd53db45aaa77a01cdd9627e7 (patch) | |
tree | 38559cd68cd4f63023fb5f6375def9db3b8b491e /plugins/rssfeed/rssfilter.h | |
parent | 894f94545727610df22c4f73911d62d58266f695 (diff) | |
download | ktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.tar.gz ktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.zip |
TQt4 port ktorrent
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktorrent@1238733 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'plugins/rssfeed/rssfilter.h')
-rw-r--r-- | plugins/rssfeed/rssfilter.h | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/plugins/rssfeed/rssfilter.h b/plugins/rssfeed/rssfilter.h index be31d18..2bf3dca 100644 --- a/plugins/rssfeed/rssfilter.h +++ b/plugins/rssfeed/rssfilter.h @@ -20,11 +20,11 @@ #ifndef RSSFILTER_H #define RSSFILTER_H -#include <qobject.h> -#include <qstring.h> -#include <qtimer.h> -#include <qdatastream.h> -#include <qregexp.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqdatastream.h> +#include <tqregexp.h> #include "rssarticle.h" @@ -42,109 +42,110 @@ namespace kt { public: - FilterMatch() { m_season = 0; m_episode = 0; m_time = QDateTime::currentDateTime().toString(); m_link=QString(); }; - FilterMatch(int season, int episode, QString link, QString time = QDateTime::currentDateTime().toString()); + FilterMatch() { m_season = 0; m_episode = 0; m_time = TQDateTime::tqcurrentDateTime().toString(); m_link=TQString(); }; + FilterMatch(int season, int episode, TQString link, TQString time = TQDateTime::tqcurrentDateTime().toString()); FilterMatch(const FilterMatch &other); FilterMatch &operator=(const FilterMatch &other); bool operator==(const FilterMatch &other) const; ~FilterMatch() {}; - QString link() const { return m_link; } + TQString link() const { return m_link; } int season() const { return m_season; } int episode() const { return m_episode; } - QString time() const { return m_time; } + TQString time() const { return m_time; } - void setLink(const QString& link) { m_link = link; } + void setLink(const TQString& link) { m_link = link; } void setSeason(int season) { m_season = season; } void setEpisode(int episode) { m_episode = episode; } - void setTime(QString time) { m_time = time; } + void setTime(TQString time) { m_time = time; } private: int m_season; int m_episode; - QString m_link; - QString m_time; + TQString m_link; + TQString m_time; }; - class RssFilter : public QObject + class RssFilter : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * Default constructor. */ - RssFilter(QObject * parent = 0); + RssFilter(TQObject * tqparent = 0); RssFilter(const RssFilter &other); - RssFilter(QString title, bool active, QStringList regexps, bool series, bool sansEpisode, + RssFilter(TQString title, bool active, TQStringList regexps, bool series, bool sansEpisode, int minSeason, int minEpisode, int maxSeason, int maxEpisode, - QValueList<FilterMatch> matches); + TQValueList<FilterMatch> matches); RssFilter &operator=(const RssFilter &other); ~RssFilter(); - QString title() const { return m_title; } + TQString title() const { return m_title; } bool active() const { return m_active; } - QStringList regExps() const { return m_regExps; } + TQStringList regExps() const { return m_regExps; } bool series() const { return m_series; } bool sansEpisode() const { return m_sansEpisode; } int minSeason() const { return m_minSeason; } int minEpisode() const { return m_minEpisode; } int maxSeason() const { return m_maxSeason; } int maxEpisode() const { return m_maxEpisode; } - QValueList<FilterMatch> matches() const { return m_matches; } + TQValueList<FilterMatch> matches() const { return m_matches; } bool scanArticle(RssArticle article, bool ignoreMatches = true, bool saveMatch = true); - void deleteMatch(const QString& link); + void deleteMatch(const TQString& link); public slots: - void setTitle( const QString& title ); + void setTitle( const TQString& title ); void setActive( bool active ); - void setRegExps ( const QStringList& regexps ); + void setRegExps ( const TQStringList& regexps ); void setSeries ( bool series ); void setSansEpisode ( bool sansEpisode ); void setMinSeason( int minSeason ); void setMinEpisode( int minEpisode ); void setMaxSeason( int maxSeason ); void setMaxEpisode( int maxEpisode ); - void setMatches( const QValueList<FilterMatch>& matches ); + void setMatches( const TQValueList<FilterMatch>& matches ); //void scanFilter(); signals: - void titleChanged( const QString& title ); + void titleChanged( const TQString& title ); void activeChanged( bool active ); - void regExpsChanged( const QStringList& regexps ); + void regExpsChanged( const TQStringList& regexps ); void seriesChanged( bool series ); void sansEpisodeChanged( bool sansEpisode ); void minSeasonChanged (int minSeason); void minEpisodeChanged (int minEpisode); void maxSeasonChanged (int maxSeason); void maxEpisodeChanged (int maxEpisode); - void matchesChanged( const QValueList<FilterMatch>& matches ); + void matchesChanged( const TQValueList<FilterMatch>& matches ); void rescanFilter(); private: - QString m_title; + TQString m_title; bool m_active; - QStringList m_regExps; + TQStringList m_regExps; bool m_series; bool m_sansEpisode; int m_minSeason; int m_minEpisode; int m_maxSeason; int m_maxEpisode; - QValueList<FilterMatch> m_matches; + TQValueList<FilterMatch> m_matches; bool episodeInRange(int season, int episode, bool ignoreMatches, bool& alreadyDownloaded); }; - QDataStream &operator<<( QDataStream &out, const FilterMatch &filterMatch ); - QDataStream &operator>>( QDataStream &in, FilterMatch &filterMatch ); + TQDataStream &operator<<( TQDataStream &out, const FilterMatch &filterMatch ); + TQDataStream &operator>>( TQDataStream &in, FilterMatch &filterMatch ); - QDataStream &operator<<( QDataStream &out, const RssFilter &filter ); - QDataStream &operator>>( QDataStream &in, RssFilter &filter ); + TQDataStream &operator<<( TQDataStream &out, const RssFilter &filter ); + TQDataStream &operator>>( TQDataStream &in, RssFilter &filter ); } |