Debian Codegraph @

src/Base/FutureWatcherProgress.h

raw
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2
3 /***************************************************************************
4 * Copyright (c) 2011 Werner Mayer <wmayer[at]users.sourceforge.net> *
5 * *
6 * This file is part of the FreeCAD CAx development system. *
7 * *
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Library General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Library General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Library General Public *
19 * License along with this library; see the file COPYING.LIB. If not, *
20 * write to the Free Software Foundation, Inc., 59 Temple Place, *
21 * Suite 330, Boston, MA 02111-1307, USA *
22 * *
23 ***************************************************************************/
24
25
26 #ifndef BASE_FUTUREWATCHER_H
27 #define BASE_FUTUREWATCHER_H
28
29 #include <QObject>
30 #include <Base/Sequencer.h>
31
32
33 namespace Base
34 {
35
36 class BaseExport FutureWatcherProgress: public QObject
37 {
38 Q_OBJECT
39
40 public:
41 FutureWatcherProgress(const char* text, unsigned int steps);
42 ~FutureWatcherProgress() override;
43
44 FutureWatcherProgress(const FutureWatcherProgress&) = delete;
45 FutureWatcherProgress(FutureWatcherProgress&&) = delete;
46 FutureWatcherProgress& operator=(const FutureWatcherProgress&) = delete;
47 FutureWatcherProgress& operator=(FutureWatcherProgress&&) = delete;
48
49 public Q_SLOTS:
50 void progressValueChanged(int value);
51
52 private:
53 Base::SequencerLauncher seq;
54 unsigned int steps, current {0};
55 };
56 } // namespace Base
57
58 #endif // BASE_FUTUREWATCHER_H