Changeset View
Changeset View
Standalone View
Standalone View
src/kitemviews/private/kitemlistkeyboardsearchmanager.h
Show All 18 Lines | |||||
19 | * Free Software Foundation, Inc., * | 19 | * Free Software Foundation, Inc., * | ||
20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | ||
21 | ***************************************************************************/ | 21 | ***************************************************************************/ | ||
22 | 22 | | |||
23 | #ifndef KITEMLISTKEYBOARDSEARCHMANAGER_H | 23 | #ifndef KITEMLISTKEYBOARDSEARCHMANAGER_H | ||
24 | #define KITEMLISTKEYBOARDSEARCHMANAGER_H | 24 | #define KITEMLISTKEYBOARDSEARCHMANAGER_H | ||
25 | 25 | | |||
26 | #include "dolphin_export.h" | 26 | #include "dolphin_export.h" | ||
27 | #include "kitemviews/kitemset.h" | ||||
27 | 28 | | |||
28 | #include <QElapsedTimer> | 29 | #include <QElapsedTimer> | ||
29 | #include <QObject> | 30 | #include <QObject> | ||
30 | #include <QString> | 31 | #include <QString> | ||
31 | 32 | | |||
32 | /** | 33 | /** | ||
33 | * @brief Controls the keyboard searching ability for a KItemListController. | 34 | * @brief Controls the keyboard searching ability for a KItemListController. | ||
34 | * | 35 | * | ||
Show All 24 Lines | 43 | public: | |||
59 | qint64 timeout() const; | 60 | qint64 timeout() const; | ||
60 | 61 | | |||
61 | void cancelSearch(); | 62 | void cancelSearch(); | ||
62 | bool shouldClearSearchIfInputTimeReached(); | 63 | bool shouldClearSearchIfInputTimeReached(); | ||
63 | 64 | | |||
64 | public slots: | 65 | public slots: | ||
65 | 66 | | |||
66 | void slotCurrentChanged(int current, int previous); | 67 | void slotCurrentChanged(int current, int previous); | ||
68 | void slotSelectionChanged(const KItemSet& current, const KItemSet& previous); | ||||
67 | 69 | | |||
68 | signals: | 70 | signals: | ||
69 | /** | 71 | /** | ||
70 | * Is emitted if the current item should be changed corresponding | 72 | * Is emitted if the current item should be changed corresponding | ||
71 | * to \a text. | 73 | * to \a text. | ||
72 | * @param searchFromNextItem If true start searching from item next to the | 74 | * @param searchFromNextItem If true start searching from item next to the | ||
73 | * current item. Otherwise, search from the | 75 | * current item. Otherwise, search from the | ||
74 | * current item. | 76 | * current item. | ||
75 | */ | 77 | */ | ||
76 | // TODO: Think about getting rid of the bool parameter | 78 | // TODO: Think about getting rid of the bool parameter | ||
77 | // (see http://doc.qt.nokia.com/qq/qq13-apis.html#thebooleanparametertrap) | 79 | // (see http://doc.qt.nokia.com/qq/qq13-apis.html#thebooleanparametertrap) | ||
78 | void changeCurrentItem(const QString& string, bool searchFromNextItem); | 80 | void changeCurrentItem(const QString& string, bool searchFromNextItem); | ||
79 | 81 | | |||
80 | private: | 82 | private: | ||
81 | QString m_searchedString; | 83 | QString m_searchedString; | ||
84 | bool m_isSearchRestarted; | ||||
82 | QElapsedTimer m_keyboardInputTime; | 85 | QElapsedTimer m_keyboardInputTime; | ||
83 | qint64 m_timeout; | 86 | qint64 m_timeout; | ||
84 | }; | 87 | }; | ||
85 | 88 | | |||
86 | #endif | 89 | #endif | ||
87 | 90 | | |||
88 | 91 | |