Commit f9f76d5e authored by Laurent Montel's avatar Laurent Montel 😁

Add a search line

parent 72dcfdff
......@@ -16,6 +16,7 @@ find_package(KF5 REQUIRED COMPONENTS
GuiAddons
IconThemes
WidgetsAddons
ItemViews
KIO)
include(FeatureSummary)
......
......@@ -22,6 +22,7 @@ macro(add_unittest _source _additionalsource)
Qt5::Widgets
KF5::ConfigCore
KF5::WidgetsAddons
KF5::ItemViews
)
endmacro ()
......
......@@ -24,6 +24,7 @@
#include <qlistwidget.h>
#include <qpushbutton.h>
#include <qtest.h>
#include <KListWidgetSearchLine>
KDeApplicationDebugSettingPageTest::KDeApplicationDebugSettingPageTest(QObject *parent)
: QObject(parent)
......@@ -47,6 +48,9 @@ void KDeApplicationDebugSettingPageTest::shouldHaveDefaultValue()
QPushButton *deselectAll = page.findChild<QPushButton *>(QStringLiteral("deselectall"));
QVERIFY(deselectAll);
KListWidgetSearchLine *searchLine = page.findChild<KListWidgetSearchLine *>(QStringLiteral("searchline"));
QVERIFY(searchLine);
}
QTEST_MAIN(KDeApplicationDebugSettingPageTest)
......@@ -11,7 +11,7 @@ set(kdebugsettings_SRCS
add_executable(kdebugsettings ${kdebugsettings_SRCS})
target_link_libraries(kdebugsettings Qt5::Widgets KF5::I18n KF5::DBusAddons KF5::CoreAddons KF5::ConfigCore KF5::WidgetsAddons)
target_link_libraries(kdebugsettings Qt5::Widgets KF5::I18n KF5::DBusAddons KF5::CoreAddons KF5::ConfigCore KF5::WidgetsAddons KF5::ItemViews)
install(TARGETS kdebugsettings ${INSTALL_TARGETS_DEFAULT_ARGS} )
......
......@@ -21,6 +21,7 @@
#include "kdeapplicationdebugsettingpage.h"
#include "kdeapplicationlistwidget.h"
#include <KLocalizedString>
#include <KListWidgetSearchLine>
#include <QListWidget>
#include <QPushButton>
#include <QVBoxLayout>
......@@ -33,6 +34,11 @@ KDeApplicationDebugSettingPage::KDeApplicationDebugSettingPage(QWidget *parent)
mListWidget = new KDeApplicationListWidget;
mListWidget->setObjectName(QStringLiteral("listwidget"));
mListWidgetSearchLine = new KListWidgetSearchLine(this, mListWidget);
mListWidgetSearchLine->setObjectName(QStringLiteral("searchline"));
mainLayout->addWidget(mListWidgetSearchLine);
mainLayout->addWidget(mListWidget);
QHBoxLayout *buttonLayout = new QHBoxLayout;
......
......@@ -25,7 +25,7 @@
#include "kdebugsettingsdialog.h"
class QPushButton;
class KDeApplicationListWidget;
class KListWidgetSearchLine;
class KDeApplicationDebugSettingPage : public QWidget
{
Q_OBJECT
......@@ -39,6 +39,7 @@ private slots:
void slotDeselectAll();
private:
KDeApplicationListWidget *mListWidget;
KListWidgetSearchLine *mListWidgetSearchLine;
QPushButton *mSelectAll;
QPushButton *mDeselectAll;
};
......
Markdown is supported
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