File indexing completed on 2024-04-28 05:11:32
0001 /* 0002 SPDX-FileCopyrightText: 2010 Casey Link <unnamedrambler@gmail.com> 0003 SPDX-FileCopyrightText: 2009-2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include "incidenceeditor_export.h" 0011 0012 #include <QSortFilterProxyModel> 0013 0014 namespace KCalendarCore 0015 { 0016 class FreeBusyPeriod; 0017 } 0018 0019 namespace IncidenceEditorNG 0020 { 0021 /** 0022 * This is a private proxy model, that wraps the free busy data exposed 0023 * by the FreeBusyItemModel for use by KDGantt2. 0024 * 0025 * This model exposes the FreeBusyPeriods, which are the child level nodes 0026 * in FreeBusyItemModel, as a list. 0027 * 0028 * @see FreeBusyItemMode 0029 * @see FreeBusyItem 0030 */ 0031 class INCIDENCEEDITOR_EXPORT FreeBusyGanttProxyModel : public QSortFilterProxyModel 0032 { 0033 Q_OBJECT 0034 public: 0035 explicit FreeBusyGanttProxyModel(QObject *parent = nullptr); 0036 [[nodiscard]] QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; 0037 [[nodiscard]] QString tooltipify(const KCalendarCore::FreeBusyPeriod &period) const; 0038 }; 0039 }