Changeset 6123b48 for src/mvc/event.cpp


Ignore:
Timestamp:
01/27/10 13:31:23 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
33b5c34
Parents:
1bcd66f
Message:

implemented 'links' in Event/EventDialog?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/event.cpp

    r1bcd66f r6123b48  
    125125}
    126126
     127QMap<QString,QString> Event::links() const
     128{
     129    QSqlQuery query;
     130    query.prepare("SELECT name,url FROM link WHERE xid_event = :id AND xid_conference = :conf");
     131    query.bindValue(":id", id());
     132    query.bindValue(":conf", conferenceId());
     133    query.exec();
     134    // TODO: handle qeury error
     135    //qDebug() << query.lastError();
     136
     137    QMap<QString,QString> links;
     138    while(query.next())
     139        links.insert(query.record().value("name").toString(), query.record().value("url").toString());
     140
     141    return links;
     142}
     143
    127144QList<int> Event::conflicts() const
    128145{
     
    232249}
    233250
     251void Event::setLinks(const QMap<QString,QString> &aLinks)
     252{
     253    Q_UNUSED(aLinks);
     254
     255    qWarning("WARINING: setLinks() is NOT IMPLEMENTED YET");
     256    // TODO: implement
     257}
     258
    234259QList<Event> Event::getSearchResultByDate(const QDate& date, int conferenceId, QString orderBy)
    235260{
Note: See TracChangeset for help on using the changeset viewer.