mirror of
https://github.com/YACReader/yacreader
synced 2025-05-25 18:00:46 -04:00
37 lines
685 B
C++
37 lines
685 B
C++
#ifndef YACREADER_SEARCH_LINE_EDIT_H
|
|
#define YACREADER_SEARCH_LINE_EDIT_H
|
|
|
|
#include <QLineEdit>
|
|
#include <QCompleter>
|
|
|
|
#include "yacreader_global.h"
|
|
|
|
class QToolButton;
|
|
class QLabel;
|
|
|
|
class YACReaderSearchLineEdit : public QLineEdit
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
YACReaderSearchLineEdit(QWidget *parent = 0);
|
|
void clearText(); // no signal emited;
|
|
const QString text();
|
|
|
|
protected:
|
|
void resizeEvent(QResizeEvent *);
|
|
|
|
signals:
|
|
void filterChanged(QString);
|
|
|
|
private slots:
|
|
void updateCloseButton(const QString &text);
|
|
void processText(const QString &text);
|
|
|
|
private:
|
|
QToolButton *clearButton;
|
|
QLabel *searchLabel;
|
|
};
|
|
|
|
#endif // YACREADER_SEARCH_LINE_EDIT_H
|