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

void KNateon::slotShowMemoPopup (  )  [private, slot]

쪽지 팝업띄우기

쪽지 받음 소리

0: Online, 1: incoming chat, 2: incoming memo

Definition at line 5636 of file knateon.cpp.

References SQLiteDB::getNewMemoCount(), nmconfig::memorecievesoundpath, pSQLiteDB, slotClickMessageBoxPopup(), KNateonMainview::slotUpdateMemoCount(), sPicsPath, nmconfig::usememorecievesound, and nmconfig::usesound.

Referenced by connected().

{
      if ( pSQLiteDB->getNewMemoCount() > 0)
      {
            if ( !pMemoPopup)
            {
                  pMemoPopup= new PopupWindow();
                  connect(pMemoPopup, SIGNAL( clickText( int, QString ) ), SLOT( slotClickMessageBoxPopup(int, QString ) ) );
                  connect(pMemoPopup, SIGNAL( hidePopup() ), SLOT( slotHidePopup() ) );
            }
            /*!
             * 쪽지 받음 소리
             */
            if ( stConfig.usesound && stConfig.usememorecievesound )
                  Sound::play( stConfig.memorecievesoundpath );
  
            QPoint point = systemTrayWidget_->mapToGlobal( systemTrayWidget_->pos() );
            int nX = point.x();

            int screen = kapp->desktop()->screenNumber();
            QRect screenSize = kapp->desktop()->availableGeometry(screen);

            int nY = screenSize.height() + screenSize.top();
            
            QString sMsg;
            sMsg = UTF8( "새로운 쪽지가 " );
            sMsg += QString::number( pSQLiteDB->getNewMemoCount() );
            sMsg += UTF8( "개 도착했습니다." );
            pMemoPopup->setText( sMsg );
  
            pMemoPopup->setAnchor( QPoint(nX, nY) );
            pMemoPopup->setLogo( sPicsPath + "popup_notice_memo.bmp" );
  
            /*! 0: Online, 1: incoming chat, 2: incoming memo */
            pMemoPopup->setType(2);
            pMemoPopup->show();
            nPopupY++;
  
            // emit updateMemoCount( pSQLiteDB->getNewMemoCount() );
            m_pMainView->slotUpdateMemoCount( pSQLiteDB->getNewMemoCount() );
      }
}


Generated by  Doxygen 1.6.0   Back to index