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

kalarm/lib

LineEdit Class Reference

#include <lineedit.h>

Inheritance diagram for LineEdit:

Inheritance graph
[legend]

List of all members.


Detailed Description

Line edit widget with extra drag and drop options.

The LineEdit class is a line edit widget which accepts specified types of drag and drop content.

The widget will always accept drag and drop of text, except text/calendar mime type, and of URLs. It will accept additional mime types depending on its configuration: Text type accepts email address lists. Email type accepts email address lists and VCard data (e.g. from KAddressBook).

The class also provides an option to prevent its contents being selected when the widget receives focus.

Author:
David Jarvie <software@astrojar.org.uk>

Definition at line 46 of file lineedit.h.


Public Types

enum  Type { Text, Url, Emails }

Public Slots

virtual void setText (const QString &str)

Public Member Functions

 LineEdit (QWidget *parent=0)
 LineEdit (Type type, QWidget *parent=0)
void setCursorAtEnd (bool end=true)
void setNoSelect ()

Protected Member Functions

virtual void dragEnterEvent (QDragEnterEvent *)
virtual void dropEvent (QDropEvent *)
virtual void focusInEvent (QFocusEvent *)

Member Enumeration Documentation

enum LineEdit::Type

Types of drag and drop content which will be accepted.

  • Text - the line edit contains general text. It accepts text, a URL or an email from KMail (the subject line is used). If multiple URLs or emails are dropped, only the first is used; the rest are ignored.
  • Url - the line edit contains a URL. It accepts text or a URL. If multiple URLs are dropped, only the first URL is used; the rest are ignored.
  • Emails - the line edit contains email addresses. It accepts text, mailto: URLs, emails from KMail (the From address is used) or vcard data (e.g. from KAddressBook). If multiple emails are dropped, only the first is used; the rest are ignored.
Enumerator:
Text 
Url 
Emails 

Definition at line 64 of file lineedit.h.


Constructor & Destructor Documentation

LineEdit::LineEdit ( Type  type,
QWidget *  parent = 0 
) [explicit]

Constructor.

Parameters:
type The content type for the line edit.
parent The parent object of this widget.

Definition at line 45 of file lineedit.cpp.

LineEdit::LineEdit ( QWidget *  parent = 0  )  [explicit]

Constructs a line edit whose content type is Text.

Parameters:
parent The parent object of this widget.

Definition at line 54 of file lineedit.cpp.


Member Function Documentation

void LineEdit::dragEnterEvent ( QDragEnterEvent *  e  )  [protected, virtual]

Definition at line 94 of file lineedit.cpp.

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

Definition at line 111 of file lineedit.cpp.

void LineEdit::focusInEvent ( QFocusEvent *  e  )  [protected, virtual]

Definition at line 81 of file lineedit.cpp.

void LineEdit::setCursorAtEnd ( bool  end = true  )  [inline]

Sets whether the cursor should be set at the beginning or end of the text when setText() is called.

Definition at line 79 of file lineedit.h.

void LineEdit::setNoSelect (  )  [inline]

Prevents the line edit's contents being selected when the widget receives focus.

Definition at line 75 of file lineedit.h.

void LineEdit::setText ( const QString &  str  )  [virtual, slot]

Sets the contents of the line edit to be str.

Definition at line 88 of file lineedit.cpp.


The documentation for this class was generated from the following files:
  • lineedit.h
  • lineedit.cpp

kalarm/lib

Skip menu "kalarm/lib"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal