const int Diary:: copyAppointment(const int appDay,const float appFrom,const int day,const float from, const float till){ const Appointment *app = findAppointment(appDay, appFrom); if(app==NULL){ return 0; }else{ return addAppointment(day, from, till,app->getSubject()); } }
/** * Creates the configure widget if there isn't one. * @param parent the parent widget for the configure widget if one needs to be made. * @return QWidget the configure widget for this plugin. */ QWidget *AwaySchedule::configure( QWidget *parent ) { if ( configureWidget == NULL ) { configureWidget = new Configure(parent, "Rot13 Configure window."); connect(configureWidget->add, SIGNAL(clicked()), this, SLOT(addAppointment())); connect(configureWidget->edit, SIGNAL(clicked()), this, SLOT(editAppointment())); connect(configureWidget->remove, SIGNAL(clicked()), this, SLOT(removeAppointment())); connect(configureWidget->day, SIGNAL(activated(int)), this, SLOT(updateDay(int))); }
void EventPool::updateAppointment( Appointment* inApp ) { removeAppointmentWithEventsById( inApp->m_uid ); addAppointment( inApp ); }