-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.hpp
49 lines (40 loc) · 1.53 KB
/
MainWindow.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/** @file MainWindow.hpp
* Display the help content and the program main controls.
* @author Adrien RICCIARDI
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
QT_BEGIN_NAMESPACE
namespace Ui
{
class MainWindow;
}
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
/** Configure the text browser so it can display the initial document and is able to follow hyperlinks.
* @param basePath The "website" root directory, each hyperlink relative URL is concatened to this base path.
* @param homeDocumentName The document to display when the user clicks the "home" button.
* @param displayedDocumentName The document to display on the text browser.
*/
void setContentSettings(QString basePath, QString homeDocumentName, QString displayedDocumentName);
/** Display the specified document.
* @param documentName The document to display file name and extension. Its path is relative to the base path provided in setContentSettings().
*/
void displayDocument(QString documentName);
private:
Ui::MainWindow *ui;
private slots:
/** Called when the user is allowed to go backward. */
void _slotTextBrowserBackwardAvailable(bool isAvailable);
/** Called when the user is allowed to go forward. */
void _slotTextBrowserForwardAvailable(bool isAvailable);
/** Called when the user clicks the "about" button. */
void _slotPushButtonAboutClicked(bool isChecked);
};
#endif // MAINWINDOW_H