File indexing completed on 2024-04-28 15:52:42
0001 /* 0002 SPDX-FileCopyrightText: 2007 David Nolden <david.nolden.kdevelop@art-master.de> 0003 SPDX-FileCopyrightText: 2008 Niko Sams <niko.sams@gmail.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-only 0006 */ 0007 0008 #ifndef PHP_NAVIGATIONWIDGET_H 0009 #define PHP_NAVIGATIONWIDGET_H 0010 0011 #include <language/duchain/navigation/abstractnavigationwidget.h> 0012 #include "phpduchainexport.h" 0013 0014 namespace KDevelop { 0015 class IncludeItem; 0016 class SimpleCursor; 0017 } 0018 0019 namespace Php 0020 { 0021 0022 class KDEVPHPDUCHAIN_EXPORT NavigationWidget : public KDevelop::AbstractNavigationWidget 0023 { 0024 Q_OBJECT 0025 public: 0026 0027 NavigationWidget(KDevelop::DeclarationPointer declaration, KDevelop::TopDUContextPointer topContext, 0028 KDevelop::AbstractNavigationWidget::DisplayHints hints = KDevelop::AbstractNavigationWidget::NoHints); 0029 0030 NavigationWidget(const KDevelop::IncludeItem& includeItem, KDevelop::TopDUContextPointer topContext, 0031 KDevelop::AbstractNavigationWidget::DisplayHints hints = KDevelop::AbstractNavigationWidget::NoHints); 0032 0033 /// use this for magic constants 0034 /// @param position the position of the "use" of the magic constant 0035 /// @param constant the name of the magic constant, e.g. __LINE__ 0036 NavigationWidget(KDevelop::TopDUContextPointer topContext, KTextEditor::Cursor position, const QString& constant, 0037 KDevelop::AbstractNavigationWidget::DisplayHints hints = KDevelop::AbstractNavigationWidget::NoHints); 0038 0039 /** 0040 * Creates a compact html description-text 0041 **/ 0042 static QString shortDescription(KDevelop::Declaration* declaration); 0043 static QString shortDescription(const KDevelop::IncludeItem& includeItem); 0044 0045 protected: 0046 KDevelop::DeclarationPointer m_declaration; 0047 }; 0048 0049 } 0050 0051 #endif