mirror of https://github.com/cutefishos/calamares
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
/* === This file is part of Calamares - <https://calamares.io> ===
|
|
*
|
|
* SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*
|
|
* Calamares is Free Software: see the License-Identifier above.
|
|
*
|
|
*/
|
|
|
|
#ifndef SCANNINGDIALOG_H
|
|
#define SCANNINGDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include <QFuture>
|
|
|
|
#include <functional>
|
|
|
|
class ScanningDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ScanningDialog( const QString& text, const QString& windowTitle, QWidget* parent = nullptr );
|
|
|
|
static void run(
|
|
const QFuture< void >& future,
|
|
const QString& text,
|
|
const QString& windowTitle,
|
|
const std::function< void() >& callback = [] {},
|
|
QWidget* parent = nullptr );
|
|
|
|
static void run(
|
|
const QFuture< void >& future,
|
|
const std::function< void() >& callback = [] {},
|
|
QWidget* parent = nullptr );
|
|
|
|
public slots:
|
|
void setVisible( bool visible ) override;
|
|
|
|
signals:
|
|
void visibilityChanged();
|
|
};
|
|
|
|
#endif // SCANNINGDIALOG_H
|