]>
cloud.milkyroute.net Git - dolphin.git/blob - src/filterbar/filterbar.h
1 /***************************************************************************
2 * Copyright (C) 2006-2010 by Peter Penz <peter.penz19@gmail.com> *
3 * Copyright (C) 2006 by Gregor Kališnik <gregor@podnapisi.net> *
4 * Copyright (C) 2012 by Stuart Citrin <ctrn3e8@gmail.com> *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, write to the *
18 * Free Software Foundation, Inc., *
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
20 ***************************************************************************/
31 * @brief Provides an input field for filtering the currently shown items.
33 * @author Gregor Kališnik <gregor@podnapisi.net>
35 class FilterBar
: public QWidget
40 explicit FilterBar(QWidget
* parent
= 0);
41 ~FilterBar() override
;
43 /** Called by view container to hide this **/
44 void closeFilterBar();
47 * Selects the whole text of the filter bar.
52 /** Clears the input field. */
54 /** Clears the input field if the "lock button" is disabled. */
55 void slotUrlChanged();
56 /** The input field is cleared also if the "lock button" is released. */
57 void slotToggleLockButton(bool checked
);
61 * Signal that reports the name filter has been
62 * changed to \a nameFilter.
64 void filterChanged(const QString
& nameFilter
);
67 * Emitted as soon as the filterbar should get closed.
72 * Emitted as soon as the focus should be returned back to the view.
74 void focusViewRequest();
77 void showEvent(QShowEvent
* event
) override
;
78 void keyReleaseEvent(QKeyEvent
* event
) override
;
81 QLineEdit
* m_filterInput
;
82 QToolButton
* m_lockButton
;