From 8b01f1f6fbcfcc4aaffe4667fa6aa98b49a9eba0 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 12 Nov 2015 15:09:43 +0100 Subject: [PATCH] added instance tooltips --- apps/opencs/view/render/object.cpp | 5 +++++ apps/opencs/view/render/object.hpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/apps/opencs/view/render/object.cpp b/apps/opencs/view/render/object.cpp index ac96cb283..c295a023a 100644 --- a/apps/opencs/view/render/object.cpp +++ b/apps/opencs/view/render/object.cpp @@ -42,6 +42,11 @@ CSVRender::ObjectTag::ObjectTag (Object* object) : TagBase (Element_Reference), mObject (object) {} +QString CSVRender::ObjectTag::getToolTip (bool hideBasics) const +{ + return QString::fromUtf8 (mObject->getReferenceableId().c_str()); +} + void CSVRender::Object::clear() { diff --git a/apps/opencs/view/render/object.hpp b/apps/opencs/view/render/object.hpp index 0858a2edb..e7638e7a9 100644 --- a/apps/opencs/view/render/object.hpp +++ b/apps/opencs/view/render/object.hpp @@ -46,6 +46,8 @@ namespace CSVRender ObjectTag (Object* object); Object* mObject; + + virtual QString getToolTip (bool hideBasics) const; };