Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
/**
* @RDE_HEADER@
* Renders complex types from model data to text for views
* $Id$
* $HeadURL$
* $Author$
*
* Created by Mike Wille, NLE, 2020-09-09
*/
#include "data_delegate.h"
#include <ngltools/ngltools_dtg.h>
#include <QDateTime>
namespace LtsDataView
{
DataDelegate::DataDelegate(QObject *parent)
: QStyledItemDelegate(parent)
{}
QString DataDelegate::displayText(const QVariant &value, const QLocale &locale) const
{
if (value.type() == QVariant::Type::DateTime)
return DTG::toString(value.toDateTime());
return QStyledItemDelegate::displayText(value, locale);
}
} // namespace LtsDataView