| 29 | #include <QScrollBar> |
| 30 | |
| 31 | QuickFindWidget::QuickFindWidget(QWidget *parent) : |
| 32 | QFrame(parent), |
| 33 | ui(new Ui::QuickFindWidget) |
| 34 | { |
| 35 | ui->setupUi(this); |
| 36 | |
| 37 | // Move the focus to the line edit widget |
| 38 | setFocusProxy(ui->lineEdit); |
| 39 | |
| 40 | ui->lineEdit->installEventFilter(this); |
| 41 | |
| 42 | FocusWatcher *fw = new FocusWatcher(ui->lineEdit); |
| 43 | connect(fw, &FocusWatcher::focusOut, this, &QuickFindWidget::focusOut); |
| 44 | connect(fw, &FocusWatcher::focusIn, this, &QuickFindWidget::focusIn); |
| 45 | |
| 46 | connect(ui->lineEdit, &QLineEdit::returnPressed, this, &QuickFindWidget::returnPressed); |
| 47 | |
| 48 | // Any changes need to trigger a new search |
| 49 | connect(ui->lineEdit, &QLineEdit::textChanged, this, &QuickFindWidget::performNewSearch); |
| 50 | connect(ui->buttonMatchCase, &QToolButton::toggled, this, &QuickFindWidget::performNewSearch); |
| 51 | connect(ui->buttonWholeWord, &QToolButton::toggled, this, &QuickFindWidget::performNewSearch); |
| 52 | connect(ui->buttonRegexp, &QToolButton::toggled, this, &QuickFindWidget::performNewSearch); |
| 53 | } |
| 54 | |
| 55 | QuickFindWidget::~QuickFindWidget() |
| 56 | { |
nothing calls this directly
no outgoing calls
no test coverage detected