Logo Search packages:      
Sourcecode: nateon version File versions  Download package

void KNateon::slotPopupMemoFromUUID ( int  nType,
QString  sUUID 
) [private, slot]

UUID로 쪽지 보기 창을 띄운다. 첫번째 인자는 팝업타입으로 MemoIncoming은 3번이다.

파일 전송 완료 후 처리

받는 사람이 본인이면,

받은 사람이 목록에 없는경우.

받는 사람이 본인이면,

받은 사람이 목록에 없는경우.

Definition at line 5476 of file knateon.cpp.

References BuddyList::getBuddyByID(), CurrentAccount::getBuddyList(), CurrentAccount::getMyCyworldID(), CurrentAccount::getMyName(), CurrentAccount::getMyNateID(), BuddyBase::getName(), SQLiteDB::getRecords(), BuddyBase::getUID(), nmconfig::logintype, pSQLiteDB, slotDeleteMemo(), and slotReplyMemo().

Referenced by dcopCommand(), slotViewAMemoPopup(), and slotViewMemoPopup().

{
      nType = 0;
      
      rowList myList;
      QString sQuery;
  
      sQuery = "SELECT SUSER, RUSER, BODYDATA FROM tb_local_inbox WHERE UUID='";
      sQuery += sUUID;
      sQuery += "';";
      myList = pSQLiteDB->getRecords(sMemoDataPath + "local_inbox.db", sQuery);
      if ( myList.isEmpty() )
      {
#ifdef NETDEBUG
            kdDebug() << "[NOTICE] Not Found UUID : [" << sUUID << "]" << endl;
#endif
            return;
      }
  
      m_pBuddyList = m_pCurrentAccount->getBuddyList();
  
      QString sSender;
      Buddy* pBuddy = m_pBuddyList->getBuddyByID( myList.first()[0] );
      if ( pBuddy )
      {
            sSender = "\"";
            sSender += pBuddy->getName();
            sSender += "\" <";
            sSender += pBuddy->getUID();
            sSender += ">";
      }
      else
      {
            sSender = myList.first()[0];
      }

      QStringList slRecv = QStringList::split(";", myList.first()[1] );
      QString sReceivers;
      for ( QStringList::Iterator it = slRecv.begin(); it != slRecv.end(); ++it )
      {
            Buddy* pBuddy = m_pBuddyList->getBuddyByID(*it);
            if ( pBuddy )
            {
                  if ( sReceivers.length() > 1 )
                        sReceivers += ";\"" + pBuddy->getName() + "\" <" + *it + ">";
                  else
                        sReceivers = "\"" + pBuddy->getName() + "\" <" + *it + ">";
            }
            else
            {
                  if ( stConfig.logintype == 'C' )
                  {
                        /// 받는 사람이 본인이면,
                        if ( *it == m_pCurrentAccount->getMyCyworldID() )
                        {
                              if ( sReceivers.length() > 1 )
                                    sReceivers += ";\"" + m_pCurrentAccount->getMyName() + "\" <" + *it + ">";
                              else
                                    sReceivers = "\"" + m_pCurrentAccount->getMyName() + "\" <" + *it + ">";
                        }
                        else /// 받은 사람이 목록에 없는경우.
                        {
                              if ( sReceivers.length() > 1 )
                                    sReceivers += ";" + *it;
                              else
                                    sReceivers = *it;
                        }
                  }
                  else
                  {
                        /// 받는 사람이 본인이면,
                        if ( *it == m_pCurrentAccount->getMyNateID() )
                        {
                              if ( sReceivers.length() > 1 )
                                    sReceivers += ";\"" + m_pCurrentAccount->getMyName() + "\" <" + *it + ">";
                              else
                                    sReceivers = "\"" + m_pCurrentAccount->getMyName() + "\" <" + *it + ">";
                        }
                        else /// 받은 사람이 목록에 없는경우.
                        {
                              if ( sReceivers.length() > 1 )
                                    sReceivers += ";" + *it;
                              else
                                    sReceivers = *it;
                        }
                  }  
            }
      }

      QString sMemoBody( myList.first()[2] );

      MemoPopupView     *pMemo1 = new MemoPopupView();
      connect( pMemo1, SIGNAL( replyMemo( MemoPopupView::SendType, const QString& , const QString& ) ), SLOT( slotReplyMemo( MemoPopupView::SendType, const QString&, const QString& ) ) );
      connect( pMemo1, SIGNAL( deleteMemo( const QString & ) ), SLOT( slotDeleteMemo( const QString & ) ) );
      connect( pMemo1, SIGNAL( closeMemoPopup( MemoPopupView * ) ), SLOT( slotCloseMemoPopup( MemoPopupView * ) ) );
      
      pMemo1->setSender( sSender );
      pMemo1->setReceiver( sReceivers );
      pMemo1->setBody( sMemoBody );
      pMemo1->setUUID( sUUID );
      pMemo1->show();
}


Generated by  Doxygen 1.6.0   Back to index