Akonadi
conflictresolvedialog.cpp
69 void addProperty(Mode mode, const QString &name, const QString &leftValue, const QString &rightValue) override
73 mContent.append(QStringLiteral("<tr><td align=\"right\"><b>%1:</b></td><td>%2</td><td></td><td>%3</td></tr>")
79 QStringLiteral("<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#ff8686\">%2</td><td></td><td bgcolor=\"#ff8686\">%3</td></tr>")
84 mContent.append(QStringLiteral("<tr><td align=\"right\"><b>%1:</b></td><td bgcolor=\"#9cff83\">%2</td><td></td><td></td></tr>")
89 mContent.append(QStringLiteral("<tr><td align=\"right\"><b>%1:</b></td><td></td><td></td><td bgcolor=\"#9cff83\">%2</td></tr>")
104 header += QStringLiteral("<tr><th align=\"center\">%1</th><th align=\"center\">%2</th><td> </td><th align=\"center\">%3</th></tr>")
125static void compareItems(AbstractDifferencesReporter *reporter, const Akonadi::Item &localItem, const Akonadi::Item &otherItem)
149 const auto localAttributes = localItem.attributes() | Views::transform(toPair) | Actions::toQHash;
150 const auto otherAttributes = otherItem.attributes() | Views::transform(toPair) | Actions::toQHash;
193 connect(takeLeftButton, &QPushButton::clicked, this, &ConflictResolveDialog::slotUseLocalItemChoosen);
200 connect(takeRightButton, &QPushButton::clicked, this, &ConflictResolveDialog::slotUseOtherItemChoosen);
207 connect(keepBothButton, &QPushButton::clicked, this, &ConflictResolveDialog::slotUseBothItemsChoosen);
218 "Unless one version can just be thrown away, you will have to integrate those changes manually.<br>"
219 "Click on <a href=\"opentexteditor\">\"Open text editor\"</a> to keep a copy of the texts, then select which version is most correct, "
234 windowHandle()->resize(static_cast<int>(availableSize.width() * 0.7), static_cast<int>(availableSize.height() * 0.5));
235 KWindowConfig::restoreWindowSize(windowHandle(), KSharedConfig::openConfig()->group(QStringLiteral("ConflictResolveDialog")));
241 KConfigGroup group(KSharedConfig::openConfig()->group(QStringLiteral("ConflictResolveDialog")));
245void ConflictResolveDialog::setConflictingItems(const Akonadi::Item &localItem, const Akonadi::Item &otherItem)
254 QObject *object = TypePluginLoader::objectForMimeTypeAndClass(localItem.mimeType(), localItem.availablePayloadMetaTypeIds());
256 DifferencesAlgorithmInterface *algorithm = qobject_cast<DifferencesAlgorithmInterface *>(object);
An interface to report differences between two arbitrary objects.
Definition abstractdifferencesreporter.h:79
virtual void addProperty(Mode mode, const QString &name, const QString &leftValue, const QString &rightValue)=0
Adds a new property entry to the table.
@ AdditionalLeftMode
The left column contains a property value that is not available in the right column.
Definition abstractdifferencesreporter.h:87
@ NormalMode
The left and right column show the same property values.
Definition abstractdifferencesreporter.h:85
@ ConflictMode
The left and right column show conflicting property values.
Definition abstractdifferencesreporter.h:86
@ AdditionalRightMode
The right column contains a property value that is not available in the left column.
Definition abstractdifferencesreporter.h:88
An interface to find out differences between two Akonadi objects.
Definition differencesalgorithminterface.h:22
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.
QList< int > availablePayloadMetaTypeIds() const
Returns a list of metatype-ids, describing the different variants of payload that are currently conta...
Definition item.cpp:504
Attribute::List attributes() const
Returns a list of all attributes of the item.
Definition item.cpp:133
QDateTime modificationTime() const
Returns the timestamp of the last modification of this item.
Definition item.cpp:220
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
Helper integration between Akonadi and Qt.
char * toString(const EngineQuery &query)
QWindow * windowHandle(QObject *job)
QString name(StandardAction id)
QAction * create(StandardAction id, const Receiver *recvr, Func slot, QObject *parent, std::optional< Qt::ConnectionType > connectionType=std::nullopt)
KCONFIGGUI_EXPORT void saveWindowSize(const QWindow *window, KConfigGroup &config, KConfigGroup::WriteConfigFlags options=KConfigGroup::Normal)
KCONFIGGUI_EXPORT void restoreWindowSize(QWindow *window, const KConfigGroup &config)
void clicked(bool checked)
bool openUrl(const QUrl &url)
QString tempPath()
void linkActivated(const QString &link)
ShortFormat
Active
availableSize
int height() const const
int width() const const
QString & append(QChar ch)
QString arg(Args &&... args) const const
QString fromUtf8(QByteArrayView str)
QString convertFromPlainText(const QString &plain, WhiteSpaceMode mode)
NoContextMenu
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
QUrl fromLocalFile(const QString &localFile)
void resize(const QSize &newSize)
QScreen * screen() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.