ksyncuikde.cpp
00001
00002
00003 #include <kdebug.h>
00004 #include <kmessagebox.h>
00005 #include <klocale.h>
00006
00007 #include "ksyncer.h"
00008
00009 #include "ksyncuikde.h"
00010
00011 KSyncUiKde::KSyncUiKde(QWidget *parent) :
00012 mParent(parent)
00013 {
00014 }
00015
00016 KSyncUiKde::~KSyncUiKde()
00017 {
00018 }
00019
00020 KSyncEntry *KSyncUiKde::deconflict(KSyncEntry *syncEntry,KSyncEntry *targetEntry)
00021 {
00022 QString text = i18n("Which entry do you want to take precedence?\n");
00023 text += i18n("Entry 1: '%1'\n").arg(syncEntry->name());
00024 text += i18n("Entry 2: '%1'\n").arg(targetEntry->name());
00025
00026 int result = KMessageBox::warningYesNoCancel(mParent,text,
00027 i18n("Resolve conflict"),i18n("Entry 1"),i18n("Entry 2"));
00028
00029 if (result == KMessageBox::Yes) {
00030 return syncEntry;
00031 } else if (result == KMessageBox::No) {
00032 return targetEntry;
00033 }
00034
00035 return 0;
00036 }
This file is part of the documentation for kdelibs Version 3.1.5.