File indexing completed on 2024-05-19 05:08:31

0001 /*
0002     SPDX-FileCopyrightText: 2023 Thomas Baumgart <tbaumgart@kde.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef KMMSEARCHWIDGET_H
0007 #define KMMSEARCHWIDGET_H
0008 
0009 #include "kmm_base_widgets_export.h"
0010 
0011 // ----------------------------------------------------------------------------
0012 // QT Includes
0013 
0014 #include <QComboBox>
0015 #include <QLineEdit>
0016 #include <QToolButton>
0017 #include <QWidget>
0018 
0019 // ----------------------------------------------------------------------------
0020 // KDE Includes
0021 
0022 // ----------------------------------------------------------------------------
0023 // Project Includes
0024 
0025 class KMMSearchWidgetPrivate;
0026 class KMM_BASE_WIDGETS_EXPORT KMMSearchWidget : public QWidget
0027 {
0028     Q_OBJECT
0029 
0030 public:
0031     explicit KMMSearchWidget(QWidget* parent);
0032 
0033     QLineEdit* lineEdit() const;
0034     QToolButton* closeButton() const;
0035     QComboBox* comboBox() const;
0036 
0037     void close();
0038 
0039 protected:
0040     bool eventFilter(QObject* watched, QEvent* event) override;
0041     void showEvent(QShowEvent* event) override;
0042 
0043 Q_SIGNALS:
0044     void closed();
0045 
0046 private:
0047     Q_DECLARE_PRIVATE(KMMSearchWidget);
0048     KMMSearchWidgetPrivate* d_ptr;
0049 };
0050 #endif // KMMSEARCHWIDGET_H