From afca8efa2601d9566c8d34d7b67dfb5abc729956 Mon Sep 17 00:00:00 2001 From: Tirtha Chatterjee Date: Mon, 29 Aug 2011 04:12:05 +0530 Subject: Added support for highlighting items by typing their name on the keyboard. --- src/kitemviews/kitemmodelbase.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/kitemviews/kitemmodelbase.h') diff --git a/src/kitemviews/kitemmodelbase.h b/src/kitemviews/kitemmodelbase.h index 467046959..c4e046402 100644 --- a/src/kitemviews/kitemmodelbase.h +++ b/src/kitemviews/kitemmodelbase.h @@ -116,6 +116,13 @@ public: */ virtual QMimeData* createMimeData(const QSet& indexes) const; + /** + * @return Reimplement this to return the index for the first item + * beginning with string typed in through the keyboard, -1 if not found. + * @param text the text which has been typed in through the keyboard + * @param startFromIndex the index from which to start searching from + */ + virtual int indexForKeyboardSearch(const QString& text, int startFromIndex = 0) const; signals: /** * Is emitted if one or more items have been inserted. Each item-range consists -- cgit v1.3