summaryrefslogtreecommitdiffstats
path: root/src/filter.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
commit2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch)
tree18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/filter.h
parent1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff)
downloadtellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz
tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip
TQt4 port tellico
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/filter.h')
-rw-r--r--src/filter.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/filter.h b/src/filter.h
index 57997bf..d269c92 100644
--- a/src/filter.h
+++ b/src/filter.h
@@ -18,8 +18,8 @@
#include <ksharedptr.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
namespace Tellico {
namespace Data {
@@ -44,7 +44,7 @@ public:
};
FilterRule();
- FilterRule(const QString& fieldName, const QString& text, Function func);
+ FilterRule(const TQString& fieldName, const TQString& text, Function func);
/**
* A rule is empty if the pattern text is empty
@@ -69,28 +69,28 @@ public:
/**
* Return field name
*/
- const QString& fieldName() const { return m_fieldName; }
+ const TQString& fieldName() const { return m_fieldName; }
/**
* Set field name
*/
- void setFieldName(const QString& fieldName) { m_fieldName = fieldName; }
+ void setFieldName(const TQString& fieldName) { m_fieldName = fieldName; }
/**
* Return pattern
*/
- const QString& pattern() const { return m_pattern; }
+ const TQString& pattern() const { return m_pattern; }
/**
* Set pattern
*/
-// void setPattern(const QString& pattern) { m_pattern = pattern; }
+// void setPattern(const TQString& pattern) { m_pattern = pattern; }
private:
bool equals(Data::EntryPtr entry) const;
- bool contains(Data::EntryPtr entry) const;
+ bool tqcontains(Data::EntryPtr entry) const;
bool matchesRegExp(Data::EntryPtr entry) const;
- QString m_fieldName;
+ TQString m_fieldName;
Function m_function;
- QString m_pattern;
+ TQString m_pattern;
};
/**
@@ -98,7 +98,7 @@ private:
*
* @author Robby Stephenson
*/
-class Filter : public QPtrList<FilterRule>, public KShared {
+class Filter : public TQPtrList<FilterRule>, public KShared {
public:
enum FilterOp {
@@ -107,23 +107,23 @@ public:
};
typedef KSharedPtr<Filter> Ptr;
- Filter(FilterOp op) : QPtrList<FilterRule>(), m_op(op) { setAutoDelete(true); }
+ Filter(FilterOp op) : TQPtrList<FilterRule>(), m_op(op) { setAutoDelete(true); }
Filter(const Filter& other);
void setMatch(FilterOp op) { m_op = op; }
FilterOp op() const { return m_op; }
bool matches(Data::EntryPtr entry) const;
- void setName(const QString& name) { m_name = name; }
- const QString& name() const { return m_name; }
+ void setName(const TQString& name) { m_name = name; }
+ const TQString& name() const { return m_name; }
- uint count() const { return QPtrList<FilterRule>::count(); } // disambiguate
+ uint count() const { return TQPtrList<FilterRule>::count(); } // disambiguate
private:
Filter& operator=(const Filter& other);
FilterOp m_op;
- QString m_name;
+ TQString m_name;
};
} // end namespace