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

« back to all changes in this revision

Viewing changes to completion/implementationitem.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
 * KDevelop Php Code Completion Support
 
3
 *
 
4
 * Copyright 2009 Milian Wolff <mail@milianw.de>
 
5
 * Basec on Cpp ImplementationHelperItem
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify
 
8
 * it under the terms of the GNU Library General Public License as
 
9
 * published by the Free Software Foundation; either version 2 of the
 
10
 * License, or (at your option) any later version.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 * GNU General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public
 
18
 * License along with this program; if not, write to the
 
19
 * Free Software Foundation, Inc.,
 
20
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
21
 */
 
22
#ifndef IMPLEMENTATIONITEM_H
 
23
#define IMPLEMENTATIONITEM_H
 
24
 
 
25
#include "item.h"
 
26
 
 
27
using namespace KDevelop;
 
28
 
 
29
namespace Php
 
30
{
 
31
 
 
32
class ImplementationItem : public NormalDeclarationCompletionItem
 
33
{
 
34
public:
 
35
    enum HelperType {
 
36
        Override,
 
37
        Implement
 
38
    };
 
39
 
 
40
    explicit ImplementationItem(HelperType type, KDevelop::DeclarationPointer decl = KDevelop::DeclarationPointer(), KSharedPtr<KDevelop::CodeCompletionContext> context = KSharedPtr<KDevelop::CodeCompletionContext>(), int _inheritanceDepth = 0)
 
41
            : NormalDeclarationCompletionItem(decl, context, _inheritanceDepth), m_type(type) {}
 
42
 
 
43
    virtual void execute(KTextEditor::Document* document, const KTextEditor::Range& word);
 
44
 
 
45
    virtual QVariant data(const QModelIndex& index, int role, const KDevelop::CodeCompletionModel* model) const;
 
46
 
 
47
    HelperType m_type;
 
48
};
 
49
 
 
50
}
 
51
 
 
52
#endif // IMPLEMENTATIONITEM_H