1 /***************************************************************************
2 * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it> *
3 * Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
11 #ifndef _OKULAR_SEARCHLINEEDIT_H_
12 #define _OKULAR_SEARCHLINEEDIT_H_
14 #include "core/document.h"
16 #include <klineedit.h>
21 * @short A line edit for find-as-you-type search. Outputs to the Document.
23 class SearchLineEdit
: public KLineEdit
27 SearchLineEdit( QWidget
*parent
, Okular::Document
*document
);
31 void setSearchCaseSensitivity( Qt::CaseSensitivity cs
);
32 void setSearchMinimumLength( int length
);
33 void setSearchType( Okular::Document::SearchType type
);
34 void setSearchId( int id
);
35 void setSearchColor( const QColor
&color
);
36 void setSearchMoveViewport( bool move
);
37 void setSearchFromStart( bool fromStart
);
45 Okular::Document
* m_document
;
46 QTimer
* m_inputDelayTimer
;
48 Qt::CaseSensitivity m_caseSensitivity
;
49 Okular::Document::SearchType m_searchType
;
57 void slotTextChanged( const QString
& text
);
59 void searchFinished( int id
, Okular::Document::SearchStatus endStatus
);