improved robot UI and added textfields for Calibration points

This commit is contained in:
Steffen Vogel 2015-01-24 11:08:45 +01:00
parent 2b32f9b1d6
commit fbee925fee
5 changed files with 221 additions and 33 deletions

View file

@ -29,6 +29,8 @@
<file>resources/octoprint.png</file>
<file>resources/go-bottom.png</file>
<file>resources/go-top.png</file>
<file>resources/process-stop.png</file>
<file>resources/start-here.png</file>
</qresource>
<qresource prefix="/math">
<file>resources/matbr_left.png</file>

BIN
resources/process-stop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
resources/start-here.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -16,7 +16,7 @@ GCode & GCode::arg(char param, int v)
GCode & GCode::arg(char param, double v)
{
arg
}
GCode::operator QByteArray()
@ -62,7 +62,7 @@ void Robot::stop()
void Robot::moveZ(double z)
{
queue << GCode("G0")
.arg('Z', pos.z);
.arg('Z', z);
}
void Robot::moveXY(Point2f pos)

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>542</width>
<height>445</height>
<height>502</height>
</rect>
</property>
<property name="windowTitle">
@ -330,26 +330,6 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="btnConnect">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Connect</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/icons/resources/octoprint.png</normaloff>:/icons/resources/octoprint.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnCalibrate">
<property name="sizePolicy">
@ -403,7 +383,7 @@
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/icons/resources/media-playback-stop.png</normaloff>:/icons/resources/media-playback-stop.png</iconset>
<normaloff>:/icons/resources/process-stop.png</normaloff>:/icons/resources/process-stop.png</iconset>
</property>
</widget>
</item>
@ -425,11 +405,21 @@
</widget>
</item>
<item>
<widget class="QWidget" name="wdgConnection" native="true">
<widget class="QWidget" name="wdgSettings" native="true">
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::FieldsStayAtSizeHint</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<item row="3" column="0">
<widget class="QLabel" name="lblHostPort">
<property name="text">
<string>OctoPrint Server</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QWidget" name="widget_4" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_2">
@ -483,26 +473,222 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnConnect">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Connect</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/icons/resources/octoprint.png</normaloff>:/icons/resources/octoprint.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblHostPort">
<property name="text">
<string>OctoPrint Server</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="lblApiKey">
<property name="text">
<string>API Key</string>
<string>OctoPrint Key</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="lineEdit_2"/>
</item>
<item row="5" column="1">
<widget class="QWidget" name="wdgCalibPoints" native="true">
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="1" column="1">
<widget class="QLineEdit" name="inpY1"/>
</item>
<item row="0" column="2">
<widget class="QLabel" name="lblZ">
<property name="text">
<string>z</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="inpZ1"/>
</item>
<item row="4" column="0">
<widget class="QLineEdit" name="inpX4"/>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="inpY2"/>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="inpX1"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblX">
<property name="text">
<string>x</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLineEdit" name="inpZ2"/>
</item>
<item row="4" column="2">
<widget class="QLineEdit" name="inpZ4"/>
</item>
<item row="3" column="0">
<widget class="QLineEdit" name="inpX3"/>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="inpY3"/>
</item>
<item row="2" column="0">
<widget class="QLineEdit" name="inpX2"/>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="inpZ3"/>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="inpY4"/>
</item>
<item row="0" column="1">
<widget class="QLabel" name="lblY">
<property name="text">
<string>y</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="pushButton_2">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/icons/resources/start-here.png</normaloff>:/icons/resources/start-here.png</iconset>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QPushButton" name="pushButton_3">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/icons/resources/start-here.png</normaloff>:/icons/resources/start-here.png</iconset>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QPushButton" name="pushButton_4">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/icons/resources/start-here.png</normaloff>:/icons/resources/start-here.png</iconset>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QPushButton" name="pushButton_5">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/icons/resources/start-here.png</normaloff>:/icons/resources/start-here.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="lblCalibPoints">
<property name="text">
<string>Calibaration Points</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>