From cba2cf9fd3408dd4f040395ef146193fbbde0e35 Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Tue, 25 Apr 2023 08:20:14 -0400 Subject: [PATCH] add todo item for delegate --- platform/qt/dmxwidget/widgetmodel.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/platform/qt/dmxwidget/widgetmodel.cpp b/platform/qt/dmxwidget/widgetmodel.cpp index e634b90..a52ff24 100644 --- a/platform/qt/dmxwidget/widgetmodel.cpp +++ b/platform/qt/dmxwidget/widgetmodel.cpp @@ -1,5 +1,5 @@ +#include #include "widgetmodel.h" -#include "qmetaobject.h" WidgetModel::WidgetModel(QObject *parent) : QAbstractItemModel(parent) @@ -117,7 +117,12 @@ QVariant WidgetModel::data(const QModelIndex &index, int role) const return QVariant(); } case Qt::EditRole: - return QVariant::fromValue(widgets_.at(index.row())); + switch (static_cast(index.column())) { + case OperatingMode: + /// \todo Create a combobox delegate to change the DMX Widget operating mode. + default: + return QVariant::fromValue(widgets_.at(index.row())); + } default: return QVariant(); }