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

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

?? fxmainwindow.cpp

?? linux-下的fetion-0.8.1。包括所有源代碼
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
/*************************************************************************** *   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 <QtGui>#include <QStandardItemModel>#include <QModelIndex>#include <QTreeView>#include <QListView>#include <QHeaderView>#include <QStandardItem>#include "appconfig.h"#include "fxmainwindow.h"#include "fxloginwindow.h"#include "fxshowAccountInfo.h"#include "fxqunwindow.h"#include "fxverifyAccount.h"#include "fxrefuseSMS.h"#include "fxsendGroupSMS.h"#include "fxconfigDlg.h"void  Sys_EventListener (int message, WPARAM wParam, LPARAM lParam, void* args){	if(!args)		return;	FxMainWindow * mainWind = (FxMainWindow *) args;	mainWind->handleFx_Sys_Event(message, wParam, lParam);}void FxMainWindow::handleFx_Sys_Event(int message, WPARAM wParam, LPARAM lParam){	switch(message)	{		case FX_CURRENT_VERSION:			emit signal_Current_Version((int)wParam);			break;		case FX_ADDACCOUNT_APP:			emit signal_AddAccountApp((char*)(lParam), (char*)wParam);			break;		case FX_MOVE_GROUP_OK:			emit signal_MoveGroup(qlonglong(lParam), (int)wParam);			break;		case FX_MOVE_GROUP_FAIL:			break;		case FX_SYS_MESSAGE:			emit signal_NewSysMsg(qlonglong(lParam));			break;		case FX_NEW_MESSAGE:			emit signal_NewMsg(qlonglong(lParam));			break;		case FX_NEW_QUN_MESSAGE:			emit signal_NewQunMsg(qlonglong(lParam));			break;		case FX_SET_STATE_OK:			emit signal_set_state((int)wParam);			break;		case FX_STATUS_OFFLINE: //2??ú??		case FX_STATUS_ONLINE ://?ú??		case FX_STATUS_BUSY:    //?|?μ		case FX_STATUS_AWAY:  //?íé???à′		case FX_STATUS_MEETING:  //?áòé?D		case FX_STATUS_PHONE:   //μ??°?D		case FX_STATUS_DINNER:  //ía3?ó?2í		case FX_STATUS_EXTENDED_AWAY:  //à??a 		case FX_STATUS_NUM_PRIMITIVES: //×??¨ò?		case FX_ACCOUNT_UPDATA_OK:			emit signal_UpdateAcInfo(qlonglong(lParam));			break;		case FX_STATUS_SMSEXTENED:			//printf("have receive the FX_STATUS_SMSEXTENED message of %d %ld\n", wParam, lParam);			//emit signal_UpdateAcInfo(qlonglong(lParam));			break;		case FX_SET_REFUSE_SMS_DAY_OK:			emit signal_UpdateSmsDay((wParam));			break;		case FX_REMOVE_BLACKLIST_OK:		case FX_ADD_BLACKLIST_OK:			emit signal_UpdateAcInfo(qlonglong(lParam));			break;		case FX_SYS_ERR_NETWORK:			emit signal_SystemNetErr( wParam);			break;		case FX_SYS_DEREGISTERED:			emit signal_DeRegistered();			break;		case FX_DIA_SEND_OK: 		case FX_DIA_SEND_FAIL: 		case FX_DIA_SEND_TIMEOUT: 		case FX_SMS_OK: 		case FX_SMS_FAIL: 		case FX_SMS_FAIL_LIMIT: 		case FX_SMS_TIMEOUT: 		case FX_QUN_SEND_OK: 		case FX_QUN_SEND_FAIL: 		case FX_QUN_SEND_TIMEOUT: 		case FX_QUN_SMS_OK: 		case FX_QUN_SMS_FAIL: 		case FX_QUN_SMS_FAIL_LIMIT: 		case FX_QUN_SMS_TIMEOUT: 			emit signal_SysDialogMsg( message, wParam, (qlonglong)lParam);			break;		case FX_ADD_BUDDY_OK:			emit signal_add_buddy( message, wParam, (qlonglong)lParam);			break;		case FX_RENAME_GROUP_OK:			emit signal_reName_group( message, wParam, (qlonglong)lParam);			break;		case FX_SET_BUDDY_INFO_OK:			emit signal_reName_buddy( message, wParam, (qlonglong)lParam);			break;		case FX_ADD_GROUP_OK:			emit signal_add_group( message, wParam, (qlonglong)lParam);			break;		case FX_DEL_GROUP_OK:			emit signal_del_group( message, wParam, (qlonglong)lParam);			break;		case FX_DEL_BUDDY_OK:			emit signal_del_buddy( message, wParam, (qlonglong)lParam);			break;		case FX_ADD_GROUP_FAIL:		case FX_DEL_GROUP_FAIL:		case FX_SET_BUDDY_INFO_FAIL:		case FX_RENAME_GROUP_FAIL:  //ignored this message			if(wParam)				free((char*)(int)wParam);			break;					case FX_SET_NICKNAME_OK:			emit signal_set_nickname_ok();			break;		default:			break;#if 0 //follow message is ignored		case FX_REMOVE_BLACKLIST_FAIL:		case FX_ADD_BLACKLIST_FAIL:		case FX_REMOVE_BLACKLIST_TIMEOUT:		case FX_ADD_BLACKLIST_TIMEOUT:		case FX_RENAME_GROUP_TIMEOUT:		case FX_SET_BUDDY_INFO_TIMEOUT:		case FX_SET_REFUSE_SMS_DAY_FAIL:#endif	}}FxMainWindow::FxMainWindow(QWidget *parent):QMainWindow(parent){	setupUi(this);	newVersion = 0;	new_msg_count = 0;	new_qun_msg_count = 0;	tmp_addBuddy = NULL;	fx_status = NO_SET;	isQuit = false;	isBreakOut = false;	isHaveminimized = false;	isNeedRecordWinPos = false;    init_UI();	initAllActions();	createMenu();	initTrayIcon();	init_slot_signal();	//set the fetion system msg call back function	fx_set_system_msg_cb (Sys_EventListener, this);	//save the account info to db, 	//will a bug: when the account is changed, but the db info maybe not changed follow#if 1	saveAccountInfo();#else	QTreeWidgetItem * tm = new QTreeWidgetItem(view, 0);	tm->setText(0, "haha");#endif		minimizedTimer.start(100);}FxMainWindow::~FxMainWindow(){	if(buddyopt)		delete buddyopt;	if(msgwin)		delete msgwin;}void FxMainWindow::UI_enable_impresa(){	UI_Impresa->setDisabled (false);	UI_Impresa->setFocus ();}void FxMainWindow::UI_enable_search(){	UI_Search->setDisabled (false);	UI_Search->setFocus ();}void FxMainWindow::setUINiceName(){	QString impresa; 	if (fx_data_get_PersonalInfo())		impresa = QString::fromUtf8(fx_data_get_PersonalInfo()->impresa); 	if (impresa.isEmpty())	{		UI_Impresa->setToolTip (NULL);		impresa = tr("please input impresa...");	}		UI_Impresa->setText(impresa);	UI_Impresa->setToolTip(impresa);	UI_Impresa->setCursorPosition (0);	m_impresa = impresa;		QString state;	switch (fx_get_user_state())	{		case FX_STATUS_ONLINE:			state = tr("online");			break;		case FX_STATUS_OFFLINE:			state = tr("hide");			break;		case FX_STATUS_BUSY:			state = tr("busy");			break;		default:			state = tr("away");			break;	}	QString name = QString::fromUtf8(fx_get_usr_show_name());	//if (name.size >12)	QString showstr= name + "(" +state + ")";	UI_NiceName->setText (showstr);}void FxMainWindow::SearcheditingFinished (){	QString text = UI_Search->text();	if (text.isEmpty())	{		UI_Search->setText(tr("search friends..."));		UI_Search->setCursorPosition (0);		//show mian tree list	}//	UI_Search->setDisabled (true);}void FxMainWindow::SearchtextChanged (const QString &text){	QString content = UI_Search->text();	if (content.isEmpty() || content == tr("search friends..."))	{		search->hide();		view->show();		return;	}		view->hide(); //hide mian tree list 		search->clear();	QList<QTreeWidgetItem *>  *items = searchAccountInfo(content.toUtf8().data());	search->insertTopLevelItems(0, *items);	search->show();}void FxMainWindow::changeNiceName(){	UI_Edit_NiceName->hide();	QString text = UI_Edit_NiceName->text();	if (text != QString::fromUtf8(fx_get_usr_show_name()))		fx_set_user_nickname(text.toUtf8().data(), NULL, NULL); }void FxMainWindow::changeImpresa(){	QString text = UI_Impresa->text();	if (text == m_impresa)		return;	if (text.isEmpty())	{		UI_Impresa->setText(tr("please input impresa..."));		UI_Impresa->setCursorPosition (0);		text = tr("please input impresa...");				if (m_impresa != tr("please input impresa..."))			fx_set_user_impresa(NULL, NULL, NULL);	}	else		fx_set_user_impresa(text.toUtf8().data(), NULL, NULL); 	UI_Impresa->setToolTip (text);	m_impresa = text;}void FxMainWindow::SearchFocusIn (){	if (UI_Search->text() == tr("search friends...") )		UI_Search->setText("");}void FxMainWindow::ImpresaFocusIn (){	if (UI_Impresa->text() == tr("please input impresa...") )		UI_Impresa->setText("");}void FxMainWindow::addNewMsgCount(bool isQunMsg){	if (!isQunMsg)		new_msg_count++;	else		new_qun_msg_count++;	if (isHaveTray) 		startFlickerTray();}bool FxMainWindow::showNewMsgDlg(){	if (new_msg_count > 0)	{		subNewMsgCount();		msgwin->show();		msgwin->activateWindow();		msgwin->setWindowState(Qt::WindowNoState) ;		return true;	}	if (new_qun_msg_count > 0)	{		subNewMsgCount(true);		return true;	}	return false;}void FxMainWindow::subNewMsgCount(bool isQunMsg){	if (!isQunMsg)		new_msg_count--;	else		new_qun_msg_count--;	if ( !new_msg_count && !new_qun_msg_count && isHaveTray) 		endFlickerTray();	if(new_msg_count < 0)		new_msg_count = 0;	if (new_qun_msg_count < 0)		new_qun_msg_count = 0;}void FxMainWindow::startFlickerTray(){	if (trayFlickTimer.isActive())		return;	trayFlickTimer.start(300);}void FxMainWindow::endFlickerTray(){	if (trayFlickTimer.isActive())		trayFlickTimer.stop();	trayIcon->setIcon(getSysTrayIcon (fx_get_user_state()));}void  Relogin_EventListener (int message, WPARAM wParam, LPARAM lParam, void* args){	if(!args)		return;	FxMainWindow * mainwind = (FxMainWindow *) args;	mainwind->handleFx_relogin_Event(message, wParam, lParam);}void FxMainWindow::relogin_fetion(){		if (reloginTimer.isActive())		return;	if (isHaveTray) 		trayIcon->setContextMenu(reloginTrayMenu);	this->hide();	fx_relogin(Relogin_EventListener, this);	reloginTimer.start(1000*35);}void FxMainWindow::handleFx_relogin_Event(int message, WPARAM wParam, LPARAM lParam){	switch(message)	{		case FX_LOGIN_URI_ERROR:		case FX_LOGIN_FAIL:		case FX_LOGIN_NETWORK_ERROR:		case FX_LOGIN_UNKOWN_ERROR :   		case FX_LOGIN_UNKOWN_USR:		case FX_LOGIN_GP_FAIL:			relogin_fetion();			if (!isBreakOut && isHaveTray) //here just one warnning			{				isBreakOut = true;				QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon(3);				trayIcon->showMessage (tr("connect break off"), 						tr("disconnect from fetion server, will relogin fetion"), 						icon, 1*1000);			}			break;		case FX_LOGIN_OK :			fx_status = NO_SET;			isBreakOut = false;			if (isHaveTray) { 				trayIcon->setContextMenu(trayIconMenu);				trayIcon->setIcon(getSysTrayIcon (fx_get_user_state()));			}			if (reloginTimer.isActive())				reloginTimer.stop();			break;	}}void FxMainWindow::relogin_timer(){	fx_relogin(Relogin_EventListener, this);	/*	   if (reloginTimer.isActive())	   reloginTimer.stop();	   */}void FxMainWindow::flickerTray(){	static bool flick_flag = false;	trayIcon->setIcon(getFlickIcon(flick_flag));	flick_flag = !flick_flag;}void FxMainWindow::minimizedWind(){	if (!isHaveminimized)	{		isHaveminimized = true;		this->setWindowState(Qt::WindowMinimized);	} else {		minimizedTimer.stop();		this->setWindowState(Qt::WindowNoState);		//registed the hot key, when the mainwindow is created, and can get the winId		if (Settings::instance().isEnableGetMsgHotKey())			Settings::instance().setGetMsgHotKey(Settings::instance().GetMsgHotKey(), Settings::instance().GetMsgHotKeyMod());		if (Settings::instance().isStartHide())			this->hide();		else			this->show();		move(Settings::instance().MainWinPos());		isNeedRecordWinPos = true;	}}void FxMainWindow::haveCurrentVersionMessage(int version){	newVersion = version;	if (version > CURRENT_VERSION)	{		QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon(1);		trayIcon->showMessage(tr("LibFetion"),				tr("LibFetion Have New Version,"					"access http://www.libfetion.cn for more infomation"),				icon, 10*1000);	}}void FxMainWindow::haveAddAccountAppMessage(char* uri, char*desc){	FxVerifyAccount * verifyAccount = new FxVerifyAccount(this, uri, desc, this);	verifyAccount->show();}void FxMainWindow::haveMoveGroupMessage(qlonglong account_id, int group_id) {	buddyopt->delAccount_direct(account_id);  	buddyopt->addAccountToGroup(fx_get_account_by_id (account_id));}void FxMainWindow::haveNewSysMessage(qlonglong sys_id){#if 0 //not using system message	Fetion_MSG * fxMsg = fx_get_msg(sys_id);	if(!fxMsg)		return;	QString newmsg ;	char *msg = fx_simple_paser_msg(fxMsg->message); 	newmsg = newmsg.fromUtf8(msg);	QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon(1);	trayIcon->showMessage(tr("sys message"), newmsg, 			icon, 5*1000);	fx_destroy_msg (fxMsg);	if(msg)		free(msg);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲福利视频一区| 亚洲国产日日夜夜| 精品乱人伦小说| 欧美亚一区二区| 欧美亚洲国产怡红院影院| 国产成a人亚洲精| 国产69精品一区二区亚洲孕妇| 丝袜诱惑亚洲看片| 日韩国产欧美在线观看| 日韩精品成人一区二区在线| 青青草成人在线观看| 国产一区在线精品| 91国偷自产一区二区三区观看| 欧美午夜精品理论片a级按摩| 欧美日韩成人激情| 精品日产卡一卡二卡麻豆| 国产日产欧美一区二区三区| 亚洲成a天堂v人片| 国产中文字幕一区| 国产高清无密码一区二区三区| 99精品视频在线免费观看| 欧美嫩在线观看| 精品国产乱码久久久久久闺蜜| 国产精品你懂的在线欣赏| 亚洲国产综合在线| 精品夜夜嗨av一区二区三区| av欧美精品.com| 3d动漫精品啪啪一区二区竹菊| 国产精品黄色在线观看| 日韩高清中文字幕一区| 成年人午夜久久久| 欧美另类videos死尸| 久久久99免费| 日韩中文字幕91| 成人av资源网站| 欧美老年两性高潮| 中文字幕一区在线观看| 一区二区三区色| 懂色av噜噜一区二区三区av| 欧美精品自拍偷拍动漫精品| 国产欧美精品一区aⅴ影院 | 一区在线观看视频| 日本aⅴ亚洲精品中文乱码| 丁香激情综合国产| 欧美一级理论性理论a| 国产喷白浆一区二区三区| 天天操天天色综合| k8久久久一区二区三区| 日韩一区二区不卡| 夜色激情一区二区| 国产精品白丝jk黑袜喷水| 欧美日本一区二区三区四区| 欧美国产激情一区二区三区蜜月| 天天综合天天做天天综合| 99re66热这里只有精品3直播| 欧美成人一区二区三区| 午夜电影久久久| 色狠狠av一区二区三区| 久久久久99精品一区| 奇米色777欧美一区二区| 欧美性猛交xxxxxx富婆| www激情久久| 久久精品国产精品青草| 欧美日韩电影在线| 亚洲激情av在线| 色先锋aa成人| 日韩午夜在线观看视频| 日韩中文字幕亚洲一区二区va在线| 在线观看中文字幕不卡| 亚洲精品欧美二区三区中文字幕| 91丨porny丨中文| 综合网在线视频| av不卡在线播放| 最新日韩在线视频| 色哟哟在线观看一区二区三区| 亚洲欧美日韩中文字幕一区二区三区| 99精品一区二区三区| 一区二区三区中文字幕精品精品 | 国产亚洲一区二区三区在线观看| 激情小说亚洲一区| 久久久久国色av免费看影院| 丁香啪啪综合成人亚洲小说| 中文字幕一区av| 91国模大尺度私拍在线视频| 亚洲成人一区在线| 91麻豆精品国产91久久久资源速度| 蜜桃视频在线观看一区二区| 亚洲精品一区二区三区精华液| 国产一区二区在线影院| 日本一区二区在线不卡| 一本色道久久综合亚洲aⅴ蜜桃| 亚洲精品国产一区二区三区四区在线| 在线观看一区二区视频| 日韩专区中文字幕一区二区| 亚洲精品在线网站| 成人黄色网址在线观看| 一区二区三区中文字幕| 欧美高清dvd| 久久99久国产精品黄毛片色诱| 国产人久久人人人人爽| 色综合天天性综合| 日韩和欧美一区二区| 久久久影视传媒| 91久久精品一区二区三| 视频在线观看一区二区三区| 久久久久久久久岛国免费| 99精品在线观看视频| 婷婷夜色潮精品综合在线| 久久老女人爱爱| 色老汉一区二区三区| 麻豆成人综合网| 亚洲欧洲国产专区| 5月丁香婷婷综合| 国产麻豆一精品一av一免费| 亚洲视频资源在线| 欧美一区二区视频在线观看| 成人手机在线视频| 日韩电影在线观看电影| 国产精品免费看片| 884aa四虎影成人精品一区| 国产精品自在欧美一区| 亚洲国产cao| 国产调教视频一区| 欧美精品一卡二卡| 国产 欧美在线| 日韩va欧美va亚洲va久久| 国产精品美女视频| 欧美一区二区黄| 99久久久无码国产精品| 老司机一区二区| 亚洲线精品一区二区三区| 久久久国产精品午夜一区ai换脸| 欧美色区777第一页| 国产91精品入口| 男人的天堂久久精品| 亚洲欧美区自拍先锋| 久久久久久久综合| 欧美日韩高清在线| 色妹子一区二区| 国产丶欧美丶日本不卡视频| 亚洲不卡在线观看| 国产精品久线在线观看| 久久综合九色综合97婷婷| 欧美系列日韩一区| 99久久久久免费精品国产| 韩国av一区二区三区四区| 亚洲福利一区二区| 综合久久国产九一剧情麻豆| 精品国产欧美一区二区| 69av一区二区三区| 欧美亚洲国产一区二区三区| av一区二区三区在线| 国精产品一区一区三区mba桃花 | 日韩一区二区三| gogogo免费视频观看亚洲一| 国产精品二区一区二区aⅴ污介绍| 亚洲午夜在线观看视频在线| 99精品一区二区| 国产精品日日摸夜夜摸av| 五月开心婷婷久久| 大陆成人av片| 久久精品人人做人人爽97| 久久99国产精品久久99果冻传媒| 99久久99精品久久久久久 | 日本伊人色综合网| 9色porny自拍视频一区二区| 日韩美女精品在线| 欧美亚洲高清一区| 91香蕉视频黄| 成人精品高清在线| 国产精品性做久久久久久| 久久99久久精品欧美| 久久黄色级2电影| 青青草原综合久久大伊人精品| 亚洲国产aⅴ天堂久久| 亚洲综合免费观看高清完整版| 亚洲欧洲综合另类| 亚洲激情图片小说视频| 亚洲女人的天堂| 亚洲欧洲另类国产综合| 国产精品免费观看视频| 中文字幕五月欧美| 亚洲欧美电影院| 一个色妞综合视频在线观看| 一区二区久久久| 亚洲制服丝袜av| 午夜久久久久久| 日本最新不卡在线| 久久99精品久久久久| 国产在线播放一区三区四| 国产在线一区二区综合免费视频| 国内精品免费在线观看| 成人午夜免费电影| 91色porny蝌蚪| 欧美色视频在线观看| 91超碰这里只有精品国产| 欧美电视剧在线观看完整版| 久久美女艺术照精彩视频福利播放 | 精品国产人成亚洲区| 国产午夜亚洲精品不卡|