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
datetimedelegate.h File Reference

Calendar-popup date-time editor for cells whose EditRole is a QDateTime. More...

#include <QStyledItemDelegate>
Include dependency graph for datetimedelegate.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::ui
 

Detailed Description

Calendar-popup date-time editor for cells whose EditRole is a QDateTime.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Qt's default delegate does hand a QDateTimeEdit to a QDateTime cell, but it arrives carrying the system locale's short format (8/14/26 5:06 AM) and no calendar. This one edits in core::swmmDateTimeDisplayFormat()MM/dd/yyyy HH:mm, the same stamp a SWMM .inp carries — with a calendar popup.

Deliberately standalone rather than another class in attributedelegates.h: that header's delegates drag in the whole compound-editor / data-object- picker chain, which any target installing just this one would then have to link. Pure Qt plus the header-only datetime helper.