- Timestamp:
- 04/15/10 14:49:59 (13 years ago)
- Branches:
- master, qt5
- Children:
- 04acaf9
- Parents:
- f5b68a4
- Location:
- src/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/importschedulewidget.cpp
rf5b68a4 rd97bcab 27 27 #include <QNetworkAccessManager> 28 28 #include <QNetworkReply> 29 #include <QMessageBox> 29 30 #include <QDebug> 30 31 #include <appsettings.h> … … 167 168 void ImportScheduleWidget::on_delete() 168 169 { 169 // TODO: implement 170 int active_id = Conference::activeConference(); 171 Conference active_conference = Conference::getById(active_id); 172 173 QMessageBox::StandardButton answer = 174 QMessageBox::question(0 175 , "Deletion confirmation" 176 , QString("Really delete the %1 conference").arg(active_conference.title()) 177 , QMessageBox::Yes | QMessageBox::No 178 , QMessageBox::No); 179 180 if (answer == QMessageBox::Yes) { 181 QString title = active_conference.title(); 182 Conference::deleteConference(active_id); 183 emit(scheduleDeleted(title)); 184 } 170 185 } 171 186 -
src/gui/importschedulewidget.h
rf5b68a4 rd97bcab 44 44 signals: 45 45 void scheduleImported(int confId); 46 void scheduleDeleted(const QString& title); 46 47 private: 47 48 void importFromNetwork(const QString& url); -
src/gui/mainwindow.cpp
rf5b68a4 rd97bcab 75 75 76 76 connect(importScheduleWidget, SIGNAL(scheduleImported(int)), SLOT(scheduleImported(int))); 77 connect(importScheduleWidget, SIGNAL(scheduleDeleted(const QString&)), SLOT(scheduleDeleted(const QString&))); 77 78 78 79 // event details have changed … … 161 162 } 162 163 164 void 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 163 177 void MainWindow::aboutApp() 164 178 { -
src/gui/mainwindow.h
rf5b68a4 rd97bcab 34 34 private slots: 35 35 void scheduleImported(int aConfId); 36 void scheduleDeleted(const QString& title); 36 37 void aboutApp(); 37 38 void conferenceMapClicked();
Note: See TracChangeset
for help on using the changeset viewer.