Changeset View
Changeset View
Standalone View
Standalone View
src/core/atcore.h
Show All 26 Lines | |||||
27 | 27 | | |||
28 | #include <QObject> | 28 | #include <QObject> | ||
29 | #include <QSerialPort> | 29 | #include <QSerialPort> | ||
30 | #include <QSerialPortInfo> | 30 | #include <QSerialPortInfo> | ||
31 | 31 | | |||
32 | #include "ifirmware.h" | 32 | #include "ifirmware.h" | ||
33 | #include "temperature.h" | 33 | #include "temperature.h" | ||
34 | #include "atcore_export.h" | 34 | #include "atcore_export.h" | ||
35 | #include "beddeform.h" | ||||
35 | 36 | | |||
36 | class SerialLayer; | 37 | class SerialLayer; | ||
37 | class IFirmware; | 38 | class IFirmware; | ||
38 | class QTime; | 39 | class QTime; | ||
39 | 40 | | |||
40 | /** | 41 | /** | ||
41 | * @brief The AtCore class | 42 | * @brief The AtCore class | ||
42 | * aims to provides a high level interface for serial based gcode devices<br /> | 43 | * aims to provides a high level interface for serial based gcode devices<br /> | ||
▲ Show 20 Lines • Show All 487 Lines • ▼ Show 20 Line(s) | 488 | private slots: | |||
530 | */ | 531 | */ | ||
531 | void getSDFileList(); | 532 | void getSDFileList(); | ||
532 | 533 | | |||
533 | /** | 534 | /** | ||
534 | * @brief Handle serial Errors. | 535 | * @brief Handle serial Errors. | ||
535 | */ | 536 | */ | ||
536 | void handleSerialError(QSerialPort::SerialPortError error); | 537 | void handleSerialError(QSerialPort::SerialPortError error); | ||
537 | 538 | | |||
539 | /** | ||||
540 | * @brief The Bed Deform data as told by the Firmware. | ||||
541 | */ | ||||
542 | BedDeform &bedDeform() const; | ||||
tcanabrava: return by copy, this eliminates possible crashes. | |||||
If this is wrong we should also fix the Temperature object return. (it returns a constRef to the temperature object) rizzitello: If this is wrong we should also fix the Temperature object return. (it returns a constRef to… | |||||
QObjects are not allowing copies. So only by ref is working. I'm also having various issues storing via QSharedPtr and various smart pointers. (maybe i am doing it wrong?) rizzitello: QObjects are not allowing copies. So only by ref is working. I'm also having various issues… | |||||
patrickelectric: You can define a copy operator.
| |||||
538 | private: | 543 | private: | ||
539 | 544 | | |||
540 | /** | 545 | /** | ||
541 | * @brief Load A firmware plugin | 546 | * @brief Load A firmware plugin | ||
542 | * @param fwName : name of the firmware | 547 | * @param fwName : name of the firmware | ||
543 | * @sa firmwarePlugin(), availableFirmwarePlugins() | 548 | * @sa firmwarePlugin(), availableFirmwarePlugins() | ||
544 | */ | 549 | */ | ||
545 | Q_INVOKABLE void loadFirmwarePlugin(const QString &fwName); | 550 | Q_INVOKABLE void loadFirmwarePlugin(const QString &fwName); | ||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |
return by copy, this eliminates possible crashes.