File indexing completed on 2024-04-28 05:46:35
0001 /* 0002 SPDX-FileCopyrightText: 2010 Volker Lanz <vl@fidra.de> 0003 SPDX-FileCopyrightText: 2014-2018 Andrius Štikonas <andrius@stikonas.eu> 0004 SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net> 0005 0006 SPDX-License-Identifier: GPL-3.0-or-later 0007 */ 0008 0009 #ifndef SCANPROGRESSDIALOG_H 0010 #define SCANPROGRESSDIALOG_H 0011 0012 #include <QProgressBar> 0013 #include <QProgressDialog> 0014 0015 class ScanProgressDialog : public QProgressDialog 0016 { 0017 public: 0018 explicit ScanProgressDialog(QWidget* parent); 0019 0020 void setProgress(int p) { 0021 setValue(p); 0022 } 0023 0024 void setDeviceName(const QString& device); 0025 0026 protected: 0027 void closeEvent(QCloseEvent* e) override; 0028 void showEvent(QShowEvent* e) override; 0029 0030 private: 0031 QProgressBar* findProgressBar(); 0032 }; 0033 0034 #endif