added 'Conference' tab - to list conference details
authorpavelpa <pavelpa@localhost>
Thu, 21 Jan 2010 18:23:23 +0000 (18:23 +0000)
committerpavelpa <pavelpa@localhost>
Thu, 21 Jan 2010 18:23:23 +0000 (18:23 +0000)
 - implemented AppSettings for storing Application settings
   - stored conference ID

src/app/app.pro
src/gui/alarmdialog.cpp
src/gui/eventdialog.cpp
src/gui/gui.pro
src/gui/mainwindow.cpp
src/gui/mainwindow.ui
src/sql/schedulexmlparser.cpp

index 71f91d4..6b1ea4c 100644 (file)
@@ -16,7 +16,10 @@ maemo {
     TARGETDEPS += $$DESTDIR/libqalarm.a
 }
 
-SOURCES += main.cpp
+SOURCES += main.cpp \
+           appsettings.cpp
+
+HEADERS += appsettings.h
 
 RESOURCES += ../icons.qrc \
              ../maps.qrc
index 01595f5..a834225 100644 (file)
@@ -1,4 +1,5 @@
 #include "alarmdialog.h"
+#include <appsettings.h>
 
 #include <QApplication>
 #include <alarm.h>
@@ -9,8 +10,6 @@
 
 const int SNOOZE_TIME = 5; // in minutes
 
-const int confId = 1;
-
 AlarmDialog::AlarmDialog(int argc, char *argv[], QWidget *aParent)
     : QDialog(aParent)
     , mEventId(0)
@@ -47,7 +46,7 @@ AlarmDialog::AlarmDialog(int argc, char *argv[], QWidget *aParent)
     QString roomStr;
     try
     {
-        Event event = Event::getById(mEventId,confId);
+        Event event = Event::getById(mEventId,AppSettings::confId());
         titleStr = "Event alarm";
         messageStr = event.title();
         timeStr = event.start().toString("hh:mm") + "-" + event.start().addSecs(event.duration()).toString("hh:mm");
@@ -89,7 +88,7 @@ void AlarmDialog::closeDialog()
     // before closing the dialog, it is necessary to remove alarm flag from the DB
     try
     {
-        Event event = Event::getById(mEventId,confId);
+        Event event = Event::getById(mEventId,AppSettings::confId());
         event.setHasAlarm(false);
         event.update("alarm");
     }
index 74d170c..df67695 100644 (file)
@@ -1,4 +1,5 @@
 #include "eventdialog.h"
+#include <appsettings.h>
 
 #include <QScrollBar>
 
@@ -12,8 +13,7 @@ EventDialog::EventDialog(const int &aEventId, QWidget *aParent)
     showFullScreen();
 #endif
 
-    const int confId = 1;
-    Event event = Event::getById(aEventId,confId);
+    Event event = Event::getById(aEventId,AppSettings::confId());
 
     //abstract->setStyleSheet("background-color : transparent;");
     //description->setStyleSheet("background-color : transparent;");
index 2f5abf9..12237c4 100644 (file)
@@ -7,7 +7,7 @@ QT += sql xml
 
 # module dependencies
 LIBS += -L$$DESTDIR -lmvc -lorm -lsql
-INCLUDEPATH += ../orm ../mvc ../sql
+INCLUDEPATH += ../orm ../mvc ../sql ../app
 DEPENDPATH += . ../orm ../mvc ../sql
 TARGETDEPS += $$DESTDIR/liborm.a $$DESTDIR/libmvc.a $$DESTDIR/libsql.a
 maemo {
index 97f1716..7fa5c64 100644 (file)
@@ -1,4 +1,5 @@
 #include "mainwindow.h"
+#include <appsettings.h>
 
 #include <QTreeView>
 #include <QDirModel>
 #include "importscheduledialog.h"
 #include "mapwindow.h"
 
-
-const int confId = 1;
-
 MainWindow::MainWindow(int aEventId, QWidget *aParent)
     : QMainWindow(aParent)
 {
     setupUi(this);
 
+    // TODO: conference ID should be assigned based on actual data in the DB
+    // for testing only
+    AppSettings::setConfId(1);
+
     // connect Menu actions
     connect(actionImportSchedule, SIGNAL(triggered()), SLOT(importSchedule()));
     connect(actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
@@ -61,7 +63,7 @@ MainWindow::MainWindow(int aEventId, QWidget *aParent)
     favTreeView->setModel(new EventModel());
     favTreeView->setItemDelegate(new Delegate(favTreeView));
 
-    //ACTIVITIES View
+    // TRACKS View
     trackTreeView->setHeaderHidden(true);
     trackTreeView->setRootIsDecorated(false);
     trackTreeView->setIndentation(0);
@@ -98,7 +100,7 @@ MainWindow::MainWindow(int aEventId, QWidget *aParent)
     // TESTING: load some 'fav' data
     if(Conference::getAll().count()) // no conference(s) in the DB
     {
-        static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId);
+        static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(AppSettings::confId()).start(),AppSettings::confId());
         favTreeView->reset();
     }
 
@@ -109,12 +111,20 @@ MainWindow::MainWindow(int aEventId, QWidget *aParent)
     }
     else
     {
-        QDate aStartDate = Conference::getById(confId).start();
-        QDate aEndDate = Conference::getById(confId).end();
+        QDate aStartDate = Conference::getById(AppSettings::confId()).start();
+        QDate aEndDate = Conference::getById(AppSettings::confId()).end();
         dayNavigator->setDates(aStartDate, aEndDate);
         trackDayNavigator->setDates(aStartDate, aEndDate);
         favouriteDayNavigator->setDates(aStartDate, aEndDate);
         searchDayNavigator->setDates(aStartDate, aEndDate);
+        //
+        conferenceTitle->setText(Conference::getById(AppSettings::confId()).title());
+        conferenceSubtitle->setText(Conference::getById(AppSettings::confId()).subtitle());
+        conferenceWhere->setText(Conference::getById(AppSettings::confId()).city() + ", " + Conference::getById(AppSettings::confId()).venue());
+        conferenceWhen->setText(
+                Conference::getById(AppSettings::confId()).start().toString("dd-MM-yyyy")
+                + ", " +
+                Conference::getById(AppSettings::confId()).end().toString("dd-MM-yyyy"));
     }
 
     connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateTab(int)));
@@ -153,8 +163,8 @@ void MainWindow::importSchedule()
     if(Conference::getAll().count())
     {
         // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates
-        QDate aStartDate = Conference::getById(confId).start();
-        QDate aEndDate = Conference::getById(confId).end();
+        QDate aStartDate = Conference::getById(AppSettings::confId()).start();
+        QDate aEndDate = Conference::getById(AppSettings::confId()).end();
         dayNavigator->setDates(aStartDate, aEndDate);
         //update activity map
         Track::updateTrackMap();
@@ -172,7 +182,7 @@ void MainWindow::aboutApp()
 
 void MainWindow::updateDayView(const QDate &aDate)
 {
-    static_cast<EventModel*>(dayTreeView->model())->loadEvents(aDate,confId);
+    static_cast<EventModel*>(dayTreeView->model())->loadEvents(aDate,AppSettings::confId());
     dayTreeView->reset();
     dayNavigator->show();
 }
@@ -210,14 +220,14 @@ void MainWindow::updateTab(const int aIndex)
 
 void MainWindow::updateTracksView(const QDate &aDate)
 {
-    static_cast<EventModel*>(trackTreeView->model())->loadEventsByTrack(aDate, confId);
+    static_cast<EventModel*>(trackTreeView->model())->loadEventsByTrack(aDate, AppSettings::confId());
     trackTreeView->reset();
     trackDayNavigator->show();
 }
 
 void MainWindow::updateFavouritesView(const QDate &aDate)
 {
-    static_cast<EventModel*>(favTreeView->model())->loadFavEvents(aDate,confId);
+    static_cast<EventModel*>(favTreeView->model())->loadFavEvents(aDate,AppSettings::confId());
     favTreeView->reset();
     favouriteDayNavigator->show();
 }
@@ -225,7 +235,7 @@ void MainWindow::updateFavouritesView(const QDate &aDate)
 void MainWindow::updateSearchView(const QDate &aDate)
 {
     searchTreeView->reset();
-    int eventsCount = static_cast<EventModel*>(searchTreeView->model())->loadSearchResultEvents(aDate,confId);
+    int eventsCount = static_cast<EventModel*>(searchTreeView->model())->loadSearchResultEvents(aDate,AppSettings::confId());
     if( eventsCount ){
         searchDayNavigator->show();
         searchTreeView->show();
@@ -276,14 +286,17 @@ void MainWindow::searchClicked()
     if( searchAbstract->isChecked() )
         columns.append( "abstract" );
 
-    mSqlEngine->searchEvent( confId, columns, searchEdit->text() );
-    updateSearchView( Conference::getById(confId).start() );
+    mSqlEngine->searchEvent( AppSettings::confId(), columns, searchEdit->text() );
+    updateSearchView( Conference::getById(AppSettings::confId()).start() );
 }
 
 void MainWindow::displayWarning(const QModelIndex &aIndex)
 {
+    Q_UNUSED(aIndex);
+
     QMessageBox::warning(
     this,
     tr("Time Conflict Warning"),
     tr("This event happens at the same time than another one of your favourites.") );
 }
+
index 4760cfa..548d021 100644 (file)
@@ -23,7 +23,7 @@
     <item row="0" column="0" >
      <widget class="QTabWidget" name="tabWidget" >
       <property name="currentIndex" >
-       <number>0</number>
+       <number>5</number>
       </property>
       <widget class="QWidget" name="dayViewTab" >
        <attribute name="title" >
@@ -66,7 +66,7 @@
         </item>
        </layout>
       </widget>
-      <widget class="QWidget" name="activitiesTab" >
+      <widget class="QWidget" name="tracksTab" >
        <attribute name="title" >
         <string>Tracks</string>
        </attribute>
         </item>
        </layout>
       </widget>
-      <widget class="QWidget" name="searchTab">
-       <attribute name="title">
+      <widget class="QWidget" name="searchTab" >
+       <attribute name="title" >
         <string>Search</string>
        </attribute>
-       <layout class="QVBoxLayout" name="verticalLayout_3">
+       <layout class="QVBoxLayout" name="verticalLayout_3" >
         <item>
-         <layout class="QFormLayout" name="searchHeadLayout">
-          <property name="fieldGrowthPolicy">
+         <layout class="QFormLayout" name="searchHeadLayout" >
+          <property name="fieldGrowthPolicy" >
            <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
           </property>
-          <item row="0" column="0">
-           <widget class="QCheckBox" name="searchTitle">
-            <property name="text">
+          <item row="0" column="0" >
+           <widget class="QCheckBox" name="searchTitle" >
+            <property name="text" >
              <string>Title</string>
             </property>
            </widget>
           </item>
-          <item row="0" column="1">
-           <layout class="QHBoxLayout" name="horizontalLayout">
+          <item row="0" column="1" >
+           <layout class="QHBoxLayout" name="horizontalLayout" >
             <item>
-             <widget class="QLineEdit" name="searchEdit">
-              <property name="enabled">
+             <widget class="QLineEdit" name="searchEdit" >
+              <property name="enabled" >
                <bool>true</bool>
               </property>
-              <property name="toolTip">
+              <property name="toolTip" >
                <string>type a keyword to search</string>
               </property>
              </widget>
             </item>
             <item>
-             <widget class="QPushButton" name="searchButton">
-              <property name="text">
+             <widget class="QPushButton" name="searchButton" >
+              <property name="text" >
                <string>Search</string>
               </property>
-              <property name="checkable">
+              <property name="checkable" >
                <bool>false</bool>
               </property>
-              <property name="autoDefault">
+              <property name="autoDefault" >
                <bool>false</bool>
               </property>
-              <property name="default">
+              <property name="default" >
                <bool>true</bool>
               </property>
-              <property name="flat">
+              <property name="flat" >
                <bool>false</bool>
               </property>
              </widget>
             </item>
            </layout>
           </item>
-          <item row="1" column="0">
-           <widget class="QCheckBox" name="searchAbstract">
-            <property name="text">
+          <item row="1" column="0" >
+           <widget class="QCheckBox" name="searchAbstract" >
+            <property name="text" >
              <string>Abstract</string>
             </property>
            </widget>
          </layout>
         </item>
         <item>
-         <layout class="QHBoxLayout" name="searchDayNavigatorHorizontalLayout">
+         <layout class="QHBoxLayout" name="searchDayNavigatorHorizontalLayout" >
           <item>
-           <spacer name="horizontalSpacer_2">
-            <property name="orientation">
+           <spacer name="horizontalSpacer_2" >
+            <property name="orientation" >
              <enum>Qt::Horizontal</enum>
             </property>
-            <property name="sizeHint" stdset="0">
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>40</width>
               <height>20</height>
            </spacer>
           </item>
           <item>
-           <widget class="DayNavigatorWidget" name="searchDayNavigator" native="true">
-            <property name="maximumSize">
+           <widget class="DayNavigatorWidget" native="1" name="searchDayNavigator" >
+            <property name="maximumSize" >
              <size>
               <width>16777215</width>
               <height>16777215</height>
            </widget>
           </item>
           <item>
-           <spacer name="horizontalSpacer">
-            <property name="orientation">
+           <spacer name="horizontalSpacer" >
+            <property name="orientation" >
              <enum>Qt::Horizontal</enum>
             </property>
-            <property name="sizeHint" stdset="0">
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>40</width>
               <height>20</height>
          </layout>
         </item>
         <item>
-         <widget class="TreeView" name="searchTreeView">
-          <property name="maximumSize">
+         <widget class="TreeView" name="searchTreeView" >
+          <property name="maximumSize" >
            <size>
             <width>16777215</width>
             <height>16777215</height>
         <string>Map</string>
        </attribute>
       </widget>
+      <widget class="QWidget" name="conferenceTab" >
+       <attribute name="title" >
+        <string>Conference</string>
+       </attribute>
+       <layout class="QGridLayout" name="gridLayout_5" >
+        <item row="0" column="0" >
+         <layout class="QVBoxLayout" name="verticalLayout_4" >
+          <item>
+           <widget class="QLabel" name="conferenceTitle" >
+            <property name="font" >
+             <font>
+              <weight>75</weight>
+              <bold>true</bold>
+             </font>
+            </property>
+            <property name="text" >
+             <string>Conference Name</string>
+            </property>
+            <property name="alignment" >
+             <set>Qt::AlignCenter</set>
+            </property>
+            <property name="wordWrap" >
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLabel" name="conferenceSubtitle" >
+            <property name="text" >
+             <string>Conference Subtitle</string>
+            </property>
+            <property name="alignment" >
+             <set>Qt::AlignCenter</set>
+            </property>
+            <property name="wordWrap" >
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="Line" name="line" >
+            <property name="orientation" >
+             <enum>Qt::Horizontal</enum>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <layout class="QGridLayout" name="gridLayout_6" >
+            <item row="0" column="0" >
+             <widget class="QLabel" name="label" >
+              <property name="text" >
+               <string>When:</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="0" >
+             <widget class="QLabel" name="label_2" >
+              <property name="text" >
+               <string>Where:</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1" >
+             <widget class="QLabel" name="conferenceWhen" >
+              <property name="text" >
+               <string>DATE (FROM - TO)</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1" >
+             <widget class="QLabel" name="conferenceWhere" >
+              <property name="text" >
+               <string>CITY, CAMPUS</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="2" >
+             <widget class="QPushButton" name="showMapButton" >
+              <property name="text" >
+               <string>MAP</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="3" >
+             <spacer name="horizontalSpacer_3" >
+              <property name="orientation" >
+               <enum>Qt::Horizontal</enum>
+              </property>
+              <property name="sizeHint" stdset="0" >
+               <size>
+                <width>40</width>
+                <height>20</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <spacer name="verticalSpacer" >
+            <property name="orientation" >
+             <enum>Qt::Vertical</enum>
+            </property>
+            <property name="sizeHint" stdset="0" >
+             <size>
+              <width>20</width>
+              <height>40</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </widget>
      </widget>
     </item>
    </layout>
index 6b7308f..db74630 100644 (file)
@@ -1,96 +1,96 @@
-\r
-#include <QDomDocument>\r
-#include <QHash>\r
-\r
-#include "schedulexmlparser.h"\r
-#include "sqlengine.h"\r
-\r
-#include <QDebug>\r
-\r
-ScheduleXmlParser::ScheduleXmlParser(QObject *aParent)\r
-    : QObject(aParent)\r
-{\r
-}\r
-\r
-void ScheduleXmlParser::parseData(const QByteArray &aData, SqlEngine *aDBEngine)\r
-{\r
-    Q_ASSERT(NULL != aDBEngine);\r
-\r
-    QDomDocument document;\r
-    document.setContent (aData, false);\r
-\r
-    QDomElement scheduleElement = document.firstChildElement("schedule");\r
-\r
-    if (!scheduleElement.isNull())\r
-    {\r
-        // TODO: assign conferenceID based on eg. title\r
-        int conferenceID = 1; // HARD-WIRED for now to '1' - only one Conference\r
-\r
-        QDomElement conferenceElement = scheduleElement.firstChildElement("conference");\r
-        if (!conferenceElement.isNull())\r
-        {\r
-            QHash<QString,QString> conference;\r
-            conference["id"] = QString::number(conferenceID,10);\r
-            conference["title"] = conferenceElement.firstChildElement("title").text();\r
-            conference["subtitle"] = conferenceElement.firstChildElement("subtitle").text();\r
-            conference["venue"] = conferenceElement.firstChildElement("venue").text();\r
-            conference["city"] = conferenceElement.firstChildElement("city").text();\r
-            conference["start"] = conferenceElement.firstChildElement("start").text(); // date\r
-            conference["end"] = conferenceElement.firstChildElement("end").text(); // date\r
-            conference["days"] = conferenceElement.firstChildElement("days").text(); // int\r
-            conference["day_change"] = conferenceElement.firstChildElement("day_change").text(); // time\r
-            conference["timeslot_duration"] = conferenceElement.firstChildElement("timeslot_duration").text(); // time\r
-            aDBEngine->addConferenceToDB(conference);\r
-        }\r
-\r
-        // we need to get count of all events in order to emit 'progressStatus' signal\r
-        int totalEventsCount = scheduleElement.elementsByTagName("event").count();\r
-\r
-        // parsing day elements\r
-        int currentEvent = 0; // hold global idx of processed event\r
-        QDomNodeList dayList = scheduleElement.elementsByTagName("day");\r
-        for (int i=0; i<dayList.count(); i++)\r
-        {\r
-            QDomElement dayElement = dayList.at(i).toElement();\r
-            //QDate dayDate = QDate::fromString(dayElement.attribute("date"),DATE_FORMAT);\r
-            //int dayIndex = dayElement.attribute("index").toInt();\r
-\r
-            // parsing room elements\r
-            QDomNodeList roomList = dayElement.elementsByTagName("room");\r
-            for (int i=0; i<roomList.count(); i++)\r
-            {\r
-                QDomElement roomElement = roomList.at(i).toElement();\r
-                // roomElement has to be 'Element' and it has to have 'name' attribute\r
-                // TODO: 'event' has also 'room' node, so it can be unstable if that node has also 'name' attribute\r
-                if(roomElement.hasAttribute("name"))\r
-                {\r
-                    // parsing event elements\r
-                    QDomNodeList eventList = roomElement.elementsByTagName("event");\r
-                    for (int i=0; i<eventList.count(); i++)\r
-                    {\r
-                        currentEvent++;\r
-                        QDomElement eventElement = eventList.at(i).toElement();\r
-\r
-                        // now we have all info to create ROOM/EVENT_ROOM record(s)\r
-                        QHash<QString,QString> room;\r
-                        room["name"] = roomElement.attribute("name");\r
-                        room["event_id"] = eventElement.attribute("id");\r
-                        room["conference_id"] = QString::number(conferenceID,10);\r
-                        room["picture"] = "NOT DEFINED YET"; // TODO: implement some mapping to assign correct picture to specified room_name\r
-                        aDBEngine->addRoomToDB(room);\r
-\r
-                        // process event's nodes\r
+
+#include <QDomDocument>
+#include <QHash>
+
+#include "schedulexmlparser.h"
+#include "sqlengine.h"
+
+#include <QDebug>
+
+ScheduleXmlParser::ScheduleXmlParser(QObject *aParent)
+    : QObject(aParent)
+{
+}
+
+void ScheduleXmlParser::parseData(const QByteArray &aData, SqlEngine *aDBEngine)
+{
+    Q_ASSERT(NULL != aDBEngine);
+
+    QDomDocument document;
+    document.setContent (aData, false);
+
+    QDomElement scheduleElement = document.firstChildElement("schedule");
+
+    if (!scheduleElement.isNull())
+    {
+        // TODO: assign conferenceID based on eg. title
+        int conferenceID = 1; // HARD-WIRED for now to '1' - only one Conference
+
+        QDomElement conferenceElement = scheduleElement.firstChildElement("conference");
+        if (!conferenceElement.isNull())
+        {
+            QHash<QString,QString> conference;
+            conference["id"] = QString::number(conferenceID,10);
+            conference["title"] = conferenceElement.firstChildElement("title").text();
+            conference["subtitle"] = conferenceElement.firstChildElement("subtitle").text();
+            conference["venue"] = conferenceElement.firstChildElement("venue").text();
+            conference["city"] = conferenceElement.firstChildElement("city").text();
+            conference["start"] = conferenceElement.firstChildElement("start").text(); // date
+            conference["end"] = conferenceElement.firstChildElement("end").text(); // date
+            conference["days"] = conferenceElement.firstChildElement("days").text(); // int
+            conference["day_change"] = conferenceElement.firstChildElement("day_change").text(); // time
+            conference["timeslot_duration"] = conferenceElement.firstChildElement("timeslot_duration").text(); // time
+            aDBEngine->addConferenceToDB(conference);
+        }
+
+        // we need to get count of all events in order to emit 'progressStatus' signal
+        int totalEventsCount = scheduleElement.elementsByTagName("event").count();
+
+        // parsing day elements
+        int currentEvent = 0; // hold global idx of processed event
+        QDomNodeList dayList = scheduleElement.elementsByTagName("day");
+        for (int i=0; i<dayList.count(); i++)
+        {
+            QDomElement dayElement = dayList.at(i).toElement();
+            //QDate dayDate = QDate::fromString(dayElement.attribute("date"),DATE_FORMAT);
+            //int dayIndex = dayElement.attribute("index").toInt();
+
+            // parsing room elements
+            QDomNodeList roomList = dayElement.elementsByTagName("room");
+            for (int i=0; i<roomList.count(); i++)
+            {
+                QDomElement roomElement = roomList.at(i).toElement();
+                // roomElement has to be 'Element' and it has to have 'name' attribute
+                // TODO: 'event' has also 'room' node, so it can be unstable if that node has also 'name' attribute
+                if(roomElement.hasAttribute("name"))
+                {
+                    // parsing event elements
+                    QDomNodeList eventList = roomElement.elementsByTagName("event");
+                    for (int i=0; i<eventList.count(); i++)
+                    {
+                        currentEvent++;
+                        QDomElement eventElement = eventList.at(i).toElement();
+
+                        // now we have all info to create ROOM/EVENT_ROOM record(s)
+                        QHash<QString,QString> room;
+                        room["name"] = roomElement.attribute("name");
+                        room["event_id"] = eventElement.attribute("id");
+                        room["conference_id"] = QString::number(conferenceID,10);
+                        room["picture"] = "NOT DEFINED YET"; // TODO: implement some mapping to assign correct picture to specified room_name
+                        aDBEngine->addRoomToDB(room);
+
+                        // process event's nodes
                         QHash<QString,QString> event;
                         event["id"] = eventElement.attribute("id");;
                         event["conference_id"] = QString::number(conferenceID, 10);
-                        event["start"] = eventElement.firstChildElement("start").text(); // time eg. 10:00\r
+                        event["start"] = eventElement.firstChildElement("start").text(); // time eg. 10:00
                         event["date"] = dayElement.attribute("date"); // date eg. 2009-02-07
                         event["duration"] = eventElement.firstChildElement("duration").text(); // time eg. 00:30
                         event["room_name"] = eventElement.firstChildElement("room").text(); // string eg. "Janson"
                         event["tag"] = eventElement.firstChildElement("tag").text(); // string eg. "welcome"
                         event["title"] = eventElement.firstChildElement("title").text(); // string eg. "Welcome"
                         event["subtitle"] = eventElement.firstChildElement("subtitle").text(); // string
-                        event["track"] = eventElement.firstChildElement("track").text(); // string eg. "Keynotes"\r
+                        event["track"] = eventElement.firstChildElement("track").text(); // string eg. "Keynotes"
                         event["type"] = eventElement.firstChildElement("type").text(); // string eg. "Podium"
                         event["language"] = eventElement.firstChildElement("language").text(); // language eg. "English"
                         event["abstract"] = eventElement.firstChildElement("abstract").text(); // string
@@ -122,11 +122,11 @@ void ScheduleXmlParser::parseData(const QByteArray &aData, SqlEngine *aDBEngine)
                         }
                         // emit signal to inform the user about the current status (how many events are parsed so far - expressed in %)
                         int status = currentEvent * 100 / totalEventsCount;
-                        progressStatus(status);\r
-                    } // parsing event elements\r
-                }\r
-            } // parsing room elements\r
-        } // parsing day elements\r
-    } // schedule element\r
-}\r
-\r
+                        progressStatus(status);
+                    } // parsing event elements
+                }
+            } // parsing room elements
+        } // parsing day elements
+    } // schedule element
+}
+