X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/blobdiff_plain/264f5e7c10f4122bf10c126e00d7ef39f03515eb..080dc7d603d45ba0662aa731418993ddd45b5fe8:/src/gui/conflictdialogcontainer.cpp diff --git a/src/gui/conflictdialogcontainer.cpp b/src/gui/conflictdialogcontainer.cpp index 2149c6b..ba55d97 100644 --- a/src/gui/conflictdialogcontainer.cpp +++ b/src/gui/conflictdialogcontainer.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2010 Ixonos Plc. - * Copyright (C) 2011 Philipp Spitzer, gregor herrmann + * Copyright (C) 2011-2024 Philipp Spitzer, gregor herrmann, Stefan Stahl * * This file is part of ConfClerk. * @@ -21,20 +21,30 @@ #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(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(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(); +} + +