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

mailcommon

  • sources
  • kde-4.12
  • kdepim
  • mailcommon
  • filter
filteractionwidget.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
3  Copyright (c) 2010 Andras Mantia <andras@kdab.com>
4  Author: Marc Mutz <mutz@kde.org>
5  based upon work by Stefan Taferner <taferner@kde.org>
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License along
18  with this program; if not, write to the Free Software Foundation, Inc.,
19  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21 
22 #ifndef MAILCOMMON_FILTERACTIONWIDGET_H
23 #define MAILCOMMON_FILTERACTIONWIDGET_H
24 
25 #include "mailcommon_export.h"
26 
27 #include <libkdepim/widgets/kwidgetlister.h>
28 
29 #include <KHBox>
30 
31 namespace MailCommon {
32 
33 class FilterAction;
34 class FilterActionWidget;
35 
54 class FilterActionWidget : public KHBox
55 {
56  Q_OBJECT
57 
58 public:
64  explicit FilterActionWidget( QWidget *parent = 0 );
65 
69  ~FilterActionWidget();
70 
80  void setAction( const MailCommon::FilterAction *action );
81 
89  MailCommon::FilterAction *action() const;
90 
91  void updateAddRemoveButton( bool addButtonEnabled, bool removeButtonEnabled );
92 
93 signals:
94  void filterModified();
95  void addWidget( QWidget * );
96  void removeWidget( QWidget * );
97 
98 private:
99  //@cond PRIVATE
100  class Private;
101  Private *const d;
102 
103  Q_PRIVATE_SLOT( d, void slotFilterTypeChanged( int ) )
104  Q_PRIVATE_SLOT( d, void slotAddWidget() )
105  Q_PRIVATE_SLOT( d, void slotRemoveWidget() )
106  //@endcond
107 };
108 
115 class MAILCOMMON_EXPORT FilterActionWidgetLister : public KPIM::KWidgetLister
116 {
117  Q_OBJECT
118 
119 public:
125  explicit FilterActionWidgetLister( QWidget *parent = 0 );
126 
130  virtual ~FilterActionWidgetLister();
131 
135  void setActionList( QList<MailCommon::FilterAction*> *list );
136 
140  void updateActionList();
141 
142  void reconnectWidget( FilterActionWidget *w );
143 
144 public Q_SLOTS:
148  void reset();
149  void slotAddWidget( QWidget * );
150  void slotRemoveWidget( QWidget * );
151 
152 signals:
153  void filterModified();
154 
155 protected:
159  virtual void clearWidget( QWidget * );
160 
164  virtual QWidget *createWidget( QWidget * );
165 
166  void updateAddRemoveButton();
167 
168 private:
169  //@cond PRIVATE
170  class Private;
171  Private *const d;
172  //@endcond
173 };
174 
175 }
176 
177 #endif
MailCommon::FilterActionWidget::action
MailCommon::FilterAction * action() const
Returns the filter action.
Definition: filteractionwidget.cpp:225
MailCommon::FilterActionWidget::addWidget
void addWidget(QWidget *)
MailCommon::FilterActionWidget::filterModified
void filterModified()
MailCommon::FilterActionWidgetLister
A container widget for a list of FilterActionWidgets.
Definition: filteractionwidget.h:115
QWidget
MailCommon::FilterAction
Abstract base class for mail filter actions.
Definition: filteraction.h:52
MailCommon::FilterActionWidget::updateAddRemoveButton
void updateAddRemoveButton(bool addButtonEnabled, bool removeButtonEnabled)
Definition: filteractionwidget.cpp:185
MailCommon::FilterActionWidget::setAction
void setAction(const MailCommon::FilterAction *action)
Sets the filter action.
Definition: filteractionwidget.cpp:191
MailCommon::FilterActionWidget
A widget to edit a single MailCommon::FilterAction.
Definition: filteractionwidget.h:54
mailcommon_export.h
MailCommon::FilterActionWidget::FilterActionWidget
FilterActionWidget(QWidget *parent=0)
Creates a filter action widget with no type selected.
Definition: filteractionwidget.cpp:103
MailCommon::FilterActionWidget::~FilterActionWidget
~FilterActionWidget()
Destroys the filter action widget.
Definition: filteractionwidget.cpp:180
MAILCOMMON_EXPORT
#define MAILCOMMON_EXPORT
Definition: mailcommon_export.h:35
KHBox
QList
MailCommon::FilterActionWidget::removeWidget
void removeWidget(QWidget *)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:14 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

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