Kirigami-addons

yearmodel.h
1/*
2 * SPDX-FileCopyrightText: 2019 David Edmundson <davidedmundson@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#pragma once
8
9#include <QAbstractListModel>
10
11/// Display the number of months in a year.
13{
15 Q_PROPERTY(int year READ year WRITE setYear NOTIFY yearChanged)
16
17public:
18 explicit YearModel(QObject *parent = nullptr);
19 ~YearModel();
20
21 int year() const;
22 void setYear(int year);
23
24 int rowCount(const QModelIndex &parent) const override;
25 QVariant data(const QModelIndex &index, int role) const override;
26
28 void yearChanged();
29
30private:
31 int m_year;
32};
Display the number of months in a year.
Definition yearmodel.h:13
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:16:11 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.