Пример #1
0
void RoomScene::OnClick(void *arg)
{
  if (this->createRoomButton_ && (AirButton*)arg == this->createRoomButton_)
	  this->initCreateRoomScreen();
  else if (this->refreshButton_ && (AirButton*)arg == this->refreshButton_)
	  this->refreshRoomScreen();
  else if (this->cancelButton_ && (AirButton*)arg == this->cancelButton_)
	  this->removeCreateRoomScreen();
  else if (this->okButton_ && (AirButton*)arg == this->okButton_)
  {
	  if (this->newRoomTitle_->getString() != "")
		  this->addRoomScreen();
  }
  else
    {
      for (unsigned int i = 0; i < this->roomsButtons_.size(); ++i)
	{
	  if ((AirButton*) arg == this->roomsButtons_[i])
	    {
	      std::string tmpTitle(((AirButton*)arg)->GetText()->getString());
	      tmpTitle = tmpTitle.erase(tmpTitle.find_last_of(" ") ,tmpTitle.size()); 
	      dynamic_cast<IUiListener*>(ui_)->OnEvent(UiEvent::ONJOINROOM, (void*)tmpTitle.c_str());
	    }
	}
    }
}
Пример #2
0
void RoomScene::addRoomScreen()
{
	std::string tmpTitle(this->newRoomTitle_->GetText()->getString());

	dynamic_cast<IUiListener*>(ui_)->OnEvent(UiEvent::ONCREATEROOM, (void*)tmpTitle.c_str());
	dynamic_cast<IUiListener*>(ui_)->OnEvent(UiEvent::ONJOINROOM, (void*)tmpTitle.c_str());	
	this->removeCreateRoomScreen();
}
void CNcdNodeDisclaimer::InternalizeL( RReadStream& aStream )
    {
    DLTRACEIN((""));

    // Read the class id out from the stream since it's not read 
    // anywhere else
    aStream.ReadInt32L();
    
    // Take data to the temporary variables    
    
    HBufC* tmpTitle( NULL );
    HBufC* tmpBodyText( NULL );

    InternalizeDesL( tmpTitle, aStream );
    CleanupStack::PushL( tmpTitle );
    
    InternalizeDesL( tmpBodyText, aStream );
    CleanupStack::PushL( tmpBodyText );

    TBool tmpOptional = aStream.ReadInt32L();
    
    // We can be sure that enumerations can be converted to integer values.
    MNcdQuery::TSemantics tmpSemantics = 
        static_cast<MNcdQuery::TSemantics>(aStream.ReadInt32L());

    // Because there was enough memory and this function will not
    // leave anymore, we may safely insert new values into the
    // member variables.

    delete iBodyText;
    iBodyText = tmpBodyText;
    CleanupStack::Pop( tmpBodyText );

    delete iTitle;
    iTitle = tmpTitle;
    CleanupStack::Pop( tmpTitle );

    iOptional = tmpOptional;    
    iSemantics = tmpSemantics;
    

    DLTRACEOUT((""));
    }