• 大小: 12KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-17
  • 语言: 其他
  • 标签:

资源简介

但是今天突然想到了这个东西,找了很久才找到的原文件,而且代码质量保证,所以我觉得,8分虽然有点高了,但总比下载一个充满未知的东西要好得多,Qt5.5开发,Qt5.8正常运行测试,希望对有需要的朋友有帮助。

资源截图

代码片段和文件信息

#include “gpsGUI.h“

gpsGUI::gpsGUI(QWidget *parent)
    : QWidget(parent)
{
    comStatusLabel = new QLabel;
    GPSComSetLabel = new QLabel(“GPS 串口参数设置“);
    comLabel = new QLabel(“串口“);
    comComboBox = new QComboBox;
    baudLabel = new QLabel(“波特率“);
    baudComboBox = new QComboBox;
    dataBitLabel = new QLabel(“数据位“);
    dataBitComboBox = new QComboBox;
    parityLabel = new QLabel(“校验位“);
    parityComboBox = new QComboBox;
    stopBitLabel = new QLabel(“停止位“);
    stopBitComboBox = new QComboBox;
    autoComBtn = new QPushButton(“搜索串口“);
    openANDcloseBtn = new QPushButton(“打开串口“);
    GPSDataLabel = new QLabel(“GPS状态数据“);
    latitudeLabel = new QLabel(“纬度:“);
    latitudeLineEdit = new QLineEdit;
    speedLabel = new QLabel(“速度:“);
    speedLineEdit = new QLineEdit;
    longitudeLabel = new QLabel(“经度:“);
    longitudeLineEdit = new QLineEdit;
    dataStatusLabel = new QLabel(“状态:“);
    dataStatusLineEdit = new QLineEdit;
    timeLabel = new QLabel(“时间:“);
    timeLineEdit = new QLineEdit;
    dateLabel = new QLabel(“日期:“);
    dateLineEdit = new QLineEdit;
    GPSReceiveLabel = new QLabel(“GPS接收的数据“);
    GPSPlainTextEdit = new QPlainTextEdit;


    comList <<“COM1“<<“COM2“<<“COM3“<<“COM4“<<“COM5“<<“COM6“
            <<“COM7“<<“COM8“<<“COM9“;
    comComboBox->addItems(comList);
    QStringList baudList;
    baudList <<“1200“<<“2400“<<“4800“<<“9600“<<“19200“<<“38400“
             <<“57600“<<“115200“<<“128000“<<“256000“;
    baudComboBox->addItems(baudList);
    baudComboBox->setCurrentIndex(3);
    dataBitComboBox->addItem(“8“);
    dataBitComboBox->addItem(“7“);
    dataBitComboBox->addItem(“6“);
    dataBitComboBox->addItem(“5“);
    parityComboBox->addItem(“无“);
    parityComboBox->addItem(“奇“);
    parityComboBox->addItem(“偶“);
    stopBitComboBox->addItem(“1“);
    stopBitComboBox->addItem(“2“);


    QGridLayout *comLayout = new QGridLayout;
    comLayout->addWidget(comLabel00);
    comLayout->addWidget(comComboBox01);
    comLayout->addWidget(baudLabel10);
    comLayout->addWidget(baudComboBox11);
    comLayout->addWidget(dataBitLabel20);
    comLayout->addWidget(dataBitComboBox21);
    comLayout->addWidget(parityLabel30);
    comLayout->addWidget(parityComboBox31);
    comLayout->addWidget(stopBitLabel40);
    comLayout->addWidget(stopBitComboBox41);
    comLayout->setColumnStretch(01);
    comLayout->setColumnStretch(12);
    QGroupBox *setComGBox = new QGroupBox(“GPS串口参数设置“);
    setComGBox->setLayout(comLayout);
    comInfoTextEdit = new QTextEdit;
    comInfoTextEdit->setMinimumHeight(70);
    comInfoTextEdit->setMaximumHeight(70);
    QGridLayout *comInfoLayout = new QGridLayout;
    comInfoLayout->addWidget(autoComBtn0011);
    comInfoLayout->addWidget(openANDcloseBtn0111);
    comInfoLayout->addWidget(comInfoTextEdit1012);
    comInfoLayout->addWidget(comStatusLabel2012);

    QGroupBox *comInfoGBox

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        435  2017-07-04 00:19  GPS-Application\GPS-Application.pro

     文件      14479  2018-04-15 13:55  GPS-Application\GPS-Application.pro.user

     文件      18718  2017-07-26 18:05  GPS-Application\GPS-Application.pro.user.a576914

     文件       4286  2017-02-23 22:50  GPS-Application\GPS.ico

     文件      11798  2017-07-26 20:14  GPS-Application\gpsGUI.cpp

     文件       2260  2017-07-26 19:48  GPS-Application\gpsGUI.h

     文件        296  2017-07-03 23:11  GPS-Application\main.cpp

     目录          0  2018-04-15 13:55  GPS-Application

----------- ---------  ---------- -----  ----

                52272                    8


评论

共有 条评论

相关资源