compile
[kdegraphics.git] / okular / ui / presentationsearchbar.h
blobf154bdcbdcb208473cd1c788e55693b1d1d34f41
1 /***************************************************************************
2 * Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #ifndef _OKULAR_PRESENTATIONSEARCHBAR_H_
11 #define _OKULAR_PRESENTATIONSEARCHBAR_H_
13 #include <qwidget.h>
15 class SearchLineEdit;
17 namespace Okular {
18 class Document;
21 class PresentationSearchBar
22 : public QWidget
24 Q_OBJECT
26 public:
27 PresentationSearchBar( Okular::Document *document, QWidget *anchor, QWidget *parent = 0 );
28 virtual ~PresentationSearchBar();
30 void forceSnap();
31 void focusOnSearchEdit();
33 protected:
34 void resizeEvent( QResizeEvent * );
35 bool eventFilter( QObject *, QEvent * );
37 private:
38 QWidget *m_handle;
39 QWidget *m_anchor;
40 QPoint m_point;
41 bool m_snapped;
42 QPoint m_drag;
44 SearchLineEdit *m_search;
47 #endif