searchwidget.h 1.33 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
/***************************************************************************
 *   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 <qhbox.h>

class KActionCollection;
class KPopupMenu;
class KLineEdit;

class KPDFDocument;

/**
 * @short A search widget for find-as-you-type search.
 *
 * ...
 */
class SearchWidget : public QHBox
{
Q_OBJECT

public:
	SearchWidget( QWidget *parent, KPDFDocument *document );

	// create actions that interact with this widget
34 35
	void setupActions( KActionCollection * collection );
	void saveSettings();
36 37 38 39 40 41 42 43 44 45 46 47 48 49

private slots:
	void slotTextChanged( const QString & text );
	void slotChangeCase( int index );
	void slotToggleSearchBar( bool visible );

private:
	KPDFDocument * m_document;
	KLineEdit * m_lineEdit;
	KPopupMenu * m_caseMenu;
	bool m_caseSensitive;
};

#endif