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

libkdepim

  • sources
  • kde-4.14
  • kdepim
  • libkdepim
  • addressline
  • addresslineedit
addresseelineedit.h
Go to the documentation of this file.
1 /*
2  This file is part of libkdepim.
3 
4  Copyright (c) 2002 Helge Deller <deller@gmx.de>
5  Copyright (c) 2002 Lubos Lunak <llunak@suse.cz>
6  Copyright (c) 2001,2003 Carsten Pfeiffer <pfeiffer@kde.org>
7  Copyright (c) 2001 Waldo Bastian <bastian@kde.org>
8  Copyright (c) 2004 Daniel Molkentin <danimo@klaralvdalens-datakonsult.se>
9  Copyright (c) 2004 Karl-Heinz Zimmer <khz@klaralvdalens-datakonsult.se>
10 
11  This library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU Library General Public
13  License as published by the Free Software Foundation; either
14  version 2 of the License, or (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Library General Public License for more details.
20 
21  You should have received a copy of the GNU Library General Public License
22  along with this library; see the file COPYING.LIB. If not, write to
23  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24  Boston, MA 02110-1301, USA.
25 */
26 
27 #ifndef KDEPIM_ADDRESSEELINEEDIT_H
28 #define KDEPIM_ADDRESSEELINEEDIT_H
29 
30 #include "kdepim_export.h"
31 
32 #include "ldap/ldapclient.h"
33 
34 #include <KLineEdit>
35 
36 class QDropEvent;
37 class QEvent;
38 class QKeyEvent;
39 class QMenu;
40 class QMouseEvent;
41 class QObject;
42 
43 namespace Akonadi {
44 class Item;
45 }
46 
47 namespace KABC {
48 class Addressee;
49 class ContactGroup;
50 }
51 
52 namespace KPIM {
53 
54 class AddresseeLineEditPrivate;
55 class KDEPIM_EXPORT AddresseeLineEdit : public KLineEdit
56 {
57  Q_OBJECT
58 
59 public:
66  explicit AddresseeLineEdit( QWidget *parent, bool enableCompletion = true );
67 
71  virtual ~AddresseeLineEdit();
72 
76  void allowSemicolonAsSeparator( bool allow );
77 
81  void setFont( const QFont &font );
82 
83  void setEnableBalooSearch(bool enable);
84 
85  bool isCompletionEnabled() const;
86 Q_SIGNALS:
87  void textCompleted();
88 
89 public Q_SLOTS:
93  void cursorAtEnd();
94 
98  void enableCompletion( bool enable );
99 
104  virtual void setText( const QString &text );
105 
106 public:
113  void addContact( const KABC::Addressee &contact, int weight, int source = -1, QString append = QString() );
114 
118  void addContactGroup( const KABC::ContactGroup &group, int weight, int source = -1 );
119 
120  void addItem( const Akonadi::Item &item, int weight, int source = -1 );
121 
129  int addCompletionSource( const QString &name, int weight );
130 
131  void removeCompletionSource(const QString &source);
132  void emitTextCompleted();
133 
134  void callUserCancelled( const QString &str );
135  void callSetCompletedText(const QString& /*text*/, bool /*marked*/);
136  void callSetCompletedText(const QString& text);
137  void callSetUserSelection(bool);
138 protected:
147  virtual void insert( const QString & );
148 
152  virtual void paste();
153 
157  virtual void mouseReleaseEvent( QMouseEvent * );
158 
159 #ifndef QT_NO_DRAGANDDROP
160 
163  virtual void dropEvent( QDropEvent * );
164 #endif
165 
169  virtual void keyPressEvent( QKeyEvent * );
170 
171 #ifndef QT_NO_CONTEXTMENU
172 
175  virtual QMenu *createStandardContextMenu();
176 
182  virtual void contextMenuEvent( QContextMenuEvent * );
183 #endif
184 
185  QStringList cleanupEmailList(const QStringList &inputList);
186  virtual void configureCompletionOrder(QMenu *menu);
187 private:
188  virtual bool eventFilter( QObject *, QEvent * );
189 
190  AddresseeLineEditPrivate* const d;
191 };
192 
193 }
194 
195 #endif
kdepim_export.h
QEvent
QWidget
QFont
QMouseEvent
ldapclient.h
KPIM::AddresseeLineEditPrivate
Definition: addresseelineedit_p.h:33
KPIM::AddresseeLineEdit
Definition: addresseelineedit.h:55
QContextMenuEvent
QObject
QDropEvent
QString
QStringList
QMenu
QKeyEvent
KLineEdit
KDEPIM_EXPORT
#define KDEPIM_EXPORT
Definition: kdepim_export.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdepim

Skip menu "libkdepim"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules

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