mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
78cf6bd910
Since unfortunately some of the autogenerated includes don't pass the checks we do a trick of building out of source and then specifying the .*/okular/.* path as the only includes we care about
47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
/***************************************************************************
|
|
* Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
|
|
* *
|
|
* 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 _OKULAR_PRESENTATIONSEARCHBAR_H_
|
|
#define _OKULAR_PRESENTATIONSEARCHBAR_H_
|
|
|
|
#include <qwidget.h>
|
|
|
|
class SearchLineEdit;
|
|
|
|
namespace Okular {
|
|
class Document;
|
|
}
|
|
|
|
class PresentationSearchBar
|
|
: public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
PresentationSearchBar( Okular::Document *document, QWidget *anchor, QWidget *parent = nullptr );
|
|
~PresentationSearchBar() override;
|
|
|
|
void forceSnap();
|
|
void focusOnSearchEdit();
|
|
|
|
protected:
|
|
void resizeEvent( QResizeEvent * ) override;
|
|
bool eventFilter( QObject *, QEvent * ) override;
|
|
|
|
private:
|
|
QWidget *m_handle;
|
|
QWidget *m_anchor;
|
|
QPoint m_point;
|
|
bool m_snapped;
|
|
QPoint m_drag;
|
|
|
|
SearchLineEdit *m_search;
|
|
};
|
|
|
|
#endif
|