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_INVOKABLE KOpeningHours::Interval interval(const QDateTime &dt) const
Returns the interval containing dt.
Definition openinghours.cpp:512
Q_INVOKABLE KOpeningHours::Interval nextInterval(const KOpeningHours::Interval &interval) const
Returns the interval immediately following interval.
Definition openinghours.cpp:600
Q_SCRIPTABLE Q_NOREPLY void start()
const QList< QKeySequence > & end()
void beginResetModel()
void endResetModel()
virtual QHash< int, QByteArray > roleNames() const const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
QDate addDays(qint64 ndays) const const
QDate currentDate()
qint64 daysTo(QDate d) const const
QDate date() const const
ShortFormat
Qt::DayOfWeek firstDayOfWeek() const const
QString standaloneDayName(int day, FormatType type) const const
QString toString(QDate date, FormatType format) const const
bool isValid() const const
int row() const const
QObject * parent() const const
DisplayRole
QVariant fromValue(T &&value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:05 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:05 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.