Skip to content

Commit

Permalink
Added version and build info
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoTheFox committed Mar 19, 2015
1 parent e28c4d7 commit c99f298
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 14 deletions.
5 changes: 5 additions & 0 deletions aboutwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ AboutWindow::AboutWindow(QWidget *parent) :
ui(new Ui::AboutWindow)
{
ui->setupUi(this);
QString info;
info += "RepRaptor v" + qApp->applicationVersion() + ", ";
info += "built with Qt " + QString(QT_VERSION_STR) + " on ";
info += QString(__DATE__) + ", " + QString(__TIME__);
ui->versionLabel->setText(info);
}

AboutWindow::~AboutWindow()
Expand Down
2 changes: 2 additions & 0 deletions aboutwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include <QDialog>

#include "repraptor.h"

namespace Ui {
class AboutWindow;
}
Expand Down
39 changes: 26 additions & 13 deletions aboutwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>424</width>
<height>308</height>
<width>359</width>
<height>363</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>About RepRaptor</string>
</property>
Expand All @@ -18,7 +24,7 @@
<normaloff>:/icons/about.png</normaloff>:/icons/about.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<item row="3" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
Expand All @@ -28,7 +34,7 @@
</property>
</widget>
</item>
<item row="0" column="0">
<item row="1" column="0">
<widget class="QTextBrowser" name="textBrowser">
<property name="acceptDrops">
<bool>false</bool>
Expand All @@ -37,16 +43,16 @@
<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;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'.Helvetica Neue DeskInterface'; font-size:13pt; 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;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;img src=&quot;:/icons/logo.png&quot; /&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:600;&quot;&gt; RepRaptor&lt;/span&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt; is free and open source software for controlling RepRap and similar machines. This software is distributed by terms of &lt;/span&gt;&lt;a href=&quot;https://www.gnu.org/licenses/gpl-2.0.html&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt; text-decoration: underline; color:#0000ff;&quot;&gt;GPL v2 licence.&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt; Some graphical images (Fugue Icons) are distributed by terms of &lt;/span&gt;&lt;a href=&quot;https://creativecommons.org/licenses/by/3.0/deed.ru&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt; text-decoration: underline; color:#0000ff;&quot;&gt;Creative Commons 3 licence&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt; 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 &lt;/span&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:600;&quot;&gt;MGTU MIREA&lt;/span&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt;&quot;&gt; university's 3D printing laboratory by&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;justify&quot; 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;mailto:[email protected]&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt; text-decoration: underline; color:#0000ff;&quot;&gt;Nickolay (aka &amp;quot;NeoTheFox&amp;quot;) Mardanov.&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; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&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;https://github.com/NeoTheFox/RepRaptor&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt; text-decoration: underline; color:#0000ff;&quot;&gt;GitHub&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; font-family:'Sans Serif'; font-size:9pt; 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; font-family:'Sans Serif'; font-size:9pt; 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; font-family:'Sans Serif'; font-size:9pt; text-decoration: underline; color:#0000ff;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt; RepRaptor&lt;/span&gt; is free and open source software for controlling RepRap and similar machines. This software is distributed by terms of &lt;a href=&quot;https://www.gnu.org/licenses/gpl-2.0.html&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;GPL v2 licence.&lt;/span&gt;&lt;/a&gt; Some graphical images (Fugue Icons) are distributed by terms of &lt;a href=&quot;https://creativecommons.org/licenses/by/3.0/deed.ru&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Creative Commons 3 licence&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p align=&quot;justify&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt; 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 &lt;span style=&quot; font-weight:600;&quot;&gt;MGTU MIREA&lt;/span&gt; university's 3D printing laboratory by&lt;/p&gt;
&lt;p align=&quot;justify&quot; 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;mailto:[email protected]&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Nickolay (aka &amp;quot;NeoTheFox&amp;quot;) Mardanov.&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;&quot;&gt;&lt;br /&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;https://github.com/NeoTheFox/RepRaptor&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;GitHub&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;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
Expand All @@ -56,6 +62,13 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="versionLabel">
<property name="text">
<string>Build info</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
Expand Down
2 changes: 2 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "mainwindow.h"
#include "repraptor.h"
#include <QApplication>

int main(int argc, char *argv[])
Expand All @@ -9,6 +10,7 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationName("NeoTheFox");
QCoreApplication::setOrganizationDomain("https://github.com/NeoTheFox");
QCoreApplication::setApplicationName("RepRaptor");
QCoreApplication::setApplicationVersion(REPRAPTOR_VERSION);

//Set the priority, so the OS would not mess up serial communication
QThread::currentThread()->setPriority(QThread::HighestPriority);
Expand Down
4 changes: 3 additions & 1 deletion repraptor.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef REPRAPTOR_H
#define REPRAPTOR_H

#include <QString>
#ifndef REPRAPTOR_VERSION
#define REPRAPTOR_VERSION "0.3.6"
#endif

namespace RepRaptor
{
Expand Down

0 comments on commit c99f298

Please sign in to comment.