Libksieve

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

KDE's Doxygen guidelines are available online.