Changeset d49254d for src/gui


Ignore:
Timestamp:
01/27/10 22:08:37 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
0401cc2
Parents:
21d7cc0
Message:

'conflict' dialog now contains list of events in conflict with given eventId

Location:
src/gui
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/gui/conflictdialogcontainer.cpp

    r21d7cc0 rd49254d  
    99void ConflictDialogContainer::loadEvents( const QDate &aDate, const int aConferenceId )
    1010{
    11     static_cast<EventModel*>(treeView->model())->loadEventsByRoom( aDate, aConferenceId );
    12     //treeView->setAllExpanded(true);
     11    static_cast<EventModel*>(treeView->model())->loadConflictEvents( mEventId, aConferenceId );
     12    dayNavigator->hide();
    1313}
    1414
    15 void ConflictDialogContainer::updateTreeViewModel(int aEventId)
    16 {
    17     // requires special handling
    18     // we need to reload favourites, because some favourite could be deleted
    19     //static_cast<EventModel*>(favTreeView->model())->updateModel(aEventId);
    20     int confId = Conference::activeConference();
    21     QDate startDate = Conference::getById(confId).start();
    22     QDate endDate = Conference::getById(confId).end();
    23     dayNavigator->setDates(startDate, endDate);
    24     updateTreeView( Conference::getById(confId).start() );
    25 }
    26 
  • src/gui/conflictdialogcontainer.h

    r21d7cc0 rd49254d  
    1212    virtual ~ConflictDialogContainer(){}
    1313
    14 public slots:
    15     virtual void updateTreeViewModel(int aEventId);
     14    void setEventId(int aEventId) { mEventId = aEventId; }
    1615
    1716protected:
    1817    virtual void loadEvents( const QDate &aDate, const int aConferenceId );
     18
     19private:
     20    int mEventId;
    1921};
    2022
  • src/gui/conflictsdialog.cpp

    r21d7cc0 rd49254d  
    11#include "conflictsdialog.h"
    22
    3 ConflictsDialog::ConflictsDialog(QWidget *aParent)
     3ConflictsDialog::ConflictsDialog(int aEventId, QWidget *aParent)
    44    : QDialog(aParent)
    55{
     
    77    connect(container, SIGNAL(eventHasChanged(int)), this, SIGNAL(eventHasChanged(int)));
    88    connect(container, SIGNAL(eventHasChanged(int)), container, SLOT(updateTreeViewModel(int)));
     9
     10    container->setEventId(aEventId);
    911
    1012    int confId = Conference::activeConference();
  • src/gui/conflictsdialog.h

    r21d7cc0 rd49254d  
    99    Q_OBJECT
    1010public:
    11     ConflictsDialog(QWidget *aParent = NULL);
     11    ConflictsDialog(int aEventId, QWidget *aParent = NULL);
    1212    ~ConflictsDialog();
    1313signals:
  • src/gui/favtabcontainer.cpp

    r21d7cc0 rd49254d  
    1313void FavTabContainer::updateTreeViewModel(int aEventId)
    1414{
     15    Q_UNUSED(aEventId);
     16
    1517    // requires special handling
    1618    // we need to reload favourites, because some favourite could be deleted
  • src/gui/tabcontainer.cpp

    r21d7cc0 rd49254d  
    3434    if(!Conference::getAll().count()) // no conference(s) in the DB
    3535    {
    36         dayNavigator->hide(); // hide DayNavigatorWidget
     36        dayNavigator->hide();
    3737    }
    3838    else
     
    8686void TabContainer::displayConflicts(const QModelIndex &aIndex)
    8787{
    88     Q_UNUSED(aIndex);
    89 
    90     ConflictsDialog dialog;
     88    ConflictsDialog dialog(static_cast<Event*>(aIndex.internalPointer())->id(),this);
    9189    connect(&dialog, SIGNAL(eventHasChanged(int)), this, SIGNAL(eventHasChanged(int)));
    9290    dialog.exec();
Note: See TracChangeset for help on using the changeset viewer.