2004-09-16 21:27:34 +00:00
|
|
|
/***************************************************************************
|
2006-03-24 19:35:20 +00:00
|
|
|
* Copyright (C) 2004 by Enrico Ros <eros.kde@email.it> *
|
2004-09-16 21:27:34 +00:00
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
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.
|
2004-12-13 18:21:37 +00:00
|
|
|
* It supports case sensitive/unsensitive(default) and provieds a button
|
|
|
|
* 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
|
|
|
|
2004-10-29 10:32:25 +00:00
|
|
|
private slots:
|
2006-03-24 19:35:20 +00:00
|
|
|
void slotMenuChaged( QAction * );
|
2004-09-16 21:27:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|