SearchToolBar::SearchToolBar(QupZilla* mainClass, QWidget* parent) : AnimatedWidget(AnimatedWidget::Up, 300, parent) , ui(new Ui::SearchToolbar) , p_QupZilla(mainClass) , m_findFlags(0) { setAttribute(Qt::WA_DeleteOnClose); ui->setupUi(widget()); ui->closeButton->setIcon(IconProvider::standardIcon(QStyle::SP_DialogCloseButton)); ui->next->setIcon(IconProvider::standardIcon(QStyle::SP_ArrowForward)); ui->previous->setIcon(IconProvider::standardIcon(QStyle::SP_ArrowBack)); connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide())); connect(ui->lineEdit, SIGNAL(textChanged(QString)), this, SLOT(findNext())); connect(ui->next, SIGNAL(clicked()), this, SLOT(findNext())); connect(ui->previous, SIGNAL(clicked()), this, SLOT(findPrevious())); connect(ui->highligh, SIGNAL(clicked()), this, SLOT(highlightChanged())); connect(ui->caseSensitive, SIGNAL(clicked()), this, SLOT(caseSensitivityChanged())); startAnimation(); QShortcut* findNextAction = new QShortcut(QKeySequence("F3"), this); connect(findNextAction, SIGNAL(activated()), this, SLOT(findNext())); QShortcut* findPreviousAction = new QShortcut(QKeySequence("Shift+F3"), this); connect(findPreviousAction, SIGNAL(activated()), this, SLOT(findPrevious())); p_QupZilla->actionStop()->setEnabled(false); qApp->installEventFilter(this); }
void ItemListItem::setHighlight(const QColor &color) { if (_Change(d->highlight, color)) { if (d->pressed.attached && d->pressed.attached->canInteract()) d->pressed.attached->setColor(d->highlight); emit highlightChanged(); } }