void View::removeAllSubviews() { for(const ViewPtr& view: subviews) { removeSubview(view); } }
void CATextSelViewEx::hideTextViewMark() { for (int i = 0; i < m_pTextViewMask.size(); i++) { removeSubview(m_pTextViewMask[i]); } m_pTextViewMask.clear(); }
void View::bringSubviewToFront(const ViewPtr& view) { auto pos = find(subviews.begin(), subviews.end(), view); if(pos != subviews.end()) { removeSubview(view); addSubview(view); } }
void PlayerSetupDialog::setupUI() { connect(ui->addPlayerBtn, SIGNAL(clicked()), this, SLOT(newPlayer())); connect(ui->removePlayerBtn, SIGNAL(clicked()), this, SLOT(removePlayer())); connect(ui->newSubviewBtn, SIGNAL(clicked()), this, SLOT(newSubview())); connect(ui->delSubviewBtn, SIGNAL(clicked()), this, SLOT(removeSubview())); connect(ui->testConnectionBtn, SIGNAL(clicked()), this, SLOT(testConnection())); connect(ui->connectBtn, SIGNAL(clicked()), this, SLOT(connectPlayer())); connect(ui->autoconnectBox, SIGNAL(toggled(bool)), this, SLOT(autoconBoxChanged(bool))); connect(ui->playerListview, SIGNAL(activated(const QModelIndex &)), this, SLOT(playerSelected(const QModelIndex &))); connect(ui->playerListview, SIGNAL(clicked(const QModelIndex &)), this, SLOT(playerSelected(const QModelIndex &))); connect(ui->subviewListview, SIGNAL(activated(const QModelIndex &)), this, SLOT(subviewSelected(const QModelIndex &))); connect(ui->subviewListview, SIGNAL(clicked(const QModelIndex &)), this, SLOT(subviewSelected(const QModelIndex &))); connect(ui->aphaMaskBrowseBtn, SIGNAL(clicked()), this, SLOT(alphamaskBrowse())); connect(ui->keyTLx, SIGNAL(valueChanged(int)), this, SLOT(subviewTopLeftXChanged(int))); connect(ui->keyTLy, SIGNAL(valueChanged(int)), this, SLOT(subviewTopLeftYChanged(int))); connect(ui->keyTRx, SIGNAL(valueChanged(int)), this, SLOT(subviewTopRightXChanged(int))); connect(ui->keyTRy, SIGNAL(valueChanged(int)), this, SLOT(subviewTopRightYChanged(int))); connect(ui->keyBLx, SIGNAL(valueChanged(int)), this, SLOT(subviewBottomLeftXChanged(int))); connect(ui->keyBLy, SIGNAL(valueChanged(int)), this, SLOT(subviewBottomLeftYChanged(int))); connect(ui->keyBRx, SIGNAL(valueChanged(int)), this, SLOT(subviewBottomRightXChanged(int))); connect(ui->keyBRy, SIGNAL(valueChanged(int)), this, SLOT(subviewBottomRightYChanged(int))); connect(ui->outputX, SIGNAL(valueChanged(int)), this, SLOT(screenXChanged(int))); connect(ui->outputY, SIGNAL(valueChanged(int)), this, SLOT(screenYChanged(int))); connect(ui->outputWidth, SIGNAL(valueChanged(int)), this, SLOT(screenWChanged(int))); connect(ui->outputHeight, SIGNAL(valueChanged(int)), this, SLOT(screenHChanged(int))); connect(ui->viewportX, SIGNAL(valueChanged(int)), this, SLOT(viewportXChanged(int))); connect(ui->viewportY, SIGNAL(valueChanged(int)), this, SLOT(viewportYChanged(int))); connect(ui->viewportWidth, SIGNAL(valueChanged(int)), this, SLOT(viewportWChanged(int))); connect(ui->viewportHeight, SIGNAL(valueChanged(int)), this, SLOT(viewportHChanged(int))); connect(ui->optIgnoreAR, SIGNAL(toggled(bool)), this, SLOT(ignoreArBoxChanged(bool))); connect(ui->aphaMaskBrowseBtn, SIGNAL(clicked()), this, SLOT(alphamaskBrowse())); connect(ui->alphaMaskFile, SIGNAL(textChanged(QString)), this, SLOT(showAlphaMaskPreview(QString))); connect(ui->brightnessResetBtn, SIGNAL(clicked()), this, SLOT(brightReset())); connect(ui->contrastResetBtn, SIGNAL(clicked()), this, SLOT(contReset())); connect(ui->hueResetBtn, SIGNAL(clicked()), this, SLOT(hueReset())); connect(ui->saturationResetBtn, SIGNAL(clicked()), this, SLOT(satReset())); }
void CAAlertView::setCtrlImage(CAScale9ImageView*& pImageView, CAImage* image) { if (pImageView) { removeSubview(pImageView); } CC_SAFE_DELETE(pImageView); pImageView = new CAScale9ImageView(); CC_RETURN_IF(pImageView == NULL); if (!pImageView->initWithImage(image)) { CC_SAFE_DELETE(pImageView); return; } addSubview(pImageView); }
void CABatchView::removeSubviewAtIndex(unsigned int uIndex) { removeSubview(m_obSubviews.at(uIndex)); }
void CABatchView::removeSubviewAtIndex(unsigned int uIndex) { removeSubview((CAView*)(m_pSubviews->objectAtIndex(uIndex))); }