KDEUI
Go to the documentation of this file.
28 #include <QtCore/QMap>
29 #include <QtCore/QObject>
30 #include <QtCore/QString>
31 #include <QtCore/QStringList>
32 #include <QtCore/QPointer>
35 class KCompletionPrivate;
36 class KCompletionBasePrivate;
37 class KCompletionMatchesWrapper;
134 Q_PROPERTY(
bool ignoreCase READ ignoreCase WRITE setIgnoreCase )
135 Q_PROPERTY( QStringList items READ items WRITE setItems )
180 virtual QString makeCompletion(
const QString&
string );
201 QString previousMatch();
220 virtual const QString& lastMatch()
const;
240 QStringList items()
const;
245 bool isEmpty()
const;
287 virtual void setOrder( CompOrder order );
294 CompOrder order()
const;
303 virtual void setIgnoreCase(
bool ignoreCase );
311 bool ignoreCase()
const;
319 QStringList allMatches();
326 QStringList allMatches(
const QString&
string );
362 virtual void setSoundsEnabled(
bool enable );
370 bool soundsEnabled()
const;
377 bool hasMultipleMatches()
const;
387 (void) makeCompletion(
string );
396 (void) previousMatch();
415 void insertItems(
const QStringList& items );
432 virtual void setItems(
const QStringList& list);
440 void addItem(
const QString& item);
453 void addItem(
const QString& item, uint weight );
461 void removeItem(
const QString& item);
466 virtual void clear();
476 void match(
const QString& item);
484 void matches(
const QStringList& matchlist);
491 void multipleMatches();
507 virtual void postProcessMatch( QString *pMatch )
const;
519 virtual void postProcessMatches( QStringList * pMatches )
const;
534 void addWeightedItem(
const QString& );
535 QString findCompletion(
const QString&
string );
536 void findAllCompletions(
const QString&,
537 KCompletionMatchesWrapper *matches,
538 bool& hasMultipleMatches )
const;
540 void extractStringsFromNode(
const KCompTreeNode *,
541 const QString& beginning,
542 KCompletionMatchesWrapper *matches,
543 bool addWeight =
false )
const;
544 void extractStringsFromNodeCI(
const KCompTreeNode *,
545 const QString& beginning,
546 const QString& restString,
547 KCompletionMatchesWrapper *matches)
const;
549 enum BeepMode { NoMatch, PartialMatch, Rotation };
550 void doBeep( BeepMode )
const;
554 KCompletionPrivate*
const d;
559 class KCompletionMatchesPrivate;
612 void removeDuplicates();
619 QStringList list(
bool sort =
true )
const;
625 bool sorting()
const;
628 KCompletionMatchesPrivate *
const d;
719 virtual void setCompletionObject(
KCompletion* compObj,
bool hsig =
true );
733 virtual void setHandleSignals(
bool handle );
745 bool isCompletionObjectAutoDeleted()
const;
756 void setAutoDeleteCompletionObject(
bool autoDelete );
778 void setEnableSignals(
bool enable );
785 bool handleSignals()
const;
792 bool emitSignals()
const;
883 void useGlobalKeyBindings();
899 virtual void setCompletedText(
const QString& text ) = 0;
908 virtual void setCompletedItems(
const QStringList& items,
bool autoSuggest =
true ) = 0;
952 void setup(
bool,
bool,
bool );
959 virtual void virtual_hook(
int id,
void* data );
962 KCompletionBasePrivate *
const d;
965 #endif // KCOMPLETION_H
void slotMakeCompletion(const QString &string)
Attempts to complete "string" and emits the completion via match().
@ PrevCompletionMatch
Switch to previous completion (by default Ctrl-Up).
A generic class for completing QStrings.
Represents a keyboard shortcut.
KAction * clear(const QObject *recvr, const char *slot, QObject *parent)
Clear the content of the focus widget.
@ Insertion
Use order of insertion.
CompOrder
Constants that represent the order in which KCompletion performs completion-lookups.
This structure is returned by KCompletion::allWeightedMatches .
const KShortcut & substringCompletion()
Find a string within another string or list of strings.
@ NextCompletionMatch
Switch to next completion (by default Ctrl-Down).
void slotPreviousMatch()
Searches the previous matching item and emits it via match().
An abstract base class for adding a completion feature into widgets.
QMap< KeyBindingType, KShortcut > KeyBindingMap
KeyBindingType
Constants that represent the items whose short-cut key-binding is programmable.
@ TextCompletion
Text completion (by default Ctrl-E).
Completion
This enum describes the completion mode used for by the KCompletion class.
void slotNextMatch()
Searches the next matching item and emits it via match().
KSortableList< QString > KCompletionMatchesList
@ Sorted
Use alphabetically sorted order.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jan 19 2020 00:00:00 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.