• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

mailcommon

  • sources
  • kde-4.14
  • kdepim
  • mailcommon
  • filter
  • filteractions
filteractionwithaddress.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1996-1998 Stefan Taferner <taferner@kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  *
18  */
19 
20 #include "filteractionwithaddress.h"
21 
22 #include <messagecore/widgets/emailaddressrequester.h>
23 
24 using namespace MailCommon;
25 
26 FilterActionWithAddress::FilterActionWithAddress( const QString &name, const QString &label, QObject *parent )
27  : FilterActionWithString( name, label, parent )
28 {
29 }
30 
31 QWidget* FilterActionWithAddress::createParamWidget( QWidget *parent ) const
32 {
33  MessageCore::EmailAddressRequester *requester = new MessageCore::EmailAddressRequester( parent );
34  requester->setObjectName(QLatin1String("emailaddressrequester"));
35  requester->setText( mParameter );
36 
37  connect( requester, SIGNAL(textChanged()), this, SIGNAL(filterActionModified()) );
38 
39  return requester;
40 }
41 
42 void FilterActionWithAddress::applyParamWidgetValue( QWidget *paramWidget )
43 {
44  mParameter = qobject_cast<MessageCore::EmailAddressRequester*>( paramWidget )->text();
45 }
46 
47 void FilterActionWithAddress::setParamWidgetValue( QWidget *paramWidget ) const
48 {
49  qobject_cast<MessageCore::EmailAddressRequester*>( paramWidget )->setText( mParameter );
50 }
51 
52 void FilterActionWithAddress::clearParamWidget( QWidget *paramWidget ) const
53 {
54  qobject_cast<MessageCore::EmailAddressRequester*>( paramWidget )->clear();
55 }
56 
QWidget
MailCommon::FilterActionWithAddress::createParamWidget
virtual QWidget * createParamWidget(QWidget *parent) const
Creates a widget for setting the filter action parameter.
Definition: filteractionwithaddress.cpp:31
MailCommon::FilterActionWithAddress::clearParamWidget
virtual void clearParamWidget(QWidget *paramWidget) const
The filter action shall clear it's parameter widget's contents.
Definition: filteractionwithaddress.cpp:52
text
const char * text
Definition: mdnadvicedialog.cpp:54
QObject
QString
MailCommon::FilterActionWithString
Abstract base class for filter actions with a free-form string as parameter.
Definition: filteractionwithstring.h:41
MailCommon::FilterActionWithString::mParameter
QString mParameter
Definition: filteractionwithstring.h:91
MailCommon::FilterActionWithAddress::applyParamWidgetValue
virtual void applyParamWidgetValue(QWidget *paramWidget)
The filter action shall set it's parameter from the widget's contents.
Definition: filteractionwithaddress.cpp:42
QLatin1String
MailCommon::FilterAction::filterActionModified
void filterActionModified()
Called to notify that the current FilterAction has had some value modification.
filteractionwithaddress.h
MailCommon::FilterActionWithAddress::setParamWidgetValue
virtual void setParamWidgetValue(QWidget *paramWidget) const
The filter action shall set it's widget's contents from it's parameter.
Definition: filteractionwithaddress.cpp:47
MailCommon::FilterActionWithAddress::FilterActionWithAddress
FilterActionWithAddress(const QString &name, const QString &label, QObject *parent=0)
Creates a new filter action.
Definition: filteractionwithaddress.cpp:26
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailcommon

Skip menu "mailcommon"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal