ui: Added custom tooltipping to code and graph (issue #195)

* Tooltips show node type with access specifier, reference count and fully qualified name
* Fields and global variables include the type name
* Methods and functinos show whole signature. Gets broken into multiple lines if too long.

Included changes:

* Upgraded to C++14
* fixed clang warnings
* Pass location of .srctrlprj file to build.sh script to load on launch
* Split off QtCodeField for showing highlighted and annotated code fom QtCodeArea
* removed TokenComponentSignature
* added TaskDecoratorDelay

bug id = 195
This commit is contained in:
Eberhard Graether
2017-07-31 12:45:22 +02:00
parent 01b1e0d6f1
commit 01864b4d0c
79 changed files with 2340 additions and 1009 deletions
+77
View File
@@ -0,0 +1,77 @@
#include "qt/view/QtTooltipView.h"
#include "qt/element/QtTooltip.h"
#include "qt/utility/utilityQt.h"
#include "qt/view/QtMainView.h"
#include "qt/view/QtViewWidgetWrapper.h"
#include "qt/window/QtMainWindow.h"
#include "settings/ColorScheme.h"
#include "utility/ResourcePaths.h"
QtTooltipView::QtTooltipView(ViewLayout* viewLayout)
: TooltipView(viewLayout)
{
m_widget = new QtTooltip(dynamic_cast<QtMainView*>(getViewLayout())->getMainWindow());
}
QtTooltipView::~QtTooltipView()
{
}
void QtTooltipView::createWidgetWrapper()
{
setWidgetWrapper(std::make_shared<QtViewWidgetWrapper>(m_widget));
}
void QtTooltipView::initView()
{
}
void QtTooltipView::refreshView()
{
m_onQtThread([=]()
{
setStyleSheet();
});
}
void QtTooltipView::showTooltip(TooltipInfo info, const View* parent)
{
m_onQtThread([=]()
{
if (m_widget->isHovered())
{
return;
}
m_widget->hide();
m_widget->setTooltipInfo(info);
if (parent)
{
m_widget->setParentView(QtViewWidgetWrapper::getWidgetOfView(parent)->parentWidget());
}
m_widget->show();
});
}
void QtTooltipView::hideTooltip(bool force)
{
m_onQtThread([=]()
{
m_widget->hide(force);
});
}
bool QtTooltipView::tooltipVisible() const
{
return m_widget->isVisible();
}
void QtTooltipView::setStyleSheet()
{
m_widget->setStyleSheet(
utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("tooltip_view/tooltip.css"))).c_str()
);
}