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

kalarm/lib

Public Types | Public Slots | Public Member Functions | Protected Member Functions | List of all members
LineEdit Class Reference

#include <lineedit.h>

Inheritance diagram for LineEdit:
Inheritance graph
[legend]

Public Types

enum  Type { Text, Url, Emails }
 

Public Slots

virtual void setText (const QString &str)
 

Public Member Functions

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

Protected Member Functions

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

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 djarv.nosp@m.ie@k.nosp@m.de.or.nosp@m.g

Definition at line 46 of file lineedit.h.

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
typeThe content type for the line edit.
parentThe parent object of this widget.

Definition at line 49 of file lineedit.cpp.

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

Constructs a line edit whose content type is Text.

Parameters
parentThe parent object of this widget.

Definition at line 58 of file lineedit.cpp.

Member Function Documentation

void LineEdit::dragEnterEvent ( QDragEnterEvent *  e)
protectedvirtual

Definition at line 105 of file lineedit.cpp.

void LineEdit::dropEvent ( QDropEvent *  e)
protectedvirtual

Definition at line 126 of file lineedit.cpp.

void LineEdit::focusInEvent ( QFocusEvent *  e)
protectedvirtual

Definition at line 85 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 83 of file lineedit.h.

void LineEdit::setNoSelect ( )
inline

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

Definition at line 79 of file lineedit.h.

void LineEdit::setText ( const QString &  str)
virtualslot

Sets the contents of the line edit to be str.

Definition at line 99 of file lineedit.cpp.

QString LineEdit::text ( ) const

Return the entered text.

If the type is Url, tilde expansion is performed.

Definition at line 92 of file lineedit.cpp.


The documentation for this class was generated from the following files:
  • lineedit.h
  • lineedit.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kalarm/lib

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

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