1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
3 | |
4 | #ifndef REMOTECONTROL_H |
5 | #define REMOTECONTROL_H |
6 | |
7 | #include <QtCore/QObject> |
8 | #include <QtCore/QString> |
9 | #include <QtCore/QUrl> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | class HelpEngineWrapper; |
14 | class MainWindow; |
15 | |
16 | class RemoteControl : public QObject |
17 | { |
18 | Q_OBJECT |
19 | |
20 | public: |
21 | RemoteControl(MainWindow *mainWindow); |
22 | |
23 | private slots: |
24 | void handleCommandString(const QString &cmdString); |
25 | void applyCache(); |
26 | |
27 | private: |
28 | void clearCache(); |
29 | void splitInputString(const QString &input, QString &cmd, QString &arg); |
30 | void handleDebugCommand(const QString &arg); |
31 | void handleShowOrHideCommand(const QString &arg, bool show); |
32 | void handleSetSourceCommand(const QString &arg); |
33 | void handleSyncContentsCommand(); |
34 | void handleActivateKeywordCommand(const QString &arg); |
35 | void handleActivateIdentifierCommand(const QString &arg); |
36 | void handleExpandTocCommand(const QString &arg); |
37 | void handleSetCurrentFilterCommand(const QString &arg); |
38 | void handleRegisterCommand(const QString &arg); |
39 | void handleUnregisterCommand(const QString &arg); |
40 | |
41 | private: |
42 | MainWindow *m_mainWindow; |
43 | QUrl m_setSource; |
44 | QString m_activateKeyword; |
45 | QString m_activateIdentifier; |
46 | QString m_currentFilter; |
47 | HelpEngineWrapper &helpEngine; |
48 | int m_expandTOC = -2; |
49 | bool m_debug = false; |
50 | |
51 | bool m_caching = true; |
52 | bool m_syncContents = false; |
53 | }; |
54 | |
55 | QT_END_NAMESPACE |
56 | |
57 | #endif |
58 | |