#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui -> setupUi(this);
this -> setGeometry(0,0,800,700);
this -> setStyleSheet("background-color:rgb(188, 198 ,204)");
button0 -> setGeometry(50,50, 100,50);
button0 -> setStyleSheet("background-color:rgb(108, 118, 143)");
connect(button0, SIGNAL (clicked()), this, SLOT (useVector0()));
button1 -> setGeometry(50,150, 100,50);
button1 -> setStyleSheet("background-color:rgb(108, 118, 143)");
connect(button1, SIGNAL (clicked()), this, SLOT (useVector1()));
button2 -> setGeometry(50,250, 100,50);
button2 -> setStyleSheet("background-color:rgb(108, 118, 143)");
connect(button2, SIGNAL (clicked()), this, SLOT (useVector2()));
button3 -> setGeometry(50,350, 100,50);
button3 -> setStyleSheet("background-color:rgb(108, 118, 143)");
connect(button3, SIGNAL (clicked()), this, SLOT (useVector3()));
button4 -> setGeometry(50,450, 100,50);
button4 -> setStyleSheet("background-color:rgb(108, 118, 143)");
connect(button4, SIGNAL (clicked()), this, SLOT (useVector4()));
button5 -> setGeometry(50,550, 100,50);
button5 -> setStyleSheet("background-color:rgb(108, 118, 143)");
connect(button5, SIGNAL (clicked()), this, SLOT (useVector5()));
label ->setStyleSheet("background-color:rgb(0, 0, 0)");
label -> setGeometry(300,50,300,600);
}
//************************************************************************
MainWindow::~MainWindow(){
delete ui;
}
//*************************************************************************
void MainWindow::useVector0(){
arm.vctrMovesFun[0]();
arm.displayMoves(label);}
//*************************************************************************
void MainWindow::useVector1(){
arm.vctrMovesFun[1]();
arm.displayMoves(label);
}
//*************************************************************************
void MainWindow::useVector2(){
arm.vctrMovesFun[2]();
arm.displayMoves(label);
}
//*************************************************************************
void MainWindow::useVector3(){
arm.vctrMovesFun[3]();
arm.displayMoves(label);
}
//*************************************************************************
void MainWindow::useVector4(){
arm.vctrMovesFun[4]();
arm.displayMoves(label);
}
//*************************************************************************
void MainWindow::useVector5(){
arm.vctrMovesFun[5]();
arm.displayMoves(label);
}
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui -> setupUi(this);
this -> setGeometry(0,0,800,700);
this -> setStyleSheet("background-color:rgb(188, 198 ,204)");
button0 = new QPushButton("Move forward", this);
button0 -> setGeometry(50,50, 100,50);
button0 -> setStyleSheet("background-color:rgb(108, 118, 143)");
connect(button0, SIGNAL (clicked()), this, SLOT (useVector0()));
button1 = new QPushButton("Move backward", this);
button1 -> setGeometry(50,150, 100,50);
button1 -> setStyleSheet("background-color:rgb(108, 118, 143)");
connect(button1, SIGNAL (clicked()), this, SLOT (useVector1()));
button2 = new QPushButton("Move left", this);
button2 -> setGeometry(50,250, 100,50);
button2 -> setStyleSheet("background-color:rgb(108, 118, 143)");
connect(button2, SIGNAL (clicked()), this, SLOT (useVector2()));
button3 = new QPushButton("Move right", this);
button3 -> setGeometry(50,350, 100,50);
button3 -> setStyleSheet("background-color:rgb(108, 118, 143)");
connect(button3, SIGNAL (clicked()), this, SLOT (useVector3()));
button4 = new QPushButton("Spin left", this);
button4 -> setGeometry(50,450, 100,50);
button4 -> setStyleSheet("background-color:rgb(108, 118, 143)");
connect(button4, SIGNAL (clicked()), this, SLOT (useVector4()));
button5 = new QPushButton("Spin right", this);
button5 -> setGeometry(50,550, 100,50);
button5 -> setStyleSheet("background-color:rgb(108, 118, 143)");
connect(button5, SIGNAL (clicked()), this, SLOT (useVector5()));
label = new QLabel("", this);
label ->setStyleSheet("background-color:rgb(0, 0, 0)");
label -> setGeometry(300,50,300,600);
}
//************************************************************************
MainWindow::~MainWindow(){
delete ui;
}
//*************************************************************************
void MainWindow::useVector0(){
arm.vctrMovesFun[0]();
arm.displayMoves(label);}
//*************************************************************************
void MainWindow::useVector1(){
arm.vctrMovesFun[1]();
arm.displayMoves(label);
}
//*************************************************************************
void MainWindow::useVector2(){
arm.vctrMovesFun[2]();
arm.displayMoves(label);
}
//*************************************************************************
void MainWindow::useVector3(){
arm.vctrMovesFun[3]();
arm.displayMoves(label);
}
//*************************************************************************
void MainWindow::useVector4(){
arm.vctrMovesFun[4]();
arm.displayMoves(label);
}
//*************************************************************************
void MainWindow::useVector5(){
arm.vctrMovesFun[5]();
arm.displayMoves(label);
}
To copy to clipboard, switch view to plain text mode
Bookmarks