Ignore:
Timestamp:
04/15/10 14:49:59 (12 years ago)
Author:
kirilma <kirilma@…>
Branches:
master, qt5
Children:
04acaf9
Parents:
f5b68a4
Message:

implement deleting a conference

pass event about it to mainwindow to update select control
fix Conference::activeConference() to work when first conference is removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    rf5b68a4 rd97bcab  
    7575
    7676    connect(importScheduleWidget, SIGNAL(scheduleImported(int)), SLOT(scheduleImported(int)));
     77    connect(importScheduleWidget, SIGNAL(scheduleDeleted(const QString&)), SLOT(scheduleDeleted(const QString&)));
    7778
    7879    // event details have changed
     
    161162}
    162163
     164void MainWindow::scheduleDeleted(const QString& title)
     165{
     166    int idx = selectConference->findText(title);
     167
     168    if (idx == -1) {
     169        // should not happen
     170        qWarning() << __PRETTY_FUNCTION__ << "removed non-existent item:" << title;
     171    } else {
     172        // will it signal "changed"?
     173        selectConference->removeItem(idx);
     174    }
     175}
     176
    163177void MainWindow::aboutApp()
    164178{
Note: See TracChangeset for help on using the changeset viewer.