]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/gui/favtabcontainer.cpp
refactoring of the TABS
[toast/confclerk.git] / src / gui / favtabcontainer.cpp
diff --git a/src/gui/favtabcontainer.cpp b/src/gui/favtabcontainer.cpp
new file mode 100644 (file)
index 0000000..4a8e98f
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * favtabcontainer.cpp
+ *
+ *  Created on: Jan 27, 2010
+ *      Author: maemo
+ */
+
+#include "favtabcontainer.h"
+
+FavTabContainer::FavTabContainer(QWidget *aParent) : TabContainer( aParent )
+{
+}
+
+void FavTabContainer::loadEvents( const QDate &aDate, const int aConferenceId )
+{
+    static_cast<EventModel*>(treeView->model())->loadFavEvents( aDate, aConferenceId );
+}
+
+void FavTabContainer::updateTreeViewModel(int aEventId)
+{
+    // requires special handling
+    // we need to reload favourites, because some favourite could be deleted
+    //static_cast<EventModel*>(favTreeView->model())->updateModel(aEventId);
+    QDate aStartDate = Conference::getById(AppSettings::confId()).start();
+    QDate aEndDate = Conference::getById(AppSettings::confId()).end();
+    dayNavigator->setDates(aStartDate, aEndDate);
+    updateTreeView( Conference::getById(AppSettings::confId()).start() );
+}