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>
13#include "guiconfig.h"
14#include "pagenotification.h"
15
16class QShortcut;
17
18namespace Ui
19{
20 class FindNotification;
21}
22
23namespace LC::Util
24{
62 {
63 std::unique_ptr<Ui::FindNotification> Ui_;
64 QShortcut * const EscShortcut_;
65 public:
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}
A horizontal bar with typical widgets for text search.
virtual void HandleNext(const QString &text, FindFlags flags)=0
Called each time the user requests a search.
A horizontal widget embedding into the parent layout of the passed parent widget.
#define UTIL_GUI_API
Definition guiconfig.h:16
std::shared_ptr< ICoreProxy > ICoreProxy_ptr
Definition icoreproxy.h:181