File indexing completed on 2024-12-01 04:37:03

0001 /*
0002    SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "libruqolawidgets_private_export.h"
0010 #include <QWidget>
0011 class QProgressBar;
0012 class QLabel;
0013 class QToolButton;
0014 class LIBRUQOLAWIDGETS_TESTS_EXPORT UploadFileProgressStatusWidget : public QWidget
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit UploadFileProgressStatusWidget(QWidget *parent = nullptr);
0019     ~UploadFileProgressStatusWidget() override;
0020 
0021     void setValue(int value);
0022     void setUploadFileName(const QString &str);
0023 
0024     [[nodiscard]] int identifier() const;
0025     void setIdentifier(int newIdentifier);
0026 
0027 Q_SIGNALS:
0028     void cancelUpload(int identifier);
0029 
0030 private:
0031     int mIdentifier = -1;
0032     QLabel *const mFileName;
0033     QProgressBar *const mProgressBar;
0034     QToolButton *const mCancelToolButton;
0035 };