File indexing completed on 2024-03-24 05:57:08
0001 /** 0002 * SPDX-FileCopyrightText: 2021 by Alexander Stippich <a.stippich@gmx.net> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #ifndef IN_PROGRESS_PAINTER_H 0008 #define IN_PROGRESS_PAINTER_H 0009 0010 #include <QQuickPaintedItem> 0011 0012 #include "Skanpage.h" 0013 0014 class InProgressPainter : public QQuickPaintedItem 0015 { 0016 Q_OBJECT 0017 0018 public: 0019 explicit InProgressPainter(QQuickItem *parent = nullptr); 0020 ~InProgressPainter(); 0021 0022 void paint(QPainter *painter) override; 0023 Q_INVOKABLE void initialize(Skanpage *skanpageApp); 0024 0025 private Q_SLOTS: 0026 void updateImage(int progress); 0027 0028 private: 0029 KSaneCore::Interface *m_scanInterface = nullptr; 0030 int m_progress = 0; 0031 }; 0032 0033 #endif // IN_PROGRESS_PAINTER_H