Commit c5a514cf authored by Laurent Montel's avatar Laurent Montel
Browse files

Add search line edit

parent d8812bc0
Pipeline #221079 canceled with stage
in 10 minutes and 18 seconds
......@@ -66,6 +66,7 @@ target_link_libraries(kaddressbookmergelibprivate
KF5::ConfigCore
KF5::WidgetsAddons
KF5::AkonadiWidgets
KF5::ItemViews
)
set_target_properties(kaddressbookmergelibprivate
......
......@@ -12,6 +12,8 @@
#include <Akonadi/CollectionComboBox>
#include <Akonadi/GrantleeContactViewer>
#include <KLocalizedString>
#include <KTreeWidgetSearchLine>
#include <KTreeWidgetSearchLineWidget>
#include <QHBoxLayout>
#include <QLabel>
#include <QPushButton>
......@@ -38,7 +40,18 @@ SearchDuplicateResultWidget::SearchDuplicateResultWidget(QWidget *parent)
mainLayout->addWidget(splitter);
mResult->setObjectName(QStringLiteral("result_treewidget"));
mContactViewer->setObjectName(QStringLiteral("contact_viewer"));
splitter->addWidget(mResult);
mSearchInResultLineEdit = new KTreeWidgetSearchLineWidget(this, mResult);
mSearchInResultLineEdit->setObjectName(QStringLiteral("searchinresultlineedit"));
mSearchInResultLineEdit->searchLine()->setClearButtonEnabled(true);
mSearchInResultLineEdit->searchLine()->setPlaceholderText(i18n("Search in result..."));
auto resultWidget = new QWidget(this);
auto resultWidgetLayout = new QVBoxLayout(resultWidget);
resultWidgetLayout->setContentsMargins({});
resultWidgetLayout->addWidget(mSearchInResultLineEdit);
resultWidgetLayout->addWidget(mResult);
splitter->addWidget(resultWidget);
splitter->addWidget(mContactViewer);
connect(mResult, &ResultDuplicateTreeWidget::showContactPreview, mContactViewer, &KAddressBookGrantlee::GrantleeContactViewer::setContact);
......
......@@ -11,6 +11,7 @@
#include <Akonadi/Item>
#include <QWidget>
class QPushButton;
class KTreeWidgetSearchLineWidget;
namespace KAddressBookGrantlee
{
class GrantleeContactViewer;
......@@ -57,6 +58,7 @@ private:
QPushButton *mMergeContact = nullptr;
Akonadi::CollectionComboBox *mCollectionCombobox = nullptr;
MergeContactLoseInformationWarning *const mMergeContactWarning;
KTreeWidgetSearchLineWidget *mSearchInResultLineEdit = nullptr;
int mIndexListContact = 0;
};
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment