File indexing completed on 2024-04-21 04:49:02
0001 /* 0002 SPDX-FileCopyrightText: 2016 (c) Matthieu Gallien <matthieu_gallien@yahoo.fr> 0003 0004 SPDX-License-Identifier: LGPL-3.0-or-later 0005 */ 0006 0007 #ifndef PROGRESSINDICATOR_H 0008 #define PROGRESSINDICATOR_H 0009 0010 #include "elisaLib_export.h" 0011 0012 #include <QObject> 0013 0014 class ELISALIB_EXPORT ProgressIndicator : public QObject 0015 { 0016 0017 Q_OBJECT 0018 0019 Q_PROPERTY(int position 0020 READ position 0021 WRITE setPosition 0022 NOTIFY positionChanged) 0023 0024 Q_PROPERTY(QString progressDuration 0025 READ progressDuration 0026 NOTIFY progressDurationChanged) 0027 0028 public: 0029 0030 explicit ProgressIndicator(QObject *parent = nullptr); 0031 0032 ~ProgressIndicator() override; 0033 0034 [[nodiscard]] int position() const; 0035 0036 [[nodiscard]] QString progressDuration() const; 0037 0038 Q_SIGNALS: 0039 0040 void positionChanged(); 0041 0042 void progressDurationChanged(); 0043 0044 public Q_SLOTS: 0045 0046 void setPosition(int position); 0047 0048 private: 0049 0050 int mPosition = 0; 0051 0052 QString mProgressDuration; 0053 0054 }; 0055 0056 #endif // PROGRESSINDICATOR_H