KDEUI
Go to the documentation of this file.
29#include <QtCore/QObject>
30#include <QtCore/QString>
31#include <QtCore/QStringList>
32#include <QtCore/QPointer>
35class KCompletionPrivate;
36class KCompletionBasePrivate;
37class 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 );
190 QStringList substringCompletion(
const QString&
string )
const;
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();
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;
559class KCompletionMatchesPrivate;
612 void removeDuplicates();
619 QStringList list(
bool sort =
true )
const;
625 bool sorting()
const;
628 KCompletionMatchesPrivate *
const d;
653 enum KeyBindingType {
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;
An abstract base class for adding a completion feature into widgets.
KeyBindingType
Constants that represent the items whose short-cut key-binding is programmable.
This structure is returned by KCompletion::allWeightedMatches .
A generic class for completing QStrings.
void slotPreviousMatch()
Searches the previous matching item and emits it via match().
void multipleMatches()
This signal is emitted, when calling makeCompletion() and more than one matching item is found.
void matches(const QStringList &matchlist)
All matching items.
CompOrder
Constants that represent the order in which KCompletion performs completion-lookups.
@ Insertion
Use order of insertion.
void slotMakeCompletion(const QString &string)
Attempts to complete "string" and emits the completion via match().
void match(const QString &item)
The matching item.
void slotNextMatch()
Searches the next matching item and emits it via match().
Completion
This enum describes the completion mode used for by the KCompletion class.
Represents a keyboard shortcut.
KSortableList< QString > KCompletionMatchesList
Defines platform-independent classes for keyboard shortcut handling.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.