예제 #1
0
bec::IconId bec::ValidationMessagesBE::get_field_icon(const bec::NodeId &node, ColumnId column, IconSize)
{
  bec::IconId icon_id = _info_icon;
  
  if (column == bec::ValidationMessagesBE::Description)
  {
    const MessageList::size_type idx = node.end();

    if (idx < _errors.size())
      icon_id = _error_icon;
    else
      icon_id = _warning_icon;
  }
  
  return icon_id;
}
예제 #2
0
bool bec::ValidationMessagesBE::get_field(const bec::NodeId &node, ColumnId column, std::string &value)
{
  bool ret = false;
  if (column == bec::ValidationMessagesBE::Description)
  {
    const MessageList::size_type idx = node.end();
  
    if (idx < _errors.size())
      value = _errors[idx].msg;
    else
      value = _warnings[idx].msg;

    ret = true;
  }
  
  return ret;
}