17 #include <QHBoxLayout>
20 #include <QSizePolicy>
21 #include <QSpacerItem>
23 #include <QTimerEvent>
24 #include <QToolButton>
26 #include "../../util/btconnect.h"
27 #include "../../util/cresmgr.h"
34 auto widgetLayout =
new QHBoxLayout(
this);
35 widgetLayout->setContentsMargins(0, 0, 0, 0);
36 widgetLayout->setSpacing(8);
39 auto const newButton =
40 [
this, widgetLayout](QIcon
const & icon) {
42 button->setIcon(icon);
43 button->setIconSize(QSize(16, 16));
44 button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
45 button->setAutoRaise(
true);
46 widgetLayout->addWidget(button);
51 auto *
const closeButton = newButton(CResMgr::findWidget::icon_close());
52 BT_CONNECT(closeButton, &QToolButton::released,
this, &BtFindWidget::hide);
68 m_nextButton = newButton(CResMgr::findWidget::icon_next());
81 widgetLayout->addItem(
new QSpacerItem(0,
83 QSizePolicy::Expanding,
84 QSizePolicy::Minimum));
101 auto const timerId =
event->timerId();
104 return QObject::timerEvent(event);
127 m_textEditor->setToolTip(tr(
"The text you want to search for",