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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fxmsgwindow.cpp

?? linux-下的fetion-0.8.1。包括所有源代碼
?? CPP
字號:
/*************************************************************************** *   Copyright (C) 2008 by DDD                                          * *   dedodong@163.com                                                     * *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * *   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.                          * *                                                                         * *   You should have received a copy of the GNU General Public License     * *   along with this program; if not, write to the                         * *   Free Software Foundation, Inc.,                                       * *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             * ***************************************************************************/#include <QLabel>#include <QtGui>#include <QTextEdit>#include "fxmsgwindow.h"#include "fxuitl.h"//find is have the ac_idinline AccountTab *findFromMsgWindow(QTabWidget * tabWidget, qlonglong ac_id){	AccountTab *ac_tab = NULL;	int tabCount = tabWidget->count ();	for(int i = 0; i< tabCount; i++)	{		ac_tab = (AccountTab *) tabWidget->widget(i); 		if(ac_tab) {			if(ac_tab->account_id == ac_id)				return ac_tab;		}	}	return NULL;}FxMsgWindow::FxMsgWindow(QWidget *parent)    : QMainWindow(parent){	setupUi(this);	mainwindow = NULL;	isQuit = false;	inputFace = new FxInputFace(this);	QPalette pal;	pal.setBrush(QPalette::Window,QBrush(getInputFaceIcon()));	inputFace->setPalette(pal);	inputFace->setMsgWindow(this);	inputFace->setGeometry (QCursor::pos().x(), QCursor::pos().y(), 320, 261);	inputFace->setWindowFlags(Qt::Dialog| Qt::FramelessWindowHint);		//tabWidget = new FxMyTabWidget(this);	tabWidget->setParent(this);	tabWidget->clear();	pal = palette();	pal.setColor(QPalette::Active, QPalette::Button, pal.color(QPalette::Active, QPalette::Window));	pal.setColor(QPalette::Disabled, QPalette::Button, pal.color(QPalette::Disabled, QPalette::Window));	pal.setColor(QPalette::Inactive, QPalette::Button, pal.color(QPalette::Inactive, QPalette::Window));	QToolButton *closeTabButton = new QToolButton(tabWidget);	closeTabButton->setAutoRaise(true);	closeTabButton->setEnabled(true);	closeTabButton->setPalette(pal);	tabWidget->setCornerWidget(closeTabButton, Qt::TopRightCorner);	closeTabButton->setCursor(Qt::ArrowCursor);	closeTabButton->setIcon(getCloseTabImage());	connect(closeTabButton, SIGNAL(clicked()), this, SLOT(closeTab()));	closeTabButton->setToolTip(tr("close current Tab"));#if 0#if MAC_OS	tabWidget->setGeometry (0,0,342,405);#else	tabWidget->setGeometry (0,0,321,385);#endif#endif	connect(tabWidget, SIGNAL( currentChanged(int) ), this, SLOT( currentChangedName(int) ));	connect(tabWidget, SIGNAL( mouseDblClick(int) ), this, SLOT( closeTabWid(int) ));	move(Settings::instance().MsgWinPos());	resize(Settings::instance().MsgWinSize());}void FxMsgWindow::setMainWind(FxMainWindow *mainW){	this->mainwindow = mainW;}void FxMsgWindow::currentChangedName(int index){/*	if(tabWidget->currentIndex() == index)		return;	*/	AccountTab *accountTab = (AccountTab *) tabWidget->widget (index); 	if (accountTab)	{		accountTab->endFlickerTab();		QString title = tr("with") + accountTab->account_name + tr("chating... "); 		this->setWindowTitle(title);		int online_state ;		if(!fx_is_pc_user_by_account(accountTab->m_account))			online_state = -1;		else		online_state = fx_get_online_status_by_account(accountTab->m_account);		//	online_state = fx_is_on_line_by_account(accountTab->m_account);		this->setWindowIcon (getOnlineStatusIcon(online_state));	}}	void FxMsgWindow::closeTab(){	closeTabWid (tabWidget->currentIndex());}void FxMsgWindow::closeTabWid(int index){	AccountTab *accountTab = (AccountTab *) tabWidget->widget(index); 	tabWidget->removeTab (index);	//if the tabWidget have no tab, hide it..	if(tabWidget->count() <= 0)		this->hide();	if(accountTab)		delete accountTab;}FxQunWindow* FxMsgWindow::findQunWindow(qlonglong qun_id){	int size = qunWindow.size();	for(int i = 0; i< size; i++ )		if(qunWindow.at(i)->qun_id == qun_id)			return qunWindow.at(i);	return NULL;}bool FxMsgWindow::addQunMessage(QString msg, qlonglong qun_id, qlonglong sender, bool iscoming_msg){	FxQunWindow	*qunW = findQunWindow(qun_id);	if(!qunW)	{		qunW = new FxQunWindow(qun_id, this);		qunWindow.append(qunW);	}	qunW->show();	qunW->activateWindow();	qunW->setWindowState ( Qt::WindowNoState ) ;	qunW->MsgEdit->setFocus();	QString str; 	QString show_msg; 	if(iscoming_msg) {		str = "<b style=\"color:rgb(0,85,0);\">"+ 			qunW->getSenderName(sender) +"("+			QDateTime::currentDateTime().toString(tr("hh:mm:ss")) + "--" +			QDateTime::currentDateTime().toString(tr("yyyy-MM-dd")) +			"):</b><br>"+ msg;		show_msg= show_msg.fromUtf8(str.toUtf8().data()); 	} else {		show_msg= msg; 	}	QTextEdit * msgBrowser = qunW->MsgBrowser;	msgBrowser->append(show_msg);	msgBrowser->moveCursor(QTextCursor::End);	saveHistroyMsg(strtol(fx_get_usr_uid(), NULL, 10), qun_id, show_msg.toUtf8().data(), NULL);	this->setFocus();	return true;}bool FxMsgWindow::addMessage(QString msg, qlonglong account_id,  bool iscoming_msg){	if (fx_is_qun_by_id(account_id)) {		addQunMessage(msg, account_id, 0L, true);		return true;	}	AccountTab *accountTab = findFromMsgWindow(tabWidget, account_id);	if (!accountTab)	{		accountTab = new AccountTab(account_id, tabWidget);		accountTab->setMainWind( this->mainwindow );		tabWidget->addTab( accountTab, accountTab->account_name);	}	if (!this->isVisible())	{		tabWidget->setCurrentWidget(accountTab);		QString title = tr("with") + accountTab->account_name + tr("chating... "); 		this->setWindowTitle(title);		int online_state ;		if (!accountTab->m_account)			online_state = -1;		else			if (!fx_is_pc_user_by_account(accountTab->m_account))				online_state = -1;			else				online_state = fx_get_online_status_by_account(accountTab->m_account);		this->setWindowIcon (getOnlineStatusIcon(online_state));		if (Settings::instance().isAutoShowMsg())		{			this->show();			this->setWindowState(Qt::WindowNoState) ;			this->setFocus();			accountTab->msgSend->MsgEdit->setFocus();		}	}		//int indexOf();	QString str; 	QString show_msg; 	if(iscoming_msg) {		str ="<b style=\"color:rgb(0,85,0);\">"+ accountTab->account_name + "("+			QDateTime::currentDateTime().toString(tr("hh:mm:ss")) + "--" +			QDateTime::currentDateTime().toString(tr("yyyy-MM-dd")) +			"):</b><br>" + msg;		show_msg= show_msg.fromUtf8(str.toUtf8().data()); 	} else {		show_msg= show_msg.fromUtf8(msg.toUtf8().data()); 	}	if (account_id == SYSTEM_ID)	{		bool tmp = selectSystemMsg (strtol (fx_get_usr_uid(), NULL, 10),				SYSTEM_ID, show_msg.toUtf8().data());		if (tmp)		{			printf("this system message have ok \n");			return true;		}	}	QTextEdit * msgBrowser = accountTab->msgSend->MsgBrowser;	msgBrowser->append(show_msg);	msgBrowser->moveCursor(QTextCursor::End);	saveHistroyMsg(strtol(fx_get_usr_uid(), NULL, 10), account_id, show_msg.toUtf8().data(), NULL);	if (Settings::instance().isAutoReply())	{		exec_autoRelpy(msgBrowser, account_id, Settings::instance().getAutoReply());	}	accountTab->startFlickerTab();	if (!Settings::instance().isMute())		playSound(MSG_SOUND);	return true;}void FxMsgWindow::exec_autoRelpy(QTextEdit* msgBrowser, qlonglong account_id, QString msg){	bool sendFlag = false;	msg = QObject::tr("(LibFetion auto reply msg)") + msg;	if (!fx_is_pc_user_by_id(account_id))		sendFlag = fx_send_sms (account_id, msg.toUtf8().data(), NULL, NULL); 	else {		msg.replace(QString("<"), QString("&lt;"));		msg.replace(QString(">"), QString("&gt;"));		sendFlag = fx_dialog_send( account_id, msg.toUtf8().data(), NULL, NULL); 	}	QString show_msg;	QString head;	if(sendFlag) 		head = "<b style=\"color:rgb(0,0,255);\">"+tr("Me:(")+ 			QDateTime::currentDateTime().toString(tr("hh:mm:ss")) + "--" +			QDateTime::currentDateTime().toString(tr("yyyy-MM-dd")) +			")</b><br>";	else 		head = "<b style=\"color:red;\">"+tr("send fail:(")+ 			QDateTime::currentDateTime().toString(tr("hh:mm:ss")) + "--" +			QDateTime::currentDateTime().toString(tr("yyyy-MM-dd")) +			")</b><br>";	msg.replace(QString("<"), QString("&lt;"));	msg.replace(QString(">"), QString("&gt;"));	msg.replace(QString("\n"), QString("<br>"));	msg = fxgui_to_faces(msg);	QString str = head+ msg;	show_msg = show_msg.fromUtf8(str.toUtf8().data());	//show the send reslut to the browser...	msgBrowser->append(show_msg);	saveHistroyMsg(strtol(fx_get_usr_uid(), NULL, 10), account_id, show_msg.toUtf8().data(), NULL);}void FxMsgWindow::haveQunMessage(qlonglong qun_id){	if (!Settings::instance().isMute())		playSound(MSG_SOUND);	Fetion_MSG * fxMsg = fx_get_msg(qun_id);	if(!fxMsg)		return;	long sender = fxMsg->ext_id;	QString newmsg = fxgui_handle_newMsg(fxMsg);#if 0	QString newmsg ;	char *msg = fx_simple_paser_msg(fxMsg->message); 	newmsg = newmsg.fromUtf8(msg);	if(msg)		free(msg);#endif	addQunMessage(newmsg, qun_id, sender, true);	fx_destroy_msg (fxMsg);}void FxMsgWindow::haveNewMessage(qlonglong account_id){	Fetion_MSG * fxMsg = fx_get_msg(account_id);	if(!fxMsg)		return;#if 0	char *msg = fx_simple_paser_msg(fxMsg->message); 	QString newmsg = newmsg.fromUtf8(msg);	addMessage(newmsg, account_id, true);	if(msg)		free(msg);#else	QString newmsg = fxgui_handle_newMsg(fxMsg);	addMessage(newmsg, account_id, true);#endif	fx_destroy_msg (fxMsg);}void FxMsgWindow::resizeEvent (QResizeEvent * event) {	Settings::instance().setMsgWinSize(size());	tabWidget->resize(event->size());}void FxMsgWindow::closeEvent(QCloseEvent *event){	hide();	if(isQuit)		event->accept();	else		event->ignore();}void FxMsgWindow::moveEvent(QMoveEvent * event){	Settings::instance().setMsgWinPos(pos());}void FxMsgWindow::addQunWin(qlonglong qun_id, bool isSendSms){	FxQunWindow	*qun = findQunWindow(qun_id);	if(!qun) {		qun = new FxQunWindow(qun_id, this, isSendSms);		qunWindow.append(qun);	}	qun->show(); 	qun->activateWindow();}void FxMsgWindow::addAccount(qlonglong account_id, bool isSendSms){	if ( fx_is_InBlacklist_by_id(account_id) ) {		QMessageBox::information(this->parentWidget(), tr("can't send mseeage to he"), 				tr("it have be added in blacklist by you") );		return ;	}	int	authed = fx_is_authed_by_id(account_id);	if( authed == AUTH_WAIT ){		QMessageBox::information(this->parentWidget(), tr("can't send mseeage to he"), 				tr("wait auth to add friend") );		return ;	}	if( authed == AUTH_REFUS){		QMessageBox::information(this->parentWidget(), tr("can't send mseeage to he"), 				tr("was refused to add friend") );		return ;	}	//first find is have the instance of the account_id, if have show it, and return.	//then create a new instance of this account_id, and add to the tabwidget.	AccountTab *accountTab = findFromMsgWindow(tabWidget, account_id);	if(!accountTab)	{		accountTab = new AccountTab(account_id, tabWidget, isSendSms);		accountTab->setMainWind( this->mainwindow );		tabWidget->addTab( accountTab, accountTab->account_name);	}	tabWidget->setCurrentWidget(accountTab);	QString title = tr("with") + accountTab->account_name + tr("chating... "); 	//QString title = QString::fromUtf8("涓?) + accountTab->account_name + QString::fromUtf8("鑱婂ぉ涓?..");	this->setWindowTitle(title);	int online_state ;	if(!fx_is_pc_user_by_account(accountTab->m_account))		online_state = -1;	else		online_state = fx_get_online_status_by_account(accountTab->m_account);	this->setWindowIcon (getOnlineStatusIcon(online_state));	if (!this->isVisible ())		this->show();	this->activateWindow();	this->setWindowState(Qt::WindowNoState);	accountTab->setSendModle(isSendSms);	accountTab->msgSend->MsgEdit->setFocus();}FxMsgWindow::~FxMsgWindow(){	int size = qunWindow.size();	for(int i = 0; i< size; i++ )		qunWindow.at(i)->qun_exit();}void FxMsgWindow::msg_exit(){	isQuit = true;	close();}void FxMsgWindow::showFaces(){	inputFace->setGeometry (QCursor::pos().x() - 320,			QCursor::pos().y() - 261, 320, 261);	inputFace->show();	inputFace->setFocus();	//inputFace->setWindowState(Qt::WindowActive);	//inputFace->grabMouse() ;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区国产豹纹内裤在线| 色婷婷狠狠综合| 99精品视频一区| 久久久久久亚洲综合影院红桃| 精品亚洲国产成人av制服丝袜| 欧美不卡一二三| 国产精品久久久久久久蜜臀| 婷婷激情综合网| 日韩欧美在线网站| 国产欧美视频一区二区三区| 蜜臀久久99精品久久久久宅男| 激情另类小说区图片区视频区| 欧美一级二级在线观看| 亚洲一区二区五区| 91久久精品国产91性色tv| 欧美日韩一级视频| 欧美一级电影网站| 精品国产乱码久久久久久图片| 在线视频你懂得一区| 成人精品免费网站| 国产高清在线观看免费不卡| 亚洲不卡在线观看| 国产成人免费视频网站高清观看视频| voyeur盗摄精品| 国产精品综合一区二区三区| 久久综合九色综合97婷婷 | 中文字幕精品三区| 日本不卡免费在线视频| 国产在线观看一区二区| 久久久蜜臀国产一区二区| 中文字幕在线一区| 欧美三级视频在线观看| 亚洲制服丝袜在线| 99亚偷拍自图区亚洲| 欧美日韩国产小视频在线观看| 五月激情综合网| 欧美高清在线视频| 欧美日本国产视频| 成人动漫一区二区在线| 亚洲一区二区在线免费观看视频| 久久日一线二线三线suv| 欧美曰成人黄网| 国产精品羞羞答答xxdd| 首页国产欧美久久| 亚洲视频香蕉人妖| 国产亚洲午夜高清国产拍精品| 在线免费一区三区| 国产盗摄女厕一区二区三区| 亚洲午夜精品在线| 《视频一区视频二区| 精品99一区二区| 欧美精品在欧美一区二区少妇| av一区二区三区黑人| 国产中文一区二区三区| 日韩精品电影在线观看| 亚洲欧洲中文日韩久久av乱码| 久久综合久色欧美综合狠狠| 国产人久久人人人人爽| 91麻豆精品国产自产在线观看一区| 99久久精品国产导航| 国产剧情一区二区| 精品在线播放午夜| 五月婷婷综合激情| 一级日本不卡的影视| 国产精品国产三级国产aⅴ入口| 欧美一级免费大片| 欧美老人xxxx18| 欧美性一区二区| 日本精品裸体写真集在线观看| 国产一区视频导航| 精品写真视频在线观看| 精品一区二区三区的国产在线播放 | 91猫先生在线| 91麻豆免费观看| av电影天堂一区二区在线观看| 国产成人精品免费| 国产91丝袜在线18| 丰满放荡岳乱妇91ww| 懂色中文一区二区在线播放| 国产精品99精品久久免费| 韩国成人精品a∨在线观看| 老司机午夜精品| 精品一区二区久久久| 久久99精品国产.久久久久久 | 久久精品夜色噜噜亚洲a∨| 久久综合久久综合九色| 久久精品人人做人人综合| 久久嫩草精品久久久久| 久久精品人人做人人爽人人| 国产精品久久网站| 综合网在线视频| 一级女性全黄久久生活片免费| 亚洲成人www| 免费一区二区视频| 国产精品亚洲一区二区三区妖精| 成人午夜在线免费| 色综合久久久久综合99| 欧美日韩一区国产| 日韩一卡二卡三卡四卡| 国产亚洲精品精华液| 一区二区中文字幕在线| 亚洲一线二线三线视频| 日韩高清电影一区| 国产精品99久久久久久久vr| 一本到不卡精品视频在线观看| 欧美日韩国产影片| 精品久久国产97色综合| 国产亚洲欧美在线| 亚洲精品高清视频在线观看| 爽好多水快深点欧美视频| 九九热在线视频观看这里只有精品| 国产成人福利片| 日本黄色一区二区| 欧美成人r级一区二区三区| 国产日韩影视精品| 亚洲一区影音先锋| 精品在线观看视频| 欧美在线色视频| 日韩精品一区二区三区在线 | 午夜精品久久久久久| 亚洲成人免费电影| 国产一区 二区 三区一级| 色偷偷一区二区三区| 日韩欧美一区二区久久婷婷| 国产精品美女www爽爽爽| 午夜精品一区二区三区三上悠亚| 国产一区二区三区蝌蚪| 欧美午夜寂寞影院| 国产欧美日产一区| 亚洲一区二区三区免费视频| 国产伦理精品不卡| 欧美日韩精品一区二区| 欧美国产日韩精品免费观看| 亚洲午夜在线视频| 成人av免费在线播放| 日韩一区二区三区精品视频| 亚洲日本成人在线观看| 美女mm1313爽爽久久久蜜臀| 色综合天天综合狠狠| 日韩免费视频一区二区| 亚洲久草在线视频| 从欧美一区二区三区| 欧美精品99久久久**| 亚洲裸体xxx| av中文字幕一区| 久久看人人爽人人| 蜜臀av一级做a爰片久久| 欧美亚洲动漫精品| 日本一区二区三区久久久久久久久不| 亚洲成人一区在线| 91免费视频观看| 1024成人网| 99麻豆久久久国产精品免费| 久久久青草青青国产亚洲免观| 麻豆久久一区二区| 欧美精品日韩一本| 一区二区三区.www| 91国在线观看| 伊人婷婷欧美激情| 91视频在线观看免费| 国产精品福利影院| 成人综合婷婷国产精品久久| 精品国产sm最大网站免费看| 日本在线播放一区二区三区| 91黄色小视频| 亚洲444eee在线观看| 精品视频在线视频| 亚洲一二三四在线观看| 欧美性猛交一区二区三区精品| 1024国产精品| 色狠狠av一区二区三区| 有坂深雪av一区二区精品| 欧美综合亚洲图片综合区| 亚洲精品国产无套在线观| 91麻豆成人久久精品二区三区| 国产精品乱人伦| 丁香婷婷综合网| 亚洲人快播电影网| 欧美午夜免费电影| 婷婷久久综合九色综合绿巨人| 欧美人伦禁忌dvd放荡欲情| 午夜精品久久久久久久蜜桃app| 在线不卡a资源高清| 偷拍一区二区三区四区| 日韩欧美电影在线| 国产伦精一区二区三区| 国产精品精品国产色婷婷| 色综合色综合色综合| 亚洲最新视频在线观看| 欧美日韩国产一级| 精品亚洲国产成人av制服丝袜| 精品国产伦一区二区三区观看体验| 日韩精品欧美精品| 国产亚洲美州欧州综合国| 色网综合在线观看| 免费成人在线观看视频| 久久久精品免费免费| 91麻豆国产香蕉久久精品| 午夜精品福利视频网站| 久久这里只有精品首页|