AtCore  1.0.70
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 Test Client
2  Copyright (C) <2018 - 2020>
3  Author: Chris Rizzitello - rizzitello@kde.org
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #pragma once
19 
20 #include <QWidget>
21 
22 #include "atcorewidgets_export.h"
23 
24 class QElapsedTimer;
25 class QLabel;
26 class QProgressBar;
27 class QSpacerItem;
28 class QTimer;
32 class ATCOREWIDGETS_EXPORT StatusWidget : public QWidget
33 {
34  Q_OBJECT
35 public:
41  StatusWidget(bool showStop = true, QWidget *parent = nullptr);
42  ~StatusWidget() = default;
47  void setSD(bool hasSd);
52  void setState(const QString &state);
57  void showPrintArea(bool visible);
62  void updatePrintProgress(const int progress);
63 
64 signals:
65  void stopPressed();
66 
67 private slots:
68  void updatePrintTime();
69 
70 private:
71  QLabel *lblState = nullptr;
72  QLabel *lblSd = nullptr;
73  QLabel *lblTime = nullptr;
74  QLabel *lblTimeLeft = nullptr;
75  QElapsedTimer *printTime = nullptr;
76  QTimer *printTimer = nullptr;
77  QSpacerItem *spacer = nullptr;
78  QProgressBar *printingProgress = nullptr;
79  QWidget *printProgressWidget = nullptr;
80 };
The StatusWidget class Status Bar information for atcore.
Definition: statuswidget.h:32