Libksieve

includefilelineedit.cpp
1/*
2 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "includefilelineedit.h"
8#include <QStringListModel>
9
10#include <QCompleter>
11
12using namespace KSieveUi;
13
14IncludeFileLineEdit::IncludeFileLineEdit(QWidget *parent)
15 : LineEditValidator(parent)
16 , mCompleter(new QCompleter(this))
17{
18 mCompleter->setObjectName(QLatin1StringView("completer"));
19 mCompleter->setCaseSensitivity(Qt::CaseInsensitive);
20 mStringListModel = new QStringListModel(this);
21 mCompleter->setModel(mStringListModel);
22 setCompleter(mCompleter);
23}
24
25IncludeFileLineEdit::~IncludeFileLineEdit() = default;
26
27void IncludeFileLineEdit::setListOfIncludeFile(const QStringList &lst)
28{
29 mStringListModel->setStringList(lst);
30}
31
32#include "moc_includefilelineedit.cpp"
void setStringList(const QStringList &strings)
CaseInsensitive
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:09:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.