Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/atcoreinstancewidget.h
Show All 11 Lines | 1 | /* Atelier KDE Printer Host for 3D Printing | |||
---|---|---|---|---|---|
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. | ||
14 | 14 | | |||
15 | You should have received a copy of the GNU General Public License | 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/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | #pragma once | 19 | #pragma once | ||
20 | #include <QWidget> | | |||
21 | #include <QUrl> | | |||
22 | #include <QToolBar> | | |||
23 | #include <AtCore/AtCore> | 20 | #include <AtCore/AtCore> | ||
21 | #include <QComboBox> | ||||
24 | #include <QList> | 22 | #include <QList> | ||
25 | 23 | #include <QPushButton> | |||
24 | #include <QSettings> | ||||
25 | #include <QToolBar> | ||||
26 | #include <QUrl> | ||||
27 | #include <QWidget> | ||||
patrickelectric: Push before settings. | |||||
26 | namespace Ui | 28 | namespace Ui | ||
27 | { | 29 | { | ||
28 | class AtCoreInstanceWidget; | 30 | class AtCoreInstanceWidget; | ||
29 | } | 31 | } | ||
30 | 32 | | |||
31 | /** | 33 | /** | ||
32 | * @todo write docs | 34 | * @todo write docs | ||
33 | */ | 35 | */ | ||
Show All 10 Lines | 40 | public: | |||
44 | /** | 46 | /** | ||
45 | * Destructor | 47 | * Destructor | ||
46 | */ | 48 | */ | ||
47 | ~AtCoreInstanceWidget(); | 49 | ~AtCoreInstanceWidget(); | ||
48 | void startConnection(const QString& serialPort, const QMap<QString, QVariant>& profile); | 50 | void startConnection(const QString& serialPort, const QMap<QString, QVariant>& profile); | ||
49 | bool connected(); | 51 | bool connected(); | ||
50 | void setOpenFiles(const QList<QUrl>& files); | 52 | void setOpenFiles(const QList<QUrl>& files); | ||
51 | 53 | | |||
54 | public slots: | ||||
55 | void updateProfileData(); | ||||
56 | | ||||
52 | private: | 57 | private: | ||
53 | Ui::AtCoreInstanceWidget* ui; | 58 | Ui::AtCoreInstanceWidget* ui; | ||
54 | AtCore m_core; | 59 | AtCore m_core; | ||
55 | QToolBar *m_mainToolBar; | 60 | QToolBar *m_mainToolBar; | ||
61 | QComboBox *m_comboPort; | ||||
62 | QComboBox *m_comboProfile; | ||||
63 | QPushButton *m_connectButton; | ||||
64 | QToolBar *m_connectToolBar; | ||||
patrickelectric: button before toolbar | |||||
65 | QWidget *m_connectWidget; | ||||
56 | QToolBar *m_toolBar; | 66 | QToolBar *m_toolBar; | ||
57 | QMap<QString, QVariant> profileData; | 67 | QMap<QString, QVariant> profileData; | ||
58 | QList<QUrl> m_files; | 68 | QList<QUrl> m_files; | ||
59 | QAction *m_printAction; | 69 | QAction *m_printAction; | ||
70 | QSettings m_settings; | ||||
patrickelectric: m_ | |||||
60 | void initConnectsToAtCore(); | 71 | void initConnectsToAtCore(); | ||
61 | void printFile(const QUrl& fileName); | 72 | void printFile(const QUrl& fileName); | ||
62 | void pausePrint(); | 73 | void pausePrint(); | ||
63 | void stopPrint(); | 74 | void stopPrint(); | ||
64 | void disableMotors(); | 75 | void disableMotors(); | ||
65 | void checkReceivedCommand(const QByteArray &message); | 76 | void checkReceivedCommand(const QByteArray &message); | ||
66 | void checkPushedCommands(const QByteArray &bmsg); | 77 | void checkPushedCommands(const QByteArray &bmsg); | ||
67 | void handlePrinterStatusChanged(AtCore::STATES newState); | 78 | void handlePrinterStatusChanged(AtCore::STATES newState); | ||
68 | void checkTemperature(uint sensorType, uint number, uint temp); | 79 | void checkTemperature(uint sensorType, uint number, uint temp); | ||
69 | void axisControlClicked(QChar axis, int value); | 80 | void axisControlClicked(QChar axis, int value); | ||
70 | void enableControls(bool b); | 81 | void enableControls(bool b); | ||
71 | void buildToolbar(); | 82 | void buildToolbar(); | ||
72 | void buildMainToolbar(); | 83 | void buildMainToolbar(); | ||
73 | void print(); | 84 | void print(); | ||
85 | void updateSerialPort(const QStringList &ports); | ||||
86 | void buildConnectionToolbar(); | ||||
87 | void connectButtonClicked(); | ||||
74 | signals: | 88 | signals: | ||
75 | void extruderCountChanged(int count); | 89 | void extruderCountChanged(int count); | ||
76 | void disableDisconnect(bool b); | 90 | void disableDisconnect(bool b); | ||
91 | void connectionChanged(QString name); | ||||
77 | }; | 92 | }; |
Push before settings.