- Main Page
- Namespaces
- Classes
- Files
- Directories

# filterelem.h

    00001 /***************************************************************************
    00002                           filterelem.h  -  description
    00003                              -------------------
    00004     begin                : Die Sep 23 2003
    00005     copyright            : (C) 2003 by Eggert Ehmke
    00006     email                : eggert.ehmke@berlin.de
    00007  ***************************************************************************/
    00008
    00009 /***************************************************************************
    00010  *                                                                         *
    00011  *   This program is free software; you can redistribute it and/or modify  *
    00012  *   it under the terms of the GNU General Public License as published by  *
    00013  *   the Free Software Foundation; either version 2 of the License, or     *
    00014  *   (at your option) any later version.                                   *
    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   // this sequence must not be changed. See FilterEntryDlg.ui
    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   // this sequence must not be changed. See FilterEntryDlg.ui
    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