去除串口连接,网络连接小窗口
This commit is contained in:
@@ -0,0 +1,219 @@
|
||||
#include "ConnectDialog.h"
|
||||
#include "ui_ConnectDialog.h"
|
||||
|
||||
ConnectDialog::ConnectDialog(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::ConnectDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
ConnectDialog::~ConnectDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
//重建列表
|
||||
//usrname type local port remote port close
|
||||
//usrname type com baud Parity check close
|
||||
|
||||
void ConnectDialog::reBuildList(void)
|
||||
{
|
||||
/*
|
||||
ui->listWidget->clear();
|
||||
for (QMap<QString,QVector<QString>>::iterator i = Conneters.begin();i != Conneters.end(); ++i)
|
||||
{
|
||||
QString usrName = i.key();
|
||||
QVector<QString> Info = i.value();
|
||||
|
||||
QWidget *widget = new QWidget(ui->listWidget);
|
||||
|
||||
|
||||
QPushButton *m_usrName = new QPushButton(widget);
|
||||
QPushButton *m_Type = new QPushButton(widget);
|
||||
QPushButton *m_Param1 = new QPushButton(widget);
|
||||
QPushButton *m_Param2 = new QPushButton(widget);
|
||||
QPushButton *m_Param3 = new QPushButton(widget);
|
||||
QPushButton *m_Param4 = new QPushButton(widget);
|
||||
QPushButton *m_Close = new QPushButton(widget);
|
||||
|
||||
m_usrName->setText(usrName);
|
||||
//m_Type->setText(Info.at(0));
|
||||
m_Param1->setText(Info.at(1));
|
||||
m_Param2->setText(Info.at(2));
|
||||
m_Param3->setText(Info.at(3));
|
||||
m_Param4->setText(Info.at(4));
|
||||
m_Close->setText(Info.at(5));
|
||||
|
||||
m_Type->setIconSize(QSize(40,40));
|
||||
if(Info.at(0) == "UDP")
|
||||
{
|
||||
m_Type->setIcon(QIcon(":/img/Net.png"));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Type->setIcon(QIcon(":/img/Port.png"));
|
||||
}
|
||||
|
||||
|
||||
m_usrName->setMinimumHeight(60);
|
||||
m_Type->setMinimumHeight(60);
|
||||
m_Param1->setMinimumHeight(60);
|
||||
m_Param2->setMinimumHeight(60);
|
||||
m_Param3->setMinimumHeight(60);
|
||||
m_Param4->setMinimumHeight(60);
|
||||
|
||||
m_Close->setMinimumHeight(60);
|
||||
m_Close->setMinimumWidth(60);
|
||||
m_Close->setMaximumHeight(60);
|
||||
m_Close->setMaximumWidth(60);
|
||||
|
||||
QHBoxLayout *layout = new QHBoxLayout;
|
||||
|
||||
layout->setMargin(0);
|
||||
layout->setSpacing(6);
|
||||
|
||||
|
||||
layout->addWidget(m_usrName);
|
||||
layout->addWidget(m_Type);
|
||||
layout->addWidget(m_Param1);
|
||||
layout->addWidget(m_Param2);
|
||||
layout->addWidget(m_Param3);
|
||||
layout->addWidget(m_Param4);
|
||||
layout->addWidget(m_Close);
|
||||
widget->setLayout(layout);
|
||||
|
||||
|
||||
connect(m_usrName,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onUsrNameClicked()));
|
||||
|
||||
connect(m_Type,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onTypeClicked()));
|
||||
|
||||
connect(m_Param1,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onParam1Clicked()));
|
||||
|
||||
connect(m_Param2,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onParam2Clicked()));
|
||||
|
||||
connect(m_Param3,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onParam3Clicked()));
|
||||
|
||||
connect(m_Param4,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onParam4Clicked()));
|
||||
|
||||
connect(m_Close,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onCloseClicked()));
|
||||
|
||||
|
||||
|
||||
//创建自定义的item
|
||||
//将widget作为列表的item
|
||||
QListWidgetItem *ITEM = new QListWidgetItem();
|
||||
|
||||
|
||||
QSize size = ITEM->sizeHint();
|
||||
ITEM->setSizeHint(QSize(size.width(), 70));
|
||||
ui->listWidget->addItem(ITEM);
|
||||
widget->setSizeIncrement(size.width(), 70);
|
||||
|
||||
ui->listWidget->setItemWidget(ITEM, widget);
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void ConnectDialog::onUsrNameClicked(void)//英文输入
|
||||
{
|
||||
Inputter *inputter = new Inputter(this);
|
||||
inputter->setGeometry(0,0,this->width(),this->height());
|
||||
|
||||
inputter->setDecimalPlaces(0);
|
||||
|
||||
//connect(inputter,SIGNAL(confirmValue(QVariant)),
|
||||
// this,SLOT(setAltitude(QVariant)));
|
||||
|
||||
inputter->show();
|
||||
}
|
||||
|
||||
void ConnectDialog::onTypeClicked(void)//选择器
|
||||
{
|
||||
Selector *selector = new Selector(this);
|
||||
selector->setGeometry(0,0,this->width(),this->height());
|
||||
|
||||
QStringList list;
|
||||
|
||||
list << "PORT"
|
||||
<< "UDP";
|
||||
|
||||
selector->setList(list);
|
||||
|
||||
// connect(selector,SIGNAL(confirmValue(QVariant)),
|
||||
// this,SLOT(setFriendlyName(QVariant)));
|
||||
|
||||
selector->show();
|
||||
}
|
||||
|
||||
void ConnectDialog::onParam1Clicked(void)//name/localaddr 串口-选择 udp-输入
|
||||
{
|
||||
Selector *selector = new Selector(this);
|
||||
selector->setGeometry(0,0,this->width(),this->height());
|
||||
|
||||
|
||||
|
||||
//selector->setList(list,ui->pushButton_friendlyName->text());
|
||||
|
||||
// connect(selector,SIGNAL(confirmValue(QVariant)),
|
||||
// this,SLOT(setFriendlyName(QVariant)));
|
||||
|
||||
selector->show();
|
||||
}
|
||||
|
||||
void ConnectDialog::onParam2Clicked(void)//baud/localport 串口-输入 udp-输入
|
||||
{
|
||||
Inputter *inputter = new Inputter(this);
|
||||
inputter->setGeometry(0,0,this->width(),this->height());
|
||||
inputter->setInputType(1);
|
||||
inputter->setDecimalPlaces(0);
|
||||
|
||||
//connect(inputter,SIGNAL(confirmValue(QVariant)),
|
||||
// this,SLOT(setAltitude(QVariant)));
|
||||
|
||||
inputter->show();
|
||||
}
|
||||
|
||||
void ConnectDialog::onParam3Clicked(void)//parity/remote addr 串口-选择 udp-输入
|
||||
{
|
||||
Inputter *inputter = new Inputter(this);
|
||||
inputter->setGeometry(0,0,this->width(),this->height());
|
||||
inputter->setInputType(1);
|
||||
inputter->setDecimalPlaces(0);
|
||||
|
||||
//connect(inputter,SIGNAL(confirmValue(QVariant)),
|
||||
// this,SLOT(setAltitude(QVariant)));
|
||||
|
||||
inputter->show();
|
||||
}
|
||||
|
||||
void ConnectDialog::onParam4Clicked(void)//check/remote port 串口-选择 udp-输入
|
||||
{
|
||||
Inputter *inputter = new Inputter(this);
|
||||
inputter->setGeometry(0,0,this->width(),this->height());
|
||||
inputter->setInputType(1);
|
||||
inputter->setDecimalPlaces(0);
|
||||
|
||||
//connect(inputter,SIGNAL(confirmValue(QVariant)),
|
||||
// this,SLOT(setAltitude(QVariant)));
|
||||
|
||||
inputter->show();
|
||||
}
|
||||
|
||||
void ConnectDialog::onCloseClicked(void)//关闭本条
|
||||
{
|
||||
//断开连接
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
#ifndef CONNECTDIALOG_H
|
||||
#define CONNECTDIALOG_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "multiselector.h"
|
||||
#include "Selector.h"
|
||||
#include "Inputter.h"
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class ConnectDialog;
|
||||
}
|
||||
|
||||
class ConnectDialog : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConnectDialog(QWidget *parent = nullptr);
|
||||
~ConnectDialog();
|
||||
|
||||
|
||||
private slots:
|
||||
|
||||
void reBuildList(void);
|
||||
|
||||
void onUsrNameClicked(void);
|
||||
void onTypeClicked(void);
|
||||
void onParam1Clicked(void);
|
||||
void onParam2Clicked(void);
|
||||
void onParam3Clicked(void);
|
||||
void onParam4Clicked(void);
|
||||
void onCloseClicked(void);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
Ui::ConnectDialog *ui;
|
||||
};
|
||||
|
||||
#endif // CONNECTDIALOG_H
|
||||
@@ -0,0 +1,44 @@
|
||||
|
||||
QT += core gui network
|
||||
QT += serialport
|
||||
QT += quickwidgets
|
||||
QT += quick
|
||||
QT += qml
|
||||
QT += opengl
|
||||
QT += sql
|
||||
QT += svg
|
||||
|
||||
|
||||
|
||||
|
||||
INCLUDEPATH += $$PWD/../../../../ComponentUI/Inputter
|
||||
INCLUDEPATH += $$PWD/../../../../ComponentUI/MultiSelector
|
||||
INCLUDEPATH += $$PWD/../../../../ComponentUI/Selector
|
||||
|
||||
|
||||
FORMS += \
|
||||
$$PWD/ConnectDialog.ui
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/ConnectDialog.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/ConnectDialog.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ConnectDialog</class>
|
||||
<widget class="QWidget" name="ConnectDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>872</width>
|
||||
<height>408</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pushButton_usrName">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>USR Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" rowspan="7">
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Param3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QPushButton" name="pushButton_param3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Param3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Param1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Param2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QPushButton" name="pushButton_param4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Param4</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPushButton" name="pushButton_param2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Param2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Param4</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Tiltle</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pushButton_type">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pushButton_param1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Param1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -8,6 +8,9 @@ LinkUI::LinkUI(QWidget *parent) :
|
||||
ui->setupUi(this);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QVector<QString> v;
|
||||
|
||||
v << "Port"
|
||||
@@ -30,8 +33,6 @@ LinkUI::LinkUI(QWidget *parent) :
|
||||
Conneters.insert("DataLink",v);
|
||||
Conneters.insertMulti("RTK",v2);
|
||||
|
||||
|
||||
reBuildList();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,218 +41,10 @@ LinkUI::~LinkUI()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
//重建列表
|
||||
//usrname type local port remote port close
|
||||
//usrname type com baud Parity check close
|
||||
void LinkUI::reBuildList(void)
|
||||
void LinkUI::on_pushButton_Add_clicked()
|
||||
{
|
||||
ui->listWidget->clear();
|
||||
for (QMap<QString,QVector<QString>>::iterator i = Conneters.begin();i != Conneters.end(); ++i)
|
||||
{
|
||||
QString usrName = i.key();
|
||||
QVector<QString> Info = i.value();
|
||||
ConnectDialog *connectdialog = new ConnectDialog();
|
||||
|
||||
QWidget *widget = new QWidget(ui->listWidget);
|
||||
|
||||
|
||||
QPushButton *m_usrName = new QPushButton(widget);
|
||||
QPushButton *m_Type = new QPushButton(widget);
|
||||
QPushButton *m_Param1 = new QPushButton(widget);
|
||||
QPushButton *m_Param2 = new QPushButton(widget);
|
||||
QPushButton *m_Param3 = new QPushButton(widget);
|
||||
QPushButton *m_Param4 = new QPushButton(widget);
|
||||
QPushButton *m_Close = new QPushButton(widget);
|
||||
|
||||
m_usrName->setText(usrName);
|
||||
//m_Type->setText(Info.at(0));
|
||||
m_Param1->setText(Info.at(1));
|
||||
m_Param2->setText(Info.at(2));
|
||||
m_Param3->setText(Info.at(3));
|
||||
m_Param4->setText(Info.at(4));
|
||||
m_Close->setText(Info.at(5));
|
||||
|
||||
m_Type->setIconSize(QSize(40,40));
|
||||
if(Info.at(0) == "UDP")
|
||||
{
|
||||
m_Type->setIcon(QIcon(":/img/Net.png"));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Type->setIcon(QIcon(":/img/Port.png"));
|
||||
}
|
||||
|
||||
|
||||
m_usrName->setMinimumHeight(60);
|
||||
m_Type->setMinimumHeight(60);
|
||||
m_Param1->setMinimumHeight(60);
|
||||
m_Param2->setMinimumHeight(60);
|
||||
m_Param3->setMinimumHeight(60);
|
||||
m_Param4->setMinimumHeight(60);
|
||||
|
||||
m_Close->setMinimumHeight(60);
|
||||
m_Close->setMinimumWidth(60);
|
||||
m_Close->setMaximumHeight(60);
|
||||
m_Close->setMaximumWidth(60);
|
||||
|
||||
QHBoxLayout *layout = new QHBoxLayout;
|
||||
|
||||
layout->setMargin(0);
|
||||
layout->setSpacing(6);
|
||||
|
||||
|
||||
layout->addWidget(m_usrName);
|
||||
layout->addWidget(m_Type);
|
||||
layout->addWidget(m_Param1);
|
||||
layout->addWidget(m_Param2);
|
||||
layout->addWidget(m_Param3);
|
||||
layout->addWidget(m_Param4);
|
||||
layout->addWidget(m_Close);
|
||||
widget->setLayout(layout);
|
||||
|
||||
|
||||
connect(m_usrName,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onUsrNameClicked()));
|
||||
|
||||
connect(m_Type,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onTypeClicked()));
|
||||
|
||||
connect(m_Param1,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onParam1Clicked()));
|
||||
|
||||
connect(m_Param2,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onParam2Clicked()));
|
||||
|
||||
connect(m_Param3,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onParam3Clicked()));
|
||||
|
||||
connect(m_Param4,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onParam4Clicked()));
|
||||
|
||||
connect(m_Close,SIGNAL(clicked(bool)),
|
||||
this,SLOT(onCloseClicked()));
|
||||
|
||||
|
||||
|
||||
//创建自定义的item
|
||||
//将widget作为列表的item
|
||||
QListWidgetItem *ITEM = new QListWidgetItem();
|
||||
|
||||
|
||||
QSize size = ITEM->sizeHint();
|
||||
ITEM->setSizeHint(QSize(size.width(), 70));
|
||||
ui->listWidget->addItem(ITEM);
|
||||
widget->setSizeIncrement(size.width(), 70);
|
||||
|
||||
ui->listWidget->setItemWidget(ITEM, widget);
|
||||
|
||||
|
||||
}
|
||||
int index = ui->tabWidget->insertTab(ui->tabWidget->currentIndex(),connectdialog,tr("SerialPort"));
|
||||
ui->tabWidget->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
void LinkUI::onUsrNameClicked(void)//英文输入
|
||||
{
|
||||
Inputter *inputter = new Inputter(this);
|
||||
inputter->setGeometry(0,0,this->width(),this->height());
|
||||
|
||||
inputter->setDecimalPlaces(0);
|
||||
|
||||
//connect(inputter,SIGNAL(confirmValue(QVariant)),
|
||||
// this,SLOT(setAltitude(QVariant)));
|
||||
|
||||
inputter->show();
|
||||
}
|
||||
|
||||
void LinkUI::onTypeClicked(void)//选择器
|
||||
{
|
||||
Selector *selector = new Selector(this);
|
||||
selector->setGeometry(0,0,this->width(),this->height());
|
||||
|
||||
QStringList list;
|
||||
|
||||
list << "PORT"
|
||||
<< "UDP";
|
||||
|
||||
selector->setList(list);
|
||||
|
||||
// connect(selector,SIGNAL(confirmValue(QVariant)),
|
||||
// this,SLOT(setFriendlyName(QVariant)));
|
||||
|
||||
selector->show();
|
||||
}
|
||||
|
||||
void LinkUI::onParam1Clicked(void)//name/localaddr 串口-选择 udp-输入
|
||||
{
|
||||
Selector *selector = new Selector(this);
|
||||
selector->setGeometry(0,0,this->width(),this->height());
|
||||
|
||||
|
||||
|
||||
//selector->setList(list,ui->pushButton_friendlyName->text());
|
||||
|
||||
// connect(selector,SIGNAL(confirmValue(QVariant)),
|
||||
// this,SLOT(setFriendlyName(QVariant)));
|
||||
|
||||
selector->show();
|
||||
}
|
||||
|
||||
void LinkUI::onParam2Clicked(void)//baud/localport 串口-输入 udp-输入
|
||||
{
|
||||
Inputter *inputter = new Inputter(this);
|
||||
inputter->setGeometry(0,0,this->width(),this->height());
|
||||
inputter->setInputType(1);
|
||||
inputter->setDecimalPlaces(0);
|
||||
|
||||
//connect(inputter,SIGNAL(confirmValue(QVariant)),
|
||||
// this,SLOT(setAltitude(QVariant)));
|
||||
|
||||
inputter->show();
|
||||
}
|
||||
|
||||
void LinkUI::onParam3Clicked(void)//parity/remote addr 串口-选择 udp-输入
|
||||
{
|
||||
Inputter *inputter = new Inputter(this);
|
||||
inputter->setGeometry(0,0,this->width(),this->height());
|
||||
inputter->setInputType(1);
|
||||
inputter->setDecimalPlaces(0);
|
||||
|
||||
//connect(inputter,SIGNAL(confirmValue(QVariant)),
|
||||
// this,SLOT(setAltitude(QVariant)));
|
||||
|
||||
inputter->show();
|
||||
}
|
||||
|
||||
void LinkUI::onParam4Clicked(void)//check/remote port 串口-选择 udp-输入
|
||||
{
|
||||
Inputter *inputter = new Inputter(this);
|
||||
inputter->setGeometry(0,0,this->width(),this->height());
|
||||
inputter->setInputType(1);
|
||||
inputter->setDecimalPlaces(0);
|
||||
|
||||
//connect(inputter,SIGNAL(confirmValue(QVariant)),
|
||||
// this,SLOT(setAltitude(QVariant)));
|
||||
|
||||
inputter->show();
|
||||
}
|
||||
|
||||
void LinkUI::onCloseClicked(void)//关闭本条
|
||||
{
|
||||
//断开连接
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,11 +7,7 @@
|
||||
#include "QPushButton"
|
||||
#include <QListWidgetItem>
|
||||
|
||||
#include "multiselector.h"
|
||||
#include "Selector.h"
|
||||
#include "Inputter.h"
|
||||
|
||||
|
||||
#include "connectdialog.h"
|
||||
|
||||
namespace Ui {
|
||||
class LinkUI;
|
||||
@@ -30,26 +26,11 @@ signals:
|
||||
|
||||
private slots:
|
||||
|
||||
void reBuildList(void);
|
||||
|
||||
void onUsrNameClicked(void);
|
||||
void onTypeClicked(void);
|
||||
void onParam1Clicked(void);
|
||||
void onParam2Clicked(void);
|
||||
void onParam3Clicked(void);
|
||||
void onParam4Clicked(void);
|
||||
void onCloseClicked(void);
|
||||
|
||||
|
||||
void on_pushButton_Add_clicked();
|
||||
|
||||
private:
|
||||
Ui::LinkUI *ui;
|
||||
|
||||
|
||||
//...
|
||||
//usr type (name/addr) (baud/port) ()
|
||||
|
||||
|
||||
QMap<QString,QVector<QString>> Conneters;//type <name addr ...>
|
||||
|
||||
};
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
|
||||
|
||||
|
||||
include (./ConnectDialog/ConnectDialog.pri)
|
||||
|
||||
INCLUDEPATH += $$PWD/../../../ComponentUI/Inputter
|
||||
INCLUDEPATH += $$PWD/../../../ComponentUI/MultiSelector
|
||||
INCLUDEPATH += $$PWD/../../../ComponentUI/Selector
|
||||
|
||||
FORMS += \
|
||||
$$PWD/LinkUI.ui
|
||||
|
||||
@@ -27,7 +27,25 @@
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QListWidget" name="listWidget"/>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Add</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pushButton_Add">
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user