akonadi
conflictresolvedialog.cpp
71 void addProperty( Mode mode, const QString &name, const QString &leftValue, const QString &rightValue )
75 mContent.append( QString::fromLatin1( "<tr><td align=\"right\"><b>%1:</b></td><td>%2</td><td></td><td>%3</td></tr>" )
81 mContent.append( QString::fromLatin1( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#ff8686\">%2</td><td></td><td bgcolor=\"#ff8686\">%3</td></tr>" )
87 mContent.append( QString::fromLatin1( "<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#9cff83\">%2</td><td></td><td></td></tr>" )
92 mContent.append( QString::fromLatin1( "<tr><td align=\"right\"><b>%1:</b></td><td></td><td></td><td bgcolor=\"#9cff83\">%2</td></tr>" )
107 header += QString::fromLatin1( "<tr><th align=\"center\">%1</th><th align=\"center\">%2</th><td> </td><th align=\"center\">%3</th></tr>" )
128static void compareItems( AbstractDifferencesReporter *reporter, const Akonadi::Item &localItem, const Akonadi::Item &otherItem )
165 reporter->addProperty( AbstractDifferencesReporter::AdditionalLeftMode, i18n( "Attribute: %1", QString::fromUtf8( localKey ) ),
172 reporter->addProperty( AbstractDifferencesReporter::ConflictMode, i18n( "Attribute: %1", QString::fromUtf8( localKey ) ),
181 reporter->addProperty( AbstractDifferencesReporter::AdditionalRightMode, i18n( "Attribute: %1", QString::fromUtf8( otherKey ) ),
207 QLabel *label = new QLabel( i18nc( "@label", "Two updates conflict with each other.<nl/>Please choose which update(s) to apply." ), mainWidget );
217void ConflictResolveDialog::setConflictingItems( const Akonadi::Item &localItem, const Akonadi::Item &otherItem )
227 QObject *object = TypePluginLoader::objectForMimeTypeAndClass( localItem.mimeType(), localItem.availablePayloadMetaTypeIds() );
229 DifferencesAlgorithmInterface *algorithm = qobject_cast<DifferencesAlgorithmInterface *>( object );
An interface to report differences between two arbitrary objects.
Definition: abstractdifferencesreporter.h:93
virtual void addProperty(Mode mode, const QString &name, const QString &leftValue, const QString &rightValue)=0
Adds a new property entry to the table.
virtual void setPropertyNameTitle(const QString &title)=0
Sets the title of the property name column.
@ AdditionalLeftMode
The left column contains a property value that is not available in the right column.
Definition: abstractdifferencesreporter.h:101
@ NormalMode
The left and right column show the same property values.
Definition: abstractdifferencesreporter.h:99
@ ConflictMode
The left and right column show conflicting property values.
Definition: abstractdifferencesreporter.h:100
@ AdditionalRightMode
The right column contains a property value that is not available in the left column.
Definition: abstractdifferencesreporter.h:102
virtual void setRightPropertyValueTitle(const QString &title)=0
Sets the title of the column that shows the property values of the right object.
virtual void setLeftPropertyValueTitle(const QString &title)=0
Sets the title of the column that shows the property values of the left object.
ResolveStrategy
Describes the strategy that should be used for resolving the conflict.
Definition: conflicthandler_p.h:57
@ UseOtherItem
The local item is dropped and the other item from the Akonadi storage is used.
Definition: conflicthandler_p.h:59
@ UseLocalItem
The local item overwrites the other item inside the Akonadi storage.
Definition: conflicthandler_p.h:58
ConflictResolveDialog(QWidget *parent=0)
Creates a new conflict resolve dialog.
Definition: conflictresolvedialog.cpp:189
ConflictHandler::ResolveStrategy resolveStrategy() const
Returns the resolve strategy the user choose.
Definition: conflictresolvedialog.cpp:245
void setConflictingItems(const Akonadi::Item &localItem, const Akonadi::Item &otherItem)
Sets the items that causes the conflict.
Definition: conflictresolvedialog.cpp:217
An interface to find out differences between two Akonadi objects.
Definition: differencesalgorithminterface.h:38
virtual void compare(AbstractDifferencesReporter *reporter, const Akonadi::Item &leftItem, const Akonadi::Item &rightItem)=0
Calculates the differences between two Akonadi objects and reports them to a reporter object.
QObject * objectForMimeTypeAndClass(const QString &mimetype, const QVector< int > &metaTypeIds, Options options=NoOptions)
Returns the type plugin object that matches the given mimetype, and any of the classes described by m...
Definition: typepluginloader.cpp:441
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.