]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/search/dolphinsearchbox.h
Hide search extra options when not available
[dolphin.git] / src / search / dolphinsearchbox.h
index 5063c2bf506e5c79b2e1e2766153f5c7022b2119..e70317450707f7b01cf4a49075bbb96db4b7a0a3 100644 (file)
@@ -46,8 +46,8 @@ class DolphinSearchBox : public QWidget {
     Q_OBJECT
 
 public:
-    explicit DolphinSearchBox(QWidget* parent = 0);
-    virtual ~DolphinSearchBox();
+    explicit DolphinSearchBox(QWidget* parent = nullptr);
+    ~DolphinSearchBox() override;
 
     /**
      * Sets the text that should be used as input for
@@ -99,11 +99,11 @@ public:
     bool isActive() const;
 
 protected:
-    virtual bool event(QEvent* event) Q_DECL_OVERRIDE;
-    virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE;
-    virtual void hideEvent(QHideEvent* event) Q_DECL_OVERRIDE;
-    virtual void keyReleaseEvent(QKeyEvent* event) Q_DECL_OVERRIDE;
-    virtual bool eventFilter(QObject* obj, QEvent* event) Q_DECL_OVERRIDE;
+    bool event(QEvent* event) override;
+    void showEvent(QShowEvent* event) override;
+    void hideEvent(QHideEvent* event) override;
+    void keyReleaseEvent(QKeyEvent* event) override;
+    bool eventFilter(QObject* obj, QEvent* event) override;
 
 signals:
     /**
@@ -139,6 +139,7 @@ private slots:
     void slotReturnPressed();
     void slotFacetsButtonToggled();
     void slotFacetChanged();
+    void slotSearchSaved();
 
 private:
     void initButton(QToolButton* button);
@@ -157,16 +158,19 @@ private:
      */
     void fromBalooSearchUrl(const QUrl& url);
 
+    void setFacetsVisible(bool visible);
     void updateFacetsToggleButton();
 
+    bool isIndexingEnabled() const;
+
 private:
     bool m_startedSearching;
     bool m_active;
 
     QVBoxLayout* m_topLayout;
 
-    QLabel* m_searchLabel;
     QLineEdit* m_searchInput;
+    QAction* m_saveSearchAction;
     QScrollArea* m_optionsScrollArea;
     QToolButton* m_fileNameButton;
     QToolButton* m_contentButton;