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

资源简介

linux系统下网络编程代码 聊天工具

资源截图

代码片段和文件信息

/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial Usage
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or alternatively in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
** Alternatively this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition as a special exception Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0 included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use please
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/

#include “chat.h“
#include 
#include 

#include “chat_adaptor.h“
#include “chat_interface.h“

ChatMainWindow::ChatMainWindow()
    : m_nickname(QLatin1String(“nickname“))
{
    setupUi(this);
    sendButton->setEnabled(false);

    connect(messageLineEdit SIGNAL(textChanged(QString))
            this SLOT(textChangedSlot(QString)));
    connect(sendButton SIGNAL(clicked(bool)) this SLOT(sendClickedSlot()));
    connect(actionchangeNickname SIGNAL(triggered(bool)) this SLOT(changeNickname()));
    connect(actionAboutQt SIGNAL(triggered(bool)) this SLOT(aboutQt()));
    connect(qApp SIGNAL(lastWindowClosed()) this SLOT(exiting()));

    // add our D-Bus interface and connect to D-Bus
    new ChatAdaptor(this);
    QDBusConnection::sessionBus().registerobject(“/“ this);

    com::trolltech::chat *iface;
    iface = new com::trolltech::chat(QString() QString() QDBusConnection::sessionBus() this);
    //connect(iface SIGNAL(message(QStringQString)) this SLOT(messageSlot(QStringQStr

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

     文件       5295  2009-09-24 17:38  聊天\.moc\release-shared\moc_chat.cpp

     文件       3563  2009-09-24 17:38  聊天\.moc\release-shared\moc_chat_adaptor.cpp

     文件       3189  2009-09-24 17:38  聊天\.moc\release-shared\moc_chat_interface.cpp

     文件     397180  2009-09-24 17:38  聊天\.obj\release-shared\chat.o

     文件     247708  2009-09-24 17:38  聊天\.obj\release-shared\chat_adaptor.o

     文件     261628  2009-09-24 17:38  聊天\.obj\release-shared\chat_interface.o

     文件     286028  2009-09-24 17:38  聊天\.obj\release-shared\moc_chat.o

     文件     251776  2009-09-24 17:38  聊天\.obj\release-shared\moc_chat_adaptor.o

     文件     265672  2009-09-24 17:38  聊天\.obj\release-shared\moc_chat_interface.o

     文件       7252  2009-09-24 17:38  聊天\.uic\release-shared\ui_chatmainwindow.h

     文件       4453  2009-09-24 17:38  聊天\.uic\release-shared\ui_chatsetnickname.h

     文件       5543  2009-09-24 17:38  聊天\chat.cpp

     文件       2881  2009-09-24 17:38  聊天\chat.h

     文件       4707  2009-09-24 17:38  聊天\chatmainwindow.ui

     文件       3382  2009-09-24 17:38  聊天\chatsetnickname.ui

     文件        789  2009-09-24 17:38  聊天\chat_adaptor.cpp

     文件       1603  2009-09-24 17:38  聊天\chat_adaptor.h

     文件        789  2009-09-24 17:38  聊天\chat_interface.cpp

     文件       1297  2009-09-24 17:38  聊天\chat_interface.h

     文件        505  2009-09-24 17:38  聊天\com.trolltech.chat.xml

     文件      59760  2009-09-24 17:38  聊天\dbus-chat

     文件     834313  2009-09-24 17:38  聊天\dbus-chat.debug

     文件        523  2009-09-24 17:38  聊天\dbus-chat.pro

     文件     102687  2009-09-24 17:38  聊天\Makefile

     目录          0  2009-09-24 17:41  聊天\.moc\release-shared

     目录          0  2009-09-24 17:41  聊天\.obj\release-shared

     目录          0  2009-09-24 17:41  聊天\.pch\release-shared

     目录          0  2009-09-24 17:41  聊天\.uic\release-shared

     目录          0  2009-09-24 17:41  聊天\.moc

     目录          0  2009-09-24 17:41  聊天\.obj

............此处省略6个文件信息

评论

共有 条评论