File indexing completed on 2024-05-05 10:08:43
0001 /* 0002 SPDX-FileCopyrightText: 2007 Nicolas Ternisien <nicolas.ternisien@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QWidget> 0010 0011 #include "logFile.h" 0012 #include "logMode.h" 0013 0014 class QProgressBar; 0015 class QLabel; 0016 /** 0017 * TODO Try to have a working Cancel button (for the moment, it only hide the Loading Dialog) 0018 */ 0019 class LoadingBar : public QWidget 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 explicit LoadingBar(QWidget *parent = nullptr); 0025 0026 ~LoadingBar() override; 0027 0028 QProgressBar *progressBar() const; 0029 0030 public Q_SLOTS: 0031 0032 void startLoading(const LogMode &logMode, const LogFile &logFile, int fileIndex, int fileCount); 0033 void endLoading(); 0034 0035 void progressLoading(); 0036 0037 Q_SIGNALS: 0038 void displayed(bool displayed); 0039 0040 private: 0041 bool mFirstLoading = true; 0042 0043 QLabel *mLabel = nullptr; 0044 0045 QProgressBar *mProgressBar = nullptr; 0046 };