mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-26 15:54:15 +01:00
LP-572 WP Editor: Add Apply button
This commit is contained in:
parent
5a18205f36
commit
c3d840ad63
@ -2,7 +2,8 @@
|
|||||||
******************************************************************************
|
******************************************************************************
|
||||||
*
|
*
|
||||||
* @file opmap_edit_waypoint_dialog.cpp
|
* @file opmap_edit_waypoint_dialog.cpp
|
||||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2017.
|
||||||
|
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||||
* @addtogroup GCSPlugins GCS Plugins
|
* @addtogroup GCSPlugins GCS Plugins
|
||||||
* @{
|
* @{
|
||||||
* @addtogroup OPMapPlugin OpenPilot Map Plugin
|
* @addtogroup OPMapPlugin OpenPilot Map Plugin
|
||||||
@ -93,12 +94,6 @@ opmap_edit_waypoint_dialog::~opmap_edit_waypoint_dialog()
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void opmap_edit_waypoint_dialog::on_pushButtonOK_clicked()
|
|
||||||
{
|
|
||||||
mapper->submit();
|
|
||||||
close();
|
|
||||||
}
|
|
||||||
|
|
||||||
void opmap_edit_waypoint_dialog::setupModeWidgets()
|
void opmap_edit_waypoint_dialog::setupModeWidgets()
|
||||||
{
|
{
|
||||||
MapDataDelegate::ModeOptions mode = (MapDataDelegate::ModeOptions)ui->cbMode->itemData(ui->cbMode->currentIndex()).toInt();
|
MapDataDelegate::ModeOptions mode = (MapDataDelegate::ModeOptions)ui->cbMode->itemData(ui->cbMode->currentIndex()).toInt();
|
||||||
@ -263,11 +258,6 @@ void opmap_edit_waypoint_dialog::setupConditionWidgets()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void opmap_edit_waypoint_dialog::pushButtonCancel_clicked()
|
|
||||||
{
|
|
||||||
mapper->revert();
|
|
||||||
close();
|
|
||||||
}
|
|
||||||
void opmap_edit_waypoint_dialog::editWaypoint(mapcontrol::WayPointItem *waypoint_item)
|
void opmap_edit_waypoint_dialog::editWaypoint(mapcontrol::WayPointItem *waypoint_item)
|
||||||
{
|
{
|
||||||
if (!waypoint_item) {
|
if (!waypoint_item) {
|
||||||
@ -287,16 +277,34 @@ void opmap_edit_waypoint_dialog::editWaypoint(mapcontrol::WayPointItem *waypoint
|
|||||||
mapper->setCurrentIndex(waypoint_item->Number());
|
mapper->setCurrentIndex(waypoint_item->Number());
|
||||||
}
|
}
|
||||||
|
|
||||||
void opmap_edit_waypoint_dialog::on_pushButton_clicked()
|
void opmap_edit_waypoint_dialog::on_pushButtonOK_clicked()
|
||||||
|
{
|
||||||
|
mapper->submit();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void opmap_edit_waypoint_dialog::pushButtonCancel_clicked()
|
||||||
|
{
|
||||||
|
mapper->revert();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void opmap_edit_waypoint_dialog::on_pushButtonPrevious_clicked()
|
||||||
{
|
{
|
||||||
mapper->toPrevious();
|
mapper->toPrevious();
|
||||||
}
|
}
|
||||||
|
|
||||||
void opmap_edit_waypoint_dialog::on_pushButton_2_clicked()
|
void opmap_edit_waypoint_dialog::on_pushButtonNext_clicked()
|
||||||
{
|
{
|
||||||
mapper->toNext();
|
mapper->toNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void opmap_edit_waypoint_dialog::on_pushButtonApply_clicked()
|
||||||
|
{
|
||||||
|
mapper->submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void opmap_edit_waypoint_dialog::enableEditWidgets(bool value)
|
void opmap_edit_waypoint_dialog::enableEditWidgets(bool value)
|
||||||
{
|
{
|
||||||
QWidget *w;
|
QWidget *w;
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
******************************************************************************
|
******************************************************************************
|
||||||
*
|
*
|
||||||
* @file opmap_edit_waypoint_dialog.h
|
* @file opmap_edit_waypoint_dialog.h
|
||||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2017.
|
||||||
|
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
||||||
* @addtogroup GCSPlugins GCS Plugins
|
* @addtogroup GCSPlugins GCS Plugins
|
||||||
* @{
|
* @{
|
||||||
* @addtogroup OPMapPlugin OpenPilot Map Plugin
|
* @addtogroup OPMapPlugin OpenPilot Map Plugin
|
||||||
@ -63,8 +64,9 @@ private slots:
|
|||||||
void setupConditionWidgets();
|
void setupConditionWidgets();
|
||||||
void pushButtonCancel_clicked();
|
void pushButtonCancel_clicked();
|
||||||
void on_pushButtonOK_clicked();
|
void on_pushButtonOK_clicked();
|
||||||
void on_pushButton_clicked();
|
void on_pushButtonApply_clicked();
|
||||||
void on_pushButton_2_clicked();
|
void on_pushButtonPrevious_clicked();
|
||||||
|
void on_pushButtonNext_clicked();
|
||||||
void enableEditWidgets(bool);
|
void enableEditWidgets(bool);
|
||||||
void currentRowChanged(QModelIndex, QModelIndex);
|
void currentRowChanged(QModelIndex, QModelIndex);
|
||||||
};
|
};
|
||||||
|
@ -789,14 +789,14 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton">
|
<widget class="QPushButton" name="pushButtonPrevious">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Previous</string>
|
<string>Previous</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_2">
|
<widget class="QPushButton" name="pushButtonNext">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Next</string>
|
<string>Next</string>
|
||||||
</property>
|
</property>
|
||||||
@ -815,6 +815,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButtonApply">
|
||||||
|
<property name="text">
|
||||||
|
<string>Apply</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButtonOK">
|
<widget class="QPushButton" name="pushButtonOK">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user