Minor tweaks towards release
This commit is contained in:
parent
a28523beaa
commit
4aa66e8bdf
@ -315,6 +315,21 @@ void MainWindow::on_btmpoff_clicked()
|
|||||||
{
|
{
|
||||||
sendLine("M140 S0");
|
sendLine("M140 S0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::bedcenter()
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
if(settings.value("printer/bedx").toInt()) x = settings.value("printer/bedx").toInt();
|
||||||
|
else x = 200;
|
||||||
|
|
||||||
|
if(settings.value("printer/bedy").toInt()) y = settings.value("printer/bedy").toInt();
|
||||||
|
else y = 200;
|
||||||
|
|
||||||
|
QString command = "G1 X" + QString::number(x/2) + "Y" + QString::number(y/2);
|
||||||
|
sendLine(command);
|
||||||
|
}
|
||||||
|
|
||||||
//Buttons end
|
//Buttons end
|
||||||
|
|
||||||
void MainWindow::readSerial()
|
void MainWindow::readSerial()
|
||||||
|
|||||||
@ -75,6 +75,7 @@ private slots:
|
|||||||
void zhome();
|
void zhome();
|
||||||
void ezero();
|
void ezero();
|
||||||
void homeall();
|
void homeall();
|
||||||
|
void bedcenter();
|
||||||
void on_sendbtn_clicked();
|
void on_sendbtn_clicked();
|
||||||
void on_fanonbtn_clicked();
|
void on_fanonbtn_clicked();
|
||||||
void on_fanoffbtn_clicked();
|
void on_fanoffbtn_clicked();
|
||||||
|
|||||||
@ -10,6 +10,12 @@
|
|||||||
<height>498</height>
|
<height>498</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>RepRaptor</string>
|
<string>RepRaptor</string>
|
||||||
</property>
|
</property>
|
||||||
@ -673,8 +679,8 @@
|
|||||||
<slot>yminus()</slot>
|
<slot>yminus()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>292</x>
|
<x>274</x>
|
||||||
<y>146</y>
|
<y>145</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>383</x>
|
<x>383</x>
|
||||||
@ -689,7 +695,7 @@
|
|||||||
<slot>yplus()</slot>
|
<slot>yplus()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>292</x>
|
<x>274</x>
|
||||||
<y>88</y>
|
<y>88</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
@ -705,7 +711,7 @@
|
|||||||
<slot>xminus()</slot>
|
<slot>xminus()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>256</x>
|
<x>236</x>
|
||||||
<y>120</y>
|
<y>120</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
@ -737,8 +743,8 @@
|
|||||||
<slot>zminus()</slot>
|
<slot>zminus()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>362</x>
|
<x>353</x>
|
||||||
<y>156</y>
|
<y>153</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>209</x>
|
<x>209</x>
|
||||||
@ -826,6 +832,22 @@
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>centerbtn</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>MainWindow</receiver>
|
||||||
|
<slot>bedcenter()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>283</x>
|
||||||
|
<y>114</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>321</x>
|
||||||
|
<y>40</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
<slots>
|
<slots>
|
||||||
<slot>open()</slot>
|
<slot>open()</slot>
|
||||||
@ -844,5 +866,6 @@
|
|||||||
<slot>eminus()</slot>
|
<slot>eminus()</slot>
|
||||||
<slot>ezero()</slot>
|
<slot>ezero()</slot>
|
||||||
<slot>yhome()</slot>
|
<slot>yhome()</slot>
|
||||||
|
<slot>bedcenter()</slot>
|
||||||
</slots>
|
</slots>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@ -13,6 +13,12 @@ SettingsWindow::SettingsWindow(QWidget *parent) :
|
|||||||
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);
|
||||||
|
|
||||||
|
if(settings.value("printer/bedx").toInt()) ui->bedxbox->setValue(settings.value("printer/bedx").toInt());
|
||||||
|
else ui->bedxbox->setValue(200);
|
||||||
|
|
||||||
|
if(settings.value("printer/bedy").toInt()) ui->bedybox->setValue(settings.value("printer/bedy").toInt());
|
||||||
|
else ui->bedybox->setValue(200);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsWindow::~SettingsWindow()
|
SettingsWindow::~SettingsWindow()
|
||||||
@ -24,4 +30,6 @@ void SettingsWindow::on_buttonBox_accepted()
|
|||||||
{
|
{
|
||||||
settings.setValue("core/senderinterval", ui->senderbox->value());
|
settings.setValue("core/senderinterval", ui->senderbox->value());
|
||||||
settings.setValue("core/statusinterval", ui->statusbox->value());
|
settings.setValue("core/statusinterval", ui->statusbox->value());
|
||||||
|
settings.setValue("printer/bedy", ui->bedybox->value());
|
||||||
|
settings.setValue("printer/bedx", ui->bedxbox->value());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>144</width>
|
<width>201</width>
|
||||||
<height>96</height>
|
<height>96</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -86,6 +86,49 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>110</y>
|
||||||
|
<width>201</width>
|
||||||
|
<height>66</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Printer</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>X</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QSpinBox" name="bedxbox">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>9999</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>Bed size</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QSpinBox" name="bedybox">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>9999</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user