Warning, file /plasma/plasma-nm/libs/editor/widgets/intdelegate.h 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 #ifndef INTDELEGATE_H 0008 #define INTDELEGATE_H 0009 0010 #include <QLineEdit> 0011 #include <QStandardItem> 0012 #include <QStandardItemModel> 0013 0014 #include "delegate.h" 0015 0016 class IntDelegate : public Delegate 0017 { 0018 Q_OBJECT 0019 public: 0020 explicit IntDelegate(QObject *parent = nullptr); 0021 IntDelegate(int min, int max, QObject *parent = nullptr); 0022 ~IntDelegate() override; 0023 0024 QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override; 0025 0026 private: 0027 int m_min = -1; 0028 int m_max = -1; 0029 bool m_boundary; 0030 }; 0031 0032 #endif