28 #include <tqclipboard.h>
29 #include <tqpainter.h>
32 #include <tdeconfig.h>
33 #include <tqtooltip.h>
36 #include <tdestdaccel.h>
37 #include <tdepopupmenu.h>
39 #include <tdecompletionbox.h>
42 #include <kiconloader.h>
43 #include <tdeapplication.h>
45 #include "klineedit.h"
46 #include "klineedit.moc"
49 class KLineEdit::KLineEditPrivate
55 handleURLDrops =
true;
56 grabReturnKeyEvents =
false;
60 disableRestoreSelection =
false;
61 enableSqueezedText =
false;
66 backspacePerformsCompletion = config.readBoolEntry(
"Backspace performs completion",
false );
79 static bool initialized;
80 static bool backspacePerformsCompletion;
82 TQColor previousHighlightColor;
83 TQColor previousHighlightedTextColor;
85 bool userSelection: 1;
87 bool disableRestoreSelection: 1;
88 bool handleURLDrops:1;
89 bool grabReturnKeyEvents:1;
90 bool enableSqueezedText:1;
94 BackgroundMode bgMode;
95 TQString squeezedText;
102 bool KLineEdit::KLineEditPrivate::backspacePerformsCompletion =
false;
103 bool KLineEdit::KLineEditPrivate::initialized =
false;
107 :TQLineEdit( string, parent, name )
113 :TQLineEdit( parent, name )
124 void KLineEdit::init()
126 d =
new KLineEditPrivate;
127 possibleTripleClick =
false;
128 d->bgMode = backgroundMode ();
133 installEventFilter(
this );
139 connect(
this, TQ_SIGNAL(selectionChanged()),
this, TQ_SLOT(slotRestoreSelectionColors()));
141 TQPalette p = palette();
142 if ( !d->previousHighlightedTextColor.isValid() )
143 d->previousHighlightedTextColor=p.color(TQPalette::Active,TQColorGroup::HighlightedText);
144 if ( !d->previousHighlightColor.isValid() )
145 d->previousHighlightColor=p.color(TQPalette::Active,TQColorGroup::Highlight);
147 d->drawClickMsg =
false;
156 d->completionBox && d->completionBox->isVisible() )
157 d->completionBox->hide();
161 if ( echoMode() != TQLineEdit::Normal )
164 if ( kapp && !kapp->authorize(
"lineedit_text_completion") )
170 d->autoSuggest =
true;
172 d->autoSuggest =
false;
179 if ( !d->autoSuggest )
182 TQString txt = text();
186 int start = marked ? txt.length() : t.length();
187 validateAndSet( t, cursorPosition(), start, t.length() );
220 if ( input.isNull() || input == displayText() )
239 if ( match.isNull() )
241 if ( d->completionBox )
243 d->completionBox->hide();
244 d->completionBox->clear();
254 if ( match.isNull() || match == text )
260 if ( d->autoSuggest )
268 if (readOnly == isReadOnly ())
271 TQLineEdit::setReadOnly (readOnly);
275 d->bgMode = backgroundMode ();
276 setBackgroundMode (TQt::PaletteBackground);
277 if (d->enableSqueezedText && d->squeezedText.isEmpty())
279 d->squeezedText = text();
285 if (!d->squeezedText.isEmpty())
288 d->squeezedText = TQString::null;
290 setBackgroundMode (d->bgMode);
302 d->enableSqueezedText = enable;
307 return d->enableSqueezedText;
312 d->drawClickMsg = text.isEmpty() && !d->clickMessage.isEmpty();
315 if( d->enableSqueezedText && isReadOnly() )
317 d->squeezedText = text;
322 TQLineEdit::setText( text );
325 void KLineEdit::setSqueezedText()
327 d->squeezedStart = 0;
329 TQString fullText = d->squeezedText;
330 TQFontMetrics fm(fontMetrics());
331 int labelWidth = size().width() - 2*frameWidth() - 2;
332 int textWidth = fm.width(fullText);
334 if (textWidth > labelWidth)
337 TQString squeezedText =
"...";
338 int squeezedWidth = fm.width(squeezedText);
341 int letters = fullText.length() * (labelWidth - squeezedWidth) / textWidth / 2;
342 squeezedText = fullText.left(letters) +
"..." + fullText.right(letters);
343 squeezedWidth = fm.width(squeezedText);
345 if (squeezedWidth < labelWidth)
352 squeezedText = fullText.left(letters) +
"..." + fullText.right(letters);
353 squeezedWidth = fm.width(squeezedText);
354 }
while (squeezedWidth < labelWidth);
356 squeezedText = fullText.left(letters) +
"..." + fullText.right(letters);
358 else if (squeezedWidth > labelWidth)
365 squeezedText = fullText.left(letters) +
"..." + fullText.right(letters);
366 squeezedWidth = fm.width(squeezedText);
367 }
while (squeezedWidth > labelWidth);
373 TQLineEdit::setText(fullText);
377 TQLineEdit::setText(squeezedText);
378 d->squeezedStart = letters;
379 d->squeezedEnd = fullText.length() - letters;
382 TQToolTip::remove(
this );
383 TQToolTip::add(
this, fullText );
388 TQLineEdit::setText(fullText);
390 TQToolTip::remove(
this );
394 setCursorPosition(0);
399 if( !copySqueezedText(
true))
403 bool KLineEdit::copySqueezedText(
bool clipboard)
const
405 if (!d->squeezedText.isEmpty() && d->squeezedStart)
409 if (!that->getSelection(&start, &end))
411 if (start >= d->squeezedStart+3)
412 start = start - 3 - d->squeezedStart + d->squeezedEnd;
413 else if (start > d->squeezedStart)
414 start = d->squeezedStart;
415 if (end >= d->squeezedStart+3)
416 end = end - 3 - d->squeezedStart + d->squeezedEnd;
417 else if (end > d->squeezedStart)
418 end = d->squeezedEnd;
421 TQString t = d->squeezedText;
422 t = t.mid(start, end - start);
423 disconnect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()),
this, 0);
424 TQApplication::clipboard()->setText( t, clipboard ? TQClipboard::Clipboard : TQClipboard::Selection );
425 connect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()),
this,
426 TQ_SLOT(clipboardChanged()) );
434 if (!d->squeezedText.isEmpty())
437 TQLineEdit::resizeEvent(ev);
456 TQString text = TQApplication::clipboard()->text( TQClipboard::Selection);
479 cursorWordBackward(
true);
480 if ( hasSelectedText() )
489 cursorWordForward(
true);
490 if ( hasSelectedText() )
498 cursorWordBackward(
false);
504 cursorWordForward(
false);
524 if ( echoMode() == TQLineEdit::Normal &&
529 bool noModifier = (e->state() == TQt::NoButton ||
530 e->state() == TQt::ShiftButton ||
531 e->state() == TQt::Keypad);
537 if ( !d->userSelection && hasSelectedText() &&
538 ( e->key() == Key_Right || e->key() == Key_Left ) &&
539 e->state()== TQt::NoButton )
541 TQString old_txt = text();
542 d->disableRestoreSelection =
true;
544 getSelection(&start, &end);
547 TQLineEdit::keyPressEvent ( e );
548 int cPosition=cursorPosition();
549 if (e->key() ==Key_Right && cPosition > start )
550 validateAndSet(old_txt, cPosition, cPosition, old_txt.length());
552 validateAndSet(old_txt, cPosition, start, old_txt.length());
554 d->disableRestoreSelection =
false;
558 if ( e->key() == Key_Escape )
560 if (hasSelectedText() && !d->userSelection )
577 TQString keycode = e->text();
578 if ( !keycode.isEmpty() && (keycode.unicode()->isPrint() ||
579 e->key() == Key_Backspace || e->key() == Key_Delete ) )
581 bool hasUserSelection=d->userSelection;
582 bool hadSelection=hasSelectedText();
584 bool cursorNotAtEnd=
false;
587 getSelection(&start, &end);
588 int cPos = cursorPosition();
594 if ( hadSelection && !hasUserSelection && start>cPos )
597 setCursorPosition(cPos);
601 d->disableRestoreSelection =
true;
602 TQLineEdit::keyPressEvent ( e );
603 d->disableRestoreSelection =
false;
605 TQString txt = text();
606 int len = txt.length();
607 if ( !hasSelectedText() && len )
609 if ( e->key() == Key_Backspace )
611 if ( hadSelection && !hasUserSelection && !cursorNotAtEnd )
618 if ( !d->backspacePerformsCompletion || !len )
619 d->autoSuggest =
false;
622 if (e->key() == Key_Delete )
623 d->autoSuggest=
false;
631 if( (e->key() == Key_Backspace || e->key() == Key_Delete) )
644 noModifier && !e->text().isEmpty() )
646 TQString old_txt = text();
647 bool hasUserSelection=d->userSelection;
648 bool hadSelection=hasSelectedText();
649 bool cursorNotAtEnd=
false;
652 getSelection(&start, &end);
653 int cPos = cursorPosition();
654 TQString keycode = e->text();
660 if (hadSelection && !hasUserSelection && start>cPos &&
661 ( (!keycode.isEmpty() && keycode.unicode()->isPrint()) ||
662 e->key() == Key_Backspace || e->key() == Key_Delete ) )
665 setCursorPosition(cPos);
669 uint selectedLength=selectedText().length();
671 d->disableRestoreSelection =
true;
672 TQLineEdit::keyPressEvent ( e );
673 d->disableRestoreSelection =
false;
675 if (( selectedLength != selectedText().length() ) && !hasUserSelection )
676 slotRestoreSelectionColors();
678 TQString txt = text();
679 int len = txt.length();
681 if ( txt != old_txt && len &&
682 ( (!keycode.isEmpty() && keycode.unicode()->isPrint()) ||
683 e->key() == Key_Backspace || e->key() == Key_Delete) )
685 if ( e->key() == Key_Backspace )
687 if ( hadSelection && !hasUserSelection && !cursorNotAtEnd )
694 if ( !d->backspacePerformsCompletion )
695 d->autoSuggest =
false;
698 if (e->key() == Key_Delete )
699 d->autoSuggest=
false;
701 if ( d->completionBox )
702 d->completionBox->setCancelledText( txt );
711 if ( (e->key() == Key_Backspace || e->key() == Key_Delete ) &&
717 else if (!len && d->completionBox && d->completionBox->isVisible())
718 d->completionBox->hide();
736 TQString txt = text();
737 int len = txt.length();
738 if ( cursorPosition() == len && len != 0 )
747 else if ( d->completionBox )
748 d->completionBox->hide();
809 uint selectedLength = selectedText().length();
812 TQLineEdit::keyPressEvent ( e );
814 if ( selectedLength != selectedText().length() )
815 slotRestoreSelectionColors();
820 if ( e->button() == TQt::LeftButton )
822 possibleTripleClick=
true;
823 TQTimer::singleShot( TQApplication::doubleClickInterval(),
this,
824 TQ_SLOT(tripleClickTimeout()) );
826 TQLineEdit::mouseDoubleClickEvent( e );
831 if ( possibleTripleClick && e->button() == TQt::LeftButton )
837 TQLineEdit::mousePressEvent( e );
842 TQLineEdit::mouseReleaseEvent( e );
843 if (TQApplication::clipboard()->supportsSelection() ) {
844 if ( e->button() == TQt::LeftButton ) {
846 copySqueezedText(
false );
851 void KLineEdit::tripleClickTimeout()
853 possibleTripleClick=
false;
859 TQLineEdit::contextMenuEvent( e );
864 enum { IdUndo, IdRedo, IdSep1, IdCut, IdCopy, IdPaste, IdClear, IdSep2, IdSelectAll };
866 TQPopupMenu *popup = TQLineEdit::createPopupMenu();
868 int id = popup->idAt(0);
869 popup->changeItem(
id - IdUndo, SmallIconSet(
"edit-undo"), popup->text(
id - IdUndo) );
870 popup->changeItem(
id - IdRedo, SmallIconSet(
"edit-redo"), popup->text(
id - IdRedo) );
871 popup->changeItem(
id - IdCut, SmallIconSet(
"edit-cut"), popup->text(
id - IdCut) );
872 popup->changeItem(
id - IdCopy, SmallIconSet(
"edit-copy"), popup->text(
id - IdCopy) );
873 popup->changeItem(
id - IdPaste, SmallIconSet(
"edit-paste"), popup->text(
id - IdPaste) );
874 popup->changeItem(
id - IdClear, SmallIconSet(
"edit-clear"), popup->text(
id - IdClear) );
879 if (
compObj() && !isReadOnly() && kapp->authorize(
"lineedit_text_completion") )
881 TQPopupMenu *subMenu =
new TQPopupMenu( popup );
882 connect( subMenu, TQ_SIGNAL( activated(
int ) ),
883 this, TQ_SLOT( completionMenuActivated(
int ) ) );
885 popup->insertSeparator();
886 popup->insertItem( SmallIconSet(
"completion"), i18n(
"Text Completion"),
889 subMenu->insertItem( i18n(
"None"), NoCompletion );
890 subMenu->insertItem( i18n(
"Manual"), ShellCompletion );
891 subMenu->insertItem( i18n(
"Automatic"), AutoCompletion );
892 subMenu->insertItem( i18n(
"Dropdown List"), PopupCompletion );
893 subMenu->insertItem( i18n(
"Short Automatic"), ShortAutoCompletion );
894 subMenu->insertItem( i18n(
"Dropdown List && Automatic"), PopupAutoCompletion );
899 subMenu->setItemChecked( NoCompletion,
901 subMenu->setItemChecked( ShellCompletion,
903 subMenu->setItemChecked( PopupCompletion,
905 subMenu->setItemChecked( AutoCompletion,
907 subMenu->setItemChecked( ShortAutoCompletion,
909 subMenu->setItemChecked( PopupAutoCompletion,
913 subMenu->insertSeparator();
914 subMenu->insertItem( i18n(
"Default"), Default );
926 void KLineEdit::completionMenuActivated(
int id )
941 case ShortAutoCompletion:
944 case ShellCompletion:
947 case PopupCompletion:
950 case PopupAutoCompletion:
961 d->completionBox && d->completionBox->isVisible() )
962 d->completionBox->hide();
969 TQLineEdit::drawContents( p );
971 if ( d->drawClickMsg && !hasFocus() ) {
972 TQPen tmp = p->pen();
973 p->setPen( palette().color( TQPalette::Disabled, TQColorGroup::Text ) );
974 TQRect cr = contentsRect();
978 p->drawText( cr, AlignAuto | AlignVCenter, d->clickMessage );
985 d->drawClickMsg =
false;
989 TQString dropText = text();
990 KURL::List::ConstIterator it;
991 for( it = urlList.begin() ; it != urlList.end() ; ++it )
993 if(!dropText.isEmpty())
996 dropText += (*it).prettyURL();
999 validateAndSet( dropText, dropText.length(), 0, 0);
1004 TQLineEdit::dropEvent(e);
1012 if ( ev->type() == TQEvent::AccelOverride )
1014 TQKeyEvent *e =
static_cast<TQKeyEvent*
>( ev );
1015 if (overrideAccel (e))
1021 else if( ev->type() == TQEvent::KeyPress )
1023 TQKeyEvent *e =
static_cast<TQKeyEvent*
>( ev );
1025 if( e->key() == TQt::Key_Return || e->key() == TQt::Key_Enter )
1027 bool trap = d->completionBox && d->completionBox->isVisible();
1029 bool stopEvent = trap || (d->grabReturnKeyEvents &&
1030 (e->state() == TQt::NoButton ||
1031 e->state() == TQt::Keypad));
1036 emit TQLineEdit::returnPressed();
1044 d->completionBox->hide();
1046 setCursorPosition(text().length());
1054 return TQLineEdit::eventFilter( o, ev );
1060 d->handleURLDrops=enable;
1065 return d->handleURLDrops;
1070 d->grabReturnKeyEvents = grab;
1075 return d->grabReturnKeyEvents;
1085 if ( d->completionBox )
1088 d->completionBox = box;
1091 connect( d->completionBox, TQ_SIGNAL(highlighted(
const TQString& )),
1092 TQ_SLOT(setTextWorkaround(
const TQString& )) );
1093 connect( d->completionBox, TQ_SIGNAL(
userCancelled(
const TQString& )),
1095 connect( d->completionBox, TQ_SIGNAL( activated(
const TQString& )),
1107 else if (hasSelectedText() )
1109 if (d->userSelection)
1113 d->autoSuggest=
false;
1115 getSelection(&start, &end);
1116 TQString s=text().remove(start, end-start+1);
1117 validateAndSet(s,start,s.length(),s.length());
1118 d->autoSuggest=
true;
1123 bool KLineEdit::overrideAccel (
const TQKeyEvent* e)
1178 if (d->completionBox && d->completionBox->isVisible ())
1181 ButtonState state = e->state();
1182 if ((key == Key_Backtab || key == Key_Tab) &&
1183 (state == TQt::NoButton || (state & TQt::ShiftButton)))
1201 if ( d->completionBox && d->completionBox->isVisible() ) {
1209 if ( !items.isEmpty() &&
1210 !(items.count() == 1 && txt == items.first()) )
1215 if ( d->completionBox->isVisible() )
1217 bool wasSelected = d->completionBox->isSelected( d->completionBox->currentItem() );
1218 const TQString currentSelection = d->completionBox->currentText();
1219 d->completionBox->setItems( items );
1220 TQListBoxItem* item = d->completionBox->findItem( currentSelection, TQt::ExactMatch );
1224 if( !item || !wasSelected )
1226 wasSelected =
false;
1227 item = d->completionBox->item( 0 );
1231 d->completionBox->blockSignals(
true );
1232 d->completionBox->setCurrentItem( item );
1233 d->completionBox->setSelected( item, wasSelected );
1234 d->completionBox->blockSignals(
false );
1239 if ( !txt.isEmpty() )
1240 d->completionBox->setCancelledText( txt );
1241 d->completionBox->setItems( items );
1242 d->completionBox->popup();
1247 int index = items.first().find( txt );
1248 TQString newText = items.first().mid( index );
1255 if ( d->completionBox && d->completionBox->isVisible() )
1256 d->completionBox->hide();
1262 if (
create && !d->completionBox ) {
1264 d->completionBox->setFont(font());
1267 return d->completionBox;
1274 disconnect( oldComp, TQ_SIGNAL( matches(
const TQStringList& )),
1278 connect( comp, TQ_SIGNAL( matches(
const TQStringList& )),
1287 TQLineEdit::create(
id, initializeWindow, destroyOldWindow );
1293 TQPalette p = palette();
1297 p.setColor(TQColorGroup::Highlight, d->previousHighlightColor);
1298 p.setColor(TQColorGroup::HighlightedText, d->previousHighlightedTextColor);
1302 TQColor color=p.color(TQPalette::Disabled, TQColorGroup::Text);
1303 p.setColor(TQColorGroup::HighlightedText, color);
1304 color=p.color(TQPalette::Active, TQColorGroup::Base);
1305 p.setColor(TQColorGroup::Highlight, color);
1308 d->userSelection=userSelection;
1312 void KLineEdit::slotRestoreSelectionColors()
1314 if (d->disableRestoreSelection)
1325 void KLineEdit::setTextWorkaround(
const TQString& text )
1333 if ( d->enableSqueezedText && isReadOnly() )
1334 return d->squeezedText;
1341 if ( d->drawClickMsg ) {
1342 d->drawClickMsg =
false;
1347 if ( ev->reason() == TQFocusEvent::Tab && inputMask().isNull() && hasSelectedText() )
1350 TQLineEdit::focusInEvent(ev);
1355 if ( text().isEmpty() && !d->clickMessage.isEmpty() ) {
1356 d->drawClickMsg =
true;
1359 TQLineEdit::focusOutEvent( ev );
1364 return d->autoSuggest;
1369 d->clickMessage = msg;
1375 return d->clickMessage;
1379 void KLineEdit::virtual_hook(
int id,
void* data )
1380 { TDECompletionBase::virtual_hook(
id, data ); }
static void setAutoHideCursor(TQWidget *w, bool enable)
Sets auto-hiding the cursor for widget w.
static void autoHideEventFilter(TQObject *, TQEvent *)
KCursor has to install an eventFilter over the widget you want to auto-hide.
An enhanced TQLineEdit widget for inputting text.
virtual void setCompletedText(const TQString &)
See TDECompletionBase::setCompletedText.
bool trapReturnKey() const
virtual ~KLineEdit()
Destructor.
virtual TQPopupMenu * createPopupMenu()
Re-implemented for internal reasons.
void textRotation(TDECompletionBase::KeyBindingType)
Emitted when the text rotation key-bindings are pressed.
void returnPressed(const TQString &)
Emitted when the user presses the return key.
virtual void dropEvent(TQDropEvent *)
Re-implemented to handle URI drops.
void setURLDropsEnabled(bool enable)
Enables/Disables handling of URL drops.
virtual void mouseDoubleClickEvent(TQMouseEvent *)
Re-implemented for internal reasons.
void setTrapReturnKey(bool trap)
By default, KLineEdit recognizes Key_Return and Key_Enter and emits the returnPressed() signals,...
virtual void setReadOnly(bool)
Re-implemented for internal reasons.
void setCompletionBox(TDECompletionBox *box)
Set the completion-box to be used in completion mode TDEGlobalSettings::CompletionPopup.
void setClickMessage(const TQString &msg)
This makes the line edit display a grayed-out hinting text as long as the user didn't enter any text.
virtual void setText(const TQString &)
Re-implemented to enable text squeezing.
virtual void focusOutEvent(TQFocusEvent *)
Re-implemented for internal reasons.
virtual void focusInEvent(TQFocusEvent *)
Re-implemented for internal reasons.
bool isURLDropsEnabled() const
Returns true when decoded URL drops are enabled.
virtual void contextMenuEvent(TQContextMenuEvent *)
Re-implemented for internal reasons.
void setURL(const KURL &url)
Sets url into the lineedit.
void rotateText(TDECompletionBase::KeyBindingType type)
Iterates through all possible matches of the completed text or the history list.
void setEnableSqueezedText(bool enable)
Enable text squeezing whenever the supplied text is too long.
virtual void setCompletionMode(TDEGlobalSettings::Completion mode)
Re-implemented from TDECompletionBase for internal reasons.
virtual void mouseReleaseEvent(TQMouseEvent *)
Re-implemented for internal reasons.
TDECompletionBox * completionBox(bool create=true)
void setUserSelection(bool userSelection)
Sets the widget in userSelection mode or in automatic completion selection mode.
TQString clickMessage() const
void substringCompletion(const TQString &)
Emitted when the shortcut for substring completion is pressed.
virtual void mousePressEvent(TQMouseEvent *)
Re-implemented for internal reasons.
virtual void setCompletionObject(TDECompletion *, bool hsig=true)
Reimplemented for internal reasons, the API is not affected.
void completionBoxActivated(const TQString &)
Emitted whenever the completion box is activated.
bool autoSuggest() const
Whether in current state text should be auto-suggested.
void completionModeChanged(TDEGlobalSettings::Completion)
Emitted when the user changed the completion mode by using the popupmenu.
virtual void setContextMenuEnabled(bool showMenu)
Enables/disables the popup (context) menu.
virtual bool eventFilter(TQObject *, TQEvent *)
Re-implemented for internal reasons.
void completion(const TQString &)
Emitted when the completion key is pressed.
void userCancelled(const TQString &cancelText)
Resets the current displayed text.
void aboutToShowContextMenu(TQPopupMenu *p)
Emitted before the context menu is displayed.
virtual void drawContents(TQPainter *p)
Re-implemented for internal reasons.
virtual void keyPressEvent(TQKeyEvent *)
Re-implemented for internal reasons.
virtual void makeCompletion(const TQString &)
Completes the remaining text with a matching one from a given list.
virtual void copy() const
Reimplemented for internal reasons, the API is not affected.
virtual void resizeEvent(TQResizeEvent *)
Re-implemented for internal reasons.
void setCompletedItems(const TQStringList &items)
Sets items into the completion-box if completionMode() is CompletionPopup.
bool isSqueezedTextEnabled() const
Returns true if text squeezing is enabled.
virtual void clear()
Reimplemented to workaround a buggy TQLineEdit::clear() (changing the clipboard to the text we just h...
KLineEdit(const TQString &string, TQWidget *parent, const char *name=0)
Constructs a KLineEdit object with a default text, a parent, and a name.
void setSqueezedText(const TQString &text)
Squeezes text into the line edit.
virtual void create(WId=0, bool initializeWindow=true, bool destroyOldWindow=true)
Reimplemented for internal reasons, the API is not affected.
TQString originalText() const
Returns the original text if text squeezing is enabled.
static bool decode(const TQMimeSource *e, KURL::List &urls)
TQString prettyURL(int _trailing=0) const
TDECompletion * compObj() const
TDEGlobalSettings::Completion completionMode() const
KeyBindingMap getKeyBindings() const
bool handleSignals() const
virtual void setCompletionMode(TDEGlobalSettings::Completion mode)
virtual void setCompletionObject(TDECompletion *compObj, bool hsig=true)
A helper widget for "completion-widgets" (KLineEdit, KComboBox))
TQString cancelledText() const
TQStringList allMatches()
virtual TQString makeCompletion(const TQString &string)
static Completion completionMode()
static TDEConfig * config()
bool contains(const KKey &key) const
const TDEShortcut & copy()
const TDEShortcut & endOfLine()
const TDEShortcut & paste()
const TDEShortcut & cut()
const TDEShortcut & redo()
const TDEShortcut & forwardWord()
const TDEShortcut & completion()
const TDEShortcut & beginningOfLine()
const TDEShortcut & deleteWordBack()
const TDEShortcut & undo()
const TDEShortcut & backwardWord()
const TDEShortcut & pasteSelection()
const TDEShortcut & deleteWordForward()
const TDEShortcut & shortcut(StdAccel id)