FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
base_runner_signals.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** FougTools
3 ** Copyright Fougue (30 Mar. 2015)
4 ** contact@fougue.pro
5 **
6 ** This software is a computer program whose purpose is to provide utility
7 ** tools for the C++ language and the Qt toolkit.
8 **
9 ** This software is governed by the CeCILL-C license under French law and
10 ** abiding by the rules of distribution of free software. You can use,
11 ** modify and/ or redistribute the software under the terms of the CeCILL-C
12 ** license as circulated by CEA, CNRS and INRIA at the following URL
13 ** "http://www.cecill.info".
14 ****************************************************************************/
15 
16 #pragma once
17 
18 #include <QtCore/QObject>
19 
20 namespace qttask {
21 
22 class BaseRunner;
23 class Manager;
24 
30 class BaseRunnerSignals : public QObject
31 {
32  Q_OBJECT
33 
34 public:
35  BaseRunnerSignals(BaseRunner* runner, QObject* parent = nullptr);
36 
37  void emitAboutToRun();
38  void emitStarted(const QString& title);
39  void emitProgressStep(const QString &title);
40  void emitProgress(int pct);
41  void emitMessage(const QString &msg);
42  void emitEnded();
43  void emitDestroyRequest();
44 
45 signals:
46  void aboutToRun(BaseRunner* runner);
47  void started(quint64 taskId, const QString& title);
48  void progressStep(quint64 taskId, const QString& title);
49  void progress(quint64 taskId, int pct);
50  void message(quint64 taskId, const QString& msg);
51  void ended(quint64 taskId);
52  void destroyRequest(BaseRunner* runner);
53 
54 private:
55  BaseRunner* m_runner;
56 };
57 
58 } // namespace qttask
void emitProgressStep(const QString &title)
Definition: base_runner_signals.cpp:46
Base class for all runner objects.
Definition: base_runner.h:31
void aboutToRun(BaseRunner *runner)
void progress(quint64 taskId, int pct)
void ended(quint64 taskId)
void emitMessage(const QString &msg)
Definition: base_runner_signals.cpp:56
void emitAboutToRun()
Definition: base_runner_signals.cpp:36
void emitDestroyRequest()
Definition: base_runner_signals.cpp:66
void emitEnded()
Definition: base_runner_signals.cpp:61
BaseRunnerSignals(BaseRunner *runner, QObject *parent=nullptr)
Definition: base_runner_signals.cpp:23
void message(quint64 taskId, const QString &msg)
void emitProgress(int pct)
Definition: base_runner_signals.cpp:51
Provides task Qt signals, to be forwarded to the Manager object.
Definition: base_runner_signals.h:30
void started(quint64 taskId, const QString &title)
Definition: base_runner.cpp:20
void emitStarted(const QString &title)
Definition: base_runner_signals.cpp:41
void destroyRequest(BaseRunner *runner)
void progressStep(quint64 taskId, const QString &title)