Ignore:
Timestamp:
10/05/11 00:11:03 (11 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
dc66a91
Parents:
a9430aa
Message:

Removed the "Now" tab.
Removed the day navigator inside tabs.
Added a search button in the button bar.

Right now, at least the following does not work:

  • update of favorites
  • conflict editor
  • setting favorite in the event dialog
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    ra9430aa r264f5e7  
    8585
    8686    // event details have changed
    87     connect(dayTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
    88     connect(favsTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
    89     connect(tracksTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
    90     connect(roomsTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
    91     connect(nowTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
    92     connect(searchTabContainer, SIGNAL(eventHasChanged(int,bool)), SLOT(eventHasChanged(int,bool)));
     87    connect(dayTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(redisplayEvent(int,bool)));
     88    connect(favsTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(redisplayEvent(int,bool)));
     89    connect(tracksTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(redisplayEvent(int,bool)));
     90    connect(roomsTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(redisplayEvent(int,bool)));
     91    connect(searchTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(redisplayEvent(int,bool)));
    9392
    9493    // date has changed
    95     connect(dayNavigator, SIGNAL(dateChanged(QDate)), dayTabContainer, SLOT(setCurDate(QDate)));
    96     connect(dayNavigator, SIGNAL(dateChanged(QDate)), favsTabContainer, SLOT(setCurDate(QDate)));
    97     connect(dayNavigator, SIGNAL(dateChanged(QDate)), tracksTabContainer, SLOT(setCurDate(QDate)));
    98     connect(dayNavigator, SIGNAL(dateChanged(QDate)), roomsTabContainer, SLOT(setCurDate(QDate)));
    99     connect(dayNavigator, SIGNAL(dateChanged(QDate)), nowTabContainer, SLOT(setCurDate(QDate)));
    100     connect(dayNavigator, SIGNAL(dateChanged(QDate)), searchTabContainer, SLOT(setCurDate(QDate)));
    101 
    102     connect(aboutAction, SIGNAL(triggered()), SLOT(aboutApp()));
    103     connect(settingsAction, SIGNAL(triggered()), SLOT(setup()));
    104     connect(conferencesAction, SIGNAL(triggered()), SLOT(showConferences()));
     94    connect(dayNavigator, SIGNAL(dateChanged(QDate)), dayTabContainer, SLOT(redisplayDate(QDate)));
     95    connect(dayNavigator, SIGNAL(dateChanged(QDate)), favsTabContainer, SLOT(redisplayDate(QDate)));
     96    connect(dayNavigator, SIGNAL(dateChanged(QDate)), tracksTabContainer, SLOT(redisplayDate(QDate)));
     97    connect(dayNavigator, SIGNAL(dateChanged(QDate)), roomsTabContainer, SLOT(redisplayDate(QDate)));
     98    connect(dayNavigator, SIGNAL(dateChanged(QDate)), searchTabContainer, SLOT(redisplayDate(QDate)));
    10599
    106100    useConference(Conference::activeConference());
     
    132126}
    133127
    134 void MainWindow::aboutApp()
     128void MainWindow::on_aboutAction_triggered()
    135129{
    136130    QDialog dialog(this);
     
    144138}
    145139
    146 void MainWindow::eventHasChanged(int aEventId, bool aReloadModel)
    147 {
    148     dayTabContainer->updateTreeViewModel(aEventId);
    149     favsTabContainer->updateTreeViewModel(aEventId,aReloadModel);
    150     tracksTabContainer->updateTreeViewModel(aEventId);
    151     nowTabContainer->updateTreeViewModel(aEventId);
    152     roomsTabContainer->updateTreeViewModel(aEventId);
    153     searchTabContainer->updateTreeViewModel(aEventId);
     140
     141void MainWindow::on_reloadAction_triggered() {
     142
     143}
     144
     145
     146void MainWindow::on_nowAction_triggered() {
     147
     148}
     149
     150
     151void MainWindow::on_searchAction_triggered() {
     152    searchTabContainer->showSearchDialog();
     153    tabWidget->setCurrentWidget(searchTab);
     154}
     155
     156
     157
     158void MainWindow::redisplayEvent(int aEventId, bool aReloadModel)
     159{
     160    dayTabContainer->redisplayEvent(aEventId);
     161    favsTabContainer->redisplayEvent(aEventId,aReloadModel);
     162    tracksTabContainer->redisplayEvent(aEventId);
     163    roomsTabContainer->redisplayEvent(aEventId);
     164    searchTabContainer->redisplayEvent(aEventId);
    154165}
    155166
     
    201212
    202213        // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates
    203         dayTabContainer->setDates(startDate, endDate);
    204         tracksTabContainer->setDates(startDate, endDate);
    205         roomsTabContainer->setDates(startDate, endDate);
    206         favsTabContainer->setDates(startDate, endDate);
    207         searchTabContainer->setDates(startDate, endDate);
    208         searchTabContainer->searchAgainClicked();
    209         nowTabContainer->updateTreeView(QDate::currentDate());
    210214        dayNavigator->setDates(startDate, endDate);
    211215    }
     
    219223    favsTabContainer->clearModel();
    220224    searchTabContainer->clearModel();
    221     searchTabContainer->searchAgainClicked();
    222     nowTabContainer->clearModel();
    223225}
    224226
     
    230232}
    231233
    232 void MainWindow::setup()
     234void MainWindow::on_settingsAction_triggered()
    233235{
    234236    SettingsDialog dialog;
     
    256258 addition and refresh.
    257259*/
    258 void MainWindow::showConferences()
     260void MainWindow::on_conferencesAction_triggered()
    259261{
    260262    ConferenceEditor dialog(conferenceModel, this);
Note: See TracChangeset for help on using the changeset viewer.