Debian Codegraph @

gui/pinyindictmanager/pipeline.h

raw
1 /*
2 * SPDX-FileCopyrightText: 2018-2018 CSSlayer <[email protected]>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 *
6 */
7 #ifndef _PINYINDICTMANAGER_PIPELINE_H_
8 #define _PINYINDICTMANAGER_PIPELINE_H_
9
10 #include "pipelinejob.h"
11 #include <QObject>
12 #include <QVector>
13
14 namespace fcitx {
15
16 class Pipeline : public QObject {
17 Q_OBJECT
18 public:
19 Pipeline(QObject *parent = nullptr);
20
21 void addJob(PipelineJob *job);
22 void start();
23 void abort();
24 void reset();
25
26 Q_SIGNALS:
27 void finished(bool);
28 void messages(const QString &message);
29
30 private:
31 void startNext();
32 void emitFinished(bool);
33
34 QVector<PipelineJob *> jobs_;
35 int index_ = -1;
36 };
37
38 } // namespace fcitx
39
40 #endif // _PINYINDICTMANAGER_PIPELINE_H_