Exemplo n.º 1
0
void bec::ValidationMessagesBE::validation_message(const grt::Validator::Tag& tag, const grt::ObjectRef& obj, const std::string& msg, const int type)
{  
  switch (type)
  {
    case grt::NoErrorMsg:
    {
      if ("*" != tag)
      {
        // Clear all types with obj and tag. Argument @msg in this case holds tag value
        remove_messages(&_errors, obj, tag);
        remove_messages(&_warnings, obj, tag);
      }
      else
        clear();
      break;
    }
    case grt::ErrorMsg:
    {
      _errors.push_back(Message(msg, obj, tag));
      break;
    }
    case grt::WarningMsg:
    {
      _warnings.push_back(Message(msg, obj, tag));
      break;
    }
    default:
    {
      log_warning("Unhandled type in validation_message");
    }
  }

  tree_changed();
}
Exemplo n.º 2
0
void Render::set_model(Model *model)
{
  model->signal_tree_changed().connect (sigc::mem_fun(*this, &Render::tree_changed));
  tree_changed();
}