File indexing completed on 2024-05-19 05:51:03
0001 /* Atelier KDE Printer Host for 3D Printing 0002 Copyright (C) <2016> 0003 Author: Lays Rodrigues - lays.rodrigues@kde.org 0004 Tomaz Canabraza - tcanabrava@kde.org 0005 Chris Rizzitello - rizzitello@kde.org 0006 0007 This program is free software: you can redistribute it and/or modify 0008 it under the terms of the GNU General Public License as published by 0009 the Free Software Foundation, either version 3 of the License, or 0010 (at your option) any later version. 0011 0012 This program is distributed in the hope that it will be useful, 0013 but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0015 GNU General Public License for more details. 0016 0017 You should have received a copy of the GNU General Public License 0018 along with this program. If not, see <http://www.gnu.org/licenses/>. 0019 */ 0020 #pragma once 0021 0022 #include <QHBoxLayout> 0023 #include <QMap> 0024 #include <QRadioButton> 0025 #include <QWidget> 0026 0027 class ThermoWidget; 0028 0029 class BedExtruderWidget : public QWidget 0030 { 0031 Q_OBJECT 0032 0033 public: 0034 explicit BedExtruderWidget(QWidget *parent = nullptr); 0035 ~BedExtruderWidget() = default; 0036 void setExtruderCount(int value); 0037 void setBedMaxTemperature(int value); 0038 void setExtruderMaxTemperature(int value); 0039 void updateBedTemp(const float temp); 0040 void updateExtTemp(const float temp); 0041 void updateBedTargetTemp(const int temp); 0042 void updateExtTargetTemp(const int temp); 0043 void setBedThermoHidden(bool hidden); 0044 0045 private: 0046 int m_extruderCount = 0; 0047 ThermoWidget *m_bedThermo = nullptr; 0048 ThermoWidget *m_extruderThermo = nullptr; 0049 QMap<int, QRadioButton *> extruderMap; 0050 QHBoxLayout *m_extrudersLayout = nullptr; 0051 QWidget *m_extruderBox = nullptr; 0052 int currentExtruder(); 0053 0054 signals: 0055 void bedTemperatureChanged(int tmp, bool andWait); 0056 void extTemperatureChanged(int tmp, int currExt, bool andWait); 0057 };