Changeset View
Changeset View
Standalone View
Standalone View
src/mainwindow.h
Show All 13 Lines | 1 | /* Atelier KDE Printer Host for 3D Printing | |||
---|---|---|---|---|---|
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 | #pragma once | 18 | #pragma once | ||
19 | 19 | | |||
20 | #include <QMainWindow> | 20 | #include <QMainWindow> | ||
21 | #include <QUrl> | 21 | #include <QUrl> | ||
22 | #include <AtCore/AtCore> | | |||
23 | #include <KXmlGui/KXmlGuiWindow> | 22 | #include <KXmlGui/KXmlGuiWindow> | ||
24 | #include <widgets/logwidget.h> | 23 | | ||
rizzitello: New empty space | |||||
25 | namespace Ui | 24 | namespace Ui | ||
26 | { | 25 | { | ||
27 | class MainWindow; | 26 | class MainWindow; | ||
28 | } | 27 | } | ||
29 | 28 | | |||
30 | class MainWindow : public KXmlGuiWindow | 29 | class MainWindow : public KXmlGuiWindow | ||
31 | { | 30 | { | ||
32 | Q_OBJECT | 31 | Q_OBJECT | ||
33 | 32 | | |||
34 | public: | 33 | public: | ||
35 | explicit MainWindow(QWidget *parent = nullptr); | 34 | explicit MainWindow(QWidget *parent = nullptr); | ||
36 | ~MainWindow(); | 35 | ~MainWindow(); | ||
37 | 36 | | |||
38 | private: | 37 | private: | ||
39 | Ui::MainWindow *ui; | 38 | Ui::MainWindow *ui; | ||
40 | AtCore core; | 39 | QUrl m_fileName; | ||
rizzitello: This needs to be rebased to master | |||||
41 | QUrl fileName; | | |||
42 | LogWidget *logWidget; | | |||
43 | QAction *_connect; | | |||
44 | void initConnectsToAtCore(); | | |||
45 | void initWidgets(); | | |||
46 | void setupActions(); | 40 | void setupActions(); | ||
47 | void openFile(); | 41 | void openFile(); | ||
48 | void printFile(); | 42 | void newConnection(const QString& port, const QMap<QString, QVariant>& profile); | ||
49 | void pausePrint(); | | |||
50 | void stopPrint(); | | |||
51 | void checkReceivedCommand(const QByteArray &message); | | |||
52 | void checkPushedCommands(QByteArray bmsg); | | |||
53 | void handlePrinterStatusChanged(AtCore::STATES newState); | | |||
54 | void checkTemperature(uint sensorType, uint number, uint temp); | | |||
55 | void axisControlClicked(QChar axis, int value); | | |||
56 | void toggleDockTitles(bool checked); | | |||
57 | 43 | | |||
58 | signals: | 44 | signals: | ||
59 | void extruderCountChanged(int count); | 45 | void extruderCountChanged(int count); | ||
60 | }; | 46 | }; |
New empty space