当前位置: 首页>>代码示例>>C++>>正文


C++ ListItem类代码示例

本文整理汇总了C++中ListItem的典型用法代码示例。如果您正苦于以下问题:C++ ListItem类的具体用法?C++ ListItem怎么用?C++ ListItem使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ListItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: VERIFY

void TItemList::RenameItem(LPCSTR fn0, LPCSTR fn1, EItemType type)
{
	if (!OnItemRenameEvent.empty())	OnItemRenameEvent(fn0,fn1,type);
    if (type==TYPE_OBJECT){
        TElTreeItem* item0			= FHelper.FindObject(tvItems,fn0); 	VERIFY(item0);
        ListItem* prop				= (ListItem*)item0->Tag; 			VERIFY(prop);
		prop->SetName				(fn1);
        TElTreeItem* item1			= FHelper.FindObject(tvItems,fn1);
        if (item1) prop->item		= item1;
    }
}
开发者ID:NeoAnomaly,项目名称:xray,代码行数:11,代码来源:ItemList.cpp

示例2: VERIFY

void __fastcall TfrmEditLightAnim::OnItemFocused(TElTreeItem* item)
{
    if (item&&FHelper.IsObject(item)){
        ListItem* prop 			= (ListItem*)item->Tag; VERIFY(prop);
        AnsiString nm			= prop->Key();
		CLAItem* I  			= LALib.FindItem(nm.c_str());
        SetCurrentItem			(I,prop);
    }else{
        SetCurrentItem			(0,0);
    }
}
开发者ID:2asoft,项目名称:xray,代码行数:11,代码来源:EditLightAnim.cpp

示例3: isNewItemCheckable

bool ListModel::isNewItemCheckable(ListItem* parent, int row)
{
    if (row > 0) {
        ListItem* previous = parent->child(row - 1);
        if (previous)
            return previous->isCheckable();
    } else
        return parent->isProject() || parent->isMilestone();

    return false;
}
开发者ID:Pandahisham,项目名称:outliner,代码行数:11,代码来源:listmodel.cpp

示例4: out_of_range

int &List::getNthElement(int n) {
	if (currentSize >= n + 1 && n >= 0) {
		ListItem* tmp = first;
		for (int i = 0; i < n; i++) {
			tmp = tmp->getNext();
		}
		return tmp->getContent();
	}
	else
		throw std::out_of_range("List index out of range");
}
开发者ID:species-gh,项目名称:cpp-prak-tud-mm,代码行数:11,代码来源:List.cpp

示例5: ListItem

void ListBox::CreateItems()
{
    if (format_.fontPointSize() > 16.0)
	format_.setFontPointSize(16.0);

    for (size_t i = 0; i < data_.size(); i++)
    {
		ListItem* item = new ListItem(ctx_, data_[i], this);
		item->setFont(format_.font());
    }
    setMinimumSize(minimumSize().width(), sizeHint().height());
}
开发者ID:anandtrex,项目名称:imli-s60,代码行数:12,代码来源:ListBox.cpp

示例6: getText

const std::string& ComboBox::getItemText(int itemIndex) const
{
  if (itemIndex >= 0 && (size_t)itemIndex < m_items.size()) {
    ListItem* item = m_items[itemIndex];
    return item->getText();
  }
  else {
    // Returns the text of the combo-box (it should be empty).
    ASSERT(getText().empty());
    return getText();
  }
}
开发者ID:BlueHeisenberg,项目名称:aseprite,代码行数:12,代码来源:combobox.cpp

示例7: ListItem

void ListWidget::addItem(const std::string &content)
{
	ListItem* item = new ListItem();
	item->setText(content);
	item->setRelativePosition(computeItemPosition(items_.size()));
	item->setSize({this->getSize().x - SCROLLBAR_WIDTH, ITEM_HEIGHT});
	items_.push_back(std::unique_ptr<ListItem>(item));

	// If this is the first item, select it
	if(items_.size() == 1)
		selectItem(*item);
}
开发者ID:namelessvoid,项目名称:qrwar,代码行数:12,代码来源:listwidget.cpp

示例8: deleteLast

int List::deleteLast() {
	if (currentSize != 0) {
		int tmp = last->getContent();
		ListItem *del = last;
		last = del->getPrevious();
		delete del;
		currentSize--;
		return tmp;
	}
	else
		return 0;
}
开发者ID:species-gh,项目名称:cpp-prak-tud-mm,代码行数:12,代码来源:List.cpp

