LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
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 
16 class QShortcut;
17 
18 namespace Ui
19 {
20  class FindNotification;
21 }
22 
23 namespace LC::Util
24 {
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 }
icoreproxy.h
LC::Util
Definition: icoreproxy.h:33
LC::Util::FindNotification::FindFlag
FindFlag
Definition: findnotification.h:68
pagenotification.h
LC::Util::Q_DECLARE_FLAGS
Q_DECLARE_FLAGS(FitFlags, FitFlag)
LC::Util::PageNotification
A horizontal widget embedding into the parent layout of the passed parent widget.
Definition: pagenotification.h:29
UTIL_GUI_API
#define UTIL_GUI_API
Definition: guiconfig.h:16
ICoreProxy_ptr
std::shared_ptr< ICoreProxy > ICoreProxy_ptr
Definition: icoreproxy.h:181
Ui
Definition: backendselector.h:15
LC::Util::FindNotification
A horizontal bar with typical widgets for text search.
Definition: findnotification.h:61
guiconfig.h