okular/ui/searchwidget.h
Pino Toscano 91dc3ef06c move the searchIDs in document.h, like it's done for the observerIDs
svn path=/branches/work/kde4/playground/graphics/okular/; revision=545944
2006-05-28 15:54:48 +00:00

51 lines
1.7 KiB
C++

/***************************************************************************
* Copyright (C) 2004 by Enrico Ros <eros.kde@email.it> *
* *
* 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. *
***************************************************************************/
#ifndef _KPDF_SEARCHWIDGET_H_
#define _KPDF_SEARCHWIDGET_H_
#include <qtoolbar.h>
class KPDFDocument;
class KLineEdit;
class QAction;
class QTimer;
/**
* @short A widget for find-as-you-type search. Outputs to the Document.
*
* This widget accepts keyboard input and performs a call to findTextAll(..)
* in the KPDFDocument class when there are 3 or more chars to search for.
* It supports case sensitive/unsensitive(default) and provieds a button
* for switching between the 2 modes.
*/
class SearchWidget : public QToolBar
{
Q_OBJECT
public:
SearchWidget( QWidget *parent, KPDFDocument *document );
void clearText();
private:
KPDFDocument * m_document;
QMenu * m_menu;
QTimer * m_inputDelayTimer;
int m_searchType;
bool m_caseSensitive;
QAction *m_matchPhraseAction, *m_caseSensitiveAction, * m_marchAllWordsAction, *m_marchAnyWordsAction;
KLineEdit *m_lineEdit;
private slots:
void slotTextChanged( const QString & text );
void slotMenuChaged( QAction * );
void startSearch();
};
#endif