亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? chatwgt.cpp

?? 用qt4 編寫的局域網(wǎng)聊天工具
?? CPP
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
/*************************************************************************** *   Copyright (C) 2007-2008 by Anistratov Oleg                            * *   ower@users.sourceforge.net                                            * *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License version 2        * *   as published by the Free Software Foundation;                         * *                                                                         * *   This program is distributed in the hope that it will be useful,       * *   but WITHOUT ANY WARRANTY; without even the implied warranty of        * *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         * *   GNU General Public License for more details.                          * *                                                                         * ***************************************************************************/#include "chatwgt.h"#include "globals.h"#include <assert.h>#include <string.h>#include <time.h>#include <QSplitter>#include <QMessageBox>#include <QApplication>#include <QBuffer>#include <QDir>#include <QFile>#include <QFileDialog>#include <QHBoxLayout>#include <QInputDialog>#include <QLocale>#include <QCursor>#include <QStatusBar>#include <QKeySequence>#include <QActionGroup>#include <QPluginLoader>#include "singlemessagewgt.h"#include "filetransferwgt.h"#include "userwgt.h"#include "userinfo.h"#include "addchanneldialog.h"#include "edituserinfodlg.h"#include "receiverthread.h"#include "senderthread.h"#include "largedatagram.h"#include "largedatagramout.h"#include "logwgt.h"#include "qchatsettings.h"#include "preferencesdlg.h"#include "chatcore.h"#include "smileswgt.h"#include "channelwgt.h"#include "chattextwgt.h"#include "inputrichtextwgt.h"#include "qchattrayicon.h"#include "message.h"#include "singlemsgshistoryview.h"#include "singlemsgshistory.h"#include "aboutqchat.h"#include "pluginsinterfaces.h"#include "login2serverdlg.h"#include "tcpreceiverthread.h"#include "formattingtoolbar.h"#include "qchaticon.h"#include "shortcutseditor.h"#include "messagetreeitem.h"#include "singlemessage.h"#include "pluginmanager.h"#include "plugin.h"#include <QDesktopWidget>#include <QScrollBar>const char* BuildDate    = "";ChatWgt::ChatWgt(ChatCore* chc, QWidget* parent) : QMainWindow(parent), m_chatCore    (chc), m_formattingToolBar(NULL), m_menuToolbars(NULL), m_cursorX     (-1), m_cursorY     (-1), m_hidePlugins (true){  m_translator    = new QTranslator;  m_activityTimer = new QTimer(this);  createWidgets();  createActions();  setupLayout();  ChatTextWgt::initSmiles(QChatSettings::settings()->smilesThemePath());  mw_smiles->init();  mw_log->hide();  Globals::m_log = mw_log;  m_trayIcon->show ();  m_trayIcon->setContextMenu(m_menuFile);  //***********************************  connect(this          , SIGNAL(     singleMessage(const QString &, quint64, bool)),          m_chatCore    , SLOT  (slot_singleMessage(const QString &, quint64, bool)));  connect(m_chatCore    , SIGNAL(profileLoaded(const QString &)),          this          , SLOT  (slot_reloadProfileData()));  connect(this          , SIGNAL(wantLoadProfile (const QString &)),          m_chatCore    , SLOT  (slot_loadProfile(const QString &)));  connect(this          , SIGNAL(wantRenameProfile (const QString &, const QString &)),          m_chatCore    , SLOT  (slot_renameProfile(const QString &, const QString &)));  connect(this          , SIGNAL(wantDeleteProfile (const QString &)),          m_chatCore    , SLOT  (slot_deleteProfile(const QString &)));  connect(m_activityTimer, SIGNAL(timeout()),          this           , SLOT  (activity()));  connect(m_chatCore     , SIGNAL(disconnectedFromServer()),          this           , SLOT  (disconnectedFromServer()));  connect(m_preferencesDlg, SIGNAL(formatChanged(UserListIconFormat)), this, SLOT(changeIconFormat(UserListIconFormat)));  connect(m_preferencesDlg, SIGNAL(wantLoadPlugin(QString))  , this, SLOT(loadPlugin(QString)));  connect(m_preferencesDlg, SIGNAL(wantUnloadPlugin(QString)), this, SLOT(unloadPlugin(QString)));  connect(m_preferencesDlg, SIGNAL(useAnimatedSmiles(bool))  , this, SLOT(setAnimationsRunning(bool)));  //***********************************  UserInfo::myInfo()->setStatus(Globals::FREE);  setWindowTitle(QString("Q_Chat %1").arg(Globals::VersionStr));  QApplication::setWindowIcon(QChatIcon::icon("tray-icon"));  if(!m_translator->load("qchat_" + QLocale().name () + ".qm", QChatSettings::settings()->settingsDir()))    if(!m_translator->load("qchat_" + QLocale().name () + ".qm", "/usr/share/qchat/translations/"))      m_translator->load("qchat_" + QLocale().name () + ".qm", "/usr/local/share/qchat/translations/");  QApplication::installTranslator(m_translator);  m_activityTimer->start(1000);  retranslate();  setIcons();}//\*****************************************************************************ChatWgt::~ChatWgt(){  qDebug("[~ChatWgt]\n");  m_addChannelDlg->~AddChannelDlg();}//\*****************************************************************************ChannelWgt* ChatWgt::findChannel(const QString & name, quint32 type) const{  foreach(ChannelWgt* cw, mw_channels)    if(cw->name() == name && (1 || cw->type() == type))      return cw;  return NULL;}//\*****************************************************************************ChannelWgt* ChatWgt::findChannel(quint64 uid, quint32 type) const{  foreach(ChannelWgt* cw, mw_channels)    if(cw->destUid() == uid && (cw->type() == type))      return cw;  return NULL;}//\*****************************************************************************void ChatWgt::slot_singleMessageIn(SingleMessage* msg, bool important){  SingleMessageWgt* smw = new SingleMessageWgt(msg, 1);  connect(smw , SIGNAL(singleMessage   (const QString &, quint64, bool)),          this, SIGNAL(singleMessageOut(const QString &, quint64, bool)));  if(important)    smw->setWindowFlags(smw->windowFlags() | Qt::WindowStaysOnTopHint/* | Qt::Popup*/);  SingleMessageWgt::addNewMessage(smw);  smw->show();}//\*****************************************************************************void ChatWgt::createChannel(const QString & name, quint64 uid){  qDebug("[ChatWgt::createChannel]: begin");  int new_idx = 0;  ChannelWgt* new_ch;  if(uid == 0)  {    if(name == "Log" || name == "log")    {      new_idx = mw_tabs->addTab(mw_log, QString("Log"));      mw_tabs->setCurrentIndex(new_idx);      return;    }    if(findChannel(name))      return;  }  else  {    if(findChannel(name, 1))      return;    foreach(ChannelWgt* cw, mw_channels)      if(cw->destUid() == uid)        return;  }  if(uid == 0)  {    new_ch = new ChannelWgt(name, this);    new_idx = mw_tabs->addTab(new_ch, name);  }  else  {    new_ch = new ChannelWgt(name, this, AbstractChatCore::Private, uid);    new_idx = mw_tabs->addTab(new_ch, name + "(private)");  }  if(!mw_channels.contains(new_ch))    mw_channels.append(new_ch);  new_ch->show();  connect(new_ch, SIGNAL(wantActivate   ()), this, SLOT(slot_activateWindow ()));  connect(new_ch    , SIGNAL(     statusAnswer   (QString, quint64, AbstractChatCore::ChannelType, bool, bool)),          m_chatCore, SLOT  (slot_statusAnswer   (QString, quint64, AbstractChatCore::ChannelType, bool, bool)));  connect(new_ch    , SIGNAL(     infoAnswer     (QString, quint64, AbstractChatCore::ChannelType, uchar)),          m_chatCore, SLOT  (slot_infoAnswer     (QString, quint64, AbstractChatCore::ChannelType, uchar)));  connect(new_ch    , SIGNAL(sendSomeData(QString, quint64, AbstractChatCore::DataType, QString, AbstractChatCore::ChannelType, QByteArray*)),          m_chatCore, SLOT  (slot_prepareAndSend(QString, quint64, AbstractChatCore::DataType, QString, AbstractChatCore::ChannelType, QByteArray*)));  connect(new_ch    , SIGNAL(sendMsgsHistory       (QString, quint64, QByteArray, AbstractChatCore::ChannelType)),          m_chatCore, SLOT  (slot_msgsHistoryAnswer(QString, quint64, QByteArray, AbstractChatCore::ChannelType)));  connect(new_ch    , SIGNAL(sendMsgsNum       (const QString &, quint64, quint32, AbstractChatCore::ChannelType)),          m_chatCore, SLOT  (slot_msgsNumAnswer(const QString &, quint64, quint32, AbstractChatCore::ChannelType)));  connect(m_preferencesDlg, SIGNAL(ulRefreshIntervalChanged(uint)),          new_ch          , SLOT  (slot_changeUlRefreshInterval(uint)));  connect(m_preferencesDlg, SIGNAL(ulDeepRefreshIntervalChanged(uint)),          new_ch          , SLOT  (slot_changeUlDeepRefreshInterval(uint)));  connect(new_ch    , SIGNAL(sendMessage     (const QString &, quint64, AbstractChatCore::ChannelType, QTextDocument*)),          m_chatCore, SLOT  (slot_sendMessage(const QString &, quint64, AbstractChatCore::ChannelType, QTextDocument*)));  connect(new_ch    , SIGNAL(wantSaveState  (const QString &, const QByteArray &)),          m_chatCore, SLOT  (setChannelState(const QString &, const QByteArray &)));  connect(new_ch    , SIGNAL(avatarAnswer     (const QString &, quint64, AbstractChatCore::ChannelType)),          m_chatCore, SLOT  (slot_avatarAnswer(const QString &, quint64, AbstractChatCore::ChannelType)));  connect(m_chatCore, SIGNAL(loginFinished (int, QString)),          new_ch    , SLOT  (slot_refreshUL()));  new_ch->setFocus();  new_ch->setFocus2InputText();  new_ch->setSndOnMsgIn(QChatSettings::settings()->boolOption("SoundOnMessageIn"));  new_ch->initChannel();  mw_tabs->setCurrentIndex(new_idx);  if(uid != 0)    m_chatCore->slot_privateChatRequest(UserInfo::myInfo()->nickname(), uid);  new_ch->restoreState(m_chatCore->channelState(name));  qDebug("[ChatWgt::createChannel]: end");}//\*****************************************************************************void ChatWgt::slot_delChannell(){  ChannelWgt* wgt = qobject_cast<ChannelWgt*>(mw_tabs->currentWidget());  if(!wgt)  {    QChatWidgetPlugin* plug = qobject_cast<QChatWidgetPlugin*>(mw_tabs->currentWidget());    if(plug)    {      QMessageBox* msgbx;      int ans;      msgbx = new QMessageBox(tr("Are you sure?"), tr("Are you sure you want to unload plugin '%1'?").arg(plug->name()),                            QMessageBox::Question, QMessageBox::Yes, QMessageBox::No, 0, this, 0);      ans = msgbx->exec();      delete msgbx;      if(ans == QMessageBox::No)        return;      unloadPlugin(plug->path());    }    return;  }  qDebug("[ChatWgt::slot_delChannell]: name = %s\n", wgt->name().toLocal8Bit().data());  if(mw_tabs->currentWidget() == mw_log)  {    mw_tabs->removeTab(mw_tabs->currentIndex());    return;  }  QString name_id = wgt->name();  quint32 type    = wgt->type();  ChannelWgt* ch = findChannel(name_id, type);  if(name_id == "Main")    return;  QMessageBox* msgbx;  int ans;  msgbx = new QMessageBox(tr("Are you sure?"), tr("Are you sure you want to close channel '%1'?").arg(name_id),                          QMessageBox::Question, QMessageBox::Yes, QMessageBox::No, 0, this, 0);  ans = msgbx->exec();  delete msgbx;  if(ans == QMessageBox::No)    return;  if(ch)    mw_channels.removeAll(ch);  delete ch;}//\*****************************************************************************void ChatWgt::slot_license(){   QString str =     "This program is free software; you can redistribute it and/or modify\n"     "it under the terms of the GNU General Public License version 2\n"     "as published by the Free Software Foundation;\n\n"     "This program is distributed in the hope that it will be useful,\n"     "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"     "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"     "GNU General Public License for more details.\n\n"     "Copyright (C) 2007-2008 by Anistratov Oleg\n"     "ower@users.sourceforge.net";   QMessageBox::information (this, "License", str);}//\*****************************************************************************void ChatWgt::slot_aboutQt(){  QMessageBox::aboutQt(this);}//\*****************************************************************************void ChatWgt::slot_about(){  AboutQChat* dlg = new AboutQChat(this);  dlg->exec();  delete dlg;}//\*****************************************************************************void ChatWgt::slot_showSettings(){  m_userInfoDlg->setReadOnly(false);  m_userInfoDlg->slot_loadInfo(UserInfo::myInfo());  m_userInfoDlg->slot_notEdited();  m_userInfoDlg->toggleVisible();}//\*****************************************************************************void ChatWgt::slot_showPreferences(){  m_preferencesDlg->init();  m_preferencesDlg->toggleVisible();}//\*****************************************************************************void ChatWgt::slot_showUserInfo(UserWgt* user){  m_userInfoDlg->slot_loadInfo(user->info());  m_userInfoDlg->setReadOnly(true);  m_userInfoDlg->show();}//\*****************************************************************************void ChatWgt::slot_activateWindow(){  if(!QApplication::focusWidget())    m_trayIcon->setAnimatedIcon(QChatIcon::iconPath("animated-new-message"));  if(QChatSettings::settings()->boolOption("ActivateOnMessageIn") && isHidden())

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内久久婷婷综合| 久久99精品国产.久久久久久| 欧美精品久久天天躁| 精品亚洲国内自在自线福利| 亚洲麻豆国产自偷在线| 精品美女在线观看| 欧美三级在线播放| 99久久精品免费看国产免费软件| 天天色图综合网| 亚洲男同性视频| 国产欧美一二三区| 制服丝袜在线91| 91久久精品一区二区二区| 国产成人在线看| 激情综合网激情| 日韩av二区在线播放| 亚洲综合无码一区二区| 中文字幕视频一区| 久久综合中文字幕| 日韩欧美123| 555www色欧美视频| 欧美日韩亚洲不卡| 91精品福利视频| 95精品视频在线| 成人性色生活片免费看爆迷你毛片| 黄一区二区三区| 奇米精品一区二区三区在线观看一| 一区二区三区四区国产精品| 国产精品理伦片| 国产精品视频线看| 欧美国产欧美综合| 国产欧美一区二区精品婷婷| 久久精品一区四区| 久久久久久一二三区| 26uuu精品一区二区| 欧美成人免费网站| 欧美xxxxx裸体时装秀| 欧美一区二区福利视频| 欧美欧美午夜aⅴ在线观看| 欧美日韩aaaaaa| 7777精品久久久大香线蕉| 欧美日韩大陆一区二区| 欧美一区二区三区免费视频| 91精品久久久久久久99蜜桃| 制服.丝袜.亚洲.中文.综合| 欧美一区二区二区| 亚洲精品一区二区精华| 久久久久久久国产精品影院| 久久精品夜色噜噜亚洲aⅴ| 国产欧美一区二区三区在线老狼 | 欧美一级片免费看| 日韩一区二区三区观看| 精品国产乱码久久久久久牛牛| 亚洲精品一区二区三区蜜桃下载 | 亚洲一区二区欧美日韩| 亚洲已满18点击进入久久| 91久久精品一区二区| 国产精品99久久久久久似苏梦涵 | 欧美日韩精品电影| 欧美一区二区三区系列电影| 欧美不卡视频一区| 国产日本欧洲亚洲| 亚洲欧美国产毛片在线| 亚洲制服丝袜在线| 精品无人码麻豆乱码1区2区| 国产成人av自拍| 91小视频在线免费看| 欧美久久一二三四区| 久久综合久久综合亚洲| 国产精品久久久久久久久免费相片 | 亚洲国产电影在线观看| 一区二区三区在线观看欧美| 免费人成在线不卡| 粗大黑人巨茎大战欧美成人| 欧洲精品一区二区三区在线观看| 777色狠狠一区二区三区| 欧美大片在线观看一区二区| 国产欧美精品一区二区色综合 | 国产盗摄一区二区| 欧洲在线/亚洲| 精品国产一二三区| 亚洲精品v日韩精品| 日本人妖一区二区| av午夜精品一区二区三区| 777午夜精品免费视频| 亚洲国产电影在线观看| 日韩av一二三| 91黄视频在线| 久久久91精品国产一区二区精品| 亚洲激情男女视频| 国产高清视频一区| 欧美精品v国产精品v日韩精品| 久久久另类综合| 日韩国产精品久久久| aaa亚洲精品| 精品91自产拍在线观看一区| 亚洲一区二区五区| 国产成人日日夜夜| 日韩欧美专区在线| 亚洲在线视频免费观看| 丁香六月综合激情| 日韩欧美精品在线视频| 亚洲国产另类av| www.欧美日韩国产在线| 亚洲精品一区二区三区影院 | 久久女同精品一区二区| 亚洲6080在线| 99re亚洲国产精品| 国产日产欧产精品推荐色| 美女一区二区视频| 欧美日韩黄色影视| 亚洲精品亚洲人成人网在线播放| 国产精品一区在线观看你懂的| 欧美日本在线看| 亚洲精品中文字幕乱码三区| 成人午夜精品一区二区三区| 精品国产在天天线2019| 日本视频免费一区| 欧美精品高清视频| 婷婷六月综合亚洲| 欧美在线观看18| 国产精品久久久久久久久久免费看 | 欧美在线观看18| 亚洲精品视频免费看| 99久久久久久99| 最新中文字幕一区二区三区| 丁香婷婷综合激情五月色| 精品国产电影一区二区| 蜜臀va亚洲va欧美va天堂 | 欧美区在线观看| 亚洲电影激情视频网站| 在线免费不卡电影| 一区二区三区四区蜜桃| 欧美中文一区二区三区| 亚洲成人动漫在线观看| 欧美日韩在线免费视频| 午夜久久久影院| 欧美日韩精品高清| 免费在线看一区| 欧美videossexotv100| 国产一区 二区| 国产欧美精品一区| 大桥未久av一区二区三区中文| 亚洲国产精品成人久久综合一区| 成人精品亚洲人成在线| 国产精品久久久久久久岛一牛影视| 高清在线不卡av| 亚洲视频1区2区| 欧美亚洲国产一区二区三区| 丝袜国产日韩另类美女| 日韩欧美你懂的| 国产成人免费在线观看| 国产精品情趣视频| 色94色欧美sute亚洲线路一久| 亚洲激情自拍视频| 制服丝袜亚洲精品中文字幕| 国产中文一区二区三区| 国产精品女同互慰在线看| 97久久精品人人澡人人爽| 一区二区久久久| 欧美一区二区三区四区久久| 国产精品资源在线看| 中文字幕欧美一| 欧美日韩国产精品自在自线| 九九九久久久精品| 国产精品久久久久久久久果冻传媒| 色综合久久中文字幕综合网 | 精品一区二区日韩| 国产精品久久久久久久久果冻传媒 | 日本欧美一区二区| 久久久亚洲国产美女国产盗摄| 91丝袜美女网| 美女诱惑一区二区| √…a在线天堂一区| 欧美一级精品在线| 99v久久综合狠狠综合久久| 奇米影视在线99精品| 国产精品成人免费精品自在线观看| 在线观看av一区二区| 国产乱码精品一品二品| 一区二区三区影院| 26uuu欧美| 欧美羞羞免费网站| 国产精品996| 亚洲国产精品一区二区www| 欧美精品一区二区久久婷婷| 日本高清不卡视频| 国产精品亚洲一区二区三区妖精| 一区二区三区电影在线播| 久久免费精品国产久精品久久久久| 日本黄色一区二区| 国产成人综合在线| 日韩在线观看一区二区| 国产精品午夜在线| 欧美mv和日韩mv的网站| 91福利在线播放| 丁香亚洲综合激情啪啪综合| 久久国产综合精品| 亚洲高清视频中文字幕| 国产精品家庭影院|