• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 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 193 of file addresslineedit.cpp.

AddressLineEdit::~AddressLineEdit ( )
virtual

Destroys the instance.

Definition at line 208 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 482 of file addresslineedit.cpp.

void AddressLineEdit::cursorAtEnd ( )
slot

Set cursor to end of line.

Definition at line 331 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 343 of file addresslineedit.cpp.

void AddressLineEdit::dropEvent ( QDropEvent *  e)
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:
eThe drop event
See also:
enableCompletion()

Definition at line 497 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 337 of file addresslineedit.cpp.

void AddressLineEdit::insert ( const QString &  addr)
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:
addrThe string to insert

Definition at line 259 of file addresslineedit.cpp.

void AddressLineEdit::keyPressEvent ( QKeyEvent *  e)
protectedvirtual

Handles KDE completion short cuts.

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

Definition at line 224 of file addresslineedit.cpp.

void AddressLineEdit::loadAddresses ( )
protectedvirtual

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

Use addAddress() to add addresses.

Definition at line 470 of file addresslineedit.cpp.

void AddressLineEdit::mouseReleaseEvent ( QMouseEvent *  e)
protectedvirtual

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 247 of file addresslineedit.cpp.

void AddressLineEdit::paste ( )
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.

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

Reimplemented for internal reasons.

Parameters:
fontThe 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:
  • addresslineedit.h
  • addresslineedit.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 15:07:04 by doxygen 1.8.1.1 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.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • 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