添加地图设置界面
This commit is contained in:
@@ -15,14 +15,13 @@ Index0::Index0(QWidget *parent) :
|
||||
this->setStyleSheet(stylesheet);
|
||||
file.close();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//link
|
||||
link = new LinkUI(this);
|
||||
|
||||
|
||||
//mapsetting
|
||||
mapsetting = new MapSettingUI(this);
|
||||
|
||||
connect(this,SIGNAL(IndexChanged(int)),
|
||||
this,SLOT(onTabIndexChanged(int)));
|
||||
|
||||
@@ -40,6 +39,7 @@ void Index0::resizeEvent(QResizeEvent *event)
|
||||
Q_UNUSED(event)
|
||||
|
||||
link->setGeometry(ui->frame->geometry());
|
||||
mapsetting->setGeometry(ui->frame->geometry());
|
||||
|
||||
update();
|
||||
}
|
||||
@@ -47,13 +47,13 @@ void Index0::resizeEvent(QResizeEvent *event)
|
||||
|
||||
void Index0::onTabIndexChanged(const int &index)//界面选择管理
|
||||
{
|
||||
//软件设置
|
||||
//连接设置
|
||||
if(index == 0) link->show();
|
||||
else link->hide();
|
||||
|
||||
//硬件设置
|
||||
//if(index == 1) index1->show();
|
||||
//else index1->hide();
|
||||
//地图设置
|
||||
if(index == 1) mapsetting->show();
|
||||
else mapsetting->hide();
|
||||
}
|
||||
|
||||
void Index0::on_pushButton_Link_clicked()
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
|
||||
#include "LinkUI.h"
|
||||
#include "MapSettingUI.h"
|
||||
|
||||
namespace Ui {
|
||||
class Index0;
|
||||
@@ -23,6 +24,7 @@ public:
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
|
||||
LinkUI *link = nullptr;
|
||||
MapSettingUI *mapsetting = nullptr;
|
||||
|
||||
private slots:
|
||||
|
||||
|
||||
@@ -10,9 +10,10 @@ QT += svg
|
||||
|
||||
|
||||
include (./LinkUI/LinkUI.pri)
|
||||
include (./MapSettingUI/MapSettingUI.pri)
|
||||
|
||||
|
||||
INCLUDEPATH += $$PWD/LinkUI
|
||||
INCLUDEPATH += $$PWD/LinkUI \
|
||||
$$PWD/MapSettingUI
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,14 +8,6 @@ QT += opengl
|
||||
QT += sql
|
||||
QT += svg
|
||||
|
||||
|
||||
|
||||
INCLUDEPATH += $$PWD/../../../../ComponentUI/CharInputter
|
||||
INCLUDEPATH += $$PWD/../../../../ComponentUI/Inputter
|
||||
INCLUDEPATH += $$PWD/../../../../ComponentUI/MultiSelector
|
||||
INCLUDEPATH += $$PWD/../../../../ComponentUI/Selector
|
||||
|
||||
|
||||
FORMS += \
|
||||
$$PWD/ConnectDialog.ui
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#include "MapSettingUI.h"
|
||||
#include "ui_MapSettingUI.h"
|
||||
|
||||
MapSettingUI::MapSettingUI(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::MapSettingUI)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
MapSettingUI::~MapSettingUI()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void MapSettingUI::setMapProvider(QVariant value)
|
||||
{
|
||||
ui->pushButton_MapProvider->setText(value.toString());
|
||||
|
||||
//emit setMapProvider
|
||||
|
||||
}
|
||||
|
||||
void MapSettingUI::MapTypes(QStringList list)
|
||||
{
|
||||
Selector *selector = new Selector(this);
|
||||
selector->setGeometry(0,0,this->width(),this->height());
|
||||
|
||||
selector->setList(list,ui->pushButton_MapProvider->text());
|
||||
|
||||
connect(selector,SIGNAL(confirmValue(QVariant)),
|
||||
this,SLOT(setMapProvider(QVariant)));
|
||||
|
||||
selector->show();
|
||||
}
|
||||
|
||||
void MapSettingUI::on_pushButton_MapProvider_clicked()
|
||||
{
|
||||
emit getMapTypes();
|
||||
}
|
||||
|
||||
void MapSettingUI::on_pushButton_Path_clicked()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
#ifndef MAPSETTINGUI_H
|
||||
#define MAPSETTINGUI_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "QDebug"
|
||||
#include "multiselector.h"
|
||||
#include "Selector.h"
|
||||
#include "Inputter.h"
|
||||
#include "CharInputter.h"
|
||||
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class MapSettingUI;
|
||||
}
|
||||
|
||||
class MapSettingUI : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MapSettingUI(QWidget *parent = nullptr);
|
||||
~MapSettingUI();
|
||||
|
||||
private slots:
|
||||
|
||||
void setMapProvider(QVariant value);
|
||||
|
||||
void on_pushButton_MapProvider_clicked();
|
||||
|
||||
void on_pushButton_Path_clicked();
|
||||
|
||||
public slots:
|
||||
void MapTypes(QStringList list);
|
||||
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
void getMapTypes(void);
|
||||
|
||||
|
||||
private:
|
||||
Ui::MapSettingUI *ui;
|
||||
};
|
||||
|
||||
#endif // MAPSETTINGUI_H
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
|
||||
RESOURCES += \
|
||||
$$PWD/MapSettingUIRes.qrc
|
||||
|
||||
FORMS += \
|
||||
$$PWD/MapSettingUI.ui
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/MapSettingUI.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/MapSettingUI.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
|
||||
|
||||
.QFrame {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
.QPushButton {
|
||||
background-color: #FFFFFF /*palegoldenrod*/;
|
||||
border-width: 2px;
|
||||
border-color: darkkhaki;
|
||||
border-style: solid;
|
||||
border-radius: 5;
|
||||
padding: 3px;
|
||||
font: 30px "Arial";
|
||||
}
|
||||
|
||||
.QPushButton:pressed {
|
||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #dadbde, stop: 1 #f6f7fa);
|
||||
}
|
||||
|
||||
QTabWidget {
|
||||
|
||||
font: 20px "Arial";
|
||||
|
||||
}
|
||||
|
||||
QTabWidget::pane {
|
||||
border-top: 1px solid #E5E5E5;
|
||||
border-left:1px solid #E5E5E5;
|
||||
position: absolute;
|
||||
font-size: 20px;
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
|
||||
QTabBar::tab {
|
||||
border-width: 2px;
|
||||
border-bottom-color: #5F4F4F; /* same as the pane color */
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
min-width: 10px;
|
||||
padding: 5px;
|
||||
font-size: 20px;
|
||||
background-color:#FF5F6F;
|
||||
}
|
||||
|
||||
QTabBar::tab:selected, QTabBar::tab:hover {
|
||||
background-color:#EFEFFF;//选中背景色
|
||||
}
|
||||
|
||||
QTabBar::tab:selected {
|
||||
color:#2080F7;//选中颜色
|
||||
border-bottom: 2px solid #2080F7;
|
||||
font-weight:bold;
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
|
||||
QTabWidget::tab-bar {
|
||||
border-top: 2px solid #E5E5E5;
|
||||
border-bottom: 2px solid #E5E5E5;
|
||||
border-left:1px solid #E5E5E5;
|
||||
alignment: center;//居中显示
|
||||
font-size: 30px;
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MapSettingUI</class>
|
||||
<widget class="QWidget" name="MapSettingUI">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>877</width>
|
||||
<height>581</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pushButton_MapProvider">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>10</y>
|
||||
<width>321</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>MapProvider</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Path">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>110</y>
|
||||
<width>321</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cache Path</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>220</y>
|
||||
<width>321</width>
|
||||
<height>91</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>330</y>
|
||||
<width>321</width>
|
||||
<height>91</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/img"/>
|
||||
<qresource prefix="/qss">
|
||||
<file>MapSettingUI.qss</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -14,6 +14,12 @@ include (./Index1/Index1.pri)
|
||||
INCLUDEPATH += $$PWD/Index0 \
|
||||
$$PWD/Index1
|
||||
|
||||
INCLUDEPATH += $$PWD/../ComponentUI/CharInputter
|
||||
INCLUDEPATH += $$PWD/../ComponentUI/Inputter
|
||||
INCLUDEPATH += $$PWD/../ComponentUI/MultiSelector
|
||||
INCLUDEPATH += $$PWD/../ComponentUI/Selector
|
||||
|
||||
|
||||
FORMS += \
|
||||
$$PWD/Setting.ui
|
||||
|
||||
|
||||
+1
-2
@@ -72,7 +72,6 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
connect(dlink->mavlinknode,SIGNAL(state_updated()),
|
||||
this,SLOT(updateUI()));
|
||||
|
||||
|
||||
connect(setting->index0->link,SIGNAL(connectSignal(QVariant,QVariant,QVariant,QVariant,QVariant,QVariant,QVariant,QVariant)),
|
||||
dlink,SLOT(connectSignal(QVariant,QVariant,QVariant,QVariant,QVariant,QVariant,QVariant,QVariant)));
|
||||
|
||||
@@ -120,7 +119,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
missionUI = new propertyui(this);
|
||||
missionUI->hide();
|
||||
|
||||
|
||||
//mision ----- map
|
||||
|
||||
connect(map, SIGNAL(WPProperty(float,float,float,float,int32_t,int32_t,float,uint16_t,uint16_t,uint16_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t)),
|
||||
missionUI,SLOT(setWayPointProperty(float,float,float,float,int32_t,int32_t,float,uint16_t,uint16_t,uint16_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t,uint8_t)));
|
||||
|
||||
@@ -27,4 +27,15 @@
|
||||
#include "mousewheelzoomtype.h"
|
||||
|
||||
|
||||
namespace internals {}
|
||||
namespace internals {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -33,9 +33,12 @@
|
||||
#include <QMetaEnum>
|
||||
namespace internals {
|
||||
|
||||
|
||||
#ifdef QtOpmapInternals
|
||||
#include <internalglobal.h>
|
||||
class OPMAPINTERNALSHARED_EXPORT MouseWheelZoomType : public QObject {
|
||||
#else
|
||||
class MouseWheelZoomType : public QObject {
|
||||
|
||||
#endif
|
||||
Q_OBJECT Q_ENUMS(Types)
|
||||
public:
|
||||
enum Types {
|
||||
|
||||
Reference in New Issue
Block a user