Changeset View
Changeset View
Standalone View
Standalone View
incidenceeditor-ng/incidenceattendee.cpp
Show First 20 Lines • Show All 520 Lines • ▼ Show 20 Lines | |||||
void IncidenceEditorNG::IncidenceAttendee::slotSolveConflictPressed() | void IncidenceEditorNG::IncidenceAttendee::slotSolveConflictPressed() | ||||
{ | { | ||||
const int duration = mDateTime->startTime().secsTo( mDateTime->endTime() ); | const int duration = mDateTime->startTime().secsTo( mDateTime->endTime() ); | ||||
mConflictResolver->setDuration(duration); | mConflictResolver->setDuration(duration); | ||||
QScopedPointer<SchedulingDialog> dialog( new SchedulingDialog( mDateTime->startDate(), | QScopedPointer<SchedulingDialog> dialog( new SchedulingDialog( mDateTime->startDate(), | ||||
mDateTime->startTime(), | mDateTime->startTime(), | ||||
duration, mConflictResolver, | duration, mConflictResolver, | ||||
mParentWidget ) ); | mParentWidget ) ); | ||||
dialog->slotUpdateIncidenceStartEnd( mDateTime->currentStartDateTime(), | |||||
mDateTime->currentEndDateTime() ); | |||||
if ( dialog->exec() == KDialog::Accepted ) { | if ( dialog->exec() == KDialog::Accepted ) { | ||||
kDebug () << dialog->selectedStartDate() << dialog->selectedStartTime(); | kDebug () << dialog->selectedStartDate() << dialog->selectedStartTime(); | ||||
mDateTime->setStartDate( dialog->selectedStartDate() ); | mDateTime->setStartDate( dialog->selectedStartDate() ); | ||||
mDateTime->setStartTime( dialog->selectedStartTime() ); | mDateTime->setStartTime( dialog->selectedStartTime() ); | ||||
} | } | ||||
} | } | ||||
void IncidenceAttendee::slotConflictResolverAttendeeChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) | void IncidenceAttendee::slotConflictResolverAttendeeChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) | ||||
Show All 12 Lines | if (AttendeeTableModel::FullName <= bottomRight.column() && AttendeeTableModel::FullName >= topLeft.column()) { | ||||
} | } | ||||
} | } | ||||
checkDirtyStatus(); | checkDirtyStatus(); | ||||
#endif | #endif | ||||
} | } | ||||
void IncidenceAttendee::slotConflictResolverAttendeeAdded(const QModelIndex &index, int first, int last) | void IncidenceAttendee::slotConflictResolverAttendeeAdded(const QModelIndex &index, int first, int last) | ||||
{ | { | ||||
mUi->mSolveButton->setEnabled( true ); | |||||
knauss: should not be needed
the update of the satus of the button is done in slotUpdateConflictLabel… | |||||
mollekopfAuthorUnsubmitted Not Done Inline ActionsIt's needed because I want the schedule dialog also to be available if no fb-data is found. mollekopf: It's needed because I want the schedule dialog also to be available if no fb-data is found. | |||||
for (int i = first; i <= last; i++) { | for (int i = first; i <= last; i++) { | ||||
QModelIndex email = dataModel()->index(i, AttendeeTableModel::Email, index); | QModelIndex email = dataModel()->index(i, AttendeeTableModel::Email, index); | ||||
if (!dataModel()->data(email).toString().isEmpty()) { | if (!dataModel()->data(email).toString().isEmpty()) { | ||||
mConflictResolver->insertAttendee( dataModel()->data(email, AttendeeTableModel::AttendeeRole).value<KCalCore::Attendee::Ptr>() ); | mConflictResolver->insertAttendee( dataModel()->data(email, AttendeeTableModel::AttendeeRole).value<KCalCore::Attendee::Ptr>() ); | ||||
} | } | ||||
} | } | ||||
checkDirtyStatus(); | checkDirtyStatus(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 496 Lines • ▼ Show 20 Lines | if ( !found ) { | ||||
<< attendee->delegate() | << attendee->delegate() | ||||
<< attendee->delegator(); | << attendee->delegator(); | ||||
} | } | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |
should not be needed
the update of the satus of the button is done in slotUpdateConflictLabel and this is updated by the conflictResolver directly:
connect( mConflictResolver, SIGNAL(conflictsDetected(int)),
and this signal is fired whenever the fbdata is changed (if the fb data is downloaded).