Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI fix #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions aboutwindow.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
#ifndef ABOUTWINDOW_H
#define ABOUTWINDOW_H

#include <QDialog>

#include "repraptor.h"

namespace Ui {
class AboutWindow;
class AboutWindow;
}

class AboutWindow : public QDialog
{
Q_OBJECT

public:
explicit AboutWindow(QWidget *parent = 0);
explicit AboutWindow(QWidget *parent = nullptr);
~AboutWindow();

private:
Expand Down
2 changes: 1 addition & 1 deletion eepromwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ EEPROMWindow::EEPROMWindow(QStringList eepromLines, QWidget *parent) :
{
case 0:
edit->setValidator(new QIntValidator(-128, 255, this));
case 1:
break;
case 2:
edit->setValidator(new QIntValidator(this));
break;
Expand Down
5 changes: 2 additions & 3 deletions eepromwindow.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef EEPROMWINDOW_H
#define EEPROMWINDOW_H

#include <QDialog>
#include <QtWidgets>

Expand All @@ -9,15 +8,15 @@
using namespace RepRaptor;

namespace Ui {
class EEPROMWindow;
class EEPROMWindow;
}

class EEPROMWindow : public QDialog
{
Q_OBJECT

public:
explicit EEPROMWindow(QStringList eepromLines, QWidget *parent = 0);
explicit EEPROMWindow(QStringList eepromLines, QWidget *parent = nullptr);
~EEPROMWindow();

private:
Expand Down
3 changes: 1 addition & 2 deletions erroricon.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef ERRORICON_H
#define ERRORICON_H

#include <QWidget>
#include <QTimer>
#include <QPainter>
Expand All @@ -9,7 +8,7 @@ class ErrorIcon : public QWidget
{
Q_OBJECT
public:
explicit ErrorIcon(QWidget *parent = 0);
explicit ErrorIcon(QWidget *parent = nullptr);
~ErrorIcon();
QTimer *animation;
QString frame;
Expand Down
5 changes: 2 additions & 3 deletions errorwindow.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
#ifndef ERRORWINDOW_H
#define ERRORWINDOW_H

#include <QDialog>

#include "erroricon.h"
#include "repraptor.h"

namespace Ui {
class ErrorWindow;
class ErrorWindow;
}

class ErrorWindow : public QDialog
{
Q_OBJECT

public:
explicit ErrorWindow(QWidget *parent = 0, QString errorText = "Unknown error", int errType = 0);
explicit ErrorWindow(QWidget *parent = nullptr, QString errorText = "Unknown error", int errType = 0);
~ErrorWindow();

private:
Expand Down
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ int main(int argc, char *argv[])
MainWindow w;
w.show();

return a.exec();
return QApplication::exec();
}
2 changes: 0 additions & 2 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ MainWindow::MainWindow(QWidget *parent) :
ui(new Ui::MainWindow)
{
ui->setupUi(this);

//Set parents
settings.setParent(this);
gfile.setParent(this);
Expand Down Expand Up @@ -207,7 +206,6 @@ MainWindow::~MainWindow()
parserThread->wait();
senderThread->quit();
senderThread->wait();

delete ui;
}

Expand Down
5 changes: 2 additions & 3 deletions mainwindow.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QFileDialog>
#include <QSystemTrayIcon>
Expand All @@ -26,15 +25,15 @@
using namespace RepRaptor;

namespace Ui {
class MainWindow;
class MainWindow;
}

class MainWindow : public QMainWindow
{
Q_OBJECT

public:
explicit MainWindow(QWidget *parent = 0);
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();

Parser *parserWorker;
Expand Down
116 changes: 64 additions & 52 deletions mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>791</width>
<height>514</height>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -16,6 +16,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>800</width>
<height>600</height>
</size>
</property>
<property name="windowTitle">
<string>RepRaptor</string>
</property>
Expand All @@ -35,7 +41,7 @@
</property>
<property name="maximumSize">
<size>
<width>200</width>
<width>250</width>
<height>16777215</height>
</size>
</property>
Expand Down Expand Up @@ -83,15 +89,21 @@
<item row="0" column="1" rowspan="3">
<widget class="QGroupBox" name="controlBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>261</width>
<height>500</height>
<width>320</width>
<height>16777215</height>
</size>
</property>
<property name="title">
Expand Down Expand Up @@ -314,7 +326,7 @@
<widget class="QLineEdit" name="flowedit">
<property name="font">
<font>
<pointsize>9</pointsize>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
Expand Down Expand Up @@ -354,34 +366,6 @@
</property>
</widget>
</item>
<item row="10" column="2" colspan="2">
<widget class="QPushButton" name="fanonbtn">
<property name="text">
<string>Fan On</string>
</property>
</widget>
</item>
<item row="10" column="4" colspan="3">
<widget class="QPushButton" name="fanoffbtn">
<property name="text">
<string>Fan Off</string>
</property>
</widget>
</item>
<item row="11" column="2" colspan="2">
<widget class="QPushButton" name="atxonbtn">
<property name="text">
<string>ATX On</string>
</property>
</widget>
</item>
<item row="11" column="4" colspan="3">
<widget class="QPushButton" name="atxoffbtn">
<property name="text">
<string>ATX Off</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="QPushButton" name="homeallbtn">
<property name="text">
Expand Down Expand Up @@ -462,6 +446,47 @@
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="QLabel" name="label_2">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>15</height>
</size>
</property>
<property name="text">
<string>Step Increment</string>
</property>
</widget>
</item>
<item row="10" column="4" colspan="3">
<widget class="QPushButton" name="fanoffbtn">
<property name="text">
<string>Fan Off</string>
</property>
</widget>
</item>
<item row="11" column="4" colspan="3">
<widget class="QPushButton" name="atxoffbtn">
<property name="text">
<string>ATX Off</string>
</property>
</widget>
</item>
<item row="11" column="2" colspan="2">
<widget class="QPushButton" name="atxonbtn">
<property name="text">
<string>ATX On</string>
</property>
</widget>
</item>
<item row="10" column="2" colspan="2">
<widget class="QPushButton" name="fanonbtn">
<property name="text">
<string>Fan On</string>
</property>
</widget>
</item>
<item row="10" column="0" rowspan="2" colspan="2">
<widget class="QPushButton" name="haltbtn">
<property name="minimumSize">
Expand Down Expand Up @@ -897,19 +922,6 @@ STOP</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="QLabel" name="label_2">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>15</height>
</size>
</property>
<property name="text">
<string>Step Increment</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down Expand Up @@ -971,7 +983,7 @@ STOP</string>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<width>250</width>
<height>16777215</height>
</size>
</property>
Expand Down Expand Up @@ -1051,7 +1063,7 @@ STOP</string>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<width>250</width>
<height>16777215</height>
</size>
</property>
Expand Down Expand Up @@ -1129,8 +1141,8 @@ STOP</string>
<rect>
<x>0</x>
<y>0</y>
<width>791</width>
<height>20</height>
<width>800</width>
<height>24</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
Expand Down
3 changes: 1 addition & 2 deletions parser.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef PARSETHREAD_H
#define PARSETHREAD_H

#include <QThread>
#include <QSettings>

Expand All @@ -13,7 +12,7 @@ class Parser : public QObject
Q_OBJECT

public:
explicit Parser(QObject *parent = 0);
explicit Parser(QObject *parent = nullptr);
~Parser();

protected:
Expand Down
2 changes: 1 addition & 1 deletion repraptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

#ifndef REPRAPTOR_H
#define REPRAPTOR_H

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

namespace RepRaptor
{
Expand Down
Loading