]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/gui/conflictdialogcontainer.cpp
The conflict editor works again.
[toast/confclerk.git] / src / gui / conflictdialogcontainer.cpp
index 2149c6b6a18a3bcab1ee5fe9933358fd98891921..c04bc3e4980bbd89d7079ecb5e3c9f3f8d7bbe8c 100644 (file)
 #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 );
+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_ASSERT(aConferenceId == mConferenceId);
+    Q_ASSERT(mConferenceId > 0);
+    Q_ASSERT(mEventId > 0);
+    loadEvents();
+}
+
+