File indexing completed on 2025-01-19 03:53:52

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2003-02-10
0007  * Description : a widget to display splash with progress bar
0008  *
0009  * SPDX-FileCopyrightText: 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
0010  * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_DSPLASH_SCREEN_H
0017 #define DIGIKAM_DSPLASH_SCREEN_H
0018 
0019 // Qt includes
0020 
0021 #include <QPainter>
0022 #include <QSplashScreen>
0023 
0024 // Local includes
0025 
0026 #include "digikam_export.h"
0027 
0028 namespace Digikam
0029 {
0030 
0031 class DIGIKAM_EXPORT DSplashScreen : public QSplashScreen
0032 {
0033     Q_OBJECT
0034 
0035 public:
0036 
0037     DSplashScreen();
0038     ~DSplashScreen()             override;
0039 
0040     void setColor(const QColor& color);
0041     void setMessage(const QString& message);
0042 
0043 protected:
0044 
0045     void drawContents(QPainter*) override;
0046 
0047 private Q_SLOTS:
0048 
0049     void slotAnimate();
0050 
0051 private:
0052 
0053     // Disable
0054     explicit DSplashScreen(QWidget*) = delete;
0055 
0056 private:
0057 
0058     class Private;
0059     Private* const d;
0060 };
0061 
0062 } // namespace Digikam
0063 
0064 #endif // DIGIKAM_DSPLASH_SCREEN_H