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

libkdepim

  • sources
  • kde-4.12
  • kdepim
  • libkdepim
  • addressline
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 Nepomuk2 {
53  namespace Query {
54  class Result;
55  }
56 }
57 
58 namespace KPIM {
59 
60 
61 class KDEPIM_EXPORT AddresseeLineEdit : public KLineEdit
62 {
63  Q_OBJECT
64 
65  public:
72  explicit AddresseeLineEdit( QWidget *parent, bool enableCompletion = true );
73 
77  virtual ~AddresseeLineEdit();
78 
82  void allowSemicolonAsSeparator( bool allow );
83 
87  void setFont( const QFont &font );
88  Q_SIGNALS:
89  void textCompleted();
90 
91  public Q_SLOTS:
95  void cursorAtEnd();
96 
100  void enableCompletion( bool enable );
101 
106  virtual void setText( const QString &text );
107 
108  protected:
112  void addContact( const KABC::Addressee &contact, int weight, int source = -1 );
113 
117  void addContactGroup( const KABC::ContactGroup &group, int weight, int source = -1 );
118 
119  void addItem( const Akonadi::Item &item, int weight, int source = -1 );
120 
128  int addCompletionSource( const QString &name, int weight );
129 
130  void removeCompletionSource(const QString &source);
131 
140  virtual void insert( const QString & );
141 
145  virtual void paste();
146 
150  virtual void mouseReleaseEvent( QMouseEvent * );
151 
152 #ifndef QT_NO_DRAGANDDROP
153 
156  virtual void dropEvent( QDropEvent * );
157 #endif
158 
162  virtual void keyPressEvent( QKeyEvent * );
163 
164 #ifndef QT_NO_CONTEXTMENU
165 
168  virtual QMenu *createStandardContextMenu();
169 
175  virtual void contextMenuEvent( QContextMenuEvent * );
176 #endif
177 
178  private:
179  virtual bool eventFilter( QObject *, QEvent * );
180  void emitTextCompleted();
181 
182  //@cond PRIVATE
183  class Private;
184  Private *const d;
185 
186  Q_PRIVATE_SLOT( d, void slotCompletion() )
187  Q_PRIVATE_SLOT( d, void slotPopupCompletion( const QString & ) )
188  Q_PRIVATE_SLOT( d, void slotReturnPressed( const QString & ) )
189  Q_PRIVATE_SLOT( d, void slotStartLDAPLookup() )
190  Q_PRIVATE_SLOT( d, void slotLDAPSearchData( const KLDAP::LdapResult::List & ) )
191  Q_PRIVATE_SLOT( d, void slotEditCompletionOrder() )
192  Q_PRIVATE_SLOT( d, void slotUserCancelled( const QString & ) )
193  Q_PRIVATE_SLOT( d, void slotAkonadiSearchResult( KJob * ) )
194  Q_PRIVATE_SLOT( d, void slotAkonadiSearchDbResult( KJob * ) )
195  Q_PRIVATE_SLOT( d, void slotAkonadiCollectionsReceived( const Akonadi::Collection::List & ) )
196  Q_PRIVATE_SLOT( d, void slotNepomukHits( const QList<Nepomuk2::Query::Result>& ) )
197  Q_PRIVATE_SLOT( d, void slotNepomukSearchFinished() )
198  Q_PRIVATE_SLOT( d, void slotTriggerDelayedQueries() )
199  //@endcond
200 };
201 
202 }
203 
204 #endif
kdepim_export.h
QWidget
QObject
ldapclient.h
KPIM::AddresseeLineEdit
Definition: addresseelineedit.h:61
QMenu
KLineEdit
KJob
KDEPIM_EXPORT
#define KDEPIM_EXPORT
Definition: kdepim_export.h:35
QList
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:03 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

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