Files
seer/src/QEditDelegate.h
T
2025-08-26 17:26:05 -05:00

33 lines
928 B
C++

// SPDX-FileCopyrightText: 2021 Ernie Pasveer <epasveer@att.net>
//
// SPDX-License-Identifier: MIT
#pragma once
#include <QtWidgets/QItemDelegate>
#include <QtWidgets/QStyledItemDelegate>
#include <QtCore/QModelIndex>
class QAllowEditDelegate : public QStyledItemDelegate {
Q_OBJECT
public:
QAllowEditDelegate(QObject* parent = nullptr);
virtual void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
signals:
void editingStarted (const QModelIndex& index) const;
void editingFinished (const QModelIndex& index) const;
};
class QNoEditDelegate : public QStyledItemDelegate {
public:
QNoEditDelegate(QObject* parent = nullptr);
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
};