void MultiListBox::_unwrapItem(MultiListItem* _item) { for (VectorColumnInfo::iterator item = mVectorColumnInfo.begin(); item != mVectorColumnInfo.end(); ++item) { if ((*item).item == _item) { if ((*item).button != nullptr) WidgetManager::getInstance().destroyWidget((*item).button); mVectorColumnInfo.erase(item); break; } } if (mVectorColumnInfo.empty()) { mSortColumnIndex = ITEM_NONE; mItemSelected = ITEM_NONE; } else { mSortColumnIndex = ITEM_NONE; mSortUp = true; sortList(); } updateColumns(); if (!mVectorColumnInfo.empty()) mVectorColumnInfo.back().list->setScrollVisible(true); }
void DataGridControl::onItemRemoved(unsigned int index) { m_listView.DeleteItem(index); if (m_listView.GetItemCount() == 0) { updateColumns(); } }
void MultiListBox::setSize(const IntSize& _size) { Base::setSize(_size); if (getUpdateByResize()) updateColumns(); }
void DataGridControl::setModel(IDataGridModelPtr model) { // Clean out any previous data while (m_listView.GetHeader().GetItemCount()) { m_listView.DeleteColumn(0); } m_listView.DeleteAllItems(); if (m_model) { m_model->disconnect(m_addSignalConnection); m_model->disconnect(m_removeSignalConnection); m_model->disconnect(m_clearSignalConnection); m_model->disconnect(m_updateSignalConnection); } m_model = model; if (m_model) { m_addSignalConnection = m_model->connectItemAdded(boost::bind(&DataGridControl::onItemAdded, this, _1)); m_removeSignalConnection = m_model->connectItemRemoved(boost::bind(&DataGridControl::onItemRemoved, this, _1)); m_clearSignalConnection = m_model->connectAllRemoved(boost::bind(&DataGridControl::onAllItemsRemoved, this)); m_updateSignalConnection = m_model->connectCollectionUpdated(boost::bind(&DataGridControl::onAllItemsUpdated, this)); } updateColumns(); m_listView.SetItemCountEx(m_model->getItemCount(), 0); }
void MultiListBox::setCoord(const IntCoord& _coord) { Base::setCoord(_coord); if (getUpdateByResize()) updateColumns(); }
void MultiListBox::insertColumnAt(size_t _column, const UString& _name, int _width, Any _data) { MYGUI_ASSERT_RANGE_INSERT(_column, mVectorColumnInfo.size(), "MultiListBox::insertColumnAt"); if (_column == ITEM_NONE) _column = mVectorColumnInfo.size(); createWidget<MultiListItem>("", IntCoord(), Align::Default); mVectorColumnInfo.back().width = _width; mVectorColumnInfo.back().sizeType = ResizingPolicy::Fixed; mVectorColumnInfo.back().name = _name; mVectorColumnInfo.back().data = _data; mVectorColumnInfo.back().button->setCaption(_name); if (_column == (mVectorColumnInfo.size() - 1)) { updateColumns(); mVectorColumnInfo.back().list->setScrollVisible(true); } else { _swapColumnsAt(_column, mVectorColumnInfo.size() - 1); } }
void DataGridControl::onItemAdded(unsigned int index) { if (m_listView.GetItemCount() == 0) { updateColumns(); } m_listView.InsertItem(index, LPSTR_TEXTCALLBACK); autosizeColumnsUseHeader(); }
void MultiListBox::setColumnNameAt(size_t _column, const UString& _name) { MYGUI_ASSERT_RANGE(_column, mVectorColumnInfo.size(), "MultiListBox::setColumnNameAt"); mVectorColumnInfo[_column].name = _name; // обновляем кэпшен сначала redrawButtons(); updateColumns(); }
void ColumnMappingCombobox::handleNotification(Dispatcher<std::vector<DatabaseColumn *> *> *oSource, std::vector<DatabaseColumn *> *oColumns) { UNUSED(oSource); std::vector<DatabaseColumn *> columns; if(oColumns == NULL) oColumns = &columns; updateColumns(*oColumns); }
void MultiList::deleteAllColumns() { WidgetManager & manager = WidgetManager::getInstance(); for (VectorColumnInfo::iterator iter=mVectorColumnInfo.begin(); iter!=mVectorColumnInfo.end(); ++iter) { manager.destroyWidget((*iter).button); manager.destroyWidget((*iter).list); } mVectorColumnInfo.clear(); mSortColumnIndex = ITEM_NONE; updateColumns(); }
void MultiListBox::_swapColumnsAt(size_t _index1, size_t _index2) { if (_index1 == _index2) return; mVectorColumnInfo[_index1].list->setScrollVisible(false); mVectorColumnInfo[_index2].list->setScrollVisible(false); std::swap(mVectorColumnInfo[_index1], mVectorColumnInfo[_index2]); updateColumns(); mVectorColumnInfo.back().list->setScrollVisible(true); }
void MultiListBox::initialiseOverride() { Base::initialiseOverride(); std::string skinButtonEmpty; if (isUserString("SkinButton")) mSkinButton = getUserString("SkinButton"); if (isUserString("SkinList")) mSkinList = getUserString("SkinList"); if (isUserString("SkinSeparator")) mSkinSeparator = getUserString("SkinSeparator"); if (isUserString("WidthSeparator")) mWidthSeparator = utility::parseValue<int>(getUserString("WidthSeparator")); // OBSOLETE if (isUserString("HeightButton")) mHeightButton = utility::parseValue<int>(getUserString("HeightButton")); if (mHeightButton < 0) mHeightButton = 0; ///@wskin_child{MultiListBox, Widget, HeaderPlace} Место для заголовков колонок. assignWidget(mHeaderPlace, "HeaderPlace"); ///@wskin_child{MultiListBox, Widget, Client} Клиентская зона. assignWidget(mClient, "Client"); if (mClient != nullptr) setWidgetClient(mClient); if (nullptr == mClient) mClient = this; ///@wskin_child{MultiListBox, Widget, Empty} Виджет для заголовка в месте где нет списков. assignWidget(mWidgetEmpty, "Empty"); if (mWidgetEmpty == nullptr) { if (isUserString("SkinButtonEmpty")) skinButtonEmpty = getUserString("SkinButtonEmpty"); if (!skinButtonEmpty.empty()) mWidgetEmpty = mClient->createWidget<Widget>(skinButtonEmpty, IntCoord(0, 0, mClient->getWidth(), getButtonHeight()), Align::Default); } if (getUpdateByResize()) updateColumns(); }
InterceptWidget::InterceptWidget(IntercepSource * source, QWidget *parent) : QWidget(parent), source(source) { currentBlockSource = NULL; currentGui = NULL; ui = new(std::nothrow) Ui::InterceptWidget; if (ui == NULL) { qFatal("Cannot allocate memory for Ui::InterceptWidget X{"); } ui->setupUi(this); packetsTable = new(std::nothrow) QTableView(this); if (packetsTable == NULL) { qFatal("Cannot allocate memory for QTableView X{"); } QAbstractItemModel *old = packetsTable->model(); model = source->getModel(); packetsTable->setModel(model); delete old; packetsTable->setSelectionMode(QAbstractItemView::ContiguousSelection); packetsTable->setSelectionBehavior(QAbstractItemView::SelectRows); packetsTable->verticalHeader()->setFont(RegularFont); packetsTable->horizontalHeader()->setFont(RegularFont); packetsTable->setColumnWidth(PayloadModel::TIMESPTAMP_COLUMN,TIMESTAMP_COLUMN_WIDTH); packetsTable->setColumnWidth(PayloadModel::DIRECTION_COLUMN,25); packetsTable->verticalHeader()->setDefaultSectionSize(20); #if QT_VERSION >= 0x050000 packetsTable->horizontalHeader()->setSectionsMovable( false ); #else packetsTable->horizontalHeader()->setMovable(true); #endif connect(packetsTable->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), SLOT(onCurrentSelectedChanged(QModelIndex,QModelIndex))); ui->listLayout->addWidget(packetsTable); updateColumns(); sourceChoices << CHOOSE_TEXT << UDP_EXTERNAL_SOURCE_TEXT << TCP_EXTERNAL_SOURCE_TEXT << RAW_TCP_SOURCE_TEXT; ui->blockSourceComboBox->addItems(sourceChoices); ui->blockSourceComboBox->setCurrentIndex(0); QStandardItem * item = qobject_cast<QStandardItemModel *>(ui->blockSourceComboBox->model())->item(0); item->setEnabled( false ); item->setTextAlignment(Qt::AlignCenter); item->setBackground(Qt::darkGray); item->setForeground(Qt::white); connect(ui->blockSourceComboBox, SIGNAL(currentIndexChanged(QString)), SLOT(onSourceChanged(QString))); }
// virtual BOOL LLPanelFriends::postBuild() { mFriendsList = getChild<LLScrollListCtrl>("friend_list"); mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT); mFriendsList->setMaximumSelectCallback(onMaximumSelect); mFriendsList->setCommitOnSelectionChange(TRUE); childSetCommitCallback("friend_list", onSelectName, this); childSetCommitCallback("buddy_group_combobox", onChangeContactGroup, this); childSetDoubleClickCallback("friend_list", onClickIM); // <dogmode> // Contact search and group system. // 09/05/2010 - Charley Levenque LLLineEditor* contact = getChild<LLLineEditor>("buddy_search_lineedit"); if (contact) { contact->setKeystrokeCallback(&onContactSearchKeystroke); } getChild<LLTextBox>("s_num")->setValue("0"); getChild<LLTextBox>("f_num")->setValue(llformat("%d", mFriendsList->getItemCount())); U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE; refreshNames(changed_mask); childSetAction("im_btn", onClickIM, this); childSetAction("assign_btn", onClickAssign, this); childSetAction("expand_collapse_btn", onClickExpand, this); childSetAction("profile_btn", onClickProfile, this); childSetAction("offer_teleport_btn", onClickOfferTeleport, this); childSetAction("pay_btn", onClickPay, this); childSetAction("add_btn", onClickAddFriend, this); childSetAction("remove_btn", onClickRemove, this); //childSetAction("export_btn", onClickExport, this); Making Dummy View -HgB //childSetAction("import_btn", onClickImport, this); Making Dummy View -HgB setDefaultBtn("im_btn"); updateFriends(LLFriendObserver::ADD); refreshUI(); // primary sort = online status, secondary sort = name mFriendsList->sortByColumn(std::string("friend_name"), TRUE); mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE); updateColumns(this); return TRUE; }
void k9astStreams::addTitle(k9DVDTitle *_title) { _k9TitleWidget *item=new _k9TitleWidget(m_streams,_title); item->setText(0,_title->getname()); for (int i=0; i < _title->getaudioStreamCount();i++) { new _k9StreamWidget(_title->getaudioStream(i),item); } for (int i=0;i <_title->getsubPictureCount();i++) { _k9StreamWidget *subtitle=new _k9StreamWidget(_title->getsubtitle(i),item); if (m_parent->destination()==dstAudio) subtitle->setHidden(true); } item->setExpanded(true); m_streams->sortItems(0,Qt::AscendingOrder); updateColumns(); }
// virtual BOOL LLPanelFriends::postBuild() { mFriendsList = getChild<LLScrollListCtrl>("friend_list"); mFriendsList->setCommitOnSelectionChange(TRUE); mFriendsList->setCommitCallback(onSelectName, this); //childSetCommitCallback("buddy_group_combobox", onChangeContactGroup, this); mFriendsList->setDoubleClickCallback(onClickIM, this); // <dogmode> // Contact search and group system. // 09/05/2010 - Charley Levenque LLFilterEditor* contact = getChild<LLFilterEditor>("buddy_search_lineedit"); if (contact) { contact->setCommitCallback(boost::bind(&LLPanelFriends::onContactFilterEdit, this, _2)); } getChild<LLTextBox>("s_num")->setValue("0"); getChild<LLTextBox>("f_num")->setValue(llformat("%d", mFriendsList->getItemCount())); U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE; refreshNames(changed_mask); childSetAction("im_btn", onClickIM, this); //childSetAction("assign_btn", onClickAssign, this); childSetAction("expand_collapse_btn", onClickExpand, this); childSetAction("profile_btn", onClickProfile, this); getChild<LLUICtrl>("offer_teleport_btn")->setCommitCallback(boost::bind(static_cast<void(*)(const uuid_vec_t&)>(LLAvatarActions::offerTeleport), boost::bind(&LLScrollListCtrl::getSelectedIDs, mFriendsList))); childSetAction("pay_btn", onClickPay, this); childSetAction("add_btn", onClickAddFriend, this); getChild<LLUICtrl>("remove_btn")->setCommitCallback(boost::bind(LLAvatarActions::removeFriendsDialog, boost::bind(&LLScrollListCtrl::getSelectedIDs, mFriendsList))); //childSetAction("export_btn", onClickExport, this); Making Dummy View -HgB //childSetAction("import_btn", onClickImport, this); Making Dummy View -HgB setDefaultBtn("im_btn"); updateFriends(LLFriendObserver::ADD); refreshUI(); // primary sort = online status, secondary sort = name mFriendsList->sortByColumn(std::string("friend_name"), TRUE); mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE); updateColumns(this); return TRUE; }
void MultiListBox::initialiseOverride() { Base::initialiseOverride(); std::string skinButtonEmpty; if (isUserString("SkinButton")) mSkinButton = getUserString("SkinButton"); if (isUserString("SkinList")) mSkinList = getUserString("SkinList"); if (isUserString("SkinSeparator")) mSkinSeparator = getUserString("SkinSeparator"); if (isUserString("WidthSeparator")) mWidthSeparator = utility::parseValue<int>(getUserString("WidthSeparator")); // OBSOLETE if (isUserString("HeightButton")) mHeightButton = utility::parseValue<int>(getUserString("HeightButton")); if (mHeightButton < 0) mHeightButton = 0; assignWidget(mHeaderPlace, "HeaderPlace"); assignWidget(mClient, "Client"); if (mClient != nullptr) setWidgetClient(mClient); if (nullptr == mClient) mClient = this; assignWidget(mWidgetEmpty, "Empty"); if (mWidgetEmpty == nullptr) { if (isUserString("SkinButtonEmpty")) skinButtonEmpty = getUserString("SkinButtonEmpty"); if (!skinButtonEmpty.empty()) mWidgetEmpty = mClient->createWidget<Widget>(skinButtonEmpty, IntCoord(0, 0, mClient->getWidth(), getButtonHeight()), Align::Default); } if (getUpdateByResize()) updateColumns(); }
void MultiListBox::_wrapItem(MultiListItem* _item) { // скрываем у крайнего скролл if (!mVectorColumnInfo.empty()) mVectorColumnInfo.back().list->setScrollVisible(false); else mSortColumnIndex = ITEM_NONE; ColumnInfo column; column.width = 0; column.sizeType = ResizingPolicy::Auto; column.item = _item; column.list = _item->createWidget<ListBox>(mSkinList, IntCoord(0, 0, _item->getWidth(), _item->getHeight()), Align::Stretch); column.list->eventListChangePosition += newDelegate(this, &MultiListBox::notifyListChangePosition); column.list->eventListMouseItemActivate += newDelegate(this, &MultiListBox::notifyListMouseItemActivate); column.list->eventListMouseItemFocus += newDelegate(this, &MultiListBox::notifyListChangeFocus); column.list->eventListChangeScroll += newDelegate(this, &MultiListBox::notifyListChangeScrollPosition); column.list->eventListSelectAccept += newDelegate(this, &MultiListBox::notifyListSelectAccept); if (mHeaderPlace != nullptr) column.button = mHeaderPlace->createWidget<Button>(mSkinButton, IntCoord(), Align::Default); else column.button = mClient->createWidget<Button>(mSkinButton, IntCoord(), Align::Default); //column.button->eventMouseButtonClick += newDelegate(this, &MultiListBox::notifyButtonClick); // если уже были столбики, то делаем то же колличество полей if (!mVectorColumnInfo.empty()) { size_t count = mVectorColumnInfo.front().list->getItemCount(); for (size_t pos = 0; pos < count; ++pos) column.list->addItem(""); } mVectorColumnInfo.push_back(column); updateColumns(); // показываем скролл нового крайнего mVectorColumnInfo.back().list->setScrollVisible(true); }
void MultiList::deleteColumn(size_t _column) { MYGUI_ASSERT(_column < mVectorColumnInfo.size(), "column " << _column <<" out of range"); ColumnInfo & info = mVectorColumnInfo[_column]; WidgetManager & manager = WidgetManager::getInstance(); manager.destroyWidget(info.button); manager.destroyWidget(info.list); mVectorColumnInfo.erase(mVectorColumnInfo.begin() + _column); if (mVectorColumnInfo.empty()) mSortColumnIndex = ITEM_NONE; else { mSortColumnIndex = 0; mSortUp = true; sortList(); } updateColumns(); }
void TransactionViewTable::resizeEvent(QResizeEvent *event) { QTableView::resizeEvent(event); updateColumns(); }
void MultiList::setColumnWidth(size_t _column, int _width) { MYGUI_ASSERT(_column < mVectorColumnInfo.size(), "column " << _column <<" out of range"); mVectorColumnInfo[_column].width = _width < 0 ? 0 : _width; updateColumns(); }
RegisterDialog::RegisterDialog(RegisterModel * pRegisterModel, QWidget *parent) : QDialog(parent), _pUi(new Ui::RegisterDialog) { _pUi->setupUi(this); _pRegisterModel = pRegisterModel; // Setup registerView _pUi->registerView->setModel(_pRegisterModel); _pUi->registerView->verticalHeader()->hide(); _pUi->registerView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); _pUi->registerView->horizontalHeader()->setStretchLastSection(true); // Select using click, shift and control _pUi->registerView->setSelectionBehavior(QAbstractItemView::SelectRows); _pUi->registerView->setSelectionMode(QAbstractItemView::ExtendedSelection); // Setup handler for buttons connect(_pUi->btnAdd, SIGNAL(released()), this, SLOT(addRegisterRow())); connect(_pUi->btnRemove, SIGNAL(released()), this, SLOT(removeRegisterRow())); connect(_pRegisterModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(updateColumns())); }
// static void LLPanelFriends::onClickExpand(void* user_data) { BOOL collapsed = gSavedSettings.getBOOL("ContactListCollapsed"); gSavedSettings.setBOOL("ContactListCollapsed", !collapsed); updateColumns(user_data); }
BOOL LLPanelNearByMedia::postBuild() { LLPanel::postBuild(); if(mStandalonePanel) { const S32 RESIZE_BAR_THICKNESS = 6; LLResizeBar::Params p; p.rect = LLRect(0, RESIZE_BAR_THICKNESS, getRect().getWidth(), 0); p.name = "resizebar_bottom"; p.min_size = getRect().getHeight(); p.side = LLResizeBar::BOTTOM; p.resizing_view = this; addChild( LLUICtrlFactory::create<LLResizeBar>(p) ); p.rect = LLRect( 0, getRect().getHeight(), RESIZE_BAR_THICKNESS, 0); p.name = "resizebar_left"; p.min_size = getRect().getWidth(); p.side = LLResizeBar::LEFT; addChild( LLUICtrlFactory::create<LLResizeBar>(p) ); LLResizeHandle::Params resize_handle_p; resize_handle_p.rect = LLRect( 0, RESIZE_HANDLE_HEIGHT, RESIZE_HANDLE_WIDTH, 0 ); resize_handle_p.mouse_opaque(false); resize_handle_p.min_width(getRect().getWidth()); resize_handle_p.min_height(getRect().getHeight()); resize_handle_p.corner(LLResizeHandle::LEFT_BOTTOM); addChild(LLUICtrlFactory::create<LLResizeHandle>(resize_handle_p)); } mNearbyMediaPanel = getChild<LLUICtrl>("nearby_media_panel"); mMediaList = getChild<LLScrollListCtrl>("media_list"); mEnableAllCtrl = getChild<LLUICtrl>("all_nearby_media_enable_btn"); mDisableAllCtrl = getChild<LLUICtrl>("all_nearby_media_disable_btn"); mShowCtrl = getChild<LLComboBox>("show_combo"); // Dynamic (selection-dependent) controls mStopCtrl = getChild<LLUICtrl>("stop"); mPlayCtrl = getChild<LLUICtrl>("play"); mPauseCtrl = getChild<LLUICtrl>("pause"); mMuteCtrl = getChild<LLUICtrl>("mute"); mVolumeSliderCtrl = getChild<LLUICtrl>("volume_slider_ctrl"); mZoomCtrl = getChild<LLUICtrl>("zoom"); mUnzoomCtrl = getChild<LLUICtrl>("unzoom"); mVolumeSlider = getChild<LLSlider>("volume_slider"); mMuteBtn = getChild<LLButton>("mute_btn"); mEmptyNameString = getString("empty_item_text"); mParcelMediaName = getString("parcel_media_name"); mParcelAudioName = getString("parcel_audio_name"); mPlayingString = getString("playing_suffix"); mMediaList->setDoubleClickCallback(onZoomMedia, this); mMediaList->sortByColumnIndex(PROXIMITY_COLUMN, TRUE); mMediaList->sortByColumnIndex(VISIBILITY_COLUMN, FALSE); refreshList(); updateControls(); updateColumns(); LLView* minimized_controls = getChildView("minimized_controls"); mMoreRect = getRect(); mLessRect = getRect(); mLessRect.mBottom = minimized_controls->getRect().mBottom; getChild<LLUICtrl>("more_btn")->setVisible(false); onMoreLess(); return TRUE; }
void DataGridControl::onAllItemsRemoved() { m_listView.DeleteAllItems(); updateColumns(); }
void MultiListBox::setColumnResizingPolicyAt(size_t _index, ResizingPolicy _value) { MYGUI_ASSERT_RANGE(_index, mVectorColumnInfo.size(), "MultiListBox::setColumnWidthAt"); mVectorColumnInfo[_index].sizeType = _value; updateColumns(); }
void ColumnMappingCombobox::setColumns(std::vector<DatabaseColumn *> const &oColumns) { updateColumns(oColumns); }
void TransactionViewTable::setModel(QAbstractItemModel *model) { QTableView::setModel(model); connect(model, SIGNAL(layoutChanged()), this, SLOT(updateColumns())); }
void LLPanelNearByMedia::refreshList() { bool all_items_deleted = false; if(!mMediaList) { // None of this makes any sense if the media list isn't there. return; } // Check whether the debug column has been shown/hidden. bool debug_info_visible = gSavedSettings.getBOOL("MediaPerformanceManagerDebug"); if(debug_info_visible != mDebugInfoVisible) { mDebugInfoVisible = debug_info_visible; // Clear all items so the list gets regenerated. mMediaList->deleteAllItems(); mParcelAudioItem = NULL; mParcelMediaItem = NULL; all_items_deleted = true; updateColumns(); } refreshParcelItems(); // Get the canonical list from LLViewerMedia LLViewerMedia::impl_list impls = LLViewerMedia::getPriorityList(); LLViewerMedia::impl_list::iterator priority_iter; U32 enabled_count = 0; U32 disabled_count = 0; // iterate over the impl list, creating rows as necessary. for(priority_iter = impls.begin(); priority_iter != impls.end(); priority_iter++) { LLViewerMediaImpl *impl = *priority_iter; // If we just emptied out the list, every flag needs to be reset. if(all_items_deleted) { impl->setInNearbyMediaList(false); } if (!impl->isParcelMedia()) { LLUUID media_id = impl->getMediaTextureID(); S32 proximity = impl->getProximity(); // This is expensive (i.e. a linear search) -- don't use it here. We now use mInNearbyMediaList instead. //S32 index = mMediaList->getItemIndex(media_id); if (proximity < 0 || !shouldShow(impl)) { if (impl->getInNearbyMediaList()) { // There's a row for this impl -- remove it. removeListItem(media_id); impl->setInNearbyMediaList(false); } } else { if (!impl->getInNearbyMediaList()) { // We don't have a row for this impl -- add one. addListItem(media_id); impl->setInNearbyMediaList(true); } } // Update counts if (impl->isMediaDisabled()) { disabled_count++; } else { enabled_count++; } } } mDisableAllCtrl->setEnabled((gSavedSettings.getBOOL("AudioStreamingMusic") || gSavedSettings.getBOOL("AudioStreamingMedia")) && (LLViewerMedia::isAnyMediaShowing() || LLViewerMedia::isParcelMediaPlaying() || LLViewerMedia::isParcelAudioPlaying())); mEnableAllCtrl->setEnabled( (gSavedSettings.getBOOL("AudioStreamingMusic") || gSavedSettings.getBOOL("AudioStreamingMedia")) && (disabled_count > 0 || // parcel media (if we have it, and it isn't playing, enable "start") (LLViewerMedia::hasParcelMedia() && ! LLViewerMedia::isParcelMediaPlaying()) || // parcel audio (if we have it, and it isn't playing, enable "start") (LLViewerMedia::hasParcelAudio() && ! LLViewerMedia::isParcelAudioPlaying()))); // Iterate over the rows in the control, updating ones whose impl exists, and deleting ones whose impl has gone away. std::vector<LLScrollListItem*> items = mMediaList->getAllData(); for (std::vector<LLScrollListItem*>::iterator item_it = items.begin(); item_it != items.end(); ++item_it) { LLScrollListItem* item = (*item_it); LLUUID row_id = item->getUUID(); if (row_id != PARCEL_MEDIA_LIST_ITEM_UUID && row_id != PARCEL_AUDIO_LIST_ITEM_UUID) { LLViewerMediaImpl* impl = LLViewerMedia::getMediaImplFromTextureID(row_id); if(impl) { updateListItem(item, impl); } else { // This item's impl has been deleted -- remove the row. // Removing the row won't throw off our iteration, since we have a local copy of the array. // We just need to make sure we don't access this item after the delete. removeListItem(row_id); } } } // Set the selection to whatever media impl the media focus/hover is on. // This is an experiment, and can be removed by ifdefing out these 4 lines. LLUUID media_target = LLViewerMediaFocus::getInstance()->getControlsMediaID(); if(media_target.notNull()) { mMediaList->selectByID(media_target); } }
void MultiListBox::setColumnWidthAt(size_t _column, int _width) { MYGUI_ASSERT_RANGE(_column, mVectorColumnInfo.size(), "MultiListBox::setColumnWidthAt"); mVectorColumnInfo[_column].width = _width; updateColumns(); }