File indexing completed on 2024-05-12 04:41:12
0001 /* AtCore KDE Libary for 3D Printers 0002 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0003 SPDX-FileCopyrightText: 2018, 2020 Chris Rizzitello <rizzitello@kde.org> 0004 */ 0005 0006 #pragma once 0007 0008 #include <QWidget> 0009 0010 #include "atcorewidgets_export.h" 0011 0012 class QCheckBox; 0013 class QComboBox; 0014 class QSpinBox; 0015 0016 /** 0017 * @brief The TemperatureWidget Control the bed and extruder(s) temperatures 0018 */ 0019 class ATCOREWIDGETS_EXPORT TemperatureWidget : public QWidget 0020 { 0021 Q_OBJECT 0022 public: 0023 /** 0024 * @brief TemperatureWidget 0025 * @param parent 0026 */ 0027 explicit TemperatureWidget(QWidget *parent = nullptr); 0028 ~TemperatureWidget() = default; 0029 0030 /** 0031 * @brief Update widget with count extruder controls 0032 * @param count: number of extruder controls needed. 0033 */ 0034 void updateExtruderCount(const int count); 0035 0036 signals: 0037 /** 0038 * @brief User has changed the bed temperature. 0039 * @param temperature: new temperature 0040 * @param andWait: true if heat and wait mode 0041 */ 0042 void bedTempChanged(const int temperature, bool andWait); 0043 0044 /** 0045 * @brief User has changed the extruder temperature. 0046 * @param temperature: new temperature 0047 * @param extNum: the extruder to change temperature of 0048 * @param andWait: true if head and wait mode. 0049 */ 0050 void extTempChanged(const int temperature, const int extNum, bool andWait); 0051 0052 private: 0053 QCheckBox *checkAndWait = nullptr; 0054 QComboBox *comboExtruderSelect; 0055 QSpinBox *sbBedTemp = nullptr; 0056 QSpinBox *sbExtruderTemp; 0057 };