7#ifndef KOPENINGHOURS_INTERVALMODEL_H
8#define KOPENINGHOURS_INTERVALMODEL_H
10#include "kopeninghours_export.h"
12#include <KOpeningHours/OpeningHours>
14#include <QAbstractListModel>
21class IntervalModelPrivate;
30 Q_PROPERTY(
QDate beginDate READ beginDate WRITE setBeginDate NOTIFY beginDateChanged)
32 Q_PROPERTY(
QDate endDate READ endDate WRITE setEndDate NOTIFY endDateChanged)
38 Q_PROPERTY(
QString currentState READ currentState NOTIFY openingHoursChanged)
47 QDate beginDate() const;
48 void setBeginDate(
QDate beginDate);
49 QDate endDate() const;
50 void setEndDate(
QDate endDate);
60 int rowCount(
const QModelIndex& parent = {})
const override;
70 Q_INVOKABLE
QString formatTimeColumnHeader(
int hour,
int minute)
const;
73 void openingHoursChanged();
74 void beginDateChanged();
75 void endDateChanged();
78 [[deprecated(
"use Display::currentState directly")]]
QString currentState()
const;
79 std::unique_ptr<IntervalModelPrivate> d;
Model for showing opening intervals per day.
@ DateRole
The date represented by the current row.
@ IsTodayRole
true if the row represents the current day.
@ DayBeginTimeRole
Same as DateRole, but as a date/time object.
@ ShortDayNameRole
Localized short day name for the current row.
An OSM opening hours specification.
OSM opening hours parsing and evaluation.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:26 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.