Пример #1
0
EvaDetailsWindow::EvaDetailsWindow(  QStringList &user, QWidget* parent, const char* name, bool modal, WFlags fl)
	: EvaUserUIBase( parent, name, modal, fl ),
	details( user ),selectedFaceIndex( 0 )
{
  
        
	QObject::connect( pbUpdate, SIGNAL( clicked() ), this, SLOT( slotUpdateClick() ) );	//Click the update button
	QObject::connect( pbClose, SIGNAL( clicked() ), this, SLOT( close() ) );	//Click the close button
	
	QObject::connect( tbtnShop, SIGNAL( clicked() ), this, SLOT( slotShopClicked() ) );
	QObject::connect( tbtnAlbum, SIGNAL( clicked() ), this, SLOT( slotAlbumClicked() ) );
	
	QObject::connect( kpbUpdateShow, SIGNAL( clicked() ), this, SLOT( slotUpdateQQShow() ) );
	QObject::connect( twTabMain, SIGNAL(currentChanged(QWidget*)), this, SLOT( slotCurrentChanged(QWidget*)));
	
	QObject::connect( pbDownloadMemo, SIGNAL( clicked() ), this, SLOT( slotDownloadMemo() ));
	//QObject::connect( tabWidget, SIGNAL(currentChanged(QWidget*)), this, SLOT(currentChanged(QWidget*)) );
	
	m_IsModifyMemo = false;
	codec = QTextCodec::codecForName("GB18030");
	
	bool ok;
	id = details[0].toUInt(&ok, 10);
	if(!ok) return;
	frd = (EvaMain::user->getFriendList()).getFriend(id); //get the user qq of this details window
	
	setCaption( i18n( "View User Info") );//set the title of this dialog

	qwUserInfo->lblBasicInfo->setPixmap(*faces->getIcon("DETAILS_BASIC_INFO"));
	qwUserInfo->lblDetails->setPixmap(*faces->getIcon("DETAILS_DETAILS"));
	qwUserInfo->lblDescription->setPixmap(*faces->getIcon("DETAILS_DESCRIPTION"));
	
	chbAutoUploadMemo->setChecked(true);
	if(!frd){ // He/She is not in your buddy list
		twTabMain->setTabEnabled(twTabMain->page(2), false);
	}
	if(faces){
		QPixmap *icon = faces->getIcon("QQ_SHOP");
		if(icon)
			tbtnShop->setIconSet(QIconSet(*icon));// add Icon to QQShow shop button
	} 
	if(faces){
		QPixmap *icon = faces->getIcon("QQ_ALBUM");
		if(icon)
			tbtnAlbum->setIconSet(QIconSet(*icon));
	}
	
	UpdateData(true);
	if(details.size()!=37) {
		QTimer::singleShot(500, this, SLOT(slotFirstUpdate()));
	}
	
	
}
Пример #2
0
bool EvaDetailsWindow::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotUpdateClick(); break;
    case 1: slotDetailsUpdated((QStringList)(*((QStringList*)static_QUType_ptr.get(_o+1)))); break;
    case 2: slotUpdateQQShow(); break;
    case 3: slotFirstUpdate(); break;
    case 4: slotShopClicked(); break;
    case 5: slotAlbumClicked(); break;
    case 6: slotLinkClicked((const QString&)static_QUType_QString.get(_o+1)); break;
    case 7: slotBuddyQQShowReady((const unsigned int)(*((const unsigned int*)static_QUType_ptr.get(_o+1)))); break;
    case 8: slotCurrentChanged((QWidget*)static_QUType_ptr.get(_o+1)); break;
    case 9: slotDownloadMemo(); break;
    case 10: slotUpdateMemo((const MemoItem&)*((const MemoItem*)static_QUType_ptr.get(_o+1))); break;
    case 11: slotUploadMemoReply((const bool)static_QUType_bool.get(_o+1)); break;
    case 12: slotNoMemoFound(); break;
    default:
	return EvaUserUIBase::qt_invoke( _id, _o );
    }
    return TRUE;
}