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; }
const bool EvaDetailsWindow::UpdateData(const bool toShow) { qwUserInfo->leNumber->setText( details[0] ); if(details.size()!=37) return false; slotBuddyQQShowReady(id); int level = 0; QString signature = ""; if(id == EvaMain::user->getQQ() ){ level = EvaMain::user->getLevel(); signature = codec->toUnicode(EvaMain::user->getSignature().c_str()); }else{ if(frd){ level = frd->getLevel(); signature = codec->toUnicode(frd->getSignature().c_str()); m_Memo = frd->getMemo(); slotUpdateMemo(m_Memo); } } int suns, moons, stars; EvaUtil::calcSuns(level, &suns, &moons, &stars); QString strSun = "<img src=\"" + faces->getIconFullPath("TIME_SUN") + "\"></img>"; QString strMoon = "<img src=\"" + faces->getIconFullPath("TIME_MOON") + "\"></img>"; QString strStar = "<img src=\"" + faces->getIconFullPath("TIME_STAR") + "\"></img>"; QString strLevel; for(int i=0; i<suns; i++){ strLevel += strSun; } for(int i=0; i<moons; i++){ strLevel += strMoon; } for(int i=0; i<stars; i++){ strLevel += strStar; } qwUserInfo->lblLevelDisplay->setText("(" + QString::number(level) + ")" + strLevel); qwUserInfo->lblLevelDisplay->adjustSize(); //lE_Num->setReadOnly(true); if (toShow) { qwUserInfo->leNumber->setText( details[0] ); qwUserInfo->leNickName->setText( details[1]); qwUserInfo->leAge->setText( details[7] ); qwUserInfo->leSex->setText( details[8] ); qwUserInfo->leArea->setText( details[2] ); qwUserInfo->leProvince->setText( details[3] ); qwUserInfo->leCity->setText( details[25] ); bool ok; int faceId = details[21].toInt(&ok, 10); if(ok){ selectedFaceIndex = faceId; QPixmap *pix = faces->getUserHeadPixmap(id); if(!pix) pix = faces->getFace(faces->getFaceFileIndex(faceId)); if(pix) qwUserInfo->lblFace->setPixmap( *pix ); }else selectedFaceIndex = 0; qwUserInfo->leEmail->setText( details[10] ); qwUserInfo->leAddress->setText( details[5] ); qwUserInfo->leZipCode->setText( details[4] ); qwUserInfo->lePhone->setText( details[6] ); qwUserInfo->leMobile->setText( details[22]); qwUserInfo->leRealName->setText( details[9]); qwUserInfo->leSchool->setText( details[31] ); qwUserInfo->leOccupation->setText( details[16] ); qwUserInfo->leHomePage->setText( details[17] ); qwUserInfo->teAboutMe->setText( details[24] ); qwUserInfo->teSignature->setText(signature); QStringList ZodiacList( QString::null ); QStringList BloodList( QString::null ); QStringList HoroscapeList( QString::null ); ZodiacList += ( i18n( "Rat" ) ); ZodiacList += ( i18n( "Ox" ) ); ZodiacList += ( i18n("Tiger" ) ); ZodiacList += ( i18n("Rabbit" ) ); ZodiacList += ( i18n("Dragon" ) ); ZodiacList += ( i18n("Snake" ) ); ZodiacList += ( i18n("Horse" ) ); ZodiacList += ( i18n("Sheep" ) ); ZodiacList += ( i18n("Monkey" ) ); ZodiacList += ( i18n("Rooster" ) ); ZodiacList += ( i18n("Dog" ) ); ZodiacList += ( i18n("Pig" ) ); BloodList += ( i18n("A" ) ); BloodList += ( i18n("B" ) ); BloodList += ( i18n("O" ) ); BloodList += ( i18n("AB" ) ); BloodList += ( i18n("Other" ) ); HoroscapeList += ( i18n("Aquarius" ) ); HoroscapeList += ( i18n("Pisces" ) ); HoroscapeList += ( i18n("Aries" ) ); HoroscapeList += ( i18n("Taurus" ) ); HoroscapeList += ( i18n("Gemini" ) ); HoroscapeList += ( i18n("Cancer" ) ); HoroscapeList += ( i18n("Leo" ) ); HoroscapeList += ( i18n("Virgo" ) ); HoroscapeList += ( i18n("Libra" ) ); HoroscapeList += ( i18n("Scoripio" ) ); HoroscapeList += ( i18n("Sagittarius" ) ); HoroscapeList += ( i18n("Capricorn" ) ); qwUserInfo->leZodiac->setText( ZodiacList[ details[33].toInt()<0 ? 0: details[33].toInt() ] ); qwUserInfo->leBlood->setText( BloodList[ details[34].toInt() <0 ? 0: details[34].toInt() ] ); qwUserInfo->leHoroscape->setText( HoroscapeList[ details[32].toInt() <0 ? 0: details[32].toInt() ] ); } return true; }