File indexing completed on 2024-04-28 04:35:52
0001 /* This file is part of KDevelop 0002 * 0003 * Copyright (C) 2011-2015 Miquel Sabaté Solà <mikisabate@gmail.com> 0004 * 0005 * This program is free software: you can redistribute it and/or modify 0006 * it under the terms of the GNU General Public License as published by 0007 * the Free Software Foundation, either version 3 of the License, or 0008 * (at your option) any later version. 0009 * 0010 * This program is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 * GNU General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU General Public License 0016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0017 */ 0018 0019 0020 #ifndef NAVIGATIONWIDGET_H 0021 #define NAVIGATIONWIDGET_H 0022 0023 0024 #include <duchain/duchainexport.h> 0025 #include <language/duchain/navigation/abstractnavigationwidget.h> 0026 0027 0028 namespace KDevelop { class IncludeItem; } 0029 0030 namespace ruby { 0031 0032 /** 0033 * @class NavigationWidget 0034 * 0035 * The NavigationWidget for the Ruby plugin. 0036 */ 0037 class KDEVRUBYDUCHAIN_EXPORT NavigationWidget : public KDevelop::AbstractNavigationWidget 0038 { 0039 Q_OBJECT 0040 0041 public: 0042 /** 0043 * Constructor. 0044 * 0045 * @param decl A pointer to the involved declaration. 0046 * @param topContext The involved Top Context. 0047 */ 0048 explicit NavigationWidget(KDevelop::DeclarationPointer decl, 0049 KDevelop::TopDUContextPointer topContext, 0050 KDevelop::AbstractNavigationWidget::DisplayHints hints = KDevelop::AbstractNavigationWidget::NoHints); 0051 0052 /** 0053 * Constructor. 0054 * 0055 * @param item The involved Include Item. 0056 * @param topContext The involved Top Context. 0057 */ 0058 explicit NavigationWidget(const KDevelop::IncludeItem &item, 0059 KDevelop::TopDUContextPointer topContext, 0060 KDevelop::AbstractNavigationWidget::DisplayHints hints = KDevelop::AbstractNavigationWidget::NoHints); 0061 0062 /** 0063 * Creates a compact html description given a Declaration. 0064 * 0065 * @param decl The given Declaration. 0066 */ 0067 static QString shortDescription(KDevelop::Declaration *decl); 0068 0069 /** 0070 * Creates a compact html description given an Include item. 0071 * 0072 * @param decl The given Include item. 0073 */ 0074 static QString shortDescription(const KDevelop::IncludeItem &item); 0075 }; 0076 0077 } 0078 0079 0080 #endif // NAVIGATIONWIDGET_H