Some more dev release preparations
This commit is contained in:
parent
4afb645f63
commit
a28523beaa
11
Wizard.pro
11
Wizard.pro
@ -14,13 +14,16 @@ TEMPLATE = app
|
|||||||
|
|
||||||
SOURCES += main.cpp\
|
SOURCES += main.cpp\
|
||||||
mainwindow.cpp \
|
mainwindow.cpp \
|
||||||
settingswindow.cpp
|
settingswindow.cpp \
|
||||||
|
aboutwindow.cpp
|
||||||
|
|
||||||
HEADERS += mainwindow.h \
|
HEADERS += mainwindow.h \
|
||||||
settingswindow.h
|
settingswindow.h \
|
||||||
|
aboutwindow.h
|
||||||
|
|
||||||
FORMS += mainwindow.ui \
|
FORMS += mainwindow.ui \
|
||||||
settingswindow.ui
|
settingswindow.ui \
|
||||||
|
aboutwindow.ui
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
settings.qrc
|
graphics.qrc
|
||||||
|
|||||||
@ -1,38 +1,71 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<author/>
|
|
||||||
<comment/>
|
|
||||||
<exportmacro/>
|
|
||||||
<class>AboutWindow</class>
|
<class>AboutWindow</class>
|
||||||
<widget class="QDialog" name="AboutWindow">
|
<widget class="QDialog" name="AboutWindow">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>424</width>
|
||||||
<height>300</height>
|
<height>308</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>About</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="geometry">
|
<item row="0" column="0">
|
||||||
<rect>
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<x>30</x>
|
<property name="title">
|
||||||
<y>240</y>
|
<string>About RepRaptor</string>
|
||||||
<width>341</width>
|
</property>
|
||||||
<height>32</height>
|
<property name="checkable">
|
||||||
</rect>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="orientation">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<enum>Qt::Horizontal</enum>
|
<item row="0" column="0">
|
||||||
</property>
|
<widget class="QTextBrowser" name="textBrowser">
|
||||||
<property name="standardButtons">
|
<property name="acceptDrops">
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="html">
|
||||||
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||||
|
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/pics/logo" /></p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">RepRaptor</span> is a free and open source software for controlling RepRap and similar mashines. This software is distributed by terms of <a href="https://www.gnu.org/licenses/gpl-2.0.html"><span style=" text-decoration: underline; color:#0000ff;">GPL v2 licence.</span></a></p>
|
||||||
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; text-decoration: underline; color:#0000ff;"><br /></p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">RepRaptor's main goal is to be as simple as possible and fast, yet functional. This software is being developed as a primary host software for <span style=" font-weight:600;">MGTU MIREA</span> university's 3D printing labratory.</p>
|
||||||
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/NeoTheFox/RepRaptor"><span style=" text-decoration: underline; color:#0000ff;">GitHub</span></a></p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.reprap.org"><span style=" text-decoration: underline; color:#0000ff;">RepRap</span></a></p>
|
||||||
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; text-decoration: underline; color:#0000ff;"><br /></p>
|
||||||
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; text-decoration: underline; color:#0000ff;"><br /></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="openLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<pixmapfunction/>
|
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
|
|||||||
@ -15,8 +15,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
ui->consoleGroup->setDisabled(true);
|
ui->consoleGroup->setDisabled(true);
|
||||||
ui->pauseBtn->setDisabled("true");
|
ui->pauseBtn->setDisabled("true");
|
||||||
|
|
||||||
//ui->extruderlcd->setSegmentStyle();
|
|
||||||
|
|
||||||
ui->baudbox->addItem(QString::number(4800));
|
ui->baudbox->addItem(QString::number(4800));
|
||||||
ui->baudbox->addItem(QString::number(9600));
|
ui->baudbox->addItem(QString::number(9600));
|
||||||
ui->baudbox->addItem(QString::number(115200));
|
ui->baudbox->addItem(QString::number(115200));
|
||||||
@ -47,7 +45,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
statusTimer.start();
|
statusTimer.start();
|
||||||
|
|
||||||
if(settings.value("core/senderinterval").toInt()) sendTimer.setInterval(settings.value("core/senderinterval").toInt());
|
if(settings.value("core/senderinterval").toInt()) sendTimer.setInterval(settings.value("core/senderinterval").toInt());
|
||||||
else sendTimer.setInterval(50);
|
else sendTimer.setInterval(5);
|
||||||
sendTimer.start();
|
sendTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +68,8 @@ MainWindow::~MainWindow()
|
|||||||
void MainWindow::open()
|
void MainWindow::open()
|
||||||
{
|
{
|
||||||
QString filename;
|
QString filename;
|
||||||
filename = QFileDialog::getOpenFileName(this, tr("Open GCODE"), "/home/", tr("GCODE (*.g *.gcode *.nc)"));
|
QDir home;
|
||||||
|
filename = QFileDialog::getOpenFileName(this, tr("Open GCODE"),home.home().absolutePath(), tr("GCODE (*.g *.gcode *.nc)"));
|
||||||
|
|
||||||
gfile.setFileName(filename);
|
gfile.setFileName(filename);
|
||||||
if(!recentFiles.contains(filename))
|
if(!recentFiles.contains(filename))
|
||||||
@ -327,6 +326,7 @@ void MainWindow::readSerial()
|
|||||||
{
|
{
|
||||||
QString extmp = "";
|
QString extmp = "";
|
||||||
QString btmp = "";
|
QString btmp = "";
|
||||||
|
|
||||||
for(int i = 2; data.at(i) != '/'; i++)
|
for(int i = 2; data.at(i) != '/'; i++)
|
||||||
{
|
{
|
||||||
extmp+=data.at(i);
|
extmp+=data.at(i);
|
||||||
@ -338,6 +338,7 @@ void MainWindow::readSerial()
|
|||||||
|
|
||||||
ui->extruderlcd->display(extmp.toDouble());
|
ui->extruderlcd->display(extmp.toDouble());
|
||||||
ui->bedlcd->display(btmp.toDouble());
|
ui->bedlcd->display(btmp.toDouble());
|
||||||
|
sinceLastTemp.restart();
|
||||||
}
|
}
|
||||||
else if(data.startsWith("ok") || data.startsWith("wait")) commandDone = true;
|
else if(data.startsWith("ok") || data.startsWith("wait")) commandDone = true;
|
||||||
printMsg(QString(data));
|
printMsg(QString(data));
|
||||||
@ -431,7 +432,7 @@ void MainWindow::on_pauseBtn_clicked()
|
|||||||
|
|
||||||
void MainWindow::checkStatus()
|
void MainWindow::checkStatus()
|
||||||
{
|
{
|
||||||
if(checkingTemperature) sendLine("M105");
|
if(checkingTemperature && sinceLastTemp.elapsed() < statusTimer.interval()) sendLine("M105");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_checktemp_stateChanged(int arg1)
|
void MainWindow::on_checktemp_stateChanged(int arg1)
|
||||||
@ -451,3 +452,15 @@ void MainWindow::on_releasebtn_clicked()
|
|||||||
{
|
{
|
||||||
sendLine("M84");
|
sendLine("M84");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionAbout_triggered()
|
||||||
|
{
|
||||||
|
AboutWindow aboutwindow(this);
|
||||||
|
|
||||||
|
aboutwindow.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::updateRecent()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -10,8 +10,10 @@
|
|||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QElapsedTimer>
|
||||||
|
|
||||||
#include "settingswindow.h"
|
#include "settingswindow.h"
|
||||||
|
#include "aboutwindow.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@ -30,6 +32,7 @@ public:
|
|||||||
QVector<QString> gcode;
|
QVector<QString> gcode;
|
||||||
QTimer sendTimer;
|
QTimer sendTimer;
|
||||||
QTimer statusTimer;
|
QTimer statusTimer;
|
||||||
|
QElapsedTimer sinceLastTemp;
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
QStringList recentFiles;
|
QStringList recentFiles;
|
||||||
|
|
||||||
@ -57,6 +60,7 @@ private slots:
|
|||||||
void printMsg(const char* text);
|
void printMsg(const char* text);
|
||||||
void sendNext();
|
void sendNext();
|
||||||
void checkStatus();
|
void checkStatus();
|
||||||
|
void updateRecent();
|
||||||
|
|
||||||
void xplus();
|
void xplus();
|
||||||
void yplus();
|
void yplus();
|
||||||
@ -85,6 +89,7 @@ private slots:
|
|||||||
void on_checktemp_stateChanged(int arg1);
|
void on_checktemp_stateChanged(int arg1);
|
||||||
void on_actionSettings_triggered();
|
void on_actionSettings_triggered();
|
||||||
void on_releasebtn_clicked();
|
void on_releasebtn_clicked();
|
||||||
|
void on_actionAbout_triggered();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
|||||||
@ -123,6 +123,9 @@
|
|||||||
<property name="acceptDrops">
|
<property name="acceptDrops">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="openLinks">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
@ -156,6 +159,9 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Control</string>
|
<string>Control</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
<item row="0" column="8">
|
<item row="0" column="8">
|
||||||
<widget class="QPushButton" name="homexbtn">
|
<widget class="QPushButton" name="homexbtn">
|
||||||
@ -465,7 +471,14 @@
|
|||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionExit"/>
|
<addaction name="actionExit"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuAbout">
|
||||||
|
<property name="title">
|
||||||
|
<string>Help</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionAbout"/>
|
||||||
|
</widget>
|
||||||
<addaction name="menuFile"/>
|
<addaction name="menuFile"/>
|
||||||
|
<addaction name="menuAbout"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QToolBar" name="mainToolBar">
|
<widget class="QToolBar" name="mainToolBar">
|
||||||
<attribute name="toolBarArea">
|
<attribute name="toolBarArea">
|
||||||
@ -512,6 +525,14 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Settings</string>
|
<string>Settings</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+P</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionAbout">
|
||||||
|
<property name="text">
|
||||||
|
<string>About</string>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
|
|||||||
@ -8,7 +8,7 @@ SettingsWindow::SettingsWindow(QWidget *parent) :
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
if(settings.value("core/senderinterval").toInt()) ui->senderbox->setValue(settings.value("core/senderinterval").toInt());
|
if(settings.value("core/senderinterval").toInt()) ui->senderbox->setValue(settings.value("core/senderinterval").toInt());
|
||||||
else ui->senderbox->setValue(50);
|
else ui->senderbox->setValue(5);
|
||||||
|
|
||||||
if(settings.value("core/statusinterval").toInt()) ui->statusbox->setValue(settings.value("core/statusinterval").toInt());
|
if(settings.value("core/statusinterval").toInt()) ui->statusbox->setValue(settings.value("core/statusinterval").toInt());
|
||||||
else ui->senderbox->setValue(3000);
|
else ui->senderbox->setValue(3000);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user