X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/blobdiff_plain/6df32f20316aab78c979f50ff17798cc6dd7e9e0..080dc7d603d45ba0662aa731418993ddd45b5fe8:/src/mvc/conferencemodel.h diff --git a/src/mvc/conferencemodel.h b/src/mvc/conferencemodel.h index c46c1ae..1e8f77d 100644 --- a/src/mvc/conferencemodel.h +++ b/src/mvc/conferencemodel.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2010 Ixonos Plc. + * Copyright (C) 2011-2024 Philipp Spitzer, gregor herrmann, Stefan Stahl * * This file is part of ConfClerk. * @@ -28,7 +29,8 @@ It also provides typed access to the conferences from ConferenceEditor. -It does not actually modify anything in DB, this is performed by other classes. +It does not actually modify anything in DB (unless methods changing the conference instance returned by conferenceFromIndex are used), +this is performed by other classes. \see ConferenceEditor, MainWindow::showConferences() */ @@ -42,17 +44,19 @@ public: virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; const Conference& conferenceFromIndex(const QModelIndex&) const; + Conference& conferenceFromIndex(const QModelIndex&); QModelIndex indexFromId(int id) const; public slots: void newConferenceBegin(); - void newConferenceEnd(const QString& title); + void newConferenceEnd(int conferenceId); void conferenceRemoved(); private: // reinitialize list from database void reinit() { + beginResetModel(); conferences = Conference::getAll(); - reset(); + endResetModel(); } QList conferences;