• 大小: 451KB
    文件类型: .zip
    金币: 2
    下载: 4 次
    发布日期: 2021-06-04
  • 语言: 其他
  • 标签: QT  飞秋  飞鸽  源码  

资源简介

使用QT开发的飞秋,比飞秋漂亮,能实现局域网内与飞秋的通信,下载后只需将代码中绑定的IP修改,编译即可运行。。。

资源截图

代码片段和文件信息

#include “dialog.h“
#include “ui_dialog.h“
#include 
#include 
#include 
#include 
#include 
#include 
#include 

Dialog::Dialog(QWidget *parent) :
    QDialog(parent)
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
}
Dialog::Dialog(QString ipQMap *smapQUdpSocket *udpsocket):
        ui(new Ui::Dialog)
{
    ui->setupUi(this);
    ui->pushButton_3->setShortcut(QKeySequence(tr(“Ctrl+Enter“)));
    this->installEventFilter(this);
    this->uEdit = ui->upEdit;
    QIcon icon(“:/new/prefix1/icon/friend2.ico“);
    this->ip = ip.mid(0ip.indexOf(“|“));
    this->udpsocket = udpsocket;
    this->smap = smap;

    Qt::WindowFlags flags = Qt::WindowMinimizeButtonHint|Qt::WindowMaximizeButtonHint|Qt::WindowCloseButtonHint;
    this->setWindowFlags(flags);
    this->setWindowtitle(tr(“与 %1 聊天中...“).arg(ip));
    this->setWindowIcon(icon);

    this->setAttribute(Qt::WA_QuitOnClosefalse);

}

Dialog::~Dialog()
{
    delete ui;
}

bool Dialog::eventFilter(Qobject * obj QEvent * e){
    if(obj==this){
        if(e->type()==QEvent::KeyPress){
            QKeyEvent *event = static_cast(e);
            //组合键的绑定
            if(event->key()==Qt::Key_Return&&(event->modifiers()&Qt::ControlModifier)){
                this->on_pushButton_3_clicked();
            }
        }
    }
    return QWidget::eventFilter(obje);
}

void Dialog::on_comboBox_currentIndexChanged(int index)
{
    if(index==0){
                ui->frame->setstyleSheet(QString::fromUtf8(“background-image: url(:/new/prefix1/icon/1313.jpg);“));
                ui->toolBox->setstyleSheet(QString::fromUtf8(“background-image: url(:/new/prefix1/icon/1313.jpg);\n“
                                                         “color: rgb(170 170 127);\n“
                                                      ““));
    }
    if(index==1){
                ui->frame->setstyleSheet(QString::fromUtf8(“background-image: url(:/new/prefix1/icon/1212.jpg);“));
                ui->toolBox->setstyleSheet(QString::fromUtf8(“background-image: url(:/new/prefix1/icon/1212.jpg);\n“
                                                         “color: rgb(170 170 127);\n“
                                                      ““));
    }
    if(index==2){
                ui->frame->setstyleSheet(QString::fromUtf8(“background-image: url(:/new/prefix1/icon/1112.jpg);“));
                ui->toolBox->setstyleSheet(QString::fromUtf8(“background-image: url(:/new/prefix1/icon/1112.jpg);\n“
                                                         “color: rgb(170 170 127);\n“
                                                      ““));
    }
    if(index==3){
                ui->frame->setstyleSheet(QString::fromUtf8(“background-image: url(:/new/prefix1/icon/1515.jpg);“));
                ui->toolBox->setstyleSheet(QString::fromUtf8(“background-image: url(:

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-06-08 11:41  softeem\
     文件        4384  2011-04-25 22:50  softeem\dialog.cpp
     文件         772  2011-04-25 17:10  softeem\dialog.h
     文件        9287  2011-04-22 10:26  softeem\dialog.ui
     目录           0  2011-06-08 11:41  softeem\icon\
     文件       25493  2011-03-18 16:42  softeem\icon\111.jpg
     文件      140950  2011-03-18 23:10  softeem\icon\1112.jpg
     文件       41122  2011-03-18 21:51  softeem\icon\1212.jpg
     文件       44823  2011-03-18 21:52  softeem\icon\1313.jpg
     文件       14154  2011-03-18 21:53  softeem\icon\1414.jpg
     文件       73977  2011-03-18 21:55  softeem\icon\1515.jpg
     文件       45732  2011-03-18 21:57  softeem\icon\1717.jpg
     文件        4286  2009-04-19 20:30  softeem\icon\friend.ico
     文件        4286  2010-04-06 17:30  softeem\icon\friend1.ico
     文件        2238  2001-05-12 15:49  softeem\icon\friend2.ico
     文件        9662  2008-12-05 19:43  softeem\icon\friend3.ico
     文件         766  2010-02-22 15:53  softeem\icon\friend4.ico
     文件      323590  2006-05-07 03:59  softeem\icon\services.ico
     文件       69120  2011-03-28 11:28  softeem\icon\Thumbs.db
     文件         294  2011-04-22 10:41  softeem\main.cpp
     文件        3525  2011-04-21 17:19  softeem\resources.qrc
     文件        6523  2011-06-03 10:57  softeem\softeem.cpp
     文件        1140  2011-04-25 13:39  softeem\softeem.h
     文件         429  2011-04-25 13:38  softeem\softeem.pro
     文件       13563  2011-06-03 13:34  softeem\softeem.pro.user
     文件        3927  2011-04-25 09:53  softeem\softeem.ui

评论

共有 条评论