示例9: addItem

int List::addItem(std::vector< std::string >* values)
{
	ListItem tempItem; //Creating a tempororary item

	tempItem.create(colWidth, values, x, nextItemY);

	listItems->push_back(tempItem);

	nextItemY = nextItemY + rowHeight;

	return 0;
}
开发者ID:TheZoq2,项目名称:Silverheart,代码行数:12,代码来源:UI.cpp

示例10: SignalStop

void C4PortraitSelDlg::LoaderThread::Execute() {
  // list empty?
  if (!LoadItems.size()) {
    // then we're done!
    SignalStop();
    return;
  }
  // load one item at the time
  ListItem *pLoadItem = LoadItems.front();
  pLoadItem->Load();
  LoadItems.erase(LoadItems.begin());
}
开发者ID:ev1313,项目名称:yaC,代码行数:12,代码来源:C4FileSelDlg.cpp

示例11: ListItem

void NotesWidget::insertNewNote(QString guid, QString noteBook, QString title)
{
    ListItem* item = new ListItem(this);
    item->setText(title);
    item->setNoteBookGUID(noteBook);
    item->setIcon(QIcon::fromTheme("basket"));
    item->setGUID(guid);

    signalsDisabled = true;
    setCurrentItem(item);
    signalsDisabled = false;
}
开发者ID:MidoriYakumo,项目名称:hippo,代码行数:12,代码来源:noteswidget.cpp

示例12: deleteFirst

int List::deleteFirst() {
	if (currentSize != 0) {
		int tmp = first->getContent();
		ListItem *del = first;
		first = del->getNext();
		delete del;
		currentSize--;
		return tmp;
	}
	else
		return 0;
}
开发者ID:species-gh,项目名称:cpp-prak-tud-mm,代码行数:12,代码来源:List.cpp

示例13: CheckEvent

STDMETHODIMP OrxEvent::CheckEvent(LPCOLESTR Code, IDispatch **pbIDispatch)
{
    ListItem    *Current;
    ESource     *Content;
    HRESULT      RetCode=DISP_E_UNKNOWNNAME;
    int          i=0;
    size_t       CodeLen;
    RetCode = DISP_E_UNKNOWNNAME;


    if (!Code)
    {
        RetCode = E_POINTER;
    }
    else
    {
        CodeLen = wcslen(Code);
    }
    if (!pbIDispatch)
    {
        RetCode = E_POINTER;
    }
    else
    {
        *pbIDispatch = (IDispatch *)NULL;
    }
    if (RetCode == DISP_E_UNKNOWNNAME)
    {
        while (Current = EventSourceChain->FindItem(i++))
        {
            Content = (ESource *)Current->GetContent();
            if (Content->EventType == ESource::ParseProcedure)
            {
                if (CodeLen == Content->CodeLen)
                {
                    if (Content->Code)
                    {
                        if (wcsicmp(Code,Content->Code) == 0)
                        {
                            *pbIDispatch = (IDispatch *)Content;
                            RetCode = S_OK;
                            ((IDispatch*) Content)->AddRef();
                            break;
                        }
                    }
                }
            }
        }
    }
    FPRINTF2(logfile,"OrxEvent::CheckEvent() HRESULT %08x. \n",RetCode);
    return RetCode;
}
开发者ID:KlemensEngel,项目名称:oorexxforandroid,代码行数:52,代码来源:orxevents.cpp

示例14: setNoteSortType

void NotesWidget::setNoteSortType(qint8 type)
{
    sortType = type;

    for (int i = 0; i < count(); i++) {
        ListItem* item = reinterpret_cast<ListItem*>(this->item(i));
        item->setSortType(sortType);
    }

    sortItems();

    sql::updateSyncStatus("noteSortType", sortType);
}
开发者ID:MidoriYakumo,项目名称:hippo,代码行数:13,代码来源:noteswidget.cpp

示例15: getNoteWithGuid

ListItem* NotesWidget::getNoteWithGuid(QString guid)
{
    ListItem* item = reinterpret_cast<ListItem*>(this->currentItem());
    if ((item != NULL) && (item->getGUID() == guid))
        return item;

    for (int i = 0; i < count(); i++) {
        ListItem* item = reinterpret_cast<ListItem*>(this->item(i));
        if (item->getGUID() == guid) {
            return item;
        }
    }
    return NULL;
}
开发者ID:MidoriYakumo,项目名称:hippo,代码行数:14,代码来源:noteswidget.cpp


注:本文中的ListItem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。