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);
QDateTime addSecs(qint64 s) const const
DisplayRole
QVariant fromValue(const T &value)
Qt::DayOfWeek firstDayOfWeek() const const
Q_SCRIPTABLE Q_NOREPLY void start()
KOpeningHours::OpeningHours openingHours
The opening hours expression shown in this model.
Definition: intervalmodel.h:28
virtual QHash< int, QByteArray > roleNames() const const
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
QString toString(qlonglong i) const const
QDate currentDate()
QDate addDays(qint64 ndays) const const
void beginResetModel()
bool isValid() const const
QString currentState
Description of the current status as a translated human-readable string.
Definition: intervalmodel.h:37
int row() const const
ShortFormat
KOPENINGHOURS_EXPORT QString currentState(const OpeningHours &oh)
Localized description of the current opening state, and upcoming transitions.
Definition: display.cpp:17
QDate date() const const
Q_INVOKABLE QString formatTimeColumnHeader(int hour, int minute) const
Localized formatting for time column headers.
Definition: intervalmodel.cpp:207
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
void endResetModel()
QString standaloneDayName(int day, QLocale::FormatType type) const const
QObject * parent() const const
A time interval for which an opening hours expression has been evaluated.
Definition: interval.h:24
int day() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jun 25 2022 06:02:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jun 25 2022 06:02:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.