From d8669c68e40a6571dfcbdf38e3281a4aeb8c2be6 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 8 Dec 2006 23:41:08 +0000 Subject: Cleanup of signal/slot handling between the dolphin view and the main window: now the main window listens to the signals from the dolphin view and connects to private slots (previously the dolphin view connected to public slots of the main window). Also prevent naming all slots by the prefix 'slot', describe instead what the method does. svn path=/trunk/playground/utils/dolphin/; revision=611617 --- src/filterbar.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/filterbar.h') diff --git a/src/filterbar.h b/src/filterbar.h index 503938fc0..b1d60232c 100644 --- a/src/filterbar.h +++ b/src/filterbar.h @@ -31,13 +31,14 @@ class DolphinMainWindow; * @brief Provides an input field for filtering the currently shown items. * * @author Gregor Kališnik + * @author Peter Penz */ class FilterBar : public QWidget { Q_OBJECT public: - FilterBar(DolphinMainWindow* mainWindow, QWidget *parent = 0, const char *name = 0); + FilterBar(QWidget* parent = 0); virtual ~FilterBar(); signals: @@ -45,15 +46,22 @@ signals: * Signal that reports the name filter has been * changed to \a nameFilter. */ - void signalFilterChanged(const QString& nameFilter); + void filterChanged(const QString& nameFilter); + + /** + * Emitted as soon as the filterbar should get closed. + */ + void closed(); protected: virtual void hideEvent(QHideEvent* event); virtual void showEvent(QShowEvent* event); virtual void keyReleaseEvent(QKeyEvent* event); +private slots: + void emitClose(); + private: - DolphinMainWindow *m_mainWindow; QLabel* m_filter; KLineEdit* m_filterInput; QToolButton* m_close; -- cgit v1.3