Commit 07aba7a1 authored by Don Gagne's avatar Don Gagne

Remove old SettingsDialog

parent 8c7432cb
...@@ -238,7 +238,6 @@ FORMS += \ ...@@ -238,7 +238,6 @@ FORMS += \
src/ui/QGCTabbedInfoView.ui \ src/ui/QGCTabbedInfoView.ui \
src/ui/QGCUASFileView.ui \ src/ui/QGCUASFileView.ui \
src/ui/QGCUASFileViewMulti.ui \ src/ui/QGCUASFileViewMulti.ui \
src/ui/SettingsDialog.ui \
src/ui/uas/UASQuickView.ui \ src/ui/uas/UASQuickView.ui \
src/ui/uas/UASQuickViewItemSelect.ui \ src/ui/uas/UASQuickViewItemSelect.ui \
src/ui/UASInfo.ui \ src/ui/UASInfo.ui \
...@@ -363,7 +362,6 @@ HEADERS += \ ...@@ -363,7 +362,6 @@ HEADERS += \
src/ui/MultiVehicleDockWidget.h \ src/ui/MultiVehicleDockWidget.h \
src/ui/QGCMAVLinkLogPlayer.h \ src/ui/QGCMAVLinkLogPlayer.h \
src/ui/QGCMapRCToParamDialog.h \ src/ui/QGCMapRCToParamDialog.h \
src/ui/SettingsDialog.h \
src/ui/uas/UASMessageView.h \ src/ui/uas/UASMessageView.h \
src/ui/uas/QGCUnconnectedInfoWidget.h \ src/ui/uas/QGCUnconnectedInfoWidget.h \
src/ui/QGCDataPlot2D.h \ src/ui/QGCDataPlot2D.h \
...@@ -490,7 +488,6 @@ SOURCES += \ ...@@ -490,7 +488,6 @@ SOURCES += \
src/ui/uas/UASMessageView.cc \ src/ui/uas/UASMessageView.cc \
src/uas/FileManager.cc \ src/uas/FileManager.cc \
src/ui/uas/QGCUnconnectedInfoWidget.cc \ src/ui/uas/QGCUnconnectedInfoWidget.cc \
src/ui/SettingsDialog.cc \
src/ui/MAVLinkDecoder.cc \ src/ui/MAVLinkDecoder.cc \
src/ui/MAVLinkSettingsWidget.cc \ src/ui/MAVLinkSettingsWidget.cc \
src/ui/QGCMapRCToParamDialog.cpp \ src/ui/QGCMapRCToParamDialog.cpp \
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <QDesktopServices> #include <QDesktopServices>
#include <QDockWidget> #include <QDockWidget>
#include <QMenuBar> #include <QMenuBar>
#include <QDialog>
#include "QGC.h" #include "QGC.h"
#include "MAVLinkProtocol.h" #include "MAVLinkProtocol.h"
...@@ -42,7 +43,6 @@ ...@@ -42,7 +43,6 @@
#include "QGCImageProvider.h" #include "QGCImageProvider.h"
#ifndef __mobile__ #ifndef __mobile__
#include "SettingsDialog.h"
#include "QGCDataPlot2D.h" #include "QGCDataPlot2D.h"
#include "Linecharts.h" #include "Linecharts.h"
#include "QGCUASFileViewMulti.h" #include "QGCUASFileViewMulti.h"
...@@ -489,9 +489,6 @@ void MainWindow::connectCommonActions() ...@@ -489,9 +489,6 @@ void MainWindow::connectCommonActions()
connect(qgcApp()->toolbox()->audioOutput(), &GAudioOutput::mutedChanged, _ui.actionMuteAudioOutput, &QAction::setChecked); connect(qgcApp()->toolbox()->audioOutput(), &GAudioOutput::mutedChanged, _ui.actionMuteAudioOutput, &QAction::setChecked);
connect(_ui.actionMuteAudioOutput, &QAction::triggered, qgcApp()->toolbox()->audioOutput(), &GAudioOutput::mute); connect(_ui.actionMuteAudioOutput, &QAction::triggered, qgcApp()->toolbox()->audioOutput(), &GAudioOutput::mute);
// Application Settings
connect(_ui.actionSettings, &QAction::triggered, this, &MainWindow::showSettings);
// Connect internal actions // Connect internal actions
connect(qgcApp()->toolbox()->multiVehicleManager(), &MultiVehicleManager::vehicleAdded, this, &MainWindow::_vehicleAdded); connect(qgcApp()->toolbox()->multiVehicleManager(), &MultiVehicleManager::vehicleAdded, this, &MainWindow::_vehicleAdded);
} }
...@@ -503,14 +500,6 @@ void MainWindow::_openUrl(const QString& url, const QString& errorMessage) ...@@ -503,14 +500,6 @@ void MainWindow::_openUrl(const QString& url, const QString& errorMessage)
} }
} }
#ifndef __mobile__
void MainWindow::showSettings()
{
SettingsDialog settings(this);
settings.exec();
}
#endif
void MainWindow::_vehicleAdded(Vehicle* vehicle) void MainWindow::_vehicleAdded(Vehicle* vehicle)
{ {
connect(vehicle->uas(), &UAS::valueChanged, this, &MainWindow::valueChanged); connect(vehicle->uas(), &UAS::valueChanged, this, &MainWindow::valueChanged);
......
...@@ -89,10 +89,6 @@ public: ...@@ -89,10 +89,6 @@ public:
QObject* rootQmlObject(void); QObject* rootQmlObject(void);
public slots: public slots:
#ifndef __mobile__
void showSettings();
#endif
/** @brief Save power by reducing update rates */ /** @brief Save power by reducing update rates */
void enableLowPowerMode(bool enabled) { _lowPowerMode = enabled; } void enableLowPowerMode(bool enabled) { _lowPowerMode = enabled; }
......
...@@ -61,7 +61,6 @@ ...@@ -61,7 +61,6 @@
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionMuteAudioOutput"/> <addaction name="actionMuteAudioOutput"/>
<addaction name="actionStatusBar"/> <addaction name="actionStatusBar"/>
<addaction name="actionSettings"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionExit"/> <addaction name="actionExit"/>
</widget> </widget>
...@@ -95,17 +94,6 @@ ...@@ -95,17 +94,6 @@
<string>Mute Audio Output</string> <string>Mute Audio Output</string>
</property> </property>
</action> </action>
<action name="actionSettings">
<property name="text">
<string>Settings</string>
</property>
<property name="toolTip">
<string>Application settings</string>
</property>
<property name="menuRole">
<enum>QAction::PreferencesRole</enum>
</property>
</action>
<action name="actionAdvanced_Mode"> <action name="actionAdvanced_Mode">
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
......
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#include <QSettings>
#include <QDesktopWidget>
#include "SettingsDialog.h"
#include "MainWindow.h"
#include "ui_SettingsDialog.h"
#include "LinkManager.h"
#include "MAVLinkProtocol.h"
#include "MAVLinkSettingsWidget.h"
#include "GAudioOutput.h"
#include "QGCApplication.h"
#include "QGCFileDialog.h"
#include "QGCMessageBox.h"
#include "MainToolBarController.h"
#include "FlightMapSettings.h"
SettingsDialog::SettingsDialog(QWidget *parent, Qt::WindowFlags flags)
: QDialog(parent, flags)
, _ui(new Ui::SettingsDialog)
{
_ui->setupUi(this);
// Center the window on the screen.
QDesktopWidget *desktop = QApplication::desktop();
int screen = desktop->screenNumber(parent);
QRect position = frameGeometry();
position.moveCenter(QApplication::desktop()->availableGeometry(screen).center());
move(position.topLeft());
MAVLinkSettingsWidget* pMavsettings = new MAVLinkSettingsWidget(qgcApp()->toolbox()->mavlinkProtocol(), this);
// Add the MAVLink settings pane
_ui->tabWidget->addTab(pMavsettings, "MAVLink");
this->window()->setWindowTitle(tr("QGroundControl Settings"));
_ui->tabWidget->setCurrentWidget(pMavsettings);
connect(_ui->buttonBox, &QDialogButtonBox::accepted, this, &SettingsDialog::accept);
}
SettingsDialog::~SettingsDialog()
{
delete _ui;
}
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include <QDialog>
#include "MainWindow.h"
#include "GAudioOutput.h"
#include "FlightMapSettings.h"
namespace Ui
{
class SettingsDialog;
}
class SettingsDialog : public QDialog
{
Q_OBJECT
public:
SettingsDialog(QWidget *parent = 0, Qt::WindowFlags flags = Qt::Sheet);
~SettingsDialog();
private:
Ui::SettingsDialog* _ui;
};
#endif
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SettingsDialog</class>
<widget class="QDialog" name="SettingsDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>689</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QTabWidget" name="tabWidget"/>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
<property name="centerButtons">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment