UI tweaks

Fixed settings
This commit is contained in:
NeoTheFox 2015-03-04 14:29:09 +03:00
parent 41d396fe2a
commit f3487fae38
6 changed files with 46 additions and 39 deletions

View File

@ -11,25 +11,30 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>About</string> <string>About RepRaptor</string>
</property>
<property name="windowIcon">
<iconset resource="graphics.qrc">
<normaloff>:/icons/about.png</normaloff>:/icons/about.png</iconset>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="1" column="0">
<widget class="QGroupBox" name="groupBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="title"> <property name="orientation">
<string>About RepRaptor</string> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="checkable"> <property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QTextBrowser" name="textBrowser">
<property name="acceptDrops">
<bool>false</bool> <bool>false</bool>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <property name="html">
<item row="0" column="0"> <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
<widget class="QTextBrowser" name="textBrowser">
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
@ -42,31 +47,20 @@ p, li { white-space: pre-wrap; }
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://www.reprap.org&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;RepRap wiki&lt;/span&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://www.reprap.org&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;RepRap wiki&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;-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;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style=&quot;-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;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;-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;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot;-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;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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>
<property name="standardButtons"> <property name="openExternalLinks">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> <bool>true</bool>
</property>
<property name="openLinks">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <resources>
<include location="graphics.qrc"/>
</resources>
<connections> <connections>
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>

View File

@ -7,5 +7,6 @@
<file>icons/g.png</file> <file>icons/g.png</file>
<file>icons/sd.png</file> <file>icons/sd.png</file>
<file>icons/settings.png</file> <file>icons/settings.png</file>
<file>icons/about.png</file>
</qresource> </qresource>
</RCC> </RCC>

BIN
icons/about.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@ -23,8 +23,8 @@ MainWindow::MainWindow(QWidget *parent) :
ui->baudbox->addItem(QString::number(250000)); ui->baudbox->addItem(QString::number(250000));
ui->baudbox->addItem(QString::number(460800)); ui->baudbox->addItem(QString::number(460800));
ui->baudbox->addItem(QString::number(500000)); ui->baudbox->addItem(QString::number(500000));
if(settings.value("printer/baudrateIndex").toInt()) ui->baudbox->setCurrentIndex(settings.value("printer/baudrateIndex").toInt()); if(settings.value("printer/baudrateindex").toInt()) ui->baudbox->setCurrentIndex(settings.value("printer/baudrateindex").toInt());
ui->baudbox->setCurrentIndex(2); else ui->baudbox->setCurrentIndex(2);
ui->extruderlcd->setPalette(Qt::red); ui->extruderlcd->setPalette(Qt::red);
ui->bedlcd->setPalette(Qt::red); ui->bedlcd->setPalette(Qt::red);
@ -82,9 +82,9 @@ MainWindow::~MainWindow()
if(gfile.isOpen()) gfile.close(); if(gfile.isOpen()) gfile.close();
if(printer.isOpen()) printer.close(); if(printer.isOpen()) printer.close();
settings.setValue("printer/baudrateIndex", ui->baudbox->currentIndex()); settings.setValue("printer/baudrateindex", ui->baudbox->currentIndex());
settings.setValue("core/checktemperature", ui->checktemp->isChecked()); settings.setValue("core/checktemperature", ui->checktemp->isChecked());
settings.setValue("user/extrudertemp", ui->estepspin->value()); settings.setValue("user/extrudertemp", ui->etmpspin->value());
settings.setValue("user/bedtemp", ui->btmpspin->value()); settings.setValue("user/bedtemp", ui->btmpspin->value());
if(firstrun) settings.setValue("core/firstrun", true); if(firstrun) settings.setValue("core/firstrun", true);

View File

@ -13,6 +13,10 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string>Dialog</string>
</property> </property>
<property name="windowIcon">
<iconset resource="graphics.qrc">
<normaloff>:/icons/sd.png</normaloff>:/icons/sd.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
@ -43,7 +47,9 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <resources>
<include location="graphics.qrc"/>
</resources>
<connections> <connections>
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>

View File

@ -13,6 +13,10 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Settings</string> <string>Settings</string>
</property> </property>
<property name="windowIcon">
<iconset resource="graphics.qrc">
<normaloff>:/icons/settings.png</normaloff>:/icons/settings.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QGroupBox" name="internalGroup"> <widget class="QGroupBox" name="internalGroup">
@ -154,7 +158,9 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <resources>
<include location="graphics.qrc"/>
</resources>
<connections> <connections>
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>