SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmmvis::ui::DateTimeDelegate Class Reference

QDateTimeEdit-in-a-cell, formatted MM/dd/yyyy HH:mm. More...

#include <datetimedelegate.h>

Inheritance diagram for openswmmvis::ui::DateTimeDelegate:
Collaboration diagram for openswmmvis::ui::DateTimeDelegate:

Public Member Functions

 DateTimeDelegate (QObject *parent=nullptr)
 
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &opt, const QModelIndex &index) const override
 
void setEditorData (QWidget *editor, const QModelIndex &index) const override
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
 

Detailed Description

QDateTimeEdit-in-a-cell, formatted MM/dd/yyyy HH:mm.

Seconds are absent from the format but NOT discarded. The editor is seeded with the model's full QDateTime and a QDateTimeEdit preserves the sections its display format omits, so a stamp at 00:15:30 survives an edit of its minute field. SWMM stores whole seconds and the engine's [TIMESERIES] writer emits HH:MM:SS, so dropping them here would be the same class of silent truncation as GH #1.

Constructor & Destructor Documentation

◆ DateTimeDelegate()

openswmmvis::ui::DateTimeDelegate::DateTimeDelegate ( QObject *  parent = nullptr)
explicit

Member Function Documentation

◆ createEditor()

QWidget * openswmmvis::ui::DateTimeDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  opt,
const QModelIndex &  index 
) const
override
Here is the call graph for this function:

◆ setEditorData()

void openswmmvis::ui::DateTimeDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const
override

◆ setModelData()

void openswmmvis::ui::DateTimeDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const
override

The documentation for this class was generated from the following files: