~ubuntu-branches/ubuntu/utopic/kdevelop-php/utopic

« back to all changes in this revision

Viewing changes to duchain/navigation/navigationwidget.h

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2010-01-17 17:10:22 UTC
  • Revision ID: james.westby@ubuntu.com-20100117171022-q2xlgd9ekewo2ijx
Tags: upstream-1.0.0~beta2
ImportĀ upstreamĀ versionĀ 1.0.0~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   Copyright 2007 David Nolden <david.nolden.kdevelop@art-master.de>
 
3
   Copyright 2008 Niko Sams <niko.sams@gmail.com>
 
4
 
 
5
   This library is free software; you can redistribute it and/or
 
6
   modify it under the terms of the GNU Library General Public
 
7
   License version 2 as published by the Free Software Foundation.
 
8
 
 
9
   This library is distributed in the hope that it will be useful,
 
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
   Library General Public License for more details.
 
13
 
 
14
   You should have received a copy of the GNU Library General Public License
 
15
   along with this library; see the file COPYING.LIB.  If not, write to
 
16
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
17
   Boston, MA 02110-1301, USA.
 
18
*/
 
19
 
 
20
#ifndef PHP_NAVIGATIONWIDGET_H
 
21
#define PHP_NAVIGATIONWIDGET_H
 
22
 
 
23
#include <language/duchain/navigation/abstractnavigationwidget.h>
 
24
#include "../phpduchainexport.h"
 
25
 
 
26
namespace KDevelop {
 
27
    struct IncludeItem;
 
28
}
 
29
 
 
30
namespace Php
 
31
{
 
32
 
 
33
class KDEVPHPDUCHAIN_EXPORT NavigationWidget : public KDevelop::AbstractNavigationWidget
 
34
{
 
35
    Q_OBJECT
 
36
public:
 
37
 
 
38
    /**
 
39
      * @param htmlPrefix and @param htmlSuffix can be used to add own text before/behind the
 
40
      * normal text in the navigation-widget.
 
41
      * The texts may contain links to files, using a simple special Syntax:
 
42
      * KDEV_FILE_LINK{File}. Every occurrence of KDEV_FILE_LINK will be replaced.
 
43
      * */
 
44
    NavigationWidget(KDevelop::DeclarationPointer declaration, KDevelop::TopDUContextPointer topContext, const QString& htmlPrefix = QString(), const QString& htmlSuffix = QString());
 
45
 
 
46
    NavigationWidget(const KDevelop::IncludeItem& includeItem, KDevelop::TopDUContextPointer topContext, const QString& htmlPrefix = QString(), const QString& htmlSuffix = QString());
 
47
 
 
48
    /// use this for magic constants
 
49
    /// @param position the position of the "use" of the magic constant
 
50
    /// @param constant the name of the magic constant, e.g. __LINE__
 
51
    NavigationWidget(KDevelop::TopDUContextPointer topContext, KDevelop::SimpleCursor position, const QString& constant);
 
52
 
 
53
    /**
 
54
    * Creates a compact html description-text
 
55
    **/
 
56
    static QString shortDescription(KDevelop::Declaration* declaration);
 
57
    static QString shortDescription(const KDevelop::IncludeItem& includeItem);
 
58
 
 
59
protected:
 
60
    KDevelop::DeclarationPointer m_declaration;
 
61
};
 
62
 
 
63
}
 
64
 
 
65
#endif