subsurface/qt-ui/usermanual.h
Tomaz Canabrava bd993a4135 Use a layout to lay down the search and the help
The old layout tried to add the search on top of the help view, which
didn't really work because of the way that the QWebView rendered: we got
garbage after a scroll with the find opened. So now I'v created a QWidget
and layed down the QWebView and the search bar vertically.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-11 16:59:14 -07:00

41 lines
778 B
C++

#ifndef USERMANUAL_H
#define USERMANUAL_H
#include <QWebView>
#include "ui_searchbar.h"
class SearchBar : public QWidget{
Q_OBJECT
public:
SearchBar(QWidget *parent = 0);
signals:
void searchTextChanged(const QString& s);
void searchNext();
void searchPrev();
protected:
void setVisible(bool visible);
private slots:
void enableButtons(const QString& s);
private:
Ui::SearchBar ui;
};
class UserManual : public QWidget {
Q_OBJECT
public:
explicit UserManual(QWidget *parent = 0);
private
slots:
void searchTextChanged(const QString& s);
void searchNext();
void searchPrev();
void linkClickedSlot(const QUrl& url);
private:
QWebView *userManual;
SearchBar *searchBar;
QString mLastText;
void search(QString, QWebPage::FindFlags);
};
#endif // USERMANUAL_H