mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-23 18:52:28 -04:00
New dialog to store my geolocalisation
This commit is contained in:
parent
9dca6096f9
commit
88f76c5a61
122
sdrbase/gui/myposdialog.ui
Normal file
122
sdrbase/gui/myposdialog.ui
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>MyPositionDialog</class>
|
||||||
|
<widget class="QDialog" name="MyPositionDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>324</width>
|
||||||
|
<height>127</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Sans Serif</family>
|
||||||
|
<pointsize>9</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>My Station Position</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="latitudeLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Latitude</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="longitudeLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Longitude</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="longitudeSpinBox">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-180.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>180.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="latitudeSpinBox">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-90.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>90.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>buttonBox</tabstop>
|
||||||
|
</tabstops>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>MyPositionDialog</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>257</x>
|
||||||
|
<y>194</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>203</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>buttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>MyPositionDialog</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>314</x>
|
||||||
|
<y>194</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>203</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
45
sdrbase/gui/mypositiondialog.cpp
Normal file
45
sdrbase/gui/mypositiondialog.cpp
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Copyright (C) 2016 F4EXB //
|
||||||
|
// written by Edouard Griffiths //
|
||||||
|
// //
|
||||||
|
// OpenGL interface modernization. //
|
||||||
|
// See: http://doc.qt.io/qt-5/qopenglshaderprogram.html //
|
||||||
|
// //
|
||||||
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
|
// it under the terms of the GNU General Public License as published by //
|
||||||
|
// the Free Software Foundation as version 3 of the License, or //
|
||||||
|
// //
|
||||||
|
// This program is distributed in the hope that it will be useful, //
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||||
|
// GNU General Public License V3 for more details. //
|
||||||
|
// //
|
||||||
|
// You should have received a copy of the GNU General Public License //
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "gui/mypositiondialog.h"
|
||||||
|
#include "ui_myposdialog.h"
|
||||||
|
|
||||||
|
|
||||||
|
MyPositionDialog::MyPositionDialog(MainSettings& mainSettings, QWidget* parent) :
|
||||||
|
m_mainSettings(mainSettings),
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::MyPositionDialog)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
ui->latitudeSpinBox->setValue(m_mainSettings.getLatitude());
|
||||||
|
ui->longitudeSpinBox->setValue(m_mainSettings.getLongitude());
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPositionDialog::~MyPositionDialog()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyPositionDialog::accept()
|
||||||
|
{
|
||||||
|
m_mainSettings.setLatitude(ui->latitudeSpinBox->value());
|
||||||
|
m_mainSettings.setLongitude(ui->longitudeSpinBox->value());
|
||||||
|
QDialog::accept();
|
||||||
|
}
|
46
sdrbase/gui/mypositiondialog.h
Normal file
46
sdrbase/gui/mypositiondialog.h
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Copyright (C) 2016 F4EXB //
|
||||||
|
// written by Edouard Griffiths //
|
||||||
|
// //
|
||||||
|
// OpenGL interface modernization. //
|
||||||
|
// See: http://doc.qt.io/qt-5/qopenglshaderprogram.html //
|
||||||
|
// //
|
||||||
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
|
// it under the terms of the GNU General Public License as published by //
|
||||||
|
// the Free Software Foundation as version 3 of the License, or //
|
||||||
|
// //
|
||||||
|
// This program is distributed in the hope that it will be useful, //
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||||
|
// GNU General Public License V3 for more details. //
|
||||||
|
// //
|
||||||
|
// You should have received a copy of the GNU General Public License //
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef SDRBASE_GUI_MYPOSITIONDIALOG_H_
|
||||||
|
#define SDRBASE_GUI_MYPOSITIONDIALOG_H_
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include "settings/mainsettings.h"
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class MyPositionDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyPositionDialog : public QDialog {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit MyPositionDialog(MainSettings& mainSettings, QWidget* parent = 0);
|
||||||
|
~MyPositionDialog();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::MyPositionDialog* ui;
|
||||||
|
MainSettings& m_mainSettings;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void accept();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* SDRBASE_GUI_MYPOSITIONDIALOG_H_ */
|
@ -38,6 +38,7 @@
|
|||||||
#include "gui/channelwindow.h"
|
#include "gui/channelwindow.h"
|
||||||
#include "gui/audiodialog.h"
|
#include "gui/audiodialog.h"
|
||||||
#include "gui/samplingdevicecontrol.h"
|
#include "gui/samplingdevicecontrol.h"
|
||||||
|
#include "gui/mypositiondialog.h"
|
||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
#include "dsp/spectrumvis.h"
|
#include "dsp/spectrumvis.h"
|
||||||
#include "dsp/dspcommands.h"
|
#include "dsp/dspcommands.h"
|
||||||
@ -617,6 +618,12 @@ void MainWindow::on_action_Audio_triggered()
|
|||||||
audioDialog.exec();
|
audioDialog.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_action_My_Position_triggered()
|
||||||
|
{
|
||||||
|
MyPositionDialog myPositionDialog(m_settings, this);
|
||||||
|
myPositionDialog.exec();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_action_DV_Serial_triggered(bool checked)
|
void MainWindow::on_action_DV_Serial_triggered(bool checked)
|
||||||
{
|
{
|
||||||
m_dspEngine->setDVSerialSupport(checked);
|
m_dspEngine->setDVSerialSupport(checked);
|
||||||
|
@ -149,6 +149,7 @@ private slots:
|
|||||||
void on_presetTree_itemActivated(QTreeWidgetItem *item, int column);
|
void on_presetTree_itemActivated(QTreeWidgetItem *item, int column);
|
||||||
void on_action_Audio_triggered();
|
void on_action_Audio_triggered();
|
||||||
void on_action_DV_Serial_triggered(bool checked);
|
void on_action_DV_Serial_triggered(bool checked);
|
||||||
|
void on_action_My_Position_triggered();
|
||||||
void on_sampleSource_confirmClicked(bool checked);
|
void on_sampleSource_confirmClicked(bool checked);
|
||||||
void on_action_Loaded_Plugins_triggered();
|
void on_action_Loaded_Plugins_triggered();
|
||||||
void on_action_About_triggered();
|
void on_action_About_triggered();
|
||||||
|
@ -33,7 +33,16 @@
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -66,7 +75,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1012</width>
|
<width>1012</width>
|
||||||
<height>19</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menu_File">
|
<widget class="QMenu" name="menu_File">
|
||||||
@ -137,6 +146,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<addaction name="action_Audio"/>
|
<addaction name="action_Audio"/>
|
||||||
<addaction name="action_DV_Serial"/>
|
<addaction name="action_DV_Serial"/>
|
||||||
|
<addaction name="action_My_Position"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menu_File"/>
|
<addaction name="menu_File"/>
|
||||||
<addaction name="menu_View"/>
|
<addaction name="menu_View"/>
|
||||||
@ -162,7 +172,16 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QWidget" name="dockWidgetContents">
|
<widget class="QWidget" name="dockWidgetContents">
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
<layout class="QGridLayout" name="gridLayout_6">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
@ -373,7 +392,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -404,7 +432,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -441,7 +478,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -469,7 +515,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -596,6 +651,11 @@
|
|||||||
<string>DV Serial</string>
|
<string>DV Serial</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_My_Position">
|
||||||
|
<property name="text">
|
||||||
|
<string>My Position</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
<zorder>presetDock</zorder>
|
<zorder>presetDock</zorder>
|
||||||
<zorder>channelDock</zorder>
|
<zorder>channelDock</zorder>
|
||||||
</widget>
|
</widget>
|
||||||
@ -608,6 +668,23 @@
|
|||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="resources/res.qrc"/>
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
|
<include location="resources/res.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
|
@ -80,6 +80,7 @@ SOURCES += mainwindow.cpp\
|
|||||||
gui/presetitem.cpp\
|
gui/presetitem.cpp\
|
||||||
gui/rollupwidget.cpp\
|
gui/rollupwidget.cpp\
|
||||||
gui/samplingdevicecontrol.cpp\
|
gui/samplingdevicecontrol.cpp\
|
||||||
|
gui/mypositiondialog.cpp\
|
||||||
gui/scale.cpp\
|
gui/scale.cpp\
|
||||||
gui/scaleengine.cpp\
|
gui/scaleengine.cpp\
|
||||||
gui/valuedial.cpp\
|
gui/valuedial.cpp\
|
||||||
@ -159,6 +160,7 @@ HEADERS += mainwindow.h\
|
|||||||
gui/presetitem.h\
|
gui/presetitem.h\
|
||||||
gui/rollupwidget.h\
|
gui/rollupwidget.h\
|
||||||
gui/samplingdevicecontrol.h\
|
gui/samplingdevicecontrol.h\
|
||||||
|
gui/mypositiondialog.h\
|
||||||
gui/scale.h\
|
gui/scale.h\
|
||||||
gui/scaleengine.h\
|
gui/scaleengine.h\
|
||||||
gui/valuedial.h\
|
gui/valuedial.h\
|
||||||
@ -189,6 +191,7 @@ FORMS += mainwindow.ui\
|
|||||||
gui/aboutdialog.ui\
|
gui/aboutdialog.ui\
|
||||||
gui/pluginsdialog.ui\
|
gui/pluginsdialog.ui\
|
||||||
gui/samplingdevicecontrol.ui\
|
gui/samplingdevicecontrol.ui\
|
||||||
|
gui/myposdialog.ui\
|
||||||
gui/glspectrumgui.ui\
|
gui/glspectrumgui.ui\
|
||||||
mainwindow.ui
|
mainwindow.ui
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user