File indexing completed on 2024-12-29 04:54:51
0001 /* 0002 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "includefilelineedit.h" 0008 #include <QStringListModel> 0009 0010 #include <QCompleter> 0011 0012 using namespace KSieveUi; 0013 0014 IncludeFileLineEdit::IncludeFileLineEdit(QWidget *parent) 0015 : LineEditValidator(parent) 0016 , mCompleter(new QCompleter(this)) 0017 { 0018 mCompleter->setObjectName(QLatin1StringView("completer")); 0019 mCompleter->setCaseSensitivity(Qt::CaseInsensitive); 0020 mStringListModel = new QStringListModel(this); 0021 mCompleter->setModel(mStringListModel); 0022 setCompleter(mCompleter); 0023 } 0024 0025 IncludeFileLineEdit::~IncludeFileLineEdit() = default; 0026 0027 void IncludeFileLineEdit::setListOfIncludeFile(const QStringList &lst) 0028 { 0029 mStringListModel->setStringList(lst); 0030 } 0031 0032 #include "moc_includefilelineedit.cpp"