kalarm/lib
#include <lineedit.h>
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.
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
Constructor.
- Parameters
-
type The content type for the line edit. parent The parent object of this widget.
Definition at line 49 of file lineedit.cpp.
|
explicit |
Constructs a line edit whose content type is Text.
- Parameters
-
parent The parent object of this widget.
Definition at line 58 of file lineedit.cpp.
Member Function Documentation
|
protectedvirtual |
Definition at line 105 of file lineedit.cpp.
|
protectedvirtual |
Definition at line 126 of file lineedit.cpp.
|
protectedvirtual |
Definition at line 85 of file lineedit.cpp.
|
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.
|
inline |
Prevents the line edit's contents being selected when the widget receives focus.
Definition at line 79 of file lineedit.h.
|
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:
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.