X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/c4bb3db0229bef8adee1daa183892cebba5efe72..dd07a327:/src/search/dolphinsearchbox.h diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h index b73c2899f..6a847ba57 100644 --- a/src/search/dolphinsearchbox.h +++ b/src/search/dolphinsearchbox.h @@ -7,8 +7,9 @@ #ifndef DOLPHINSEARCHBOX_H #define DOLPHINSEARCHBOX_H +#include "animatedheightwidget.h" + #include -#include class DolphinFacetsWidget; class DolphinQuery; @@ -18,7 +19,6 @@ class QToolButton; class QScrollArea; class QLabel; class QVBoxLayout; -class KMoreToolsMenuFactory; /** * @brief Input box for searching files with or without Baloo. @@ -30,7 +30,7 @@ class KMoreToolsMenuFactory; * If Baloo is available and the current folder is indexed, further * options are offered. */ -class DolphinSearchBox : public QWidget +class DolphinSearchBox : public AnimatedHeightWidget { Q_OBJECT @@ -87,8 +87,13 @@ public: */ bool isActive() const; + /* + * @see AnimatedHeightWidget::setVisible() + * @see QWidget::setVisible() + */ + void setVisible(bool visible, Animated animated); + protected: - bool event(QEvent *event) override; void showEvent(QShowEvent *event) override; void hideEvent(QHideEvent *event) override; void keyReleaseEvent(QKeyEvent *event) override; @@ -153,6 +158,9 @@ private: bool isIndexingEnabled() const; + /** @see AnimatedHeightWidget::preferredHeight() */ + int preferredHeight() const override; + private: QString queryTitle(const QString &text) const; @@ -172,9 +180,10 @@ private: DolphinFacetsWidget *m_facetsWidget; QUrl m_searchPath; - QScopedPointer m_menuFactory; QTimer *m_startSearchTimer; + + bool m_initialized; }; #endif