Changeset View
Changeset View
Standalone View
Standalone View
krusader/Panel/krsearchbar.h
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | |||||
42 | * NOTE: some key events in KrView are filtered here. | 42 | * NOTE: some key events in KrView are filtered here. | ||
43 | */ | 43 | */ | ||
44 | class KrSearchBar : public QWidget | 44 | class KrSearchBar : public QWidget | ||
45 | { | 45 | { | ||
46 | Q_OBJECT | 46 | Q_OBJECT | ||
47 | 47 | | |||
48 | public: | 48 | public: | ||
49 | enum SearchMode { | 49 | enum SearchMode { | ||
50 | MODE_LAST = -1, | 50 | MODE_DEFAULT = -1, | ||
51 | // NOTE: values used for combobox index | 51 | // NOTE: values used for combobox index | ||
52 | MODE_SEARCH = 0, | 52 | MODE_SEARCH = 0, | ||
53 | MODE_SELECT = 1, | 53 | MODE_SELECT = 1, | ||
54 | MODE_FILTER = 2, | 54 | MODE_FILTER = 2, | ||
55 | }; | 55 | }; | ||
56 | 56 | | |||
57 | public: | 57 | public: | ||
58 | KrSearchBar(KrView *view, QWidget *parent); | 58 | KrSearchBar(KrView *view, QWidget *parent); | ||
59 | /** | 59 | /** | ||
60 | * Set another KrView, old one must not be deleted yet! | 60 | * Set another KrView, old one must not be deleted yet! | ||
61 | */ | 61 | */ | ||
62 | void setView(KrView *view); | 62 | void setView(KrView *view); | ||
63 | 63 | | |||
64 | public slots: | 64 | public slots: | ||
65 | void showBar(SearchMode mode = MODE_LAST); | 65 | void showBar(SearchMode mode = MODE_DEFAULT); | ||
66 | void hideBar(); | 66 | void hideBar(); | ||
67 | /** | 67 | /** | ||
68 | * Reset search to empty string. | 68 | * Reset search to empty string. | ||
69 | */ | 69 | */ | ||
70 | void resetSearch(); | 70 | void resetSearch(); | ||
71 | 71 | | |||
72 | protected slots: | 72 | protected slots: | ||
73 | void onModeChange(); | 73 | void onModeChange(); | ||
Show All 36 Lines |