diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 47d455dd55be855e4cc691c32f687f723d9247ee (patch) | |
tree | 52e236aaa2576bdb3840ebede26619692fed6d7d /kpdf/ui/searchwidget.h | |
download | tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpdf/ui/searchwidget.h')
-rw-r--r-- | kpdf/ui/searchwidget.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/kpdf/ui/searchwidget.h b/kpdf/ui/searchwidget.h new file mode 100644 index 00000000..9f2a1e44 --- /dev/null +++ b/kpdf/ui/searchwidget.h @@ -0,0 +1,50 @@ +/*************************************************************************** + * Copyright (C) 2004 by Enrico Ros <[email protected]> * + * * + * 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 <ktoolbar.h> + +class KPopupMenu; +class KPDFDocument; +class m_inputDelayTimer; + +// definition of searchID for this class (publicly available to ThumbnailsList) +#define SW_SEARCH_ID 3 + +/** + * @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 KToolBar +{ + Q_OBJECT + public: + SearchWidget( QWidget *parent, KPDFDocument *document ); + void clearText(); + + private: + KPDFDocument * m_document; + KPopupMenu * m_menu; + QTimer * m_inputDelayTimer; + int m_searchType; + bool m_caseSensitive; + + private slots: + void slotTextChanged( const QString & text ); + void slotMenuChaged( int index ); + void startSearch(); +}; + +#endif |