KGantt

kganttstyleoptionganttitem.cpp
1/*
2 * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3 *
4 * This file is part of the KGantt library.
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9#include "kganttstyleoptionganttitem.h"
10
11using namespace KGantt;
12
13/*!\class KGantt::StyleOptionGanttItem kganttstyleoptionganttitem.h KGanttStyleOptionGanttItem
14 * \ingroup KGantt
15 * \brief QStyleOption subclass for gantt items.
16 */
17
19
20/*! Constructor. Sets grid to 0. */
22 : BASE(),
23 displayPosition( Left ),
24 grid( nullptr )
25{
27 version = 1;
28}
29
30/*! Copy constructor. Creates a copy of \a other */
32 : BASE(other)
33{
34 operator=( other );
35}
36
37/*! Assignment operator */
39{
40 BASE::operator=( other );
42 itemRect = other.itemRect;
44 grid = other.grid;
45 text = other.text;
46 return *this;
47}
48
49#ifndef QT_NO_DEBUG_STREAM
51{
52 switch ( p ) {
53 case KGantt::StyleOptionGanttItem::Left: dbg << "KGantt::StyleOptionGanttItem::Left"; break;
54 case KGantt::StyleOptionGanttItem::Right: dbg << "KGantt::StyleOptionGanttItem::Right"; break;
55 case KGantt::StyleOptionGanttItem::Center: dbg << "KGantt::StyleOptionGanttItem::Center"; break;
56 case KGantt::StyleOptionGanttItem::Hidden: dbg << "KGantt::StyleOptionGanttItem::Hidden"; break;
57 default: dbg << static_cast<int>( p );
58 }
59 return dbg;
60}
61
63{
64 dbg << "KGantt::StyleOptionGanttItem[ boundingRect="<<s.boundingRect
65 <<", itemRect="<<s.itemRect
66 <<", displayPosition="<<s.displayPosition
67 <<", grid="<<s.grid
68 <<", text="<<s.text
69 <<"]";
70 return dbg;
71}
72
73#endif /* QT_NO_DEBUG_STREAM */
74
75
76/*!\enum KGantt::StyleOptionGanttItem::Position
77 * This enum is used to describe where the Qt::DisplayRole
78 * (the label) should be located relative to the item itself.
79 */
80
81/*!\var StyleOptionGanttItem::boundingRect
82 * Contains the bounding rectangle for the item
83 */
84
85/*!\var StyleOptionGanttItem::itemRect
86 * Contains the "active" item rectangle that corresponds
87 * to the values from the model.
88 */
89
90/*!\var StyleOptionGanttItem::displayPosition
91 * \see StyleOptionGanttItem::Position.
92 */
93
94/*!\var StyleOptionGanttItem::grid
95 * Contains a pointer to the AbstractGrid used by the view
96 */
97
98/*!\var StyleOptionGanttItem::text
99 * Contains a string printed to the item
100 */
QStyleOption subclass for gantt items.
StyleOptionGanttItem & operator=(const StyleOptionGanttItem &other)
Global namespace.
QDebug operator<<(QDebug dbg, const PerceptualColor::LchaDouble &value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:21 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.