kabc
#include <addresslineedit.h>
Inherits KLineEdit.
Public Slots | |
void | cursorAtEnd () |
void | enableCompletion (bool enable) |
Public Member Functions | |
AddressLineEdit (QWidget *parent, bool useCompletion=true) | |
virtual | ~AddressLineEdit () |
virtual void | setFont (const QFont &font) |
Protected Member Functions | |
void | addAddress (const QString &addr) |
void | doCompletion (bool) |
virtual void | dropEvent (QDropEvent *e) |
virtual void | insert (const QString &addr) |
virtual void | keyPressEvent (QKeyEvent *e) |
virtual void | loadAddresses () |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
virtual void | paste () |
Detailed Description
A lineedit with kabc completion.
This lineedit is supposed to be used wherever the user types email addresses and might want a completion. You can simply use it as a replacement for KLineEdit or QLineEdit.
You can enable or disable the lineedit at any time.
Definition at line 43 of file addresslineedit.h.
Constructor & Destructor Documentation
|
explicit |
Creates the line edit instance.
- Parameters
-
parent The QWidget parent useCompletion Whether to use address completion. See enableCompletion()
Definition at line 193 of file addresslineedit.cpp.
|
virtual |
Destroys the instance.
Definition at line 208 of file addresslineedit.cpp.
Member Function Documentation
|
protected |
Adds a new address to the line edit.
Adds the given string to the completion handler and additionally the email part if the string contains name + address in the angle bracket notation.
- Parameters
-
addr The address to add
Definition at line 482 of file addresslineedit.cpp.
|
slot |
Set cursor to end of line.
Definition at line 331 of file addresslineedit.cpp.
|
protected |
Triggers looking for a completion of the address or the last address if there are already more than one separated by '
,'.
Definition at line 343 of file addresslineedit.cpp.
|
protectedvirtual |
Handles drop events.
Creates a list of addresses separated by '
,' from a "URI List" drop. Enables smart paste for anything else before relaying the event to the base class. See insert() for information on smart paste.
- Parameters
-
e The drop event
- See also
- enableCompletion()
Definition at line 497 of file addresslineedit.cpp.
|
slot |
Toggle completion.
- Parameters
-
enable When true
address completion will be enabled, whenfalse
it will be disabled
Definition at line 337 of file addresslineedit.cpp.
|
protectedvirtual |
Inserts the given string.
If smart paste is enabled, the text will be parsed for possible email address parts, i.e. either a mailto: URI or "spam protected" like "developer at kde dot org"
- Parameters
-
addr The string to insert
Definition at line 259 of file addresslineedit.cpp.
|
protectedvirtual |
Handles KDE completion short cuts.
- Parameters
-
e The key event to check
- See also
- KStandardShortcut::SubstringCompletion
- KStandardShortcut::TextCompletion
Definition at line 224 of file addresslineedit.cpp.
|
protectedvirtual |
Always call AddressLineEdit::loadAddresses() as the first thing.
Use addAddress() to add addresses.
Definition at line 470 of file addresslineedit.cpp.
|
protectedvirtual |
Enables smart paste for X11 middle mouse text paste if completion is enabled.
See insert() for information about smart paste.
- Parameters
-
e The mouse release event
- See also
- enableCompletion()
Definition at line 247 of file addresslineedit.cpp.
|
protectedvirtual |
Pastes the clipboard content.
Enables smart paste if completion is enabled. See insert() for information on smart paste.
- See also
- enableCompletion()
Definition at line 320 of file addresslineedit.cpp.
|
virtual |
Reimplemented for internal reasons.
- Parameters
-
font The font to use
- See also
- KLineEdit::setFont()
Definition at line 215 of file addresslineedit.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.