Changeset 9208bdb


Ignore:
Timestamp:
01/19/10 21:58:29 (12 years ago)
Author:
korrco <korrco@…>
Branches:
master, qt5
Children:
1fe2f21
Parents:
395d6d3
Message:

support for view activities with their names added

Location:
src
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    r395d6d3 r9208bdb  
    77#include <schedulexmlparser.h>
    88
     9#include <activity.h>
    910#include <eventmodel.h>
    1011#include <delegate.h>
     
    3839    connect(mXmlParser, SIGNAL(progressStatus(int)), this, SLOT(showParsingProgress(int)));
    3940    statusBar()->showMessage(tr("Ready"));
     41
     42    //create activity map
     43    Activity::updateActivityMap();
    4044
    4145    connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateDayView(const QDate &)));
     
    136140        activityDayNavigator->setDates(aStartDate, aEndDate);
    137141    }
     142    //update activity map
     143    Activity::updateActivityMap();
    138144}
    139145
     
    179185    case 2: //index 2 of tabWidget: activitiesTab
    180186        {
    181             static_cast<EventModel*>(actTreeView->model())->loadEventsByActivities(Conference::getById(confId).start(),confId);
     187            static_cast<EventModel*>(actTreeView->model())->loadEventsByActivities(Conference::getById(confId).start(), confId);
    182188            actTreeView->reset();
    183189            activityDayNavigator->show();
     
    193199void MainWindow::updateActivitiesDayView(const QDate &aDate)
    194200{
    195     static_cast<EventModel*>(actTreeView->model())->loadEventsByActivities(aDate,confId);
     201    static_cast<EventModel*>(actTreeView->model())->loadEventsByActivities(aDate, confId);
    196202    actTreeView->reset();
    197203    activityDayNavigator->show();
     
    235241    window.exec();
    236242}
    237 
  • src/mvc/eventmodel.cpp

    r395d6d3 r9208bdb  
    11#include "eventmodel.h"
    22#include <conference.h>
     3#include <activity.h>
    34
    45EventModel::EventModel()
     
    5152    }
    5253    int activityId = mEvents.first().activityId();
    53     //TODO korinpa: get activity name
    54     mGroups << EventModel::Group(QString("activity %1").arg(activityId), 0);
     54
     55    mGroups << EventModel::Group(Activity::getActivityName(activityId), 0);
    5556    int nextActivityId = activityId;
    5657
     
    6162        {
    6263            mGroups.last().mChildCount = i - mGroups.last().mFirstEventIndex;
    63             mGroups << EventModel::Group(QString("activity %1").arg(activityId), 0);
    64             //int nextActivityId = activityId;
     64            mGroups << EventModel::Group(Activity::getActivityName(activityId), i);
     65            nextActivityId = activityId;
    6566        }
    6667        // add parent-child relation
  • src/mvc/mvc.pro

    r395d6d3 r9208bdb  
    77
    88# module dependencies
    9 LIBS += -L$$DESTDIR -lorm
     9LIBS += -L$$DESTDIR \
     10    -lorm
    1011INCLUDEPATH += ../orm
    11 DEPENDPATH += . ../orm
     12DEPENDPATH += . \
     13    ../orm
    1214TARGETDEPS += $$DESTDIR/liborm.a
    13 maemo {
    14     LIBS += -L$$DESTDIR -lqalarm -lalarm
     15maemo {
     16    LIBS += -L$$DESTDIR \
     17        -lqalarm \
     18        -lalarm
    1519    INCLUDEPATH += ../alarm
    16     DEPENDPATH +=  ../alarm
     20    DEPENDPATH += ../alarm
    1721    TARGETDEPS += $$DESTDIR/libqalarm.a
    1822}
    19 
    20 HEADERS += \
     23HEADERS += activity.h \
    2124    event.h \
    2225    conference.h \
     
    2427    eventmodel.h \
    2528    treeview.h
    26 SOURCES += \
     29SOURCES += activity.cpp \
    2730    event.cpp \
    2831    conference.cpp \
     
    3033    eventmodel.cpp \
    3134    treeview.cpp
    32 
Note: See TracChangeset for help on using the changeset viewer.