mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 21:20:19 +00:00
bd993a4135
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>
41 lines
778 B
C++
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
|