mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-22 12:56:11 +00:00
47 lines
868 B
C++
47 lines
868 B
C++
#include "ComboQuickFilterView.h"
|
|
#include "ui_ComboQuickFilterView.h"
|
|
|
|
ComboQuickFilterView::ComboQuickFilterView(QWidget *parent) :
|
|
QWidget(parent),
|
|
ui(new Ui::ComboQuickFilterView)
|
|
{
|
|
ui->setupUi(this);
|
|
|
|
connect(ui->lineEdit, &QLineEdit::textChanged, this, [this](const QString & text) {
|
|
emit filterTextChanged(text);
|
|
});
|
|
}
|
|
|
|
ComboQuickFilterView::~ComboQuickFilterView()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void ComboQuickFilterView::setLabelText(const QString &text)
|
|
{
|
|
ui->label->setText(text);
|
|
}
|
|
|
|
QComboBox *ComboQuickFilterView::comboBox()
|
|
{
|
|
return ui->comboBox;
|
|
}
|
|
|
|
void ComboQuickFilterView::showFilter()
|
|
{
|
|
show();
|
|
ui->lineEdit->setFocus();
|
|
}
|
|
|
|
void ComboQuickFilterView::clearFilter()
|
|
{
|
|
ui->lineEdit->setText("");
|
|
}
|
|
|
|
void ComboQuickFilterView::closeFilter()
|
|
{
|
|
ui->lineEdit->setText("");
|
|
hide();
|
|
emit filterClosed();
|
|
}
|