Ignore:
Timestamp:
01/13/10 14:27:33 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
969a840
Parents:
c2d66b2
Message:

implemented 'conference' record for accessing info about the conference

  • events are loaded from the first day of the conference
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sql/sqlengine.cpp

    rc2d66b2 r69393c0  
    6868                         .arg(aConference["venue"]) \
    6969                         .arg(aConference["city"]) \
    70                          .arg(aConference["start"]) \
    71                          .arg(aConference["end"]) \
     70                         .arg(QDateTime(QDate::fromString(aConference["start"],DATE_FORMAT)).toTime_t()) \
     71                         .arg(QDateTime(QDate::fromString(aConference["end"],DATE_FORMAT)).toTime_t()) \
    7272                         .arg(aConference["days"]) \
    73                          .arg(aConference["day_change"]) \
    74                          .arg(aConference["timeslot_duration"]);
     73                         .arg(-QTime::fromString(aConference["day_change"],TIME_FORMAT).secsTo(QTime(0,0))) \
     74                         .arg(-QTime::fromString(aConference["timeslot_duration"],TIME_FORMAT).secsTo(QTime(0,0)));
    7575
    7676        QString query = QString("INSERT INTO CONFERENCE (id,title,subtitle,venue,city,start,end,days,day_change,timeslot_duration) VALUES (%1)").arg(values);
     
    9090        // The items of the Event are divided into the two tables EVENT and VIRTUAL_EVENT
    9191        // VIRTUAL_EVENT is for Full-Text-Serach Support
    92         QTime duration = QTime::fromString(aEvent["duration"],TIME_FORMAT);
    9392        QDateTime startDateTime = QDateTime(QDate::fromString(aEvent["date"],DATE_FORMAT),QTime::fromString(aEvent["start"],TIME_FORMAT));
    9493        QString values = QString("'%1', '%2', '%3', '%4', '%5', '%6', '%7'") \
     
    9695                         .arg(aEvent["id"]) \
    9796                         .arg(QString::number(startDateTime.toTime_t())) \
    98                          .arg(QString::number(duration.hour()*3600 + duration.minute()*60 + duration.second())) \
     97                         .arg(-QTime::fromString(aEvent["duration"],TIME_FORMAT).secsTo(QTime(0,0))) \
    9998                         .arg("123456") \
    10099                         .arg(aEvent["type"]) \
     
    201200            venue VARCHAR, \
    202201            city VARCHAR NOT NULL , \
    203             start DATETIME NOT NULL , \
    204             end DATETIME NOT NULL , \
     202            start INTEGER NOT NULL , \
     203            end INTEGER NOT NULL , \
    205204            days INTEGER, \
    206             day_change DATETIME, \
    207             timeslot_duration DATETIME)");
     205            day_change INTEGER, \
     206            timeslot_duration INTEGER)");
    208207
    209208        query.exec("CREATE TABLE ACTIVITY ( \
Note: See TracChangeset for help on using the changeset viewer.