2017-04-27 18:26:05 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2014-01-09 17:21:29 +00:00
|
|
|
#ifndef USERMANUAL_H
|
|
|
|
#define USERMANUAL_H
|
|
|
|
|
2014-06-30 20:45:52 +00:00
|
|
|
#include <QWebView>
|
2018-05-31 14:36:34 +00:00
|
|
|
#include <QDialog>
|
2014-06-30 20:45:52 +00:00
|
|
|
#include "ui_searchbar.h"
|
2014-01-09 17:21:29 +00:00
|
|
|
|
2014-06-30 20:45:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2018-05-31 14:36:34 +00:00
|
|
|
class UserManual : public QDialog {
|
2014-01-09 17:21:29 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit UserManual(QWidget *parent = 0);
|
2015-01-28 20:06:27 +00:00
|
|
|
|
|
|
|
#ifdef Q_OS_MAC
|
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *e);
|
|
|
|
void hideEvent(QHideEvent *e);
|
|
|
|
QAction *closeAction;
|
|
|
|
QAction *filterAction;
|
|
|
|
#endif
|
|
|
|
|
2014-02-28 04:09:57 +00:00
|
|
|
private
|
|
|
|
slots:
|
2014-06-30 20:45:52 +00:00
|
|
|
void searchTextChanged(const QString& s);
|
2014-01-09 17:21:29 +00:00
|
|
|
void searchNext();
|
|
|
|
void searchPrev();
|
2014-07-11 21:01:35 +00:00
|
|
|
void linkClickedSlot(const QUrl& url);
|
2014-01-09 17:21:29 +00:00
|
|
|
private:
|
2014-06-30 20:45:52 +00:00
|
|
|
SearchBar *searchBar;
|
|
|
|
QString mLastText;
|
2016-08-08 22:12:12 +00:00
|
|
|
QWebView *userManual;
|
2014-01-09 17:21:29 +00:00
|
|
|
void search(QString, QWebPage::FindFlags);
|
|
|
|
};
|
|
|
|
#endif // USERMANUAL_H
|