KD Chart API Documentation  3.1
kdganttstyleoptionganttitem.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** This file is part of the KD Chart library.
4 **
5 ** SPDX-FileCopyrightText: 2001 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: MIT
8 **
9 ****************************************************************************/
10 
12 
13 using namespace KDGantt;
14 
20 typedef QStyleOptionViewItem BASE;
21 
24  : BASE()
25 {
26  type = QStyleOption::SO_CustomBase + 89;
27  version = 1;
28 }
29 
32  : BASE(other)
33 {
34  operator=(other);
35 }
36 
39 {
40  BASE::operator=(other);
41  boundingRect = other.boundingRect;
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) {
54  dbg << "KDGantt::StyleOptionGanttItem::Left";
55  break;
57  dbg << "KDGantt::StyleOptionGanttItem::Right";
58  break;
60  dbg << "KDGantt::StyleOptionGanttItem::Center";
61  break;
63  dbg << "KDGantt::StyleOptionGanttItem::Hidden";
64  break;
65  default:
66  dbg << static_cast<int>(p);
67  }
68  return dbg;
69 }
70 
71 QDebug operator<<(QDebug dbg, const KDGantt::StyleOptionGanttItem &s)
72 {
73  dbg << "KDGantt::StyleOptionGanttItem[ boundingRect=" << s.boundingRect
74  << ", itemRect=" << s.itemRect
75  << ", displayPosition=" << s.displayPosition
76  << ", grid=" << s.grid
77  << ", text=" << s.text
78  << "]";
79  return dbg;
80 }
81 
82 #endif /* QT_NO_DEBUG_STREAM */
83 
QStyleOption subclass for gantt items.
Position
This enum is used to describe where the Qt::DisplayRole (the label) should be located relative to the...
QRectF boundingRect
Contains the bounding rectangle for the item.
AbstractGrid * grid
Contains a pointer to the AbstractGrid used by the view.
StyleOptionGanttItem & operator=(const StyleOptionGanttItem &other)
Assignment operator.
QString text
Contains a string printed to the item.
QRectF itemRect
Contains the "active" item rectangle that corresponds to the values from the model.
QAbstractProxyModel BASE
QStyleOptionViewItem BASE
QDebug operator<<(QDebug dbg, KDGantt::StyleOptionGanttItem::Position p)

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated by doxygen 1.9.1