ImagingTools Core SDK
CCollectionNumericItemDelegate.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// ImtCore includes
6#include <imtwidgets/CNumericItemDelegate.h>
7#include <imtgui/ICollectionViewDelegate.h>
8
9
10namespace imtgui
11{
12
13
14class CCollectionNumericItemDelegate : public imtwidgets::CNumericItemDelegate
15 {
16 Q_OBJECT
17public:
18 CCollectionNumericItemDelegate(Type type = CCollectionNumericItemDelegate::SpinInt, QObject *parent = 0);
19 ~CCollectionNumericItemDelegate();
20
21 void SetCollectionViewDelegate(const ICollectionViewDelegate* collectionViewDelegate);
22 void SetColumnId(const QByteArray &columnId);
23
24 // reimplemented (QStyledItemDelegate)
25 virtual void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override;
26
27private:
28 const ICollectionViewDelegate* m_collectionViewDelegate;
29 QByteArray m_columnId;
30 };
31
32
33} // namespace imtgui
34
35