AtCore  1.0.72
AtCore is a API to manage the serial connection between the computer and 3D Printers.
statuswidget.h
Go to the documentation of this file.
1 /* AtCore KDE Libary for 3D Printers
2  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
3  SPDX-FileCopyrightText: 2018, 2020 Chris Rizzitello <rizzitello@kde.org>
4 */
5 
6 #pragma once
7 
8 #include <QWidget>
9 
10 #include "atcorewidgets_export.h"
11 
12 class QElapsedTimer;
13 class QLabel;
14 class QProgressBar;
15 class QSpacerItem;
16 class QTimer;
20 class ATCOREWIDGETS_EXPORT StatusWidget : public QWidget
21 {
22  Q_OBJECT
23 public:
29  explicit StatusWidget(bool showStop = true, QWidget *parent = nullptr);
30  ~StatusWidget() = default;
35  void setSD(bool hasSd);
40  void setState(const QString &state);
45  void showPrintArea(bool visible);
50  void updatePrintProgress(const int progress);
51 
52 signals:
53  void stopPressed();
54 
55 private slots:
56  void updatePrintTime();
57 
58 private:
59  QLabel *lblState = nullptr;
60  QLabel *lblSd = nullptr;
61  QLabel *lblTime = nullptr;
62  QLabel *lblTimeLeft = nullptr;
63  QElapsedTimer *printTime = nullptr;
64  QTimer *printTimer = nullptr;
65  QSpacerItem *spacer = nullptr;
66  QProgressBar *printingProgress = nullptr;
67  QWidget *printProgressWidget = nullptr;
68 };
The StatusWidget class Status Bar information for atcore.
Definition: statuswidget.h:21
void stopPressed()
~StatusWidget()=default