summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-08-02 06:18:46 (GMT)
committerMontel Laurent <montel@kde.org>2016-08-02 06:18:46 (GMT)
commit123e018a0a912be35bff9221a1930e9597998b09 (patch)
tree745e13c3c49281e59dcb3deb23e151d920e8c396
parent6032a91dfc8ed0f046b44c672959d8aa75c34d98 (diff)
Implement hidden
-rw-r--r--src/timeline/timelineview.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/timeline/timelineview.cpp b/src/timeline/timelineview.cpp
index f3f6324..1e24fd9 100644
--- a/src/timeline/timelineview.cpp
+++ b/src/timeline/timelineview.cpp
@@ -191,7 +191,7 @@ class GanttItemDelegate : public KGantt::ItemDelegate
if (itemRect.isValid()) {
QRectF r = itemRect;
painter->drawRect(r);
-
+ bool drawText = true;
Qt::Alignment ta;
switch (opt.displayPosition) {
case KGantt::StyleOptionGanttItem::Left:
@@ -203,8 +203,13 @@ class GanttItemDelegate : public KGantt::ItemDelegate
case KGantt::StyleOptionGanttItem::Center:
ta = Qt::AlignCenter;
break;
+ case KGantt::StyleOptionGanttItem::Hidden:
+ drawText = false;
+ break;
+ }
+ if (drawText) {
+ painter->drawText(boundingRect, ta, txt);
}
- painter->drawText(boundingRect, ta, txt);
}
break;
default: