Warning, file /kdevelop/kdev-python/duchain/navigation/navigationwidget.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     SPDX-FileCopyrightText: 2012-2014 Sven Brauch <svenbrauch@googlemail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "navigationwidget.h"
0008 #include "declarationnavigationcontext.h"
0009 #include "helpers.h"
0010 
0011 using namespace KDevelop;
0012 
0013 namespace Python {
0014 
0015 NavigationWidget::NavigationWidget(KDevelop::DeclarationPointer declaration, KDevelop::TopDUContextPointer topContext,
0016                                    KDevelop::AbstractNavigationWidget::DisplayHints hints)
0017     : KDevelop::AbstractNavigationWidget()
0018 {
0019     setDisplayHints(hints);
0020 
0021     initBrowser(400);
0022     auto realDeclaration = DeclarationPointer(Helper::resolveAliasDeclaration(declaration.data()));
0023     auto context = new DeclarationNavigationContext(realDeclaration, topContext);
0024     setContext(NavigationContextPointer(context));
0025 }
0026 
0027 NavigationWidget::NavigationWidget(const IncludeItem &/*includeItem*/, TopDUContextPointer /*topContext*/,
0028                                    KDevelop::AbstractNavigationWidget::DisplayHints hints)
0029     : KDevelop::AbstractNavigationWidget()
0030 {
0031     setDisplayHints(hints);
0032     // not supported
0033 }
0034 
0035 }
0036 
0037 #include "moc_navigationwidget.cpp"