Warning, file /plasma/plasma-nm/libs/editor/widgets/ipv4delegate.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2011 Ilia Kats <ilia-kats@gmx.net> 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #include "ipv4delegate.h" 0008 0009 #include <QLineEdit> 0010 0011 #include "simpleipv4addressvalidator.h" 0012 0013 IpV4Delegate::IpV4Delegate(QObject *parent) 0014 : Delegate(parent) 0015 { 0016 } 0017 IpV4Delegate::~IpV4Delegate() = default; 0018 0019 QWidget *IpV4Delegate::createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &) const 0020 { 0021 auto editor = new QLineEdit(parent); 0022 editor->setValidator(new SimpleIpV4AddressValidator(SimpleIpV4AddressValidator::Base, editor)); 0023 0024 return editor; 0025 }