Exemplo n.º 1
0
FbTextElement::TypeList::const_iterator FbTextElement::subtype(const TypeList &list, const QString &style)
{
    for (TypeList::const_iterator item = list.begin(); item != list.end(); item++) {
        if (item->name() == style) return item;
    }
    return list.end();
}
Exemplo n.º 2
0
FbTextElement::Sublist::Sublist(const TypeList &list, const QString &name)
    : m_list(list)
    , m_pos(list.begin())
{
    TypeList::const_iterator empty = list.end();
    while (m_pos != list.end()) {
        if (m_pos->name() == name) break;
        if (m_pos->name().isEmpty()) empty = m_pos;
        m_pos++;
    }
    if (m_pos == list.end()) m_pos = empty;
}
Exemplo n.º 3
0
QString Address::typeLabel() const
{
  QString label;
  bool first = true;

  const TypeList list = typeList();

  TypeList::ConstIterator it;
  for ( it = list.begin(); it != list.end(); ++it ) {
    if ( ( type() & (*it) ) && ( (*it) != Pref ) ) {
      label.append( ( first ? "" : "/" ) + typeLabel( *it ) );
      if ( first )
        first = false;
    }
  }

  return label;
}