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

void KNateon::slotReplyMemo ( MemoPopupView::SendType  mSendType,
const QString &  sReceiver,
const QString &  sBody 
) [private, slot]

전체 답장에서 본인을 제외하기 위한 구문.

HTML을 Text로 변환하는것을 개발해야 함. HTML모드로 보내면 받는사람이 HTML로 받음. Text모드는 Reply 할때 이모티콘이 안보임.

Text 모드

Definition at line 1708 of file knateon.cpp.

References nmconfig::allreplymemoattach, MemoList::creatMemoObj(), nmconfig::forwardmemoattach, CurrentAccount::getMyCyworldID(), CurrentAccount::getMyNateID(), nmconfig::logintype, m_pMemoList, nmconfig::replymemoattach, sendMemo(), and slotSendMemo().

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

{
      MemoView *pMemo;

      if (!m_pMemoList)
            m_pMemoList = new MemoList();

      pMemo = m_pMemoList->creatMemoObj();

      /// 전체 답장에서 본인을 제외하기 위한 구문.
      QString sRecv;
      QStringList slRecv = QStringList::split(";", sReceiver );
      for ( QStringList::Iterator it = slRecv.begin(); it != slRecv.end(); ++it )
      {
            if ( stConfig.logintype == 'C' )
            {
                  if ( (*it).find( m_pCurrentAccount->getMyCyworldID() ) > 0 )
                        continue;
            }
            else
            {
                  if ( (*it).find( m_pCurrentAccount->getMyNateID() ) > 0 )
                        continue;
            }
            if ( sRecv.length() > 1 )
                  sRecv += ";" + *it;
            else
                  sRecv = *it;
      }

      pMemo->setReceiver(sRecv);
      QString sEditBody;

      /*!
        HTML을 Text로 변환하는것을 개발해야 함.
        HTML모드로 보내면 받는사람이 HTML로 받음.
        Text모드는 Reply 할때 이모티콘이 안보임.
      */
      // sEditBody = "<br><br>--- Original Message ---<br><br>" + sBody; /*! HTML모드 */
      bool bAttach = false;
      if ( ( mSendType == MemoPopupView::Reply ) && stConfig.replymemoattach )
            bAttach = true;
      else if ( ( mSendType == MemoPopupView::ReplyAll ) && stConfig.allreplymemoattach )
            bAttach = true;
      else if ( ( mSendType == MemoPopupView::Forward ) && stConfig.forwardmemoattach )
            bAttach = true;
  
      if ( bAttach )
      {
            QString sBody2(sBody);
            sBody2.replace("<br>", "\n");
            sEditBody = "\n\n--- Original Message ---\n\n" + sBody2; /*! Text 모드 */
            pMemo->setBody(sEditBody);
      }
      else
      {
            pMemo->setBody( QString::null );
      }
  
      pMemo->moveCursorHome();
      connect(pMemo, SIGNAL( sendMemo( MemoView* ) ), this, SLOT( slotSendMemo( MemoView* ) ) );
      connect(pMemo, SIGNAL( addBuddyList( AddBuddySelector* ) ), m_pMainView, SLOT( slotMemoAddBuddy(AddBuddySelector *) ) );
      pMemo->show();
}


Generated by  Doxygen 1.6.0   Back to index