#ifndef DOLPHINSEARCHBOX_H
#define DOLPHINSEARCHBOX_H
+#include "animatedheightwidget.h"
+
#include <QUrl>
-#include <QWidget>
class DolphinFacetsWidget;
class DolphinQuery;
class QScrollArea;
class QLabel;
class QVBoxLayout;
-class KMoreToolsMenuFactory;
/**
* @brief Input box for searching files with or without Baloo.
* If Baloo is available and the current folder is indexed, further
* options are offered.
*/
-class DolphinSearchBox : public QWidget
+class DolphinSearchBox : public AnimatedHeightWidget
{
Q_OBJECT
*/
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;
bool isIndexingEnabled() const;
+ /** @see AnimatedHeightWidget::preferredHeight() */
+ int preferredHeight() const override;
+
private:
QString queryTitle(const QString &text) const;
DolphinFacetsWidget *m_facetsWidget;
QUrl m_searchPath;
- QScopedPointer<KMoreToolsMenuFactory> m_menuFactory;
QTimer *m_startSearchTimer;
+
+ bool m_initialized;
};
#endif