void CCaliData::VerifyContent(){ const int itemNum = m_CaliItems.size(); for (int i=0; i<itemNum; ++i) { if (!VertifyIsInterior(i)) //非内标,清除用户输入的内标含量 ClearContent(i); } }
void VideoSessionWidget::SessionStateChanged(Communication::VoiceSessionInterface::State new_state) { ClearContent(); main_view_visible_ = false; switch (new_state) { case Communication::VoiceSessionInterface::STATE_OPEN: { video_session_ui_.mainVerticalLayout->setAlignment(video_session_ui_.horizontalLayout, Qt::AlignTop); ShowVideoWidgets(); main_view_visible_ = true; video_session_ui_.connectionStatus->setText("Open"); break; } case Communication::VoiceSessionInterface::STATE_CLOSED: { video_session_ui_.mainVerticalLayout->insertSpacerItem(0, new QSpacerItem(1,1, QSizePolicy::Fixed, QSizePolicy::Expanding)); video_session_ui_.connectionStatus->setText("This coversation has been closed"); break; } case Communication::VoiceSessionInterface::STATE_ERROR: { QLabel *error_label = new QLabel(QString("Connection failed with reason %1").arg(video_session_->GetReason()),this); error_label->setAlignment(Qt::AlignCenter); video_session_ui_.infoBarFrame->hide(); video_session_ui_.mainVerticalLayout->insertSpacerItem(0, new QSpacerItem(1,1, QSizePolicy::Fixed, QSizePolicy::Expanding)); video_session_ui_.mainVerticalLayout->insertWidget(1, error_label); video_session_ui_.mainVerticalLayout->insertSpacerItem(2, new QSpacerItem(1,1, QSizePolicy::Fixed, QSizePolicy::Expanding)); break; } case Communication::VoiceSessionInterface::STATE_INITIALIZING: { video_session_ui_.mainVerticalLayout->setAlignment(video_session_ui_.horizontalLayout, Qt::AlignBottom); video_session_ui_.connectionStatus->setText("Initializing..."); break; } case Communication::VoiceSessionInterface::STATE_RINGING_LOCAL: { ShowConfirmationWidget(); video_session_ui_.connectionStatus->setText("Waiting for your confirmation..."); break; } case Communication::VoiceSessionInterface::STATE_RINGING_REMOTE: { video_session_ui_.connectionStatus->setText(QString("Waiting confirmation from %1").arg(his_name_)); break; } } }
void BlobBuffer::SetBlobContent(const unsigned char *BlobPtr,unsigned long nBlobLen) { if(nBlobLen>0) { //如果要增加的长度加上当前实际长度大于总缓冲大小的话 if(m_lBufferLen< m_lBlobLen+nBlobLen) IncreaseBufferSize(nBlobLen, false); ClearContent(); memcpy(m_BlobPtr,BlobPtr,nBlobLen); m_lBlobLen = nBlobLen; } else Clear(); }
/*---------------------------------------------------------------------------------------------------------------------- | Initializes the `id' data member to "GarliReader" and calls the FactoryDefaults member function to perform the | remaining initializations. The data member `'' is set to NULL so that memory will be allocated for it in | FactoryDefaults. */ GarliReader::GarliReader() { //none of these besides garliBlock are being used anymore taxa = NULL; trees = NULL; assumptions = NULL; distances = NULL; characters = NULL; data = NULL; next_command = NULL; garliBlock = NULL; ClearContent(); }
/*---------------------------------------------------------------------------------------------------------------------- | Closes `logf' if it is open and deletes memory allocated to `next_command'. */ GarliReader::~GarliReader() { //this is a little odd, since ClearContent will reallocate a few things, but //it also ensures that a bunch of other things are deleted ClearContent(); assert(next_command != NULL); delete [] next_command; if (logf_open) logf.close(); if(garliBlock != NULL){ Detach(garliBlock); delete garliBlock; garliBlock = NULL; } }
void BWindow_DollCommand::MySetup(Scene_Battle* _pScene){ /* WINDOWAREA frameArea( BWND_DOLLCOMMAND_X, BWND_DOLLCOMMAND_Y, BWND_DOLLCOMMAND_W, BWND_DOLLCOMMAND_H); WINDOWFONT font( g_font.hInfo, FONTSIZE_INFO, FONTSIZE_INFO+4, ALIGN_CENTER); Window_Selectable_Content content; SetContent(_T("攻撃"), 0, true); SetContent(_T("特技"), 1, true); SetContent(_T("防御"), 2, true); SetRowByContentSize(1); Window_Selectable::Setup_FixContentWidth( &g_wndSkins.skin[WNDSKIN_SIMPLE], frameArea, BWND_DOLLCOMMAND_W-32, 16, font); */ TCHAR commandStr[3][32] = { _T("攻撃"), _T("特技"), _T("防御") }; // 内容のセット SetColumnSize(1); SetPresetFont(PRESETFONT_INFO); SetPresetColor(PRESETCOLORSET_WHITE); align = ALIGN_CENTER; ClearContent(); for(int n=0; n<3; n++){ AddContent(commandStr[n], n); } // タイトルの指定(人形の名前で差し替えられる) SetTitle(_T("ダミー"), PRESETFONT_INFO); // 内容の適用 ApplyContent(); // 大きさの指定 SetWindowSizeByCentering( &g_wndSkins.skin[WNDSKIN_INVISIBLE], BWND_DOLLCOMMAND_X, BWND_DOLLCOMMAND_Y, BWND_DOLLCOMMAND_W, BWND_DOLLCOMMAND_H); // 情報を渡す SetVisible(true); pScene = _pScene; Refresh(); }
void Game::Reset() { ClearContent(&this->m_content); Texture* tilesetTexture = new Texture(this->m_graphics, "tilesets/global.png"); Texture* enemyTexture = new Texture(this->m_graphics, "sprites/goomba.png"); bool levelLoadSuccess = this->LoadLevel(tilesetTexture, enemyTexture); if (!levelLoadSuccess) this->m_gamestate = GameState::EXIT; else { this->m_leveltimer.Stop(); this->m_leveltimer.Start(400000); this->m_player->Reset(); this->m_player->SetX(1); this->camera.x = 0; this->camera.y = 0; this->m_player->SetY(SCREEN_HEIGHT - TILE_HEIGHT * 3); this->m_gamestate = GameState::PLAY; } }
ESSimpleRenderView::~ESSimpleRenderView(){ ClearContent(false); delete m_pRootLine; }
Content::~Content() { ClearContent(); }
VideoSessionWidget::~VideoSessionWidget() { ClearContent(); }
void VideoSessionWidget::CloseSession() { ClearContent(); video_session_->Close(); emit Closed(his_name_); }