From 841cfa64edd8bc1d0433bfab0121afe97e329f1a Mon Sep 17 00:00:00 2001 From: lm Date: Sat, 26 Feb 2011 19:59:13 +0100 Subject: [PATCH] Slight persistence adaptions. Now improving UI before taking video --- images/style-mission.css | 7 +++++++ qgroundcontrol.pro | 3 +++ src/uas/UAS.cc | 1 - src/ui/MainWindow.cc | 3 +++ src/ui/WaypointView.cc | 2 +- 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/images/style-mission.css b/images/style-mission.css index 4cdf69696..63514226f 100644 --- a/images/style-mission.css +++ b/images/style-mission.css @@ -86,6 +86,13 @@ border: 1px solid #777777; QMainWindow::separator:hover { background: white; } + + QGCToolWidgetItem { + border: 1px solid #66666B; + border-radius: 3px; + padding: 10px 0px 0px 0px; + margin-top: 1ex; /* leave space at the top for the title */ + } QDockWidget { border: 1px solid #32345E; diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index 02262c1ba..d6f42d825 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -153,6 +153,7 @@ FORMS += src/ui/MainWindow.ui \ src/ui/designer/QGCToolWidget.ui \ src/ui/designer/QGCParamSlider.ui \ src/ui/designer/QGCActionButton.ui \ + src/ui/designer/QGCCommandButton.ui \ src/ui/QGCMAVLinkLogPlayer.ui \ src/ui/QGCWaypointListMulti.ui \ src/ui/mission/QGCCustomWaypointAction.ui \ @@ -264,6 +265,7 @@ HEADERS += src/MG.h \ src/ui/designer/QGCToolWidget.h \ src/ui/designer/QGCParamSlider.h \ src/ui/designer/QGCActionButton.h \ + src/ui/designer/QGCCommandButton.h \ src/ui/designer/QGCToolWidgetItem.h \ src/ui/QGCMAVLinkLogPlayer.h \ src/comm/MAVLinkSimulationWaypointPlanner.h \ @@ -394,6 +396,7 @@ SOURCES += src/main.cc \ src/ui/designer/QGCToolWidget.cc \ src/ui/designer/QGCParamSlider.cc \ src/ui/designer/QGCActionButton.cc \ + src/ui/designer/QGCCommandButton.cc \ src/ui/designer/QGCToolWidgetItem.cc \ src/ui/QGCMAVLinkLogPlayer.cc \ src/comm/MAVLinkSimulationWaypointPlanner.cc \ diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 0dbda9bdc..2c8030643 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -1059,7 +1059,6 @@ void UAS::setHomePosition(double lat, double lon, double alt) void UAS::setLocalOriginAtCurrentGPSPosition() { - bool result = false; QMessageBox msgBox; msgBox.setIcon(QMessageBox::Warning); diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index d8de6ca2c..96f81af1b 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -307,9 +307,11 @@ void MainWindow::buildCustomWidget() if (!dock) { QDockWidget* dock = new QDockWidget(widgets.at(i)->windowTitle(), this); + dock->setObjectName(widgets.at(i)->objectName()+"_DOCK"); dock->setWidget(widgets.at(i)); connect(widgets.at(i), SIGNAL(destroyed()), dock, SLOT(deleteLater())); QAction* showAction = new QAction(widgets.at(i)->windowTitle(), this); + showAction->setCheckable(true); connect(showAction, SIGNAL(triggered(bool)), dock, SLOT(setVisible(bool))); connect(dock, SIGNAL(visibilityChanged(bool)), showAction, SLOT(setChecked(bool))); widgets.at(i)->setMainMenuAction(showAction); @@ -1045,6 +1047,7 @@ void MainWindow::createCustomWidget() connect(tool, SIGNAL(destroyed()), dock, SLOT(deleteLater())); dock->setWidget(tool); QAction* showAction = new QAction("Show Unnamed Tool", this); + showAction->setCheckable(true); connect(dock, SIGNAL(visibilityChanged(bool)), showAction, SLOT(setChecked(bool))); connect(showAction, SIGNAL(triggered(bool)), dock, SLOT(setVisible(bool))); tool->setMainMenuAction(showAction); diff --git a/src/ui/WaypointView.cc b/src/ui/WaypointView.cc index 6672ad5da..00f5480c0 100644 --- a/src/ui/WaypointView.cc +++ b/src/ui/WaypointView.cc @@ -203,7 +203,7 @@ void WaypointView::updateActionView(int action) m_ui->orbitSpinBox->show(); m_ui->holdTimeSpinBox->show(); break; - case MAV_CMD_NAV_TARGET: + case MAV_CMD_NAV_ORIENTATION_TARGET: m_ui->orbitSpinBox->hide(); m_ui->takeOffAngleSpinBox->hide(); m_ui->turnsSpinBox->hide(); -- 2.22.0