• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.8.3 API Reference
  • KDE Home
  • Contact Us
 

kabc

  • KABC
  • AddressLineEdit
Public Slots | Public Member Functions | Protected Member Functions
KABC::AddressLineEdit Class Reference

#include <addresslineedit.h>

Inherits KLineEdit.

List of all members.

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.

See also:
AddressLineEdit::enableCompletion()

Definition at line 43 of file addresslineedit.h.


Constructor & Destructor Documentation

AddressLineEdit::AddressLineEdit ( QWidget *  parent,
bool  useCompletion = true 
) [explicit]

Creates the line edit instance.

Parameters:
parentThe QWidget parent
useCompletionWhether to use address completion. See enableCompletion()

Definition at line 191 of file addresslineedit.cpp.

AddressLineEdit::~AddressLineEdit ( ) [virtual]

Destroys the instance.

Definition at line 206 of file addresslineedit.cpp.


Member Function Documentation

void AddressLineEdit::addAddress ( const QString &  addr) [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:
addrThe address to add

Definition at line 479 of file addresslineedit.cpp.

void AddressLineEdit::cursorAtEnd ( ) [slot]

Set cursor to end of line.

Definition at line 329 of file addresslineedit.cpp.

void AddressLineEdit::doCompletion ( bool  ctrlT) [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 341 of file addresslineedit.cpp.

void AddressLineEdit::dropEvent ( QDropEvent *  e) [protected, virtual]

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:
eThe drop event
See also:
enableCompletion()

Definition at line 494 of file addresslineedit.cpp.

void AddressLineEdit::enableCompletion ( bool  enable) [slot]

Toggle completion.

Parameters:
enableWhen true address completion will be enabled, when false it will be disabled

Definition at line 335 of file addresslineedit.cpp.

void AddressLineEdit::insert ( const QString &  addr) [protected, virtual]

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:
addrThe string to insert

Definition at line 257 of file addresslineedit.cpp.

void AddressLineEdit::keyPressEvent ( QKeyEvent *  e) [protected, virtual]

Handles KDE completion short cuts.

Parameters:
eThe key event to check
See also:
KStandardShortcut::SubstringCompletion
KStandardShortcut::TextCompletion

Definition at line 222 of file addresslineedit.cpp.

void AddressLineEdit::loadAddresses ( ) [protected, virtual]

Always call AddressLineEdit::loadAddresses() as the first thing.

Use addAddress() to add addresses.

Definition at line 468 of file addresslineedit.cpp.

void AddressLineEdit::mouseReleaseEvent ( QMouseEvent *  e) [protected, virtual]

Enables smart paste for X11 middle mouse text paste if completion is enabled.

See insert() for information about smart paste.

Parameters:
eThe mouse release event
See also:
enableCompletion()

Definition at line 245 of file addresslineedit.cpp.

void AddressLineEdit::paste ( ) [protected, virtual]

Pastes the clipboard content.

Enables smart paste if completion is enabled. See insert() for information on smart paste.

See also:
enableCompletion()

Definition at line 318 of file addresslineedit.cpp.

void AddressLineEdit::setFont ( const QFont &  font) [virtual]

Reimplemented for internal reasons.

Parameters:
fontThe font to use
See also:
KLineEdit::setFont()

Definition at line 213 of file addresslineedit.cpp.


The documentation for this class was generated from the following files:
  • addresslineedit.h
  • addresslineedit.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue May 8 2012 00:05:48 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kabc

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

kdepimlibs-4.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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