Example #1
0
QString UtenteExecutive::Ricercausername(DB& d,Username& x) const
{
    if (!d.findbool(x.login)) return "<font color='red'>Errore! Utente non presente</font>";
    Utente* s=d.find(x)->second;
    if (rete->is_in(s->un.login))
    {
        return"l'utente è tuo amico :) \n ecco il suo profilo: \n\nutente: "+s->un.login+ "\n"+s->info->visualizza()+s->rete->get_rete();
    }
    return "Ecco l'utente:\n"+s->info->visualizza()+ s->rete->get_rete();
}
Example #2
0
QString UtenteBusiness::Ricercausername(DB& d,Username& x) const
{
    if (!d.findbool(x.login)) return "<font color='red'>Errore! Utente non presente</font>";
    QString risposta="Ecco l'utente:\n";
    Utente* s=d.find(x)->second;
    if (rete->is_in(s->un.login))
        risposta+="l'utente è tuo amico :) \n ecco il suo profilo: \n\nutente: "+s->un.login+ "\n"+s->info->visualizza()+s->rete->get_rete();
    else
        risposta+=s->info->visualizza();
    return risposta;
}
Example #3
0
QString UtenteBasic::Ricercausername(DB &d, Username& x) const
{
    if (!d.findbool(x.login)) return "<font color='red'>Errore! Utente non presente</font>";
    QString risposta="";
    Utente* s=d.find(x)->second;
    if (rete->is_in(s->un.login))
    {
        risposta+="l'utente è tuo amico :) \n ecco il suo profilo: \n\n"+s->info->visualizza()+s->rete->get_rete();
    }
    else
    {
        risposta+=("Ecco l'utente:\n Nome: "+ (s->info->Nome)+"\n");
        risposta+=("Cognome: "+(s->info->Cognome)+"\n");
    }
    return risposta;
}
void  UtenteBusiness::userSearch(const DB& d, const Username& u, list<string>& l) const
{
    Utente* su = d.find(u);
    Utente::SearchFunctor sf(2);
    sf(su, l);
}
Example #5
0
void Rete::add(Username u, const DB& d) {
    if(d.find(u))
        net.append(u);
}