本文整理汇总了C++中Entries::isIn方法的典型用法代码示例。如果您正苦于以下问题:C++ Entries::isIn方法的具体用法?C++ Entries::isIn怎么用?C++ Entries::isIn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entries
的用法示例。
在下文中一共展示了Entries::isIn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: accept
void DefineEntry::accept()
{
#ifdef DEBUG
qDebug("DefineEntry::accpet()");
#endif
if (!EntryProperties->count())
{
QMessageBox::warning(this, "No properties", "Please, define some entry's\nproperties", 0, 0, 0);
return;
}
if (EntryName->text() == "")
{
QMessageBox::warning(this, "No entry name", "Please, define entry name", 0, 0, 0);
return;
}
Entries *entries = IQApp->entries();
Entry *entry;
if (editEntry)
{
if (EntryName->text() != editEntry->getName() && entries->isIn(EntryName->text()))
{
QMessageBox::warning(this, "Entry exists", "Entry with such name\nexists. Please, choose another.", 0, 0, 0);
return;
}
entry = editEntry;
entry->clear();
entry->setName(EntryName->text());
}
else if ((entry = entries->isIn(EntryName->text())))
{
QMessageBox::warning(this, "Entry exists", "Entry with such name\nexists. Please, choose another.", 0, 0, 0);
return;
}
else
entry = new Entry(EntryName->text());
for (uint i = 0; true; i++)
{
PropertyBoxItem *pbi;
if ((pbi = static_cast<PropertyBoxItem *>(EntryProperties->item(i))))
{
entry->addProperty(new PropertyStruct(pbi));
}
else
break;
}
entry->setDefaultPic(defaultPic);
if (!editEntry)
entries->addEntry(entry);
entry->checkPropertiesID();
DefineEntryBase::accept();
}