33#include <QtGui/QLineEdit>
41class KLineEditPrivate;
152 friend class KLineEditStyle;
155#ifndef KDE_NO_DEPRECATED
156 Q_PROPERTY(
bool contextMenuEnabled READ isContextMenuEnabled WRITE setContextMenuEnabled )
158 Q_PROPERTY(
bool urlDropsEnabled READ urlDropsEnabled WRITE setUrlDropsEnabled )
159 Q_PROPERTY(
bool trapEnterKeyEvent READ trapReturnKey WRITE setTrapReturnKey )
160 Q_PROPERTY(
bool squeezedTextEnabled READ isSqueezedTextEnabled WRITE setSqueezedTextEnabled )
161 Q_PROPERTY( QString clickMessage READ clickMessage WRITE setClickMessage )
162 Q_PROPERTY(
bool showClearButton READ isClearButtonShown WRITE setClearButtonShown )
163 Q_PROPERTY(
bool passwordMode READ passwordMode WRITE setPasswordMode )
191 void setUrl(
const KUrl& url );
225#ifndef KDE_NO_DEPRECATED
226 virtual KDE_DEPRECATED
void setContextMenuEnabled(
bool showMenu );
233#ifndef KDE_NO_DEPRECATED
234 KDE_DEPRECATED
bool isContextMenuEnabled()
const;
244 void setUrlDropsEnabled(
bool enable );
249 bool urlDropsEnabled()
const;
261 void setTrapReturnKey(
bool trap );
269 bool trapReturnKey()
const;
284 virtual void setCompletionObject(
KCompletion *,
bool hsig =
true );
289 virtual void copy()
const;
301 void setSqueezedTextEnabled(
bool enable );
307 bool isSqueezedTextEnabled()
const;
316 QString originalText()
const;
324 QString userText()
const;
340 void setClickMessage(
const QString &msg );
345 QString clickMessage()
const;
352 void setClearButtonShown(
bool show);
357 bool isClearButtonShown()
const;
363 QSize clearButtonUsedSize()
const;
372 void doCompletion(
const QString& txt);
416#ifndef KDE_NO_DEPRECATED
464 virtual void setReadOnly(
bool);
481 virtual void setCompletedText(
const QString& );
491 void setCompletedItems(
const QStringList& items,
bool autoSuggest =
true );
497 virtual void clear();
503 void setSqueezedText(
const QString &text);
508 virtual void setText (
const QString& );
515 void setPasswordMode(
bool b =
true );
520 bool passwordMode( )
const;
529 virtual void makeCompletion(
const QString& );
536 void userCancelled(
const QString & cancelText);
543 virtual bool event( QEvent * );
550 virtual void resizeEvent( QResizeEvent * );
557 virtual void keyPressEvent( QKeyEvent * );
564 virtual void mousePressEvent( QMouseEvent * );
571 virtual void mouseReleaseEvent( QMouseEvent * );
578 virtual void mouseDoubleClickEvent( QMouseEvent * );
585 virtual void contextMenuEvent( QContextMenuEvent * );
592 QMenu* createStandardContextMenu();
599 virtual void dropEvent( QDropEvent * );
609 virtual void setCompletedText(
const QString& ,
bool );
616 void setUserSelection(
bool userSelection );
621 virtual void create( WId = 0,
bool initializeWindow =
true,
622 bool destroyOldWindow =
true );
627 bool autoSuggest()
const;
629 virtual void paintEvent( QPaintEvent *ev );
631 virtual void focusInEvent( QFocusEvent *ev );
633 virtual void focusOutEvent( QFocusEvent *ev );
636 void completionMenuActivated(
QAction *act );
637 void tripleClickTimeout();
638 void slotRestoreSelectionColors();
639 void _k_slotCompletionBoxTextChanged(
const QString& text );
644 void updateClearButtonIcon(
const QString&);
654 bool copySqueezedText(
bool clipboard )
const;
660 void setSqueezedText ();
665 void updateClearButton();
668 friend class KLineEditPrivate;
669 KLineEditPrivate *
const d;
671 Q_PRIVATE_SLOT( d,
void _k_slotSettingsChanged(
int category ) )
672 Q_PRIVATE_SLOT( d,
void _k_textChanged(
const QString&) )
An abstract base class for adding a completion feature into widgets.
KeyBindingType
Constants that represent the items whose short-cut key-binding is programmable.
A helper widget for "completion-widgets" (KLineEdit, KComboBox))
A generic class for completing QStrings.
Completion
This enum describes the completion mode used for by the KCompletion class.
An enhanced QLineEdit widget for inputting text.
QT_MOC_COMPAT void userTextChanged(const QString &)
Emitted when the text is changed NOT by the suggested autocompletion: either when the user is physica...
void aboutToShowContextMenu(QMenu *menu)
Emitted before the context menu is displayed.
void returnPressed(const QString &)
Emitted when the user presses the return key.
void textRotation(KCompletionBase::KeyBindingType)
Emitted when the text rotation key-bindings are pressed.
void completionBoxActivated(const QString &)
Emitted whenever the completion box is activated.
void completionModeChanged(KGlobalSettings::Completion)
Emitted when the user changed the completion mode by using the popupmenu.
void clearButtonClicked()
Emitted when the user clicked on the clear button.
void completion(const QString &)
Emitted when the completion key is pressed.
void substringCompletion(const QString &)
Emitted when the shortcut for substring completion is pressed.