LeechCraft
0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
findnotification.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#pragma once
10
11
#include <memory>
12
#include <
interfaces/core/icoreproxy.h
>
13
#include "
guiconfig.h
"
14
#include "
pagenotification.h
"
15
16
class
QShortcut;
17
18
namespace
Ui
19
{
20
class
FindNotification;
21
}
22
23
namespace
LC::Util
24
{
61
class
UTIL_GUI_API
FindNotification
:
public
PageNotification
62
{
63
std::unique_ptr<Ui::FindNotification> Ui_;
64
QShortcut *
const
EscShortcut_;
65
public
:
68
enum
FindFlag
69
{
72
FindNoFlags
= 0x0,
73
76
FindCaseSensitively
= 0x1,
77
80
FindBackwards
= 0x2,
81
86
FindWrapsAround
= 0x4
87
};
88
Q_DECLARE_FLAGS
(FindFlags, FindFlag)
89
90
100
FindNotification
(
const
ICoreProxy_ptr
& proxy, QWidget *near);
101
~FindNotification
()
override
;
102
107
void
SetEscCloses
(
bool
close);
108
118
void
SetText
(
const
QString& text);
119
124
QString
GetText
()
const
;
125
131
void
SetSuccessful
(
bool
successful);
132
140
FindFlags
GetFlags
()
const
;
141
150
void
FindNext
();
151
160
void
FindPrevious
();
161
166
void
Clear
();
167
protected
:
175
virtual
void
HandleNext
(
const
QString& text, FindFlags flags) = 0;
176
177
virtual
void
Reject
();
178
};
179
}
LC::Util::FindNotification
A horizontal bar with typical widgets for text search.
Definition
findnotification.h:62
LC::Util::FindNotification::FindFlag
FindFlag
Definition
findnotification.h:69
LC::Util::FindNotification::FindNoFlags
@ FindNoFlags
Definition
findnotification.h:72
LC::Util::FindNotification::FindWrapsAround
@ FindWrapsAround
Definition
findnotification.h:86
LC::Util::FindNotification::FindCaseSensitively
@ FindCaseSensitively
Definition
findnotification.h:76
LC::Util::FindNotification::FindBackwards
@ FindBackwards
Definition
findnotification.h:80
LC::Util::FindNotification::~FindNotification
~FindNotification() override
LC::Util::FindNotification::GetFlags
FindFlags GetFlags() const
Returns the current find flags except the direction.
Definition
findnotification.cpp:99
LC::Util::FindNotification::SetEscCloses
void SetEscCloses(bool close)
Sets whether Esc closes the widget.
Definition
findnotification.cpp:68
LC::Util::FindNotification::Reject
virtual void Reject()
Definition
findnotification.cpp:132
LC::Util::FindNotification::FindNext
void FindNext()
Search for the next occurrence of the search text.
Definition
findnotification.cpp:109
LC::Util::FindNotification::HandleNext
virtual void HandleNext(const QString &text, FindFlags flags)=0
Called each time the user requests a search.
LC::Util::FindNotification::SetText
void SetText(const QString &text)
Sets the text in the find field.
Definition
findnotification.cpp:73
LC::Util::FindNotification::Clear
void Clear()
Clears the text in the find field.
Definition
findnotification.cpp:127
LC::Util::FindNotification::FindNotification
FindNotification(const ICoreProxy_ptr &proxy, QWidget *near)
Creates the search widget in parent layout of near.
Definition
findnotification.cpp:19
LC::Util::FindNotification::SetSuccessful
void SetSuccessful(bool successful)
Updates the widget to show whether the search has been successful.
Definition
findnotification.cpp:83
LC::Util::FindNotification::GetText
QString GetText() const
Returns the currently entered text in the find field.
Definition
findnotification.cpp:78
LC::Util::FindNotification::FindPrevious
void FindPrevious()
Search for the previous occurrence of the search text.
Definition
findnotification.cpp:118
LC::Util::PageNotification::PageNotification
PageNotification(QWidget *parent)
Creates the widget embedding into the parent layout of the parent widget.
Definition
pagenotification.cpp:15
guiconfig.h
UTIL_GUI_API
#define UTIL_GUI_API
Definition
guiconfig.h:16
icoreproxy.h
ICoreProxy_ptr
std::shared_ptr< ICoreProxy > ICoreProxy_ptr
Definition
icoreproxy.h:181
LC::Util
Definition
icoreproxy.h:34
LC::Util::Q_DECLARE_FLAGS
Q_DECLARE_FLAGS(FitFlags, FitFlag)
Ui
Definition
backendselector.h:16
pagenotification.h
src
util
gui
findnotification.h
Generated by
1.13.1