logic: Added namespaces to overview and fixed namespace activation

This commit is contained in:
Eberhard Graether
2016-02-08 03:39:08 +01:00
parent d6c03ffb02
commit 29149f313a
24 changed files with 147 additions and 52 deletions
+13
View File
@@ -12,6 +12,7 @@
QtCodeView::QtCodeView(ViewLayout* viewLayout)
: CodeView(viewLayout)
, m_refreshViewFunctor(std::bind(&QtCodeView::doRefreshView, this))
, m_clearFunctor(std::bind(&QtCodeView::doClear, this))
, m_showCodeSnippetsFunctor(std::bind(&QtCodeView::doShowCodeSnippets, this, std::placeholders::_1, std::placeholders::_2))
, m_addCodeSnippetsFunctor(std::bind(&QtCodeView::doAddCodeSnippets, this, std::placeholders::_1, std::placeholders::_2))
, m_showCodeFileFunctor(std::bind(&QtCodeView::doShowCodeFile, this, std::placeholders::_1))
@@ -45,6 +46,11 @@ void QtCodeView::refreshView()
m_refreshViewFunctor();
}
void QtCodeView::clear()
{
m_clearFunctor();
}
void QtCodeView::setActiveTokenIds(const std::vector<Id>& activeTokenIds)
{
m_activeTokenIds = activeTokenIds;
@@ -112,6 +118,11 @@ void QtCodeView::doRefreshView()
QtCodeArea::clearAnnotationColors();
}
void QtCodeView::doClear()
{
m_widget->clearCodeSnippets();
}
void QtCodeView::doShowCodeSnippets(const std::vector<CodeSnippetParams>& snippets, const std::vector<Id>& activeTokenIds)
{
m_widget->clearCodeSnippets();
@@ -143,6 +154,8 @@ void QtCodeView::doAddCodeSnippets(const std::vector<CodeSnippetParams>& snippet
m_widget->addCodeSnippet(params, insert);
}
m_widget->updateFiles();
setStyleSheet(); // so property "isLast" of QtCodeSnippet is computed correctly
m_widget->scrollToActiveFileIfRequested();