PimCommon::LineEditWithCompleterNg Class

The LineEditWithCompleterNg class provides a line editor with completion support Author: Laurent Montel <montel@kde.org>. More...

Header: #include <PimCommon/LineEditWithCompleterNg>
CMake: find_package(KPim6PimCommon REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::PimCommon)

Public Functions

LineEditWithCompleterNg(QWidget *parent = nullptr)
virtual ~LineEditWithCompleterNg() override
void addCompletionItem(const QString &str)
void slotClearHistory()

Reimplemented Protected Functions

virtual void contextMenuEvent(QContextMenuEvent *e) override

Detailed Description

Member Function Documentation

[explicit] LineEditWithCompleterNg::LineEditWithCompleterNg(QWidget *parent = nullptr)

Constructs a LineEditWithCompleterNg. @param parent The parent widget

[override virtual noexcept] LineEditWithCompleterNg::~LineEditWithCompleterNg()

Destructs the LineEditWithCompleterNg.

void LineEditWithCompleterNg::addCompletionItem(const QString &str)

Adds a completion item to the history. @param str The item to add to completion

[override virtual protected] void LineEditWithCompleterNg::contextMenuEvent(QContextMenuEvent *e)

Handles context menu events. @param e The context menu event

void LineEditWithCompleterNg::slotClearHistory()

Clears the completion history.