KOpeningHours
intervalmodel.cpp
39 if (i.end() == endDt && i.hasOpenEndTime()) { // spans in the next day, so this sub-interval isn't open-ended
58 i.setBegin(i.hasOpenBegin() ? QDateTime(dt, {0, 0}) : std::max(i.begin(), QDateTime(dt, {0, 0})));
82 auto estimatedEnd = nextStartDt == QDateTime(dt, {0, 0}) ? nextStartDt : (*it).end().addSecs((*it).end().secsTo(nextStartDt) / 2);
176 return QLocale().standaloneDayName(d->m_intervals[index.row()].day.dayOfWeek(), QLocale::ShortFormat);
static Q_INVOKABLE QString currentState(const KOpeningHours::OpeningHours &oh)
Localized description of the current opening state, and upcoming transitions.
Definition display.cpp:17
QString currentState
Description of the current status as a translated human-readable string.
Definition intervalmodel.h:38
Q_INVOKABLE QDate beginOfWeek(const QDateTime &dt) const
Returns the day the week containing dt begins, based on the current locale.
Definition intervalmodel.cpp:195
KOpeningHours::OpeningHours openingHours
The opening hours expression shown in this model.
Definition intervalmodel.h:28
Q_INVOKABLE QString formatTimeColumnHeader(int hour, int minute) const
Localized formatting for time column headers.
Definition intervalmodel.cpp:207
A time interval for which an opening hours expression has been evaluated.
Definition interval.h:25
Q_SCRIPTABLE QString start(QString train="")
const QList< QKeySequence > & end()
void beginResetModel()
void endResetModel()
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
virtual QModelIndex parent(const QModelIndex &index) const const=0
virtual QHash< int, QByteArray > roleNames() const const
QDate addDays(qint64 ndays) const const
QDate currentDate()
QDate date() const const
ShortFormat
Qt::DayOfWeek firstDayOfWeek() const const
QString toString(QDate date, FormatType format) const const
DisplayRole
QVariant fromValue(T &&value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:58:30 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:58:30 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.