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");
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
void MainWindow::readSerial()
|
||||
|
||||
@ -75,6 +75,7 @@ private slots:
|
||||
void zhome();
|
||||
void ezero();
|
||||
void homeall();
|
||||
void bedcenter();
|
||||
void on_sendbtn_clicked();
|
||||
void on_fanonbtn_clicked();
|
||||
void on_fanoffbtn_clicked();
|
||||
|
||||
@ -10,6 +10,12 @@
|
||||
<height>498</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>RepRaptor</string>
|
||||
</property>
|
||||
@ -673,8 +679,8 @@
|
||||
<slot>yminus()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>292</x>
|
||||
<y>146</y>
|
||||
<x>274</x>
|
||||
<y>145</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>383</x>
|
||||
@ -689,7 +695,7 @@
|
||||
<slot>yplus()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>292</x>
|
||||
<x>274</x>
|
||||
<y>88</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
@ -705,7 +711,7 @@
|
||||
<slot>xminus()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>256</x>
|
||||
<x>236</x>
|
||||
<y>120</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
@ -737,8 +743,8 @@
|
||||
<slot>zminus()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>362</x>
|
||||
<y>156</y>
|
||||
<x>353</x>
|
||||
<y>153</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>209</x>
|
||||
@ -826,6 +832,22 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</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>
|
||||
<slots>
|
||||
<slot>open()</slot>
|
||||
@ -844,5 +866,6 @@
|
||||
<slot>eminus()</slot>
|
||||
<slot>ezero()</slot>
|
||||
<slot>yhome()</slot>
|
||||
<slot>bedcenter()</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
|
||||
@ -13,6 +13,12 @@ SettingsWindow::SettingsWindow(QWidget *parent) :
|
||||
if(settings.value("core/statusinterval").toInt()) ui->statusbox->setValue(settings.value("core/statusinterval").toInt());
|
||||
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()
|
||||
@ -24,4 +30,6 @@ void SettingsWindow::on_buttonBox_accepted()
|
||||
{
|
||||
settings.setValue("core/senderinterval", ui->senderbox->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>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>144</width>
|
||||
<width>201</width>
|
||||
<height>96</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -86,6 +86,49 @@
|
||||
</item>
|
||||
</layout>
|
||||
</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>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user