mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +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
|
||||
* @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 OPMapPlugin OpenPilot Map Plugin
|
||||
@ -93,12 +94,6 @@ opmap_edit_waypoint_dialog::~opmap_edit_waypoint_dialog()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void opmap_edit_waypoint_dialog::on_pushButtonOK_clicked()
|
||||
{
|
||||
mapper->submit();
|
||||
close();
|
||||
}
|
||||
|
||||
void opmap_edit_waypoint_dialog::setupModeWidgets()
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (!waypoint_item) {
|
||||
@ -287,16 +277,34 @@ void opmap_edit_waypoint_dialog::editWaypoint(mapcontrol::WayPointItem *waypoint
|
||||
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();
|
||||
}
|
||||
|
||||
void opmap_edit_waypoint_dialog::on_pushButton_2_clicked()
|
||||
void opmap_edit_waypoint_dialog::on_pushButtonNext_clicked()
|
||||
{
|
||||
mapper->toNext();
|
||||
}
|
||||
|
||||
void opmap_edit_waypoint_dialog::on_pushButtonApply_clicked()
|
||||
{
|
||||
mapper->submit();
|
||||
}
|
||||
|
||||
|
||||
void opmap_edit_waypoint_dialog::enableEditWidgets(bool value)
|
||||
{
|
||||
QWidget *w;
|
||||
|
@ -2,7 +2,8 @@
|
||||
******************************************************************************
|
||||
*
|
||||
* @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 OPMapPlugin OpenPilot Map Plugin
|
||||
@ -63,8 +64,9 @@ private slots:
|
||||
void setupConditionWidgets();
|
||||
void pushButtonCancel_clicked();
|
||||
void on_pushButtonOK_clicked();
|
||||
void on_pushButton_clicked();
|
||||
void on_pushButton_2_clicked();
|
||||
void on_pushButtonApply_clicked();
|
||||
void on_pushButtonPrevious_clicked();
|
||||
void on_pushButtonNext_clicked();
|
||||
void enableEditWidgets(bool);
|
||||
void currentRowChanged(QModelIndex, QModelIndex);
|
||||
};
|
||||
|
@ -789,14 +789,14 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<widget class="QPushButton" name="pushButtonPrevious">
|
||||
<property name="text">
|
||||
<string>Previous</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<widget class="QPushButton" name="pushButtonNext">
|
||||
<property name="text">
|
||||
<string>Next</string>
|
||||
</property>
|
||||
@ -815,6 +815,13 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonApply">
|
||||
<property name="text">
|
||||
<string>Apply</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonOK">
|
||||
<property name="text">
|
||||
|
Loading…
Reference in New Issue
Block a user