Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/profilemanager.h
- This file was added.
1 | /* AtCore - Widgets | ||||
---|---|---|---|---|---|
2 | Copyright (C) <2019> | ||||
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 <QCheckBox> | ||||
21 | #include <QComboBox> | ||||
22 | #include <QHBoxLayout> | ||||
23 | #include <QLabel> | ||||
24 | #include <QRadioButton> | ||||
25 | #include <QSpinBox> | ||||
26 | #include "atcorewidgets_export.h" | ||||
27 | | ||||
28 | class ATCOREWIDGETS_EXPORT ProfileManager : public QWidget | ||||
29 | { | ||||
30 | Q_OBJECT | ||||
31 | public: | ||||
32 | ProfileManager(QWidget *parent = nullptr); | ||||
33 | | ||||
34 | private: | ||||
35 | void onCbProfileEditingFinished(); | ||||
36 | void onRadioCartesianToggled(bool checked); | ||||
37 | QStringList detectFWPlugins() ; | ||||
38 | QStringList firmwaresInPath(const QString &path); | ||||
39 | void loadProfile(const QString &profileName); | ||||
40 | | ||||
41 | QCheckBox *checkAutoTempReport = nullptr; | ||||
42 | QComboBox *cbBaud = nullptr; | ||||
43 | QComboBox *cbFirmware = nullptr; | ||||
44 | QComboBox *cbProfile = nullptr; | ||||
45 | QRadioButton *radioCartesian = nullptr; | ||||
46 | QRadioButton *radioDelta = nullptr; | ||||
47 | QLabel *lblX = nullptr; | ||||
48 | QLabel *lblZ = nullptr; | ||||
49 | QLineEdit *lineName = nullptr; | ||||
50 | QLineEdit *linePostPause = nullptr; | ||||
51 | QSpinBox *sbMaxBedTemp = nullptr; | ||||
52 | QSpinBox *sbMaxExtTemp = nullptr; | ||||
53 | QSpinBox *sbMaxX = nullptr; | ||||
54 | QSpinBox *sbMaxY = nullptr; | ||||
55 | QSpinBox *sbMaxZ = nullptr; | ||||
56 | QWidget *axisY = nullptr; | ||||
57 | }; | ||||
58 | | ||||
59 | namespace SERIAL | ||||
60 | { | ||||
61 | static const QStringList BAUDS = { | ||||
62 | QStringLiteral("9600"), | ||||
63 | QStringLiteral("14400"), | ||||
64 | QStringLiteral("19200"), | ||||
65 | QStringLiteral("28800"), | ||||
66 | QStringLiteral("38400"), | ||||
67 | QStringLiteral("57600"), | ||||
68 | QStringLiteral("76800"), | ||||
69 | QStringLiteral("115200"), | ||||
70 | QStringLiteral("230400"), | ||||
71 | QStringLiteral("250000"), | ||||
72 | QStringLiteral("500000"), | ||||
73 | QStringLiteral("1000000") | ||||
74 | }; | ||||
75 | } |