LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
A helper class to aid connecting FindNotification with QtWebEngine. More...
#include "findnotificationwe.h"
Public Member Functions | |
FindNotificationWE (const ICoreProxy_ptr &proxy, QWebEngineView *near) | |
Constructs the find notification using the given proxy and near widget. More... | |
Public Member Functions inherited from LC::Util::FindNotification | |
FindNotification (const ICoreProxy_ptr &proxy, QWidget *near) | |
Creates the search widget in parent layout of near. More... | |
~FindNotification () override | |
void | SetEscCloses (bool close) |
Sets whether Esc closes the widget. More... | |
void | SetText (const QString &text) |
Sets the text in the find field. More... | |
QString | GetText () const |
Returns the currently entered text in the find field. More... | |
void | SetSuccessful (bool successful) |
Updates the widget to show whether the search has been successful. More... | |
FindFlags | GetFlags () const |
Returns the current find flags except the direction. More... | |
void | FindNext () |
Search for the next occurrence of the search text. More... | |
void | FindPrevious () |
Search for the previous occurrence of the search text. More... | |
void | Clear () |
Clears the text in the find field. More... | |
Public Member Functions inherited from LC::Util::PageNotification | |
PageNotification (QWidget *parent) | |
Creates the widget embedding into the parent layout of the parent widget. More... | |
Static Public Member Functions | |
static QWebEnginePage::FindFlags | ToPageFlags (FindFlags findFlags) |
Converts the given findFlags to WebKit find flags. More... | |
Protected Member Functions | |
void | HandleNext (const QString &text, FindFlags findFlags) override |
Called each time the user requests a search. More... | |
void | Reject () override |
Additional Inherited Members | |
Public Types inherited from LC::Util::FindNotification | |
enum | FindFlag { FindNoFlags = 0x0, FindCaseSensitively = 0x1, FindBackwards = 0x2, FindWrapsAround = 0x4 } |
A helper class to aid connecting FindNotification with QtWebEngine.
This class is basically a FindNotification providing an utility function ToPageFlags() to convert FindNotification::FindFlags to QWebEnginePage::FindFlags.
FindNotificationWE takes care of all the search-related things and automatically handles the QWebView passed to its constructor in its handleNext() implementation. So, using this class is as simple as just instantiating an object, passing the needed QWebView instance to its constructor.
Definition at line 38 of file findnotificationwe.h.
|
inline |
Constructs the find notification using the given proxy and near widget.
[in] | proxy | The core proxy to be used by this find notification. |
[in] | near | The web view near which to embed. |
Definition at line 58 of file findnotificationwe.h.
|
inlineoverrideprotectedvirtual |
Called each time the user requests a search.
Reimplement this function to perform the actual search.
[in] | text | The text to search for. |
[in] | flags | The flags to search with. |
Implements LC::Util::FindNotification.
Definition at line 89 of file findnotificationwe.h.
References LC::Util::FindNotification::Reject().
|
inlineoverrideprotectedvirtual |
Reimplemented from LC::Util::FindNotification.
Definition at line 101 of file findnotificationwe.h.
|
inlinestatic |
Converts the given findFlags to WebKit find flags.
[in] | findFlags | The find flags in terms of FindNotification. |
Definition at line 70 of file findnotificationwe.h.