SUBDIRS = orm mvc sql gui app
maemo : SUBDIRS += alarm
#SUBDIRS += test
-CONFIG += ordered
+CONFIG += ordered debug
connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateDayView(const QDate &)));
+
// DAY EVENTS View
dayTreeView->setHeaderHidden(true);
dayTreeView->setRootIsDecorated(false);
int confId = 1;
dayNavigator->setDates(Conference::getById(confId).start(),Conference::getById(confId).end());
}
+
+ connect(static_cast<EventModel*>(dayTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavView()));
+ connect(static_cast<EventModel*>(favTreeView->model()), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(updateFavView()));
}
MainWindow::~MainWindow()
dayNavigator->show();
}
+void MainWindow::updateFavView()
+{
+ int confId = 1;
+ static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId);
+ favTreeView->reset();
+ updateDayView(Conference::getById(confId).start());
+}
void showParsingProgress(int aStatus);
void aboutApp();
void updateDayView(const QDate &aDate);
+ void updateFavView();
private:
SqlEngine *mSqlEngine;
ScheduleXmlParser *mXmlParser;
public:
static Event getById(int id, int conferenceId);
- static Event getVirtualById(int id, int conferenceId);
static QList<Event> getByDate(const QDate& date, int conferenceId);
static QList<Event> getFavByDate(const QDate& date, int conferenceId); // get Favourities by Date
if (index.isValid() && role == Qt::DisplayRole)
{
if (index.internalId() == 0)
- { //range of time data
- //qDebug() << qVariantValue<QString>(mGroups.at(index.row()).mTitle);
+ {
return mGroups.at(index.row()).mTitle;
}
else //event data
{
- //qDebug() << qVariantValue<QString>(static_cast<Event*>(index.internalPointer())->id());
- //return static_cast<Event*>(index.internalPointer())->id();
- //qDebug() << Event::getVirtualById(static_cast<Event*>(index.internalPointer())->id(), 1).title();// Id Conference is 1 by now
- //return 1;
return static_cast<Event*>(index.internalPointer())->id();
}
}
#include <QTreeView>
+
class TreeView : public QTreeView
{
public: