int ThingTypeTreeView::selectedType() { wxDataViewItem item = GetSelection(); if (item.IsOk()) return typeNumber(item); else return -1; }
void ThingTypeTreeView::showType(int type) { // Go through item groups for (unsigned a = 0; a < groups.size(); a++) { // Go through group items for (int b = 0; b < GetChildCount(groups[a].item); b++) { wxDataViewItem item = GetNthChild(groups[a].item, b); // Select+show if match if (typeNumber(item) == type) { Select(item); EnsureVisible(item); return; } } } }
std::string OplsAtomTyper::typeString(const chemkit::Atom *atom) const { return QString::number(typeNumber(atom)).toStdString(); }
std::string OplsAtomTyper::typeString(const chemkit::Atom *atom) const { return boost::lexical_cast<std::string>(typeNumber(atom)); }