Ejemplo n.º 1
0
bool Film::operator == (const Film& f)
{
    return ((this->AbstractMedia::operator ==(f)) &&
            (getRealisateur() == f.getRealisateur()) &&
            (getScenariste() == f.getScenariste()) &&
            (getActeursPrincipaux() == f.getActeursPrincipaux()) &&
            (getType() == f.getType()) &&
            (getDuree() == f.getDuree()) &&
            (getSupport() == f.getSupport()));
}
Ejemplo n.º 2
0
QString Evenement1j::toString() const
{
    std::stringstream ss;
    ss << "<html><body><h2 align=\"center\" >" << getSujet().toStdString() << "</h2>";
    ss << "<table align=\"center\" cellpadding=\"8\" >";
    ss << "<tr><td>Date :</td><td> " << getDate().toString().toStdString()<< "</td></tr>";
    ss << "<tr><td>Horaire :</td><td> " << getHoraire().toString().toStdString()<< "</td></tr>";
    ss << "<tr><td>Durée :</td><td> " << getDuree() << "</td></tr>";
    ss << "</table></body></html>";
    return ss.str().c_str();
}
Ejemplo n.º 3
0
void Evenement1j::toXml(QXmlStreamWriter &s) const
{
    s.writeStartElement("evenement1j");
    s.writeTextElement("date",Evenement::getDate().toString(Qt::ISODate));
    s.writeTextElement("horaire",Evenement::getHoraire().toString(Qt::ISODate));
    QString str;
    str.setNum(getDuree().getDureeEnMinutes());
    s.writeTextElement("duree",str);
    s.writeTextElement("sujet",EvenementTrad::getSujet());
    s.writeEndElement();
}
Ejemplo n.º 4
0
void Rdv::toXml(QXmlStreamWriter &s) const
{
    s.writeStartElement("rdv");
    s.writeTextElement("date",Evenement::getDate().toString(Qt::ISODate));
    s.writeTextElement("horaire",Evenement::getHoraire().toString(Qt::ISODate));
    QString str;
    str.setNum(getDuree().getDureeEnMinutes());
    s.writeTextElement("duree",str);
    s.writeTextElement("sujet",EvenementTrad::getSujet());
    s.writeTextElement("lieu",lieu);
    s.writeStartElement("personnes");
    for(const_personnes_iterator it = begin_personnes(); it!= end_personnes() ; ++it)
        s.writeTextElement("personne",(*it));
    s.writeEndElement();
    s.writeEndElement();
}
Ejemplo n.º 5
0
QString Rdv::toString() const
{
    std::stringstream ss;
    ss << "<html><body><h2 align=\"center\" >" << getSujet().toStdString() << "</h2>";
    ss << "<table align=\"center\" cellpadding=\"8\" >";

    ss << "<tr><td>Date :</td><td> " << getDate().toString().toStdString()<< "</td></tr>";
    ss << "<tr><td>Horaire :</td><td> " << getHoraire().toString().toStdString()<< "</td></tr>";
    ss << "<tr><td>Durée :</td><td> " << getDuree() << "</td></tr>";
    ss << "<tr><td>Lieu :</td><td> " << getLieu().toStdString() << "</td></tr>";
    ss << "<tr><td>Participants :</td><td> "     << "</td></tr>";
    for(std::vector<QString>::const_iterator it = personnes.begin(); it != personnes.end(); ++it)
        ss << (*it).toStdString() << "<br>";
    ss << "</td></tr>";
    ss << "</table></body></html>";
    return ss.str().c_str();
}
Ejemplo n.º 6
0
void Film::sauvegarde(QXmlStreamWriter & stream)
{
    qDebug()<<"Sauvegade de "<<nom();
    stream.writeStartElement("media");
    stream.writeTextElement("nom", nom());
    stream.writeTextElement("genre", genre());
    stream.writeTextElement("date", date().toString("d/M/yyyy"));
    stream.writeTextElement("vue", QString::number(isFini()));
    stream.writeTextElement("url", url().toString());
    stream.writeTextElement("type", getType());
    stream.writeTextElement("realisateur", getRealisateur());
    stream.writeTextElement("scenariste", getScenariste());
    stream.writeTextElement("support", QString::number(getSupport()));
    stream.writeTextElement("duree", getDuree().toString());

    foreach(QString jupiter, getActeursPrincipaux())
    {
        stream.writeTextElement("acteur", jupiter);
    }
Ejemplo n.º 7
0
bool Element::estDansIntervalle(const Date& dateProg, const Horaire& horaireProg, unsigned int pourcentage) const{
    if( ( dateProg>=dateDebut || (dateProg==dateDebut && horaireProg >= horaireDebut) )
          && ( ( (dateFin-dateProg)*24*60+(horaireFin-horaireProg)-( (int(pourcentage) * int(getDuree().getDureeEnMinutes()) )/100) ) >= 0) ){
        return true;
    }
    return false;
}