2021-05-24 07:25:56 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2004 Enrico Ros <eros.kde@email.it>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2004-09-16 21:27:34 +00:00
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
#ifndef _OKULAR_SEARCHWIDGET_H_
|
|
|
|
#define _OKULAR_SEARCHWIDGET_H_
|
2004-09-16 21:27:34 +00:00
|
|
|
|
2007-08-24 14:04:48 +00:00
|
|
|
#include <qwidget.h>
|
2004-09-16 21:27:34 +00:00
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
namespace Okular
|
|
|
|
{
|
|
|
|
class Document;
|
|
|
|
}
|
|
|
|
|
2006-03-24 19:35:20 +00:00
|
|
|
class QAction;
|
2007-04-19 18:30:20 +00:00
|
|
|
class QMenu;
|
|
|
|
|
2007-03-17 16:58:01 +00:00
|
|
|
class SearchLineEdit;
|
2004-09-16 21:27:34 +00:00
|
|
|
|
|
|
|
/**
|
2004-12-13 18:21:37 +00:00
|
|
|
* @short A widget for find-as-you-type search. Outputs to the Document.
|
2004-09-16 21:27:34 +00:00
|
|
|
*
|
2004-12-13 18:21:37 +00:00
|
|
|
* This widget accepts keyboard input and performs a call to findTextAll(..)
|
2006-09-21 08:45:36 +00:00
|
|
|
* in the Okular::Document class when there are 3 or more chars to search for.
|
2018-11-14 19:12:15 +00:00
|
|
|
* It supports case sensitive/unsensitive(default) and provides a button
|
2004-12-13 18:21:37 +00:00
|
|
|
* for switching between the 2 modes.
|
2004-09-16 21:27:34 +00:00
|
|
|
*/
|
2007-08-24 14:04:48 +00:00
|
|
|
class SearchWidget : public QWidget
|
2004-09-16 21:27:34 +00:00
|
|
|
{
|
2004-10-29 10:32:25 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2006-09-21 08:45:36 +00:00
|
|
|
SearchWidget(QWidget *parent, Okular::Document *document);
|
2005-02-03 17:09:33 +00:00
|
|
|
void clearText();
|
2004-09-16 21:27:34 +00:00
|
|
|
|
2004-10-29 10:32:25 +00:00
|
|
|
private:
|
2006-03-24 19:35:20 +00:00
|
|
|
QMenu *m_menu;
|
|
|
|
QAction *m_matchPhraseAction, *m_caseSensitiveAction, *m_marchAllWordsAction, *m_marchAnyWordsAction;
|
2007-03-17 16:58:01 +00:00
|
|
|
SearchLineEdit *m_lineEdit;
|
2004-09-16 21:27:34 +00:00
|
|
|
|
2016-07-11 17:30:31 +00:00
|
|
|
private Q_SLOTS:
|
2006-03-24 19:35:20 +00:00
|
|
|
void slotMenuChaged(QAction *);
|
2004-09-16 21:27:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|