|
|
|
@ -20,10 +20,72 @@ MainWindow::~MainWindow()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::initUis(){
|
|
|
|
|
setBtnStyles();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* init
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
rock_widget = new JoyStick(ui->JoyStick_widget);
|
|
|
|
|
rock_widget->show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::setBtnStyles(){
|
|
|
|
|
/*
|
|
|
|
|
* set PushButton state
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
ui->btn_main->setIcon(QIcon("://images/up.png"));
|
|
|
|
|
ui->btn_main->setText("mainWidget");
|
|
|
|
|
ui->btn_main->setStyleSheet(
|
|
|
|
|
"QPushButton:hover{"
|
|
|
|
|
"background-color:rgb(186, 189, 182);"
|
|
|
|
|
"border-bottom:2px solid rgb(67, 154, 246);}"
|
|
|
|
|
"QPushButton:checked{"
|
|
|
|
|
"background-color:cyan;"
|
|
|
|
|
"border-bottom:2px solid white}"
|
|
|
|
|
"QPushButton:pressed{"
|
|
|
|
|
"background-color:rgb(67, 154, 246)}"
|
|
|
|
|
"QPushButton{"
|
|
|
|
|
"background-color:rgb(238, 238, 236);"
|
|
|
|
|
"border:none;"
|
|
|
|
|
"padding:0px 0px 0px 0px;"
|
|
|
|
|
"margin:0px 0px 0px 0px;}");
|
|
|
|
|
|
|
|
|
|
ui->btn_uav->setStyleSheet(
|
|
|
|
|
"QPushButton:hover{"
|
|
|
|
|
"background-color:rgb(186, 189, 182);"
|
|
|
|
|
"border-bottom:2px solid rgb(67, 154, 246);}"
|
|
|
|
|
"QPushButton:checked{"
|
|
|
|
|
"background-color:cyan;"
|
|
|
|
|
"border-bottom:2px solid white}"
|
|
|
|
|
"QPushButton:pressed{"
|
|
|
|
|
"background-color:rgb(67, 154, 246)}"
|
|
|
|
|
"QPushButton{"
|
|
|
|
|
"background-color:rgb(238, 238, 236);"
|
|
|
|
|
"border:none;"
|
|
|
|
|
"padding:0px 0px 0px 0px;"
|
|
|
|
|
"margin:0px 0px 0px 0px;}");
|
|
|
|
|
|
|
|
|
|
ui->btn_ugv->setStyleSheet(
|
|
|
|
|
"QPushButton:hover{"
|
|
|
|
|
"background-color:rgb(186, 189, 182);"
|
|
|
|
|
"border-bottom:2px solid rgb(67, 154, 246);}"
|
|
|
|
|
"QPushButton:checked{"
|
|
|
|
|
"background-color:cyan;"
|
|
|
|
|
"border-bottom:2px solid white}"
|
|
|
|
|
"QPushButton:pressed{"
|
|
|
|
|
"background-color:rgb(67, 154, 246)}"
|
|
|
|
|
"QPushButton{"
|
|
|
|
|
"background-color:rgb(238, 238, 236);"
|
|
|
|
|
"border:none;"
|
|
|
|
|
"padding:0px 0px 0px 0px;"
|
|
|
|
|
"margin:0px 0px 0px 0px;}");
|
|
|
|
|
|
|
|
|
|
// 8 -> Forward: ↑
|
|
|
|
|
ui->pushButton_Forward->setShortcut(Qt::Key_8);
|
|
|
|
|
ui->pushButton_Forward->setStyleSheet(
|
|
|
|
@ -88,15 +150,6 @@ void MainWindow::initUis(){
|
|
|
|
|
"QPushButton:pressed{border-image: url(://images/down_right_2.png)}");
|
|
|
|
|
ui->pushButton_Right_Back->setFlat(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* init
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
rock_widget = new JoyStick(ui->JoyStick_widget);
|
|
|
|
|
rock_widget->show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|