• 大小: 16.86M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-18
  • 语言: 其他
  • 标签: 其他  

资源简介

基本收发器.zip

资源截图

代码片段和文件信息

#include “basictransceiver.h“
#include “serialportsetting.h“
#include “ui_basictransceiver.h“
#include “ui_serialportsetting.h“
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

BasicTransceiver::BasicTransceiver(QWidget *parent) :
    QMainWindow(parent)
{
    setupUi(this);
    setFixedSize(1074 627);
    receiveTextBrowser->setAcceptDrops(false);//缺省情况下,QTextEdit接受来自其他应用程序拖拽来的文本,把文件名显示出来。
    senderTextEdit_1->setAcceptDrops(false);
    senderTextEdit_2->setAcceptDrops(false);
    senderTextEdit_3->setAcceptDrops(false);
    senderTextEdit_4->setAcceptDrops(false);
    senderTextEdit_5->setAcceptDrops(false);
    setAcceptDrops(true);//通过禁止QTextEdit控件的drop事件,允许主窗口得到drop事件

    connectButton->setIcon(QIcon(“:/images/open.png“));
    cleanButton->setIcon(QIcon(“:/images/empty_bin.png“));
    checkAPButton->setIcon(QIcon(“:/images/find.png“));
    resetCntButton->setIcon(QIcon(“:/images/to_zero.png“));
    exitButton->setIcon(QIcon(“:/images/exit.png“));
    actionWrite_data->setIcon(QIcon(“:/images/write.png“));
    actionRead_data->setIcon(QIcon(“:/images/read.png“));
    actionChoose_file->setIcon(QIcon(“:/images/select_file.png“));
    exitAction->setIcon(QIcon(“:/images/exit.png“));
    actionAbout->setIcon(QIcon(“:/images/about.png“));
    sendButton_1->setIcon(QIcon(“:/images/send.png“));
    sendButton_2->setIcon(QIcon(“:/images/send.png“));
    sendButton_3->setIcon(QIcon(“:/images/send.png“));
    sendButton_4->setIcon(QIcon(“:/images/send.png“));
    sendButton_5->setIcon(QIcon(“:/images/send.png“));

    setConnections();
    emit checkAvailablePorts();

    Timer_CP = new QTimer(this);
    Timer_UPDATE = new QTimer(this);
    connect(Timer_UPDATE SIGNAL(timeout()) this SLOT(repaint()));
    Timer_UPDATE->start(2000);
    Timer_AS = new QTimer(this);
}

BasicTransceiver::~BasicTransceiver()
{

}

void BasicTransceiver::checkAutoSendCB()
{
    Qobject *signalSender = sender();
    if ( signalSender->objectName() == “autoSendCB_1“)
    {
        if (autoSendCB_1->isChecked())
        {
            intervalSB_1->setEnabled(false);
            autoSendCB_2->setEnabled(false);
            autoSendCB_3->setEnabled(false);
            autoSendCB_4->setEnabled(false);
            autoSendCB_5->setEnabled(false);
            startAutoSend(sendButton_1);
        } else if (!autoSendCB_1->isChecked()) {
            Timer_AS->stop();
            Timer_AS->disconnect();
            intervalSB_1->setEnabled(true);
            autoSendCB_2->setEnabled(true);
            autoSendCB_3->setEnabled(true);
            aut

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-11-01 20:59  BasicTransceiver\
     文件         746  2016-09-02 19:28  BasicTransceiver\.qmake.stash
     文件         570  2016-09-02 19:39  BasicTransceiver\BasicTransceiver.pro
     文件       23927  2016-11-01 20:59  BasicTransceiver\BasicTransceiver.pro.user
     文件         867  2016-09-02 19:28  BasicTransceiver\BasicTransceiver_resource.rc
     文件       23664  2016-09-04 18:30  BasicTransceiver\Makefile
     文件       50936  2016-09-04 18:30  BasicTransceiver\Makefile.Debug
     文件       51037  2016-09-04 18:30  BasicTransceiver\Makefile.Release
     文件      370070  2016-09-02 19:19  BasicTransceiver\basic_transceiver.ico
     文件       28240  2016-10-08 12:57  BasicTransceiver\basictransceiver.cpp
     文件        2312  2016-10-08 12:56  BasicTransceiver\basictransceiver.h
     文件         658  2016-09-02 19:39  BasicTransceiver\basictransceiver.qrc
     文件       71412  2016-09-04 18:27  BasicTransceiver\basictransceiver.ui
     目录           0  2016-11-02 15:24  BasicTransceiver\debug\
     目录           0  2016-09-02 19:39  BasicTransceiver\images\
     文件        2099  2016-09-02 10:38  BasicTransceiver\images\about.png
     文件        2516  2016-08-31 20:00  BasicTransceiver\images\clean.png
     文件        1506  2016-09-02 08:54  BasicTransceiver\images\close.png
     文件        1982  2016-09-02 09:15  BasicTransceiver\images\empty_bin.png
     文件        1684  2016-09-02 09:13  BasicTransceiver\images\exit.png
     文件        2548  2016-09-02 09:08  BasicTransceiver\images\find.png
     文件        2019  2016-09-02 09:03  BasicTransceiver\images\find_it.png
     文件        1062  2016-09-02 08:53  BasicTransceiver\images\open.png
     文件        1309  2016-09-02 10:28  BasicTransceiver\images\read.png
     文件        1504  2016-09-02 10:30  BasicTransceiver\images\select_file.png
     文件        1312  2016-09-02 08:55  BasicTransceiver\images\send.png
     文件         333  2016-09-02 08:51  BasicTransceiver\images\to_zero.png
     文件        4252  2016-08-31 20:06  BasicTransceiver\images\win.png
     文件        1282  2016-09-02 09:03  BasicTransceiver\images\write.png
     文件         193  2016-08-28 16:11  BasicTransceiver\main.cpp
     目录           0  2016-09-04 18:31  BasicTransceiver\release\
............此处省略59个文件信息

评论

共有 条评论