]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/filterbar.h
When collapsing nodes that made the scrollbar bigger, it didnt became smaller. I...
[dolphin.git] / src / filterbar.h
index 503938fc07f2ef04c9a45f01afb2a1b3c9ed4861..db5d49f89e8ef18c22607679712cfa9571c8b4b0 100644 (file)
 #ifndef FILTERBAR_H
 #define FILTERBAR_H
 
-#include <QWidget>
+#include <QtGui/QWidget>
 
 class QLabel;
 class QToolButton;
 class KLineEdit;
-class DolphinMainWindow;
 
 /**
  * @brief Provides an input field for filtering the currently shown items.
  *
  * @author Gregor Kališnik <gregor@podnapisi.net>
+ * @author Peter Penz <peter.penz@gmx.at>
  */
 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 +45,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 closeRequest();
 
 protected:
     virtual void hideEvent(QHideEvent* event);
     virtual void showEvent(QShowEvent* event);
     virtual void keyReleaseEvent(QKeyEvent* event);
 
+private slots:
+    void emitCloseRequest();
+
 private:
-    DolphinMainWindow *m_mainWindow;
     QLabel* m_filter;
     KLineEdit* m_filterInput;
     QToolButton* m_close;