kalarm/lib

#include <lineedit.h>

Inherits KLineEdit.

Public Types

enum  Type { Text , Url , Emails }
 

Public Slots

virtual void setText (const TQString &str)
 

Public Member Functions

 LineEdit (Type type, TQWidget *parent=0, const char *name=0)
 
 LineEdit (TQWidget *parent=0, const char *name=0)
 
void setNoSelect ()
 
void setCursorAtEnd (bool end=true)
 

Protected Member Functions

virtual void focusInEvent (TQFocusEvent *)
 
virtual void dragEnterEvent (TQDragEnterEvent *)
 
virtual void dropEvent (TQDropEvent *)
 

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 softw.nosp@m.are@.nosp@m.astro.nosp@m.jar..nosp@m.org.u.nosp@m.k

Definition at line 43 of file lineedit.h.

Member Enumeration Documentation

◆ 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.

Definition at line 62 of file lineedit.h.

Constructor & Destructor Documentation

◆ LineEdit() [1/2]

LineEdit::LineEdit ( Type  type,
TQWidget *  parent = 0,
const char *  name = 0 
)
explicit

Constructor.

Parameters
typeThe content type for the line edit.
parentThe parent object of this widget.
nameThe name of this widget.

Definition at line 42 of file lineedit.cpp.

◆ LineEdit() [2/2]

LineEdit::LineEdit ( TQWidget *  parent = 0,
const char *  name = 0 
)
explicit

Constructs a line edit whose content type is Text.

Parameters
parentThe parent object of this widget.
nameThe name of this widget.

Definition at line 51 of file lineedit.cpp.

Member Function Documentation

◆ setCursorAtEnd()

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.

◆ setNoSelect()

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.

◆ setText

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

Sets the contents of the line edit to be str.

Definition at line 90 of file lineedit.cpp.


The documentation for this class was generated from the following files: