CalendarSupport

cellitem.h
1/*
2 SPDX-FileCopyrightText: 2003 Cornelius Schumacher <schumacher@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
5*/
6
7#pragma once
8
9#include "calendarsupport_export.h"
10#include <QList>
11
12namespace CalendarSupport
13{
14class CALENDARSUPPORT_EXPORT CellItem
15{
16public:
17 CellItem() = default;
18
19 virtual ~CellItem() = default;
20
21 void setSubCells(int v);
22 [[nodiscard]] int subCells() const;
23
24 void setSubCell(int v);
25 [[nodiscard]] int subCell() const;
26
27 virtual bool overlaps(CellItem *other) const = 0;
28
29 [[nodiscard]] virtual QString label() const;
30
31 /**
32 Place item @p placeItem into stripe containing items @p cells in a
33 way that items don't overlap.
34 @param cells The list of other cell items to be laid out parallel to the placeItem.
35 @param placeItem The item to be laid out.
36
37 @return Placed items
38 */
39 static QList<CellItem *> placeItem(const QList<CellItem *> &cells, CellItem *placeItem);
40
41private:
42 int mSubCells = 0;
43 int mSubCell = -1;
44};
45}
QString label(StandardShortcut id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:07:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.