├── .gitignore
├── icons
├── bed.png
├── usb.png
├── extruder.png
├── filament.png
├── icons.qrc
└── icons.svg
├── src
├── resources.qrc
├── brprint3d.cpp
├── brprint3d.h
├── main.cpp
├── gcodehighlighter.h
├── qml-files
│ ├── SettingsButton.qml
│ ├── RealTimeWidget.qml
│ ├── GCodeEditor.qml
│ ├── FilamentSettings.qml
│ ├── ConnectionSettings.qml
│ ├── BedSettings.qml
│ ├── ExtruderSettings.qml
│ └── main.qml
├── gcodehandler.h
├── gcodehighlighter.cpp
└── gcodehandler.cpp
├── controllers
├── printercontroller.cpp
└── printercontroller.h
├── CMakeLists.txt
├── qt-models
├── extruderobject.h
├── extrudermodel.h
├── connectobject.cpp
├── extruderobject.cpp
├── bedobject.cpp
├── bedobject.h
├── connectobject.h
└── extrudermodel.cpp
├── README.md
└── LICENSE.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | *.pro.*
2 |
--------------------------------------------------------------------------------
/icons/bed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/probonopd/brprint3d/master/icons/bed.png
--------------------------------------------------------------------------------
/icons/usb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/probonopd/brprint3d/master/icons/usb.png
--------------------------------------------------------------------------------
/icons/extruder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/probonopd/brprint3d/master/icons/extruder.png
--------------------------------------------------------------------------------
/icons/filament.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/probonopd/brprint3d/master/icons/filament.png
--------------------------------------------------------------------------------
/icons/icons.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | bed.png
4 | extruder.png
5 | filament.png
6 | usb.png
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/resources.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qml-files/main.qml
4 | qml-files/SettingsButton.qml
5 | qml-files/BedSettings.qml
6 | qml-files/ConnectionSettings.qml
7 | qml-files/ExtruderSettings.qml
8 | qml-files/GCodeEditor.qml
9 | qml-files/RealTimeWidget.qml
10 | qml-files/FilamentSettings.qml
11 |
12 |
13 |
--------------------------------------------------------------------------------
/controllers/printercontroller.cpp:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 |
24 | #include "printercontroller.h"
25 |
26 | PrinterController::PrinterController()
27 | {
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/brprint3d.cpp:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 | #include "Br-Print3D.h"
24 |
25 | Br-Print3D::Br-Print3D()
26 | {
27 | }
28 |
29 | Br-Print3D::~Br-Print3D()
30 | {}
31 |
32 |
--------------------------------------------------------------------------------
/src/brprint3d.h:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 | #ifndef Br-Print3D_H
24 | #define Br-Print3D_H
25 |
26 |
27 | class Br-Print3D
28 | {
29 |
30 | public:
31 | Br-Print3D();
32 | ~Br-Print3D();
33 | };
34 |
35 | #endif // Br-Print3D_H
36 |
--------------------------------------------------------------------------------
/controllers/printercontroller.h:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 |
24 | #ifndef PRINTERCONTROLLER_H
25 | #define PRINTERCONTROLLER_H
26 |
27 |
28 | class PrinterController
29 | {
30 | public:
31 | PrinterController();
32 | };
33 |
34 | #endif // PRINTERCONTROLLER_H
35 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | project(brprint3d)
2 | cmake_minimum_required(VERSION 2.8)
3 |
4 | set(CMAKE_AUTOMOC ON)
5 |
6 | if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX)
7 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ")
8 | endif()
9 |
10 | find_package(Qt5 REQUIRED COMPONENTS
11 | Core
12 | Test
13 | Quick
14 | Widgets
15 | )
16 |
17 | include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
18 |
19 | set(qtModels_SRCS
20 | qt-models/bedobject.cpp
21 | qt-models/extruderobject.cpp
22 | qt-models/extrudermodel.cpp
23 | qt-models/connectobject.cpp
24 | )
25 | set(controllers_SRCS
26 | controllers/printercontroller.cpp
27 | )
28 |
29 | set(brprint3d_SRCS
30 | src/brprint3d.cpp
31 | src/main.cpp
32 | src/gcodehighlighter.cpp
33 | src/gcodehandler.cpp
34 | )
35 | qt5_add_resources(RESOURCES src/resources.qrc icons/icons.qrc)
36 |
37 | add_executable(brprint3d ${brprint3d_SRCS} ${qtModels_SRCS} ${controllers_SRCS} ${RESOURCES})
38 | qt5_use_modules(brprint3d Quick Core)
39 | target_link_libraries(brprint3d Qt5::Core Qt5::Quick Qt5::Widgets)
40 |
41 | #install(TARGETS brprint3d RUNTIME DESTINATION bin)
42 |
--------------------------------------------------------------------------------
/src/main.cpp:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | BrPrint3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 BRPrint3D Authors
6 |
7 | This file is part of the BrPrint3D project
8 |
9 | BrPrint3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | BrPrint3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with BrPrint3D. If not, see .
21 |
22 | ======================================================================*/
23 |
24 | #include
25 | #include
26 | #include
27 | #include "gcodehandler.h"
28 |
29 | int main(int argc, char *argv[])
30 | {
31 | QApplication app(argc, argv);
32 |
33 | QCoreApplication::setOrganizationName("KDE");
34 | QCoreApplication::setOrganizationDomain("kde.org");
35 | QCoreApplication::setApplicationName("brprint3d");
36 |
37 | qmlRegisterUncreatableType("brprint3d", 1, 0, "GcodeHandler", " dont use that ");
38 |
39 | QQmlApplicationEngine engine;
40 |
41 | engine.rootContext()->setContextProperty("gcodeHandler", new GCodeHandler());
42 | engine.load(QUrl(QStringLiteral("qrc:/base/qml-files/main.qml")));
43 |
44 | return app.exec();
45 | }
46 |
--------------------------------------------------------------------------------
/qt-models/extruderobject.h:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 | #ifndef EXTRUDEROBJECT_H
24 | #define EXTRUDEROBJECT_H
25 |
26 |
27 | class ExtruderObject
28 | {
29 | public:
30 | ExtruderObject(int nExtruder, int maxtemp, int mov, int ext, int fan);
31 | double currTemp;
32 | void setMaxTemp(int t);
33 | void setMovSpeed(int s);
34 | void setExtrusionSpeed(int s);
35 | void setFanSpeed(int s);
36 | void setExtrusionQnt(double q);
37 | int getMaxTemp();
38 | int getMovSpeed();
39 | int getExtrusionSpeed();
40 | int getFanSpeed();
41 | double getExtrusionQnt();
42 |
43 | private:
44 | int maxTemp;
45 | int movimentSpeed;
46 | int extrusionSpeed;
47 | int fanSpeed;
48 | int extruderNumber;
49 | double extrusionQnt;
50 | };
51 |
52 | #endif // EXTRUDEROBJECT_H
53 |
--------------------------------------------------------------------------------
/qt-models/extrudermodel.h:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 | #ifndef EXTRUDERMODEL_H
24 | #define EXTRUDERMODEL_H
25 | //QtIncludes
26 | #include
27 | #include
28 | //LocalIncludes
29 | #include "extruderobject.h"
30 |
31 | class ExtruderModel : public QAbstractTableModel
32 | {
33 | public:
34 | ExtruderModel(int qntExtruders, QList list);
35 | virtual int rowCount(const QModelIndex &parent) const;
36 | virtual int columnCount(const QModelIndex &parent) const;
37 | virtual QVariant data(const QModelIndex &index, int role) const;
38 | virtual bool setData(const QModelIndex &index, const QVariant &value, int role);
39 | virtual Qt::ItemFlags flags(const QModelIndex &index) const;
40 | private:
41 | int m_qntExtruders;
42 | QList extruderList;
43 | void updateExtruderTemp();
44 | };
45 |
46 | #endif // EXTRUDERMODEL_H
47 |
--------------------------------------------------------------------------------
/src/gcodehighlighter.h:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 |
24 | #ifndef GCODEHIGHLIGHTER_H
25 | #define GCODEHIGHLIGHTER_H
26 | #include
27 |
28 |
29 | class GCodeHighLighter : public QSyntaxHighlighter
30 | {
31 | public:
32 | GCodeHighLighter(QTextDocument *parent);
33 |
34 | protected:
35 | void highlightBlock(const QString &text) Q_DECL_OVERRIDE;
36 |
37 | private:
38 | struct HighlightingRule
39 | {
40 | QRegExp pattern;
41 | QTextCharFormat format;
42 | };
43 |
44 | QList highlightingRules;
45 | QTextCharFormat gCommands;
46 | QTextCharFormat mCommands;
47 | QTextCharFormat fCommands;
48 | QTextCharFormat eCommands;
49 | QTextCharFormat comments;
50 | QTextCharFormat numbers;
51 | QTextCharFormat xyzCommands;
52 | void setForegrounds();
53 | void setRules();
54 |
55 | };
56 |
57 | #endif // GCODEHIGHLIGHTER_H
58 |
--------------------------------------------------------------------------------
/qt-models/connectobject.cpp:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 | #include "connectobject.h"
24 |
25 | ConnectObject::ConnectObject()
26 | {
27 |
28 | }
29 |
30 | void ConnectObject::setSerialPort(const QString &s)
31 | {
32 | m_serialPort = s;
33 | }
34 |
35 | void ConnectObject::setTransmissionRate(const int &r)
36 | {
37 | m_transmissionRate = r;
38 | }
39 |
40 | void ConnectObject::setCacheSize(const int &s)
41 | {
42 | m_cacheSize = s;
43 | }
44 |
45 | void ConnectObject::setResetOnConnect(const bool &b)
46 | {
47 | m_resetOnConnect = b;
48 | }
49 |
50 | void ConnectObject::setPrintLog(const bool &b)
51 | {
52 | m_printLog = b;
53 | }
54 |
55 | QString ConnectObject::serialPort() const
56 | {
57 | return m_serialPort;
58 | }
59 |
60 | int ConnectObject::transmissionRate() const
61 | {
62 | return m_transmissionRate;
63 | }
64 |
65 | int ConnectObject::cacheSize() const
66 | {
67 | return m_cacheSize;
68 | }
69 |
70 | int ConnectObject::resetOnConnect() const
71 | {
72 | return m_resetOnConnect;
73 | }
74 |
75 | int ConnectObject::printLog() const
76 | {
77 | return m_printLog;
78 | }
79 |
80 |
--------------------------------------------------------------------------------
/qt-models/extruderobject.cpp:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 | #include "extruderobject.h"
24 |
25 | ExtruderObject::ExtruderObject(int nExtruder ,int maxtemp, int mov, int ext, int fan)
26 | {
27 | extruderNumber = nExtruder;
28 | maxTemp = maxtemp;
29 | movimentSpeed = mov;
30 | extrusionSpeed = ext;
31 | fanSpeed = fan;
32 | }
33 |
34 | void ExtruderObject::setMaxTemp(int t)
35 | {
36 | maxTemp = t;
37 | }
38 |
39 | void ExtruderObject::setMovSpeed(int s)
40 | {
41 | movimentSpeed = s;
42 | }
43 |
44 | void ExtruderObject::setExtrusionSpeed(int s)
45 | {
46 | extrusionSpeed = s;
47 | }
48 |
49 | void ExtruderObject::setFanSpeed(int s)
50 | {
51 | fanSpeed = s;
52 | }
53 |
54 | void ExtruderObject::setExtrusionQnt(double q)
55 | {
56 | extrusionQnt = q;
57 | }
58 |
59 | int ExtruderObject::getMaxTemp()
60 | {
61 | return maxTemp;
62 | }
63 |
64 | int ExtruderObject::getMovSpeed()
65 | {
66 | return movimentSpeed;
67 | }
68 |
69 | int ExtruderObject::getExtrusionSpeed()
70 | {
71 | return extrusionSpeed;
72 | }
73 |
74 | int ExtruderObject::getFanSpeed()
75 | {
76 | return fanSpeed;
77 | }
78 |
79 | double ExtruderObject::getExtrusionQnt()
80 | {
81 | return extrusionQnt;
82 | }
83 |
--------------------------------------------------------------------------------
/qt-models/bedobject.cpp:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 | #include "bedobject.h"
24 |
25 | BedObject::BedObject(int x, int y, int z)
26 | {
27 | m_areaX = x;
28 | m_areaY = y;
29 | m_areaZ = z;
30 | }
31 |
32 | double BedObject::getDesireTemp()
33 | {
34 | return m_desireTemp;
35 | }
36 |
37 | void BedObject::setDesireTemp(double t)
38 | {
39 | m_desireTemp = t;
40 | }
41 |
42 | int BedObject::areaX() const
43 | {
44 | return m_areaX;
45 | }
46 |
47 | int BedObject::areaY() const
48 | {
49 | return m_areaY;
50 | }
51 |
52 | int BedObject::areaZ() const
53 | {
54 | return m_areaZ;
55 | }
56 |
57 | double BedObject::desireTemp() const
58 | {
59 | return m_desireTemp;
60 | }
61 |
62 | double BedObject::currTemp() const
63 | {
64 | return m_currTemp;
65 | }
66 |
67 | void BedObject::setAreaX(const int &x)
68 | {
69 | m_areaX = x;
70 | }
71 |
72 | void BedObject::setAreaY(const int &y)
73 | {
74 | m_areaY = y;
75 | }
76 |
77 | void BedObject::setAreaZ(const int &z)
78 | {
79 | m_areaZ = z;
80 | }
81 |
82 | void BedObject::setdDesireTemp(const double &t)
83 | {
84 | m_desireTemp = t;
85 | }
86 |
87 | //Dont know about this method
88 | void BedObject::setCurrTemp(const double &t)
89 | {
90 | m_currTemp = t;
91 | }
92 |
--------------------------------------------------------------------------------
/src/qml-files/SettingsButton.qml:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | BRPrint3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 BRPrint3D Authors
6 |
7 | This file is part of the BRPrint3D project
8 |
9 | BRPrint3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | BRPrint3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with BRPrint3D. If not, see .
21 |
22 | ======================================================================*/
23 |
24 | import QtQuick 2.5
25 | import QtQuick 2.0
26 | import QtQuick.Window 2.2
27 | import QtQuick.Layouts 1.3
28 |
29 | Rectangle{
30 | id: root
31 | property color buttonColor: "transparent"
32 | property color onHoverColor: "#31363b"
33 | property color onClickedColor: "#3daee9"//"#1cdc9a" Green
34 | property alias text: label.text
35 | property alias source: icon.source
36 | property bool clickControl: false
37 | signal clicked
38 |
39 | anchors.left: parent.left
40 | anchors.right: parent.right
41 |
42 | height: Screen.height /8
43 | ColumnLayout{
44 | anchors.fill: parent
45 | Image {
46 | id: icon
47 | width: parent.width /2
48 | height: parent.height /1.5
49 | }
50 |
51 | Text {
52 | id: label
53 | Layout.alignment: Qt.AlignCenter
54 | color: "white"
55 | text: qsTr("a")
56 | }
57 | }
58 |
59 | MouseArea{
60 | id: mArea
61 | anchors.fill: parent
62 | hoverEnabled: true
63 | onClicked: {
64 | root.clicked()
65 | }
66 | }
67 |
68 | color: mArea.containsMouse ? onHoverColor : clickControl ? onClickedColor : buttonColor
69 | }
70 |
--------------------------------------------------------------------------------
/qt-models/bedobject.h:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 | #ifndef BEDOBJECT_H
24 | #define BEDOBJECT_H
25 |
26 | #include
27 |
28 | class BedObject : QObject
29 | {
30 | Q_OBJECT
31 |
32 | Q_PROPERTY(int areaX READ areaX WRITE setAreaX NOTIFY areaXChanged)
33 | Q_PROPERTY(int areaY READ areaY WRITE setAreaY NOTIFY areaYChanged)
34 | Q_PROPERTY(int areaZ READ areaZ WRITE setAreaZ NOTIFY areaZChanged)
35 | Q_PROPERTY(double desireTemp READ desireTemp WRITE setDesireTemp NOTIFY desireTempChanged)
36 | Q_PROPERTY(double currTemp READ currTemp WRITE setCurrTemp NOTIFY currTempChanged)
37 |
38 | public:
39 | BedObject(int x, int y, int z);
40 | double m_currTemp;
41 | double getDesireTemp();
42 | void setDesireTemp(double t);
43 |
44 | int areaX() const;
45 | int areaY() const;
46 | int areaZ() const;
47 | double desireTemp() const; //Desire Temp
48 | double currTemp() const;//Current Temp
49 |
50 | void setAreaX(const int &x);
51 | void setAreaY(const int &y);
52 | void setAreaZ(const int &z);
53 | void setdDesireTemp(const double &t);
54 | void setCurrTemp(const double &t);
55 |
56 | private:
57 | double m_desireTemp;
58 | int m_areaX;
59 | int m_areaY;
60 | int m_areaZ;
61 |
62 | signals:
63 | void areaXChanged(const int &x);
64 | void areaYChanged(const int &y);
65 | void areaZChanged(const int &z);
66 | void desireTempChanged(const double &t);
67 | void currTempChanged(const double &t);
68 |
69 |
70 | };
71 |
72 | #endif // BEDOBJECT_H
73 |
--------------------------------------------------------------------------------
/qt-models/connectobject.h:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 | #ifndef CONNECTOBJECT_H
24 | #define CONNECTOBJECT_H
25 | //Qt Includes
26 | #include
27 | #include
28 |
29 | class ConnectObject : QObject
30 | {
31 | Q_OBJECT
32 |
33 | Q_PROPERTY(QString serialPort READ serialPort WRITE setSerialPort NOTIFY serialPortChanged)
34 | Q_PROPERTY(int transmissionRate READ transmissionRate WRITE setTransmissionRate NOTIFY transmissionRateChanged)
35 | Q_PROPERTY(int cacheSize READ cacheSize WRITE setCacheSize NOTIFY cacheSizeChanged)
36 | Q_PROPERTY(bool resetOnConnect READ resetOnConnect WRITE setResetOnConnect NOTIFY resetOnConnectChanged)
37 | Q_PROPERTY(bool printLog READ printLog WRITE setPrintLog NOTIFY printLogChanged)
38 |
39 | public:
40 | ConnectObject();
41 | void setSerialPort(const QString &s);
42 | void setTransmissionRate(const int &r);
43 | void setCacheSize(const int &s);
44 | void setResetOnConnect(const bool &b);
45 | void setPrintLog(const bool &b);
46 |
47 | QString serialPort() const;
48 | int transmissionRate() const;
49 | int cacheSize() const;
50 | int resetOnConnect() const;
51 | int printLog() const;
52 |
53 |
54 | private:
55 | QString m_serialPort;
56 | int m_transmissionRate;
57 | int m_cacheSize;
58 | bool m_resetOnConnect;
59 | bool m_printLog;
60 |
61 | signals:
62 | void serialPortChanged(const QString &s);
63 | void transmissionRateChanged(const int &t);
64 | void cacheSizeChanged(const int &c);
65 | void resetOnConnectChanged(const bool &b);
66 | void printLogChanged(const bool &b);
67 |
68 | };
69 |
70 | #endif // CONNECTOBJECT_H
71 |
--------------------------------------------------------------------------------
/src/qml-files/RealTimeWidget.qml:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | BRPrint3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 BRPrint3D Authors
6 |
7 | This file is part of the BRPrint3D project
8 |
9 | BRPrint3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | BRPrint3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with BRPrint3D. If not, see .
21 |
22 | ======================================================================*/
23 | import QtQuick 2.0
24 | import QtQuick.Window 2.1
25 | import QtQuick.Controls 1.4
26 | import QtQuick.Layouts 1.3
27 | import QtQuick.Controls.Styles 1.4
28 |
29 | Rectangle{
30 |
31 | id: root
32 | property color textColor: "#eff0f1"
33 | color: "#31363b"
34 | width: parent.width/9
35 | height: parent.height
36 | anchors.margins: 5
37 |
38 | ColumnLayout{
39 | spacing: 10
40 | Layout.margins: 3
41 | anchors.left: parent.left
42 | anchors.top: parent.top
43 | anchors.right: parent.right
44 |
45 | GroupBox{
46 | id: gbox
47 | title: qsTr("Controllers")
48 | Layout.alignment: Qt.AlignHCenter
49 | ColumnLayout{
50 | anchors.fill: parent
51 | Button{
52 | id: heatBed
53 | text: qsTr("Heat Bed")
54 | Layout.alignment: Qt.AlignHCenter
55 | checkable: true
56 | }
57 | Button{
58 | id: heatExtruder
59 | Layout.alignment: Qt.AlignHCenter
60 | checkable: true
61 | text: qsTr("Heat Extruder")
62 | }
63 | }
64 | }
65 | Text{
66 | text: qsTr("Temperatures")
67 | color:textColor
68 | Layout.alignment: Qt.AlignHCenter
69 | }
70 | Text {
71 | text: qsTr("T1")
72 | Layout.alignment: Qt.AlignHCenter
73 | }
74 |
75 | Text {
76 | text: qsTr("T2")
77 | Layout.alignment: Qt.AlignHCenter
78 | }
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/src/gcodehandler.h:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 |
24 | #ifndef GCODEHANDLER_H
25 | #define GCODEHANDLER_H
26 | //QtIncludes
27 | #include
28 | #include
29 | #include
30 | #include
31 |
32 | class GCodeHandler : public QObject
33 | {
34 | Q_OBJECT
35 |
36 | Q_PROPERTY (QQuickItem *header READ header WRITE setHeader NOTIFY headerChanged)
37 | Q_PROPERTY (QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged)
38 | Q_PROPERTY (QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged)
39 | Q_PROPERTY (QString fileContentHeader READ fileContentHeader WRITE setFileContentHeader NOTIFY fileContentHeaderChanged)
40 | Q_PROPERTY (QString fileContentFooter READ fileContentFooter WRITE setFileContentFooter NOTIFY fileContentFooterChanged)
41 | Q_PROPERTY (QUrl fileUrl READ fileUrl WRITE setFileUrl NOTIFY fileUrlChanged)
42 | Q_INVOKABLE void saveFile();
43 |
44 | public:
45 | explicit GCodeHandler(QObject *parent = 0);
46 | QQuickItem *header();
47 | QQuickItem *footer();
48 | void setHeader(QQuickItem *target);
49 | void setFooter(QQuickItem *target);
50 |
51 | QString fileName() const;
52 | QString fileContentHeader() const;
53 | QString fileContentFooter() const;
54 | QUrl fileUrl() const;
55 |
56 | void setFileContentHeader(const QString &content);
57 | void setFileContentFooter(const QString &content);
58 | void setFileName(const QString &n);
59 | void setFileUrl(const QUrl &name);
60 |
61 | private:
62 | QString m_fileName;
63 | QString m_fileContentHeader;
64 | QString m_fileContentFooter;
65 | QUrl m_fileUrl;
66 | QTextDocument *m_doc;
67 | QQuickItem *m_header;
68 | QQuickItem *m_footer;
69 |
70 | signals:
71 | void fileContentHeaderChanged(const QString &content);
72 | void fileContentFooterChanged(const QString &content);
73 | void fileNameChanged(const QString &name);
74 | void fileUrlChanged(const QUrl &url);
75 | void headerChanged();
76 | void footerChanged();
77 | };
78 |
79 | #endif // GCODEHANDLER_H
80 |
--------------------------------------------------------------------------------
/src/qml-files/GCodeEditor.qml:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | BRPrint3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 BRPrint3D Authors
6 |
7 | This file is part of the BRPrint3D project
8 |
9 | BRPrint3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | BRPrint3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with BRPrint3D. If not, see .
21 |
22 | ======================================================================*/
23 | import QtQuick 2.5
24 | import QtQuick.Controls 1.4
25 | import brprint3d 1.0
26 | import QtQuick.Window 2.2
27 | import QtQuick.Dialogs 1.2
28 | import QtQuick.Layouts 1.3
29 | import QtQuick.Controls.Styles 1.4
30 |
31 | Rectangle{
32 | id: root
33 | width: parent.width
34 | color: "#31363b"
35 | anchors.rightMargin: 3
36 | property color mTextColor:"#eff0f1"
37 |
38 | Rectangle{
39 | id: title
40 | color: mTextColor
41 | width: parent.width
42 | height: tex.height
43 | Text{
44 | id: tex
45 | text: qsTr("GCode Editor")
46 | color: "#31363b"
47 | }
48 | }
49 |
50 | ColumnLayout{
51 | spacing: 2
52 | anchors.left: parent.left
53 | anchors.right: parent.right
54 | anchors.top: title.bottom
55 | anchors.bottom: parent.bottom
56 | anchors.margins: 3
57 |
58 | Text {
59 | text: qsTr("Header")
60 | Layout.fillWidth: true
61 | color: mTextColor
62 | }
63 |
64 | TextArea{
65 | id: gcodeHeader
66 | Layout.fillWidth: true
67 | Layout.fillHeight: true
68 | focus: true
69 | wrapMode: TextEdit.Wrap
70 | style: TextAreaStyle{
71 | backgroundColor: mTextColor
72 | textColor:"#31363b"
73 | }
74 | text: gcodeHandler.fileContentHeader
75 | }
76 |
77 | Text {
78 | text: qsTr("Footer")
79 | Layout.fillWidth: true
80 | color: mTextColor
81 | }
82 |
83 | TextArea{
84 | id: gcodeFooter
85 | Layout.fillWidth: true
86 | Layout.fillHeight: true
87 | focus: true
88 | wrapMode: TextEdit.Wrap
89 | style: TextAreaStyle{
90 | backgroundColor: mTextColor
91 | textColor:"#31363b"
92 | }
93 | text: gcodeHandler.fileContentFooter
94 | }
95 | }
96 | }
97 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | This is the README file for the development version of Br-Print3D
2 |
3 | Please check the ReleaseNotes.txt for details about new features and
4 | changes since last release
5 |
6 | This version is currently in developing
7 | WE DO NOT HAVE ANY SUPPORT FOR PRINT FISNISH
8 |
9 | License: GPLv3
10 |
11 | Basic Usage:
12 | ============
13 | Before compile BrPrint-3D, check if your libraries are the version
14 | requireds:
15 | Cmake Version 3.0 or Major
16 | Qt Version 5.6 or Major
17 | http://www.qt.io/download-open-source/#section-2
18 |
19 | On Linux:
20 | Grab the source code from this repository using git and then
21 | Run the following commands to install dependencies and to build the program:
22 |
23 | In some distros the Br-Print3D will show a error: 'Arduino Serial couldn't open
24 | serial port'.
25 | This error is because the Arduino is mount with sudo permissions. We have two solutions for that:
26 | -Runs Br-Print3D with sudo
27 | -Change The Rules of your serial ports
28 | To change the rules, follow the steps:
29 | ```sh
30 | cd /etc/udev/rules.d
31 | sudo vim 999-BrRule.rules
32 | KERNEL=="ttyACM[0-9]",MODE="0666"
33 | ```
34 |
35 | Compile steps:
36 | ```sh
37 | git clone git.kde.org:brprint3d
38 | mkdir build
39 | cd build
40 | cmake ..
41 | make
42 | ./brprint3d
43 | ```
44 | Help us:
45 | ========
46 | -To find leek memories
47 | -To find bugs or inconsistecies
48 |
49 | Contributing:
50 | =============
51 |
52 | If you want to contribute code, please either send signed-off patches or
53 | a pull request with signed-off commits. If you don't sign off on them,
54 | we will not accept them. This means adding a line that says
55 | "Signed-off-by: Name " at the end of each commit, indicating that
56 | you wrote the code and have the right to pass it on as an open source
57 | patch.
58 |
59 | See: http://developercertificate.org/
60 |
61 | Also, please write good git commit messages. A good commit message
62 | looks like this:
63 |
64 | Header line: explain the commit in one line (use the imperative)
65 |
66 | Body of commit message is a few lines of text, explaining things
67 | in more detail, possibly giving some background about the issue
68 | being fixed, etc etc.
69 |
70 | The body of the commit message can be several paragraphs, and
71 | please do proper word-wrap and keep columns shorter than about
72 | 74 characters or so. That way "git log" will show things
73 | nicely even when it's indented.
74 |
75 | Make sure you explain your solution and why you're doing what you're
76 | doing, as opposed to describing what you're doing. Reviewers and your
77 | future self can read the patch, but might not understand why a
78 | particular solution was implemented.
79 |
80 | Reported-by: whoever-reported-it
81 | Signed-off-by: Your Name
82 |
83 | where that header line really should be meaningful, and really should be
84 | just one line. That header line is what is shown by tools like gitk and
85 | shortlog, and should summarize the change in one readable line of text,
86 | independently of the longer explanation. Please use verbs in the
87 | imperative in the commit message, as in "Fix bug that...", "Add
88 | file/feature ...", or "Make BrPrint3d..."
89 |
--------------------------------------------------------------------------------
/src/gcodehighlighter.cpp:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 |
24 | #include "gcodehighlighter.h"
25 |
26 | GCodeHighLighter::GCodeHighLighter(QTextDocument *parent): QSyntaxHighlighter(parent)
27 | {
28 | setForegrounds();
29 | setRules();
30 | }
31 |
32 | void GCodeHighLighter::highlightBlock(const QString &text)
33 | {
34 | foreach (const HighlightingRule &rule, highlightingRules) {
35 | QRegExp expression(rule.pattern);
36 | int index = expression.indexIn(text);
37 | while (index >= 0) {
38 | int length = expression.matchedLength();
39 | setFormat(index, length, rule.format);
40 | index = expression.indexIn(text, index + length);
41 | }
42 | }
43 | //I'm not sure what this do... copy from example
44 | //http://doc.qt.io/qt-5/qtwidgets-richtext-syntaxhighlighter-highlighter-cpp.html
45 | setCurrentBlockState(0);
46 | }
47 |
48 | void GCodeHighLighter::setRules()
49 | {
50 | HighlightingRule rule;
51 | /*M + value*/
52 | rule.format = mCommands;
53 | rule.pattern = QRegExp("\\bM(\\d+)\\b");
54 | highlightingRules.append(rule);
55 | /*G + value*/
56 | rule.format = gCommands;
57 | rule.pattern = QRegExp("\\bG(\\d+)\\b");
58 | highlightingRules.append(rule);
59 | /*X | Y | Z*/
60 | rule.format = xyzCommands;
61 | rule.pattern = QRegExp("\\bX|Y|Z\\b");
62 | highlightingRules.append(rule);
63 | /*F*/
64 | rule.format = fCommands;
65 | rule.pattern = QRegExp("\\bF.+\\b");
66 | highlightingRules.append(rule);
67 | /*E*/
68 | rule.format = eCommands;
69 | rule.pattern = QRegExp("\\bE.+\\b");
70 | highlightingRules.append(rule);
71 | /*comments*/
72 | rule.format = comments;
73 | rule.pattern = QRegExp("\\b;.+\\b");
74 | highlightingRules.append(rule);
75 | /*Numbers*/
76 | rule.format = numbers;
77 | rule.pattern = QRegExp("\\(\\d+.\\d+)\\b");
78 | highlightingRules.append(rule);
79 | }
80 |
81 | void GCodeHighLighter::setForegrounds()
82 | {
83 | gCommands.setForeground(Qt::darkCyan);
84 | mCommands.setForeground(Qt::magenta);
85 | fCommands.setForeground(Qt::yellow);
86 | eCommands.setForeground(Qt::red);
87 | comments.setForeground(Qt::darkGreen);
88 | numbers.setForeground(Qt::darkRed);
89 | }
90 |
--------------------------------------------------------------------------------
/src/qml-files/FilamentSettings.qml:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | BRPrint3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 BRPrint3D Authors
6 |
7 | This file is part of the BRPrint3D project
8 |
9 | BRPrint3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | BRPrint3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with BRPrint3D. If not, see .
21 |
22 | ======================================================================*/
23 | import QtQuick 2.0
24 | import QtQuick.Window 2.2
25 | import QtQuick.Layouts 1.3
26 | import QtQuick.Controls 1.4
27 | import QtQuick.Controls.Styles 1.4
28 |
29 | Rectangle{
30 | id: root
31 | color: "#31363b"
32 | width: parent.width
33 | property color textColor: "#eff0f1"
34 | anchors.rightMargin: 3
35 |
36 | Rectangle{
37 | id: title
38 | color: textColor
39 | width: parent.width
40 | height: tex.height
41 | Text{
42 | id: tex
43 | text: qsTr("Filament Settings")
44 | color: "#31363b"
45 | }
46 | }
47 |
48 | GridLayout{
49 | columns: 2
50 | rowSpacing: 5
51 | anchors.top: title.bottom
52 | anchors.left: parent.left
53 | anchors.right: parent.right
54 | anchors.margins: 5
55 |
56 | Text{
57 | text: qsTr("Filament Size: ")
58 | }
59 |
60 | TextField{
61 | id: filamentSize
62 | activeFocusOnPress: true
63 | validator: DoubleValidator{}
64 | text: "1.75"
65 | }
66 |
67 | Text{
68 | text: qsTr("Materials:")
69 | }
70 |
71 | ComboBox{
72 | model: ["PLA", "ABS", "PET","Wood PLA"]
73 | Layout.minimumWidth: filamentSize.width
74 | style: ComboBoxStyle{
75 | textColor: textColor
76 |
77 | }
78 | }
79 |
80 | Text{
81 | text: qsTr("Filament Controls")
82 | color: textColor
83 | Layout.columnSpan: 2
84 | Layout.alignment: Qt.AlignHCenter
85 | }
86 |
87 | Button{
88 | id: fillRetract
89 | text: qsTr("Retract")
90 | Layout.columnSpan: 2
91 | Layout.alignment: Qt.AlignHCenter
92 | }
93 |
94 | Button{
95 | id: fillFowardSlow
96 | text: qsTr("Foward Slow")
97 | }
98 | Button{
99 | id: fillFowardFast
100 | text: qsTr("Foward Fast")
101 | Layout.alignment: Qt.AlignRight
102 | }
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/src/qml-files/ConnectionSettings.qml:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | BRPrint3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 BRPrint3D Authors
6 |
7 | This file is part of the BRPrint3D project
8 |
9 | BRPrint3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | BRPrint3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with BRPrint3D. If not, see .
21 |
22 | ======================================================================*/
23 |
24 | import QtQuick 2.5
25 | import QtQuick.Controls 1.4
26 | import QtQuick.Controls.Styles 1.4
27 | import QtQuick.Window 2.2
28 | import QtQuick.Layouts 1.3
29 |
30 |
31 | Rectangle{
32 |
33 | id: connectionSet
34 | color: "#31363b"
35 | property color mtextColor: "#eff0f1"
36 | anchors.rightMargin: 3
37 |
38 | Rectangle{
39 | id: title
40 | color: mtextColor
41 | width: parent.width
42 | height: tex.height
43 | Text{
44 | id: tex
45 | text: qsTr("Connection Settings")
46 | color: "#31363b"
47 | }
48 | }
49 |
50 | GridLayout{
51 | columns: 2
52 | anchors.top: title.bottom
53 | anchors.left: parent.left
54 | anchors.right: parent.right
55 | anchors.margins: 5
56 |
57 | Text {
58 | text: qsTr("Serial Port:")
59 | color: mtextColor
60 | }
61 | //How to set a extern list?
62 | ComboBox{
63 | id: cbSerialPorts
64 | Layout.minimumWidth: cbTransmitionRate.width
65 | model: []
66 | style: ComboBoxStyle{
67 | textColor: mtextColor
68 | }
69 | }
70 |
71 | Text {
72 | text: qsTr("Transmition Rate:")
73 | color: "#eff0f1"
74 | }
75 | ComboBox{
76 | id: cbTransmitionRate
77 | Text {
78 | text: "115200"
79 | id: placeholder
80 | visible: false
81 | }
82 | Layout.minimumWidth: placeholder.width + 50
83 | model: [115200,4800,9600,19200,38400,57600]
84 | style: ComboBoxStyle{
85 | textColor: mtextColor
86 | }
87 | }
88 |
89 | Text {
90 | text: qsTr("Cache Size:")
91 | color: mtextColor
92 | }
93 |
94 | TextField{
95 | textColor: "#eff0f1"
96 | inputMask: "999"
97 | activeFocusOnPress: true
98 | validator: IntValidator{}
99 | text: "127"
100 | }
101 | Text{
102 | text: qsTr("Reset on Connect:")
103 | color: mtextColor
104 | }
105 | CheckBox{
106 | id: resetOnConnect
107 | }
108 | Text{
109 | text: qsTr("Job Log:")
110 | color: mtextColor
111 | }
112 | CheckBox{
113 | id: printLog
114 | }
115 | }
116 | }
117 |
118 |
--------------------------------------------------------------------------------
/src/qml-files/BedSettings.qml:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | BRPrint3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 BRPrint3D Authors
6 |
7 | This file is part of the BRPrint3D project
8 |
9 | BRPrint3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | BRPrint3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with BRPrint3D. If not, see .
21 |
22 | ======================================================================*/
23 |
24 | import QtQuick 2.0
25 | import QtQuick.Window 2.2
26 | import QtQuick.Layouts 1.3
27 | import QtQuick.Controls 1.4
28 |
29 | Rectangle{
30 | id: bedSet
31 | color: "#31363b"
32 | width: parent.width
33 | property bool heatedBed: true
34 | property color textColor: "#eff0f1"
35 | anchors.rightMargin: 3
36 |
37 | Rectangle{
38 | id: title
39 | color: textColor
40 | width: parent.width
41 | height: tex.height
42 | Text{
43 | id: tex
44 | text: qsTr("Bed Settings")
45 | color: "#31363b"
46 | }
47 | }
48 |
49 | GridLayout{
50 | columns: 3
51 | anchors.top: title.bottom
52 | anchors.left: parent.left
53 | anchors.right: parent.right
54 | anchors.margins: 5
55 | enabled: heatedBed ? true : false
56 |
57 |
58 |
59 | Text{
60 | text: qsTr("Area X:")
61 | color: textColor
62 | }
63 |
64 | TextField{
65 | textColor: bedSet.textColor
66 | activeFocusOnPress: true
67 | validator: IntValidator{bottom:100}
68 | text: "200"
69 | }
70 | Text {
71 | text: qsTr("mm")
72 | color: textColor
73 | }
74 |
75 | Text{
76 | text: qsTr("Area Y:")
77 | color: textColor
78 | }
79 | TextField{
80 | textColor: bedSet.textColor
81 | activeFocusOnPress: true
82 | validator: IntValidator{bottom:100}
83 | text: "200"
84 | }
85 | Text {
86 | text: qsTr("mm")
87 | color: textColor
88 | }
89 |
90 | Text{
91 | text: qsTr("Area Z:")
92 | color: textColor
93 | }
94 | TextField{
95 | textColor: bedSet.textColor
96 | activeFocusOnPress: true
97 | validator: IntValidator{bottom:100}
98 | text: "200"
99 | }
100 | Text {
101 | text: qsTr("mm")
102 | color: textColor
103 | }
104 |
105 | Text{
106 | text: qsTr("Temperature:")
107 | color: textColor
108 | }
109 | TextField{
110 | textColor: bedSet.textColor
111 | activeFocusOnPress: true
112 | validator: IntValidator{bottom: 0; top: 130}
113 | text: "110"
114 | }
115 | Text {
116 | text: qsTr("ºC")
117 | color: textColor
118 | }
119 | }
120 | }
121 |
122 |
--------------------------------------------------------------------------------
/qt-models/extrudermodel.cpp:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 | #include "extrudermodel.h"
24 |
25 | ExtruderModel::ExtruderModel(int qntExtruders, QList list)
26 | {
27 | m_qntExtruders = qntExtruders;
28 | extruderList = list;
29 | }
30 |
31 | int ExtruderModel::rowCount(const QModelIndex &parent) const
32 | { Q_UNUSED(parent);
33 | return 6;
34 | }
35 |
36 | int ExtruderModel::columnCount(const QModelIndex &parent) const
37 | { Q_UNUSED(parent);
38 | return m_qntExtruders;
39 | }
40 |
41 | QVariant ExtruderModel::data(const QModelIndex &index, int role) const
42 | {
43 | if(Qt::DisplayRole != role)
44 | return QVariant();
45 | else{
46 | //Maybe use pointer here???
47 | ExtruderObject tmp = extruderList.at(index.row());
48 | switch (index.column()){
49 | case 0: return tmp.currTemp;
50 | case 1: return tmp.getMaxTemp();
51 | case 2: return tmp.getExtrusionSpeed();
52 | case 3: return tmp.getFanSpeed();
53 | case 4: return tmp.getMovSpeed();
54 | case 5: return tmp.getExtrusionQnt();
55 | }
56 | }
57 | }
58 |
59 | bool ExtruderModel::setData(const QModelIndex &index, const QVariant &value, int role)
60 | { //Maybe use pointer??
61 | ExtruderObject tmp = extruderList.at(index.row());
62 | if (role == Qt::EditRole) {
63 | switch(index.column()) {
64 | case 1: tmp.setMaxTemp(value.toInt()); emit dataChanged(index,index);
65 | case 2: tmp.setExtrusionSpeed(value.toInt()); emit dataChanged(index,index);
66 | case 3: tmp.setFanSpeed(value.toInt()); emit dataChanged(index,index);
67 | case 4: tmp.setMovSpeed(value.toInt()); emit dataChanged(index,index);
68 | case 5: tmp.setExtrusionQnt(value.toDouble()); emit dataChanged(index,index);
69 | }
70 | }else if(role == Qt::DisplayRole){
71 | if(index.column() == 0){
72 | tmp.currTemp = value.toDouble();
73 | emit dataChanged(index,index);
74 | }
75 | }
76 | return true;//Right place?
77 | }
78 |
79 | Qt::ItemFlags ExtruderModel::flags(const QModelIndex &index) const
80 | { if(index.column()!=0)
81 | return QAbstractTableModel::flags(index) | Qt::ItemIsEditable;
82 | else
83 | return QAbstractTableModel::flags(index);
84 | }
85 |
86 | void ExtruderModel::updateExtruderTemp()
87 | { /* Use rand to sort random temps to test, but when the project is more advanced substitute this
88 | for the info get from the printer */
89 | std::srand (time(NULL));
90 | for(int i=0; i < rowCount(QModelIndex()) ; i++){
91 | const QVariant v(std::rand()%100);
92 | setData(index(i,0),v ,Qt::DisplayRole); //Check this flag
93 | }
94 |
95 | }
96 |
--------------------------------------------------------------------------------
/src/gcodehandler.cpp:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | Br-Print3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 Br-Print3D Authors
6 |
7 | This file is part of the Br-Print3D project
8 |
9 | Br-Print3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | Br-Print3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with Br-Print3D. If not, see .
21 |
22 | ======================================================================*/
23 |
24 | #include "gcodehandler.h"
25 | #include
26 | #include
27 | #include
28 |
29 | GCodeHandler::GCodeHandler(QObject *parent) : QObject(parent),
30 | m_header(nullptr),
31 | m_footer(nullptr),
32 | m_doc(nullptr)
33 | {
34 |
35 | }
36 |
37 | QQuickItem *GCodeHandler::header()
38 | {
39 | return m_header;
40 | }
41 |
42 | QQuickItem *GCodeHandler::footer()
43 | {
44 | return m_footer;
45 | }
46 |
47 | void GCodeHandler::setHeader(QQuickItem *target)
48 | {
49 | m_doc = 0;
50 | m_header = target;
51 | if (!m_header)
52 | return;
53 |
54 | QVariant doc = m_header->property("textDocument");
55 | if (doc.canConvert()) {
56 | QQuickTextDocument *qqdoc = doc.value();
57 | if (qqdoc)
58 | m_doc = qqdoc->textDocument();
59 | }
60 | emit headerChanged();
61 |
62 | }
63 |
64 | void GCodeHandler::setFooter(QQuickItem *target)
65 | {
66 | m_doc = 0;
67 | m_footer = target;
68 | if (!m_footer)
69 | return;
70 |
71 | QVariant doc = m_footer->property("textDocument");
72 | if (doc.canConvert()) {
73 | QQuickTextDocument *qqdoc = doc.value();
74 | if (qqdoc)
75 | m_doc = qqdoc->textDocument();
76 | }
77 | emit footerChanged();
78 |
79 | }
80 |
81 | /*
82 | * Save edit file - overrite
83 | */
84 | void GCodeHandler::saveFile() //Default pattern .gcode - Needs handle it?
85 | {
86 | QFile gcode(m_fileUrl.toLocalFile());
87 | if(!gcode.open(QFile::WriteOnly | QFile::Text)){
88 | gcode.write(m_doc->toPlainText().toUtf8());
89 | gcode.close();
90 | }
91 |
92 | }
93 |
94 | QString GCodeHandler::fileName() const
95 | {
96 | return m_fileName;
97 | }
98 |
99 | QString GCodeHandler::fileContentHeader() const
100 | {
101 | return m_fileContentHeader;
102 | }
103 |
104 | QString GCodeHandler::fileContentFooter() const
105 | {
106 | return m_fileContentFooter;
107 | }
108 |
109 | QUrl GCodeHandler::fileUrl() const
110 | {
111 | return m_fileUrl;
112 | }
113 |
114 | void GCodeHandler::setFileUrl(const QUrl &name)
115 | {
116 | QRegularExpression _cacthMov("G(?.) .*\\bX(?[0-9.-]+) Y(?[0-9.-]+) Z(?[0-9].+)");
117 | QRegularExpression _catchEnd(";End GCode");
118 | QRegularExpressionMatch _match;
119 | if(m_fileUrl != name){
120 | m_fileUrl = name;
121 | QString path = name.toLocalFile();
122 | QFile gcode(path);
123 | if (!gcode.open(QFile::ReadOnly | QFile::Text)) {
124 | return;
125 | }
126 | QTextStream in(&gcode);
127 | QString content = in.readAll();
128 | //TODO: Send this content to 3DView
129 | QStringList list = content.split('\n', QString::SkipEmptyParts);
130 | QString header;
131 | QString footer;
132 | foreach (const auto line, list) {
133 | _match = _cacthMov.match(line);
134 | if(_match.hasMatch()){
135 | break;
136 | }
137 | header += (line + "\n");
138 | }
139 | int last = list.lastIndexOf(_catchEnd);
140 | for(int i = last; i!= list.size() -1; ++i) {
141 | footer += (list.at(i) + "\n");
142 | }
143 | setFileName(QFileInfo(path).baseName());
144 | setFileContentHeader(header);
145 | setFileContentFooter(footer);
146 | }
147 | }
148 |
149 | void GCodeHandler::setFileContentHeader(const QString& content)
150 | {
151 | m_fileContentHeader = content;
152 | emit fileContentHeaderChanged(m_fileContentHeader);
153 | }
154 |
155 | void GCodeHandler::setFileContentFooter(const QString& content)
156 | {
157 | m_fileContentFooter = content;
158 | emit fileContentFooterChanged(m_fileContentFooter);
159 | }
160 |
161 | void GCodeHandler::setFileName(const QString& n)
162 | {
163 | if(m_fileName != n){
164 | m_fileName = n;
165 | emit fileNameChanged(m_fileName);
166 | }
167 | }
168 |
169 |
170 |
--------------------------------------------------------------------------------
/src/qml-files/ExtruderSettings.qml:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | BRPrint3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 BRPrint3D Authors
6 |
7 | This file is part of the BRPrint3D project
8 |
9 | BRPrint3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | BRPrint3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with BRPrint3D. If not, see .
21 |
22 | ======================================================================*/
23 | import QtQuick 2.5
24 | import QtQuick.Controls 1.4
25 | import QtQuick.Controls.Styles 1.4
26 | import QtQuick.Window 2.2
27 | import QtQuick.Layouts 1.3
28 |
29 | Rectangle{
30 |
31 | id: extruderSet
32 | color: "#31363b"
33 | width: Screen.width /4
34 | height: Screen.height
35 | property color mtextColor: "#eff0f1"
36 | anchors.rightMargin: 3
37 |
38 | Rectangle{
39 | id: title
40 | color: mtextColor
41 | width: parent.width
42 | height: tex.height
43 | Text{
44 | id: tex
45 | text: qsTr("Extruder Settings")
46 | color: "#31363b"
47 | }
48 | }
49 |
50 | GridLayout{
51 | id: grid
52 | columns: 3
53 | anchors.left: parent.left
54 | anchors.top: title.bottom
55 | anchors.right: parent.right
56 | anchors.margins: 5
57 |
58 | Text {
59 | text: qsTr("Extruder:")
60 | color: textColor
61 | }
62 | //How to set a extern list? use a radiobutton instead??
63 | ComboBox{
64 | id: cbExtrudersQnt
65 | model: [1]
66 | style: ComboBoxStyle{
67 | textColor: textColor
68 | }
69 | }
70 |
71 | Text{
72 |
73 | }
74 |
75 | Text{
76 | text: qsTr("Temperature:")
77 | color: textColor
78 | }
79 |
80 | TextField{
81 | textColor: mtextColor
82 | activeFocusOnPress: true
83 | validator: IntValidator{bottom:160;top:300}
84 | placeholderText: qsTr("(160~300)")
85 | }
86 |
87 | Text{
88 | text: qsTr("ºC")
89 | color: textColor
90 | }
91 |
92 | Text{
93 | text: qsTr("Moviment Speed:")
94 | color: textColor
95 | }
96 |
97 | TextField{
98 | textColor: mtextColor
99 | activeFocusOnPress: true
100 | validator: IntValidator{bottom:10;top:300}
101 | placeholderText: qsTr("(10~300)")
102 | }
103 |
104 | Text{
105 | text: qsTr("mm/s")
106 | color: textColor
107 | }
108 |
109 | Text{
110 | text: qsTr("Extrusion Speed:")
111 | color: textColor
112 | }
113 |
114 | TextField{
115 | textColor: mtextColor
116 | activeFocusOnPress: true
117 | validator: IntValidator{bottom:10;top:300}
118 | placeholderText: qsTr("(10~300)")
119 | }
120 |
121 | Text{
122 | text: qsTr("mm/s")
123 | color: textColor
124 | }
125 |
126 | Text{
127 | text: qsTr("Fan Speed:")
128 | color: textColor
129 | }
130 |
131 | TextField{
132 | textColor: mtextColor
133 | activeFocusOnPress: true
134 | validator: IntValidator{bottom: 0; top: 100}
135 | placeholderText: qsTr("(0~100)")
136 | }
137 |
138 | Text{
139 | text: qsTr("%")
140 | color: textColor
141 | }
142 |
143 | GroupBox{
144 | id: warning
145 | title: qsTr(">>Important<<")
146 | Layout.columnSpan: 3
147 | Layout.alignment: Qt.AlignHCenter
148 |
149 | Text {
150 | id: info
151 | anchors.margins: 5
152 | Layout.columnSpan: 3
153 | text: qsTr(" Please, don't forget to add here the maximum \n temperature that your extruder have. This is\n for your safety and of the 3DPrinter.")
154 | color: "#ed1515"
155 | horizontalAlignment: Text.Center
156 | }
157 | }
158 |
159 | Text{
160 | text: qsTr("Max Temperature:")
161 | color: textColor
162 | }
163 | TextField{
164 | textColor: mtextColor
165 | activeFocusOnPress: true
166 | validator: IntValidator{bottom:160; top:300}
167 | placeholderText: qsTr("(160~300)")
168 | }
169 |
170 | Text{
171 | text: qsTr("ºC")
172 | color: textColor
173 | }
174 | }
175 | }
176 |
--------------------------------------------------------------------------------
/src/qml-files/main.qml:
--------------------------------------------------------------------------------
1 | /*=====================================================================
2 |
3 | BRPrint3D, Open Source 3D Printing Host
4 |
5 | Copyright (C) 2016 BRPrint3D Authors
6 |
7 | This file is part of the BRPrint3D project
8 |
9 | BRPrint3D is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | BRPrint3D is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with BRPrint3D. If not, see .
21 |
22 | ======================================================================*/
23 |
24 | import QtQuick 2.6
25 | import QtQuick.Window 2.1
26 | import QtQuick.Controls 1.4
27 | import QtQuick.Dialogs 1.2
28 | import QtQuick.Layouts 1.3
29 |
30 | ApplicationWindow{
31 | id: mainWindow
32 | visible: true
33 | color: "#31363b"
34 | title: "Br-Print3D"
35 | //Define Minimum and Maximum width/height for the app window
36 | minimumWidth: 800
37 | minimumHeight: 600
38 | maximumWidth: 1920
39 | maximumHeight: 1080
40 |
41 | //Define default width/height
42 | width: Screen.width
43 | height: Screen.height
44 |
45 | property color textColor: "#eff0f1"
46 |
47 |
48 | menuBar: MenuBar{
49 | Menu{
50 | title: qsTr("File")
51 | MenuItem {
52 | text: qsTr("Open Gcode")
53 | action: fileOpenAction
54 | }
55 | MenuItem {text: qsTr("Close")}
56 | }
57 |
58 | Menu{
59 | title: qsTr("Language")
60 | MenuItem {text: qsTr("English")}
61 | MenuItem {text: qsTr("Portuguese")}
62 | }
63 |
64 | Menu{
65 | title: qsTr("About")
66 | MenuItem {text: qsTr("Br-Print3D")}
67 | MenuItem {text: qsTr("KDE")}
68 | MenuItem {text: qsTr("How to Contribute")}
69 | }
70 |
71 | Menu{
72 | title: qsTr("Help")
73 | MenuItem {text: qsTr("Documentation")}
74 | }
75 | }
76 | toolBar: ToolBar{
77 | RowLayout{
78 | spacing: 5
79 | anchors.fill: parent
80 |
81 | ToolButton{ action: fileOpenAction }
82 |
83 | ToolButton{ action: connectAction }
84 |
85 | Item { Layout.fillWidth: true }
86 |
87 | ToolButton{
88 | action: startAction
89 | Layout.alignment: Qt.AlignRight
90 | }
91 |
92 | ToolButton{
93 | action: pauseAction
94 | Layout.alignment: Qt.AlignRight
95 | }
96 |
97 | ToolButton{
98 | action: stopAction
99 | Layout.alignment: Qt.AlignRight
100 | }
101 |
102 | ToolButton{
103 | action: emergencyAction
104 | Layout.alignment: Qt.AlignRight
105 | }
106 | }
107 | }
108 |
109 | //-------------Settings Bar-------------------------------------------------------
110 | Rectangle{
111 | id: backgroundRec
112 | width: parent.width /9.5
113 | anchors.top: parent.top
114 | anchors.left: parent.left
115 | anchors.bottom: parent.bottom
116 | color: "#232629"
117 |
118 | Column{
119 | spacing: 5
120 | anchors.fill: parent
121 |
122 | Rectangle{
123 | color:"#3daee9"
124 | width: parent.width
125 | height: 30
126 | Text {
127 | id: title
128 | text: qsTr("Br-Print3D")
129 | color: textColor
130 | }
131 | }
132 |
133 | SettingsButton{
134 | id: connectionSettings
135 | text: qsTr("Connection Settings")
136 | clickControl: connectionSettingsTab.visible ? true : false
137 | onClicked: {
138 | connectionSettingsTab.visible = !connectionSettingsTab.visible
139 | bedSettingsTab.visible = false
140 | extruderSettingsTab.visible = false
141 | gcodeEditorTab.visible = false
142 | filamentSettingstab.visible = false
143 | }
144 | }
145 |
146 | SettingsButton{
147 | id: gcodeEditor
148 | text: qsTr("GCode Settings")
149 | clickControl: gcodeEditorTab.visible ? true : false
150 | onClicked: {
151 | gcodeEditorTab.visible = !gcodeEditorTab.visible
152 | connectionSettingsTab.visible = false
153 | bedSettingsTab.visible = false
154 | extruderSettingsTab.visible = false
155 | filamentSettingstab.visible = false
156 | }
157 | }
158 |
159 | SettingsButton{
160 | id: bedSettings
161 | text: qsTr("Bed Settings")
162 | clickControl:bedSettingsTab.visible ? true : false
163 | onClicked: {
164 | bedSettingsTab.visible = !bedSettingsTab.visible
165 | connectionSettingsTab.visible = false
166 | extruderSettingsTab.visible = false
167 | gcodeEditorTab.visible = false
168 | filamentSettingstab.visible = false
169 | }
170 | }
171 |
172 | SettingsButton{
173 | id: extruderSettings
174 | text: qsTr("Extruder Settings")
175 | clickControl:extruderSettingsTab.visible ? true : false
176 | onClicked: {
177 | extruderSettingsTab.visible = !extruderSettingsTab.visible
178 | connectionSettingsTab.visible = false
179 | bedSettingsTab.visible = false
180 | gcodeEditorTab.visible = false
181 | filamentSettingstab.visible = false
182 | }
183 | }
184 | SettingsButton{
185 | id: filamenSettings
186 | text: qsTr("Filament Settings")
187 | clickControl: filamentSettingstab.visible ? true : false
188 | onClicked: {
189 | filamentSettingstab.visible = !filamentSettingstab.visible
190 | gcodeEditorTab.visible = false
191 | connectionSettingsTab.visible = false
192 | bedSettingsTab.visible = false
193 | extruderSettingsTab.visible = false
194 | }
195 | }
196 | }//End of column
197 | }
198 |
199 | //---------------------Settings (Show/Hide) ---------------
200 | Item {
201 | id: tabs
202 | anchors.left: backgroundRec.right
203 | anchors.bottom: backgroundRec.bottom
204 | anchors.top: backgroundRec.top
205 | width: visibleChildren.length !== 0 ? mainWindow.width/4 : 0
206 | clip: true
207 | ConnectionSettings{
208 | id: connectionSettingsTab
209 | anchors.fill: parent
210 | visible: false
211 | }
212 | BedSettings{
213 | anchors.fill: parent
214 | id: bedSettingsTab
215 | visible: false
216 |
217 | }
218 | ExtruderSettings{
219 | id: extruderSettingsTab
220 | anchors.fill: parent
221 | visible: false
222 |
223 | }
224 | GCodeEditor{
225 | anchors.fill: parent
226 | id: gcodeEditorTab
227 | visible: false
228 | }
229 | FilamentSettings{
230 | anchors.fill: parent
231 | id: filamentSettingstab
232 | visible: false
233 | }
234 | }
235 |
236 | //----------------3DView----------------------------------
237 | Rectangle{
238 | id: _3dView
239 | color: "#fcfcfc"
240 | anchors.left: tabs.right
241 | anchors.bottom: parent.bottom
242 | anchors.top: parent.top
243 | anchors.right: realTime.left
244 |
245 | height: Screen.height
246 |
247 | Text{
248 | text: qsTr("3D View")
249 | anchors.centerIn: parent
250 | }
251 | }
252 | //--------------Real Time Widget ------------------------
253 | RealTimeWidget{
254 | id: realTime
255 | anchors.bottom: parent.bottom
256 | anchors.top: parent.top
257 | anchors.right: parent.right
258 | }
259 |
260 | //----------Others---------------------------------------
261 |
262 | Action {
263 | id: fileOpenAction
264 | text: "Open"
265 | onTriggered: {
266 | fileDialog.selectExisting = true
267 | fileDialog.open()
268 | }
269 | }
270 |
271 | Action{
272 | id: connectAction
273 | text: qsTr("Connect")
274 | }
275 |
276 | Action{
277 | id: startAction
278 | text: qsTr("Start")
279 | }
280 |
281 | Action{
282 | id: pauseAction
283 | text: qsTr("Pause")
284 | }
285 |
286 | Action{
287 | id: stopAction
288 | text: qsTr("Stop")
289 | }
290 |
291 | Action{
292 | id: emergencyAction
293 | text: qsTr("Emergency Stop")
294 | }
295 |
296 | FileDialog{
297 | id: fileDialog
298 | title: qsTr("Select a Gcode file:")
299 | folder: shortcuts.home
300 | nameFilters: [ "GCode Files (*.gcode *.gco)" ]
301 | onAccepted: {
302 | gcodeHandler.fileUrl = fileDialog.fileUrl
303 | }
304 | }
305 | }
306 |
307 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 |
3 | Version 3, 29 June 2007
4 |
5 | Copyright © 2007 Free Software Foundation, Inc.
6 |
7 | Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The GNU General Public License is a free, copyleft license for software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
14 |
15 | When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
16 |
17 | To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
18 |
19 | For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
20 |
21 | Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
22 |
23 | For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
24 |
25 | Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
26 |
27 | Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
28 |
29 | The precise terms and conditions for copying, distribution and modification follow.
30 |
31 | TERMS AND CONDITIONS
32 |
33 | 0. Definitions.
34 | “This License” refers to version 3 of the GNU General Public License.
35 |
36 | “Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
37 |
38 | “The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
39 |
40 | To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
41 |
42 | A “covered work” means either the unmodified Program or a work based on the Program.
43 |
44 | To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
45 |
46 | To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
47 |
48 | An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
49 |
50 | 1. Source Code.
51 | The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
52 |
53 | A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
54 |
55 | The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
56 |
57 | The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
58 |
59 | The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
60 |
61 | The Corresponding Source for a work in source code form is that same work.
62 |
63 | 2. Basic Permissions.
64 | All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
65 |
66 | You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
67 |
68 | Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
69 |
70 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
71 | No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
72 |
73 | When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
74 |
75 | 4. Conveying Verbatim Copies.
76 | You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
77 |
78 | You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
79 |
80 | 5. Conveying Modified Source Versions.
81 | You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
82 |
83 | a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
84 | b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
85 | c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
86 | d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
87 | A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
88 |
89 | 6. Conveying Non-Source Forms.
90 | You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
91 |
92 | a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
93 | b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
94 | c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
95 | d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
96 | e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
97 | A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
98 |
99 | A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
100 |
101 | “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
102 |
103 | If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
104 |
105 | The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
106 |
107 | Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
108 |
109 | 7. Additional Terms.
110 | “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
111 |
112 | When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
113 |
114 | Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
115 |
116 | a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
117 | b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
118 | c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
119 | d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
120 | e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
121 | f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
122 | All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
123 |
124 | If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
125 |
126 | Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
127 |
128 | 8. Termination.
129 | You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
130 |
131 | However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
132 |
133 | Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
134 |
135 | Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
136 |
137 | 9. Acceptance Not Required for Having Copies.
138 | You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
139 |
140 | 10. Automatic Licensing of Downstream Recipients.
141 | Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
142 |
143 | An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
144 |
145 | You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
146 |
147 | 11. Patents.
148 | A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
149 |
150 | A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
151 |
152 | Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
153 |
154 | In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
155 |
156 | If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
157 |
158 | If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
159 |
160 | A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
161 |
162 | Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
163 |
164 | 12. No Surrender of Others' Freedom.
165 | If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
166 |
167 | 13. Use with the GNU Affero General Public License.
168 | Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
169 |
170 | 14. Revised Versions of this License.
171 | The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
172 |
173 | Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
174 |
175 | If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
176 |
177 | Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
178 |
179 | 15. Disclaimer of Warranty.
180 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
181 |
182 | 16. Limitation of Liability.
183 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
184 |
185 | 17. Interpretation of Sections 15 and 16.
186 | If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
187 |
188 | END OF TERMS AND CONDITIONS
189 |
--------------------------------------------------------------------------------
/icons/icons.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
864 |
--------------------------------------------------------------------------------