• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • Plasma
  • LineEdit
Signals | Public Member Functions | Protected Member Functions | Properties
Plasma::LineEdit Class Reference

#include <Plasma/Widgets/LineEdit>

Inheritance diagram for Plasma::LineEdit:
QGraphicsProxyWidget

List of all members.

Signals

void editingFinished ()
void focusChanged (bool focused)
void returnPressed ()
void textChanged (const QString &text)
void textEdited (const QString &text)

Public Member Functions

 LineEdit (QGraphicsWidget *parent=0)
 ~LineEdit ()
QString clickMessage () const
bool isClearButtonShown () const
KLineEdit * nativeWidget () const
void setClearButtonShown (bool show)
void setClickMessage (const QString &message)
void setNativeWidget (KLineEdit *nativeWidget)
void setStyleSheet (const QString &stylesheet)
void setText (const QString &text)
QString styleSheet ()
QString text () const

Protected Member Functions

void changeEvent (QEvent *event)
void focusInEvent (QFocusEvent *event)
void focusOutEvent (QFocusEvent *event)
void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
void mousePressEvent (QGraphicsSceneMouseEvent *event)
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)

Properties

bool clearButtonShown
QString clickMessage
KLineEdit nativeWidget
QGraphicsWidget parentWidget
QString styleSheet
QString text

Detailed Description

Provides a plasma-themed KLineEdit.

Definition at line 39 of file lineedit.h.


Constructor & Destructor Documentation

Plasma::LineEdit::LineEdit ( QGraphicsWidget *  parent = 0)
explicit

Definition at line 58 of file lineedit.cpp.

Plasma::LineEdit::~LineEdit ( )

Definition at line 76 of file lineedit.cpp.


Member Function Documentation

void Plasma::LineEdit::changeEvent ( QEvent *  event)
protected

Definition at line 168 of file lineedit.cpp.

QString Plasma::LineEdit::clickMessage ( ) const
Returns:
the text of a greyed out message that will go away when clicked
Since:
4.5
void Plasma::LineEdit::editingFinished ( )
signal
void Plasma::LineEdit::focusChanged ( bool  focused)
signal

Emitted when the widget receives or loses focus.

Since:
4.7
void Plasma::LineEdit::focusInEvent ( QFocusEvent *  event)
protected

Definition at line 190 of file lineedit.cpp.

void Plasma::LineEdit::focusOutEvent ( QFocusEvent *  event)
protected

Definition at line 201 of file lineedit.cpp.

void Plasma::LineEdit::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
protected

Definition at line 148 of file lineedit.cpp.

void Plasma::LineEdit::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protected

Definition at line 154 of file lineedit.cpp.

bool Plasma::LineEdit::isClearButtonShown ( ) const
Returns:
true if the clear button is set to be shown
Since:
4.3

Definition at line 97 of file lineedit.cpp.

void Plasma::LineEdit::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 174 of file lineedit.cpp.

KLineEdit* Plasma::LineEdit::nativeWidget ( ) const
Returns:
the native widget wrapped by this LineEdit
void Plasma::LineEdit::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
protected

Definition at line 160 of file lineedit.cpp.

void Plasma::LineEdit::returnPressed ( )
signal
void Plasma::LineEdit::setClearButtonShown ( bool  show)

Shows a button to clear the text.

Since:
4.3

Definition at line 92 of file lineedit.cpp.

void Plasma::LineEdit::setClickMessage ( const QString &  message)

Sets a greyed out message that will go away after the user clicked the line edit.

Parameters:
messagethe message
Since:
4.5

Definition at line 102 of file lineedit.cpp.

void Plasma::LineEdit::setNativeWidget ( KLineEdit *  nativeWidget)

Sets the line edit wrapped by this LineEdit (widget must inherit KLineEdit), ownership is transferred to the LineEdit.

Parameters:
nativeWidgetline edit that will be wrapped by this LineEdit
Since:
KDE4.4

Definition at line 122 of file lineedit.cpp.

void Plasma::LineEdit::setStyleSheet ( const QString &  stylesheet)

Sets the stylesheet used to control the visual display of this LineEdit.

Parameters:
stylesheeta CSS string

Definition at line 112 of file lineedit.cpp.

void Plasma::LineEdit::setText ( const QString &  text)

Sets the display text for this LineEdit.

Parameters:
textthe text to display; should be translated.

Definition at line 82 of file lineedit.cpp.

QString Plasma::LineEdit::styleSheet ( )
Returns:
the stylesheet currently used with this widget
QString Plasma::LineEdit::text ( ) const
Returns:
the display text
void Plasma::LineEdit::textChanged ( const QString &  text)
signal

Emitted when the text changes.

Since:
4.4
void Plasma::LineEdit::textEdited ( const QString &  text)
signal

Property Documentation

bool Plasma::LineEdit::clearButtonShown
readwrite

Definition at line 45 of file lineedit.h.

QString Plasma::LineEdit::clickMessage
readwrite

Definition at line 46 of file lineedit.h.

KLineEdit * Plasma::LineEdit::nativeWidget
readwrite

Definition at line 48 of file lineedit.h.

QGraphicsWidget Plasma::LineEdit::parentWidget
read

Definition at line 43 of file lineedit.h.

QString Plasma::LineEdit::styleSheet
readwrite

Definition at line 47 of file lineedit.h.

QString Plasma::LineEdit::text
readwrite

Definition at line 44 of file lineedit.h.


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-2013 The KDE developers.
Generated on Tue Jul 16 2013 11:45:01 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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