/*
* Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
#include "conflictdialogcontainer.h"
ConflictDialogContainer::ConflictDialogContainer(QWidget *aParent)
- : TabContainer( aParent )
-{
-}
+ : TabContainer( aParent ), mEventId(-1), mConferenceId(-1)
+{}
-void ConflictDialogContainer::loadEvents( const QDate &aDate, const int aConferenceId )
-{
- Q_UNUSED(aDate);
- static_cast<EventModel*>(treeView->model())->loadConflictEvents( mEventId, aConferenceId );
- dayNavigator->hide();
+void ConflictDialogContainer::setEventId(int aEventId, int conferenceId) {
+ mEventId = aEventId;
+ mConferenceId = conferenceId;
+ loadEvents();
}
-void ConflictDialogContainer::updateTreeView(const QDate &aDate)
-{
- TabContainer::updateTreeView(aDate);
+
+void ConflictDialogContainer::loadEvents() {
+ static_cast<EventModel*>(treeView->model())->loadConflictEvents(mEventId, mConferenceId);
treeView->setAllExpanded(true);
}
+
+void ConflictDialogContainer::loadEvents(const QDate &aDate, const int aConferenceId) {
+ Q_UNUSED(aDate);
+ Q_UNUSED(aConferenceId);
+ Q_ASSERT(aConferenceId == mConferenceId);
+ Q_ASSERT(mConferenceId > 0);
+ Q_ASSERT(mEventId > 0);
+ loadEvents();
+}
+
+