From cc794c5ba028bbf07fa280ed49bd0b8cfb745bd7 Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 14 May 2003 14:41:47 +0000 Subject: move lastHitField stuff into OPIMRecord --- (limited to 'libopie/pim/opimrecord.h') diff --git a/libopie/pim/opimrecord.h b/libopie/pim/opimrecord.h index 6e7c0da..494c78e 100644 --- a/libopie/pim/opimrecord.h +++ b/libopie/pim/opimrecord.h @@ -75,8 +75,16 @@ public: /** * matches the Records the regular expression? */ - virtual bool match( const QString ®exp ) const - {return Qtopia::Record::match(QRegExp(regexp));}; + virtual bool match( const QString ®exp ) const + {setLastHitField( -1 ); + return Qtopia::Record::match(QRegExp(regexp));}; + + /** + * if implemented this function returns which item has been + * last hit by the match() function. + * or -1 if not implemented or no hit has occured + */ + int lastHitField()const; /** * converts the internal structure to a map @@ -121,6 +129,9 @@ public: virtual bool saveToStream( QDataStream& stream )const; protected: + // need to be const cause it is called from const methods + mutable int m_lastHit; + void setLastHitField( int lastHit )const; Qtopia::UidGen &uidGen(); // QString crossToString()const; -- cgit v0.9.0.2