summaryrefslogtreecommitdiffstats
path: root/examples/assistant/simpletextviewer/assistant.h
blob: 1cbc8b9e2c458cbe89b356e3fbbac9806364879a (plain)
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
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#ifndef ASSISTANT_H
#define ASSISTANT_H

#include <QCoreApplication>
#include <QProcess>
#include <QScopedPointer>
#include <QString>

class Assistant
{
    Q_DECLARE_TR_FUNCTIONS(Assistant)

public:
    ~Assistant();
    void showDocumentation(const QString &file);

private:
    bool startAssistant();
    void showError(const QString &message);
    void finished(int exitCode, QProcess::ExitStatus status);

    QScopedPointer<QProcess> m_process;
};

#endif