00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef FILTERELEM_H
00019 #define FILTERELEM_H
00020
00021 #include "showrecordelem.h"
00022
00027 class ShowRecordElem;
00028
00029 class FilterRecord
00030 {
00031 public:
00032
00033 enum filterType {from, subject, header, size, to};
00034 enum expressionType {contains, contains_not, equals, equals_not, greater, less};
00035
00036 FilterRecord ();
00037 FilterRecord (filterType type, expressionType expression, const TQString& match, bool CaseSensitive, bool regExp);
00038 bool matches (ShowRecordElem*);
00039 TQString toString () const;
00040
00041 filterType _type;
00042 expressionType _expression;
00043 TQString _match;
00044 bool _CaseSensitive;
00045 bool _RegExp;
00046 };
00047
00048 class FilterElem {
00049 public:
00050
00051 enum secondCondition {noSecondCondition, condAnd, condOr};
00052
00053 FilterElem();
00054 FilterElem (const FilterRecord&);
00055 FilterElem (const FilterElem&);
00056 void setSecondCondition (secondCondition scnd, const FilterRecord&);
00057
00058 ~FilterElem();
00059 TQString toString () const;
00060
00061 FilterRecord _filter1;
00062 FilterRecord _filter2;
00063
00064 secondCondition _secondCondition;
00065
00066 bool matches (ShowRecordElem*);
00067
00072 unsigned int getCounter();
00073
00078 void setCounter( unsigned int number );
00079
00083 void incCounter();
00084
00085 private:
00086
00090 unsigned int _counter;
00091 };
00092
00093 #endif