itom
Loading...
Searching...
No Matches
helpViewer.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#ifndef HELPVIEWER_H
24#define HELPVIEWER_H
25
26#include "../global.h"
27
28#ifdef ITOM_USEHELPVIEWER
29
30#include <qmainwindow.h>
31
32class QWebEngineView; //forward declaration
33class QHelpEngine; //forward declaration
34class QLineEdit;//forward declaration
35class QUrl; //forward declaration
36class QMainWindow; //forward declaration
37class QMoveEvent; //forward declaration
38
39namespace ito {
40
41class WidgetFindWord; //forward declaration
42class QtHelpUrlSchemeHandler; //forward declaration
43
44class HelpViewer : public QMainWindow
45{
46 Q_OBJECT
47
48public:
49 HelpViewer(QWidget *parent = NULL);
50 ~HelpViewer();
51
52 void setCollectionFile(const QString &collectionFile);
53 void getHelpViewer(const QWidget& helpViewer);
54 void showUrl(const QString& url);
55
56private:
57 QWebEngineView *m_pView;
58 WidgetFindWord *m_pFindWord;
59 QString m_collectionFile;
60 QHelpEngine *m_pHelpEngine;
61 QtHelpUrlSchemeHandler *m_pSchemeHandler;
62 qreal m_pDefaultZoomFactor;
63 qreal m_pZoomFactor;
64 QLineEdit *m_plineEditIndex;
65 bool m_pSearched = false;
66
67protected:
68 void keyPressEvent(QKeyEvent *event);
69 void mousePressEvent(QMouseEvent *event);
70 void moveEvent(QMoveEvent* event);
71
72private slots:
73 void linkActivated(const QUrl &url);
74 void linkActivated(const QUrl &url, const QString &text);
75 void urlChanged(const QUrl &url);
76 void setupFinished();
77 void expandContent();
78 void mnuCloseWindow();
79 void mnuZoomInWindow();
80 void mnuZoomOutWindow();
81 void mnuDefaultZoomWindow();
82 void textChanged(const QString &text);
83 void returnPressed();
84 void search();
85 void requestShowLink(const QUrl &url);
86 void searchingStarted();
87 void searchingFinished(const int &hits);
88 void indexingStarted();
89 void indexingFinished();
90 void clicked(const QModelIndex &index);
91 void findNextWord(QString expr, bool regExpr, bool caseSensitive, bool wholeWord, bool wrap, bool forward, bool isQuickSeach);
92 void hideFindWordBar();
93 void showFindWordBar();
94 void visibilityChangedIndexWidget(bool visible);
95 void visibilityChangedSearchWidget(bool visible);
96 void loadFinished(bool ok);
97
98};
99
100} //end namespace ito
101
102#endif
103#endif
Definition apiFunctionsGraph.cpp:40