Fix typo found by Yuri Chornoivan
[kdepim.git] / knode / knfilterconfigwidget.cpp
blobd9b2f1a790ebd3694e69d70ade592496e802d351
1 /*
2 KNode, the KDE newsreader
3 Copyright (c) 1999-2005 the KNode authors.
4 See file AUTHORS for details
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 You should have received a copy of the GNU General Public License
11 along with this program; if not, write to the Free Software Foundation,
12 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
15 #include <QLabel>
16 //Added by qt3to4:
17 #include <QVBoxLayout>
19 #include <klocale.h>
21 #include "knstringfilter.h"
22 #include "knstatusfilter.h"
23 #include "knrangefilter.h"
24 #include "knfilterconfigwidget.h"
26 using namespace KNode;
28 KNFilterConfigWidget::KNFilterConfigWidget( QWidget *parent ) :
29 QTabWidget( parent )
31 QWidget *sf, *idW, *add;
32 sf=new QWidget(this);
33 QVBoxLayout *sfL=new QVBoxLayout(sf);
34 sfL->setSpacing(5);
35 sfL->setMargin(8);
36 subject = new StringFilterWidget( i18n("Subject"), sf );
37 sfL->addWidget(subject);
38 from = new StringFilterWidget( i18n("From"), sf );
39 sfL->addWidget(from);
40 QLabel *l = new QLabel(i18n("The following placeholders are supported:\n%MYNAME=own name, %MYEMAIL=own email address"),sf);
41 sfL->addWidget(l);
42 sfL->addStretch(1);
43 addTab(sf, i18n("Subject && &From"));
45 idW=new QWidget(this);
46 QVBoxLayout *idL=new QVBoxLayout(idW);
47 idL->setSpacing(5);
48 idL->setMargin(8);
49 messageId = new StringFilterWidget( i18n("Message-ID"), idW );
50 idL->addWidget(messageId);
51 references = new StringFilterWidget( i18n("References"), idW );
52 idL->addWidget(references);
53 idL->addStretch(1);
54 addTab(idW, i18n("M&essage-IDs"));
56 status = new StatusFilterWidget( this );
57 addTab(status, i18n("&Status"));
59 add=new QWidget(this);
60 QVBoxLayout *addL=new QVBoxLayout(add);
61 addL->setSpacing(5);
62 addL->setMargin(8);
63 score = new RangeFilterWidget( i18n("Score"), -99999, 99999, add );
64 addL->addWidget(score);
65 age = new RangeFilterWidget( i18n("Age"), 0, 999, add, i18n(" days") );
66 addL->addWidget(age);
67 lines = new RangeFilterWidget( i18n("Lines"), 0, 99999, add );
68 addL->addWidget(lines);
69 addL->addStretch(1);
70 addTab(add, i18n("&Additional"));
74 KNFilterConfigWidget::~KNFilterConfigWidget()
79 void KNFilterConfigWidget::reset()
81 from->clear();
82 subject->clear();
83 messageId->clear();
84 references->clear();
85 age->clear();
86 lines->clear();
87 score->clear();
88 status->clear();
92 void KNFilterConfigWidget::setStartFocus()
94 subject->setStartFocus();
97 // -----------------------------------------------------------------------------
99 #include "knfilterconfigwidget.moc"