46 if (PreviousFindText_.isEmpty ())
53 SIGNAL (loadFinished (
bool)),
60 QWebPage::FindFlags pageFlags;
61 auto check = [&pageFlags, flags] (
FindFlag ourFlag, QWebPage::FindFlag pageFlag)
64 pageFlags |= pageFlag;
72 void FindNotificationWk::ClearFindResults ()
74 PreviousFindText_ =
"";
75 WebView_->page ()->findText (
"", QWebPage::HighlightAllOccurrences);
82 if (PreviousFindText_ != text)
84 const auto nflags = flags | QWebPage::HighlightAllOccurrences;
85 WebView_->page ()->findText ({}, nflags);
86 WebView_->page ()->findText (text, nflags);
87 PreviousFindText_ = text;
90 const auto found = WebView_->page ()->findText (text, flags);
void SetSuccessful(bool successful)
Updates the widget to show whether the search has been successful.
Executes a given functor upon a signal (or a list of signals).
FindNotificationWk(ICoreProxy_ptr proxy, QWebView *near)
Constructs the find notification using the given proxy and near widget.
std::shared_ptr< ICoreProxy > ICoreProxy_ptr
A horizontal bar with typical widgets for text search.
static QWebPage::FindFlags ToPageFlags(FindFlags findFlags)
Converts the given findFlags to WebKit find flags.
void handleNext(const QString &text, FindFlags flags) override
Called each time the user requests a search.