File: codecompletionmodel.sip

package info (click to toggle)
pykde4 4%3A4.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 29,376 kB
  • sloc: python: 2,056; cpp: 290; makefile: 41; sh: 5
file content (173 lines) | stat: -rw-r--r-- 4,984 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
//
//     Copyright 2007 Jim Bublitz <jbublitz@nwinternet.com>
//     Earlier copyrights 1998 - 2006 Jim Bublitz also apply


//                 Generated by preSip


// This file is part of PyKDE4.

// PyKDE4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.

// PyKDE4 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

%ModuleHeaderCode
//ctscc
#include <ktexteditor/codecompletionmodel.h>
#include <ktexteditor/configpage.h>
#include <ktexteditor/document.h>
#include <ktexteditor/editor.h>
#include <ktexteditor/editorchooser.h>
#include <ktexteditor/plugin.h>
#include <ktexteditor/cursorfeedback.h>
#include <ktexteditor/rangefeedback.h>
#include <ktexteditor/view.h>
%End

namespace KTextEditor
{

class CodeCompletionModel : QAbstractItemModel
{
%TypeHeaderCode
#include <ktexteditor/codecompletionmodel.h>
%End


public:
                         CodeCompletionModel (QObject*);

    enum Columns
    {
        Prefix, 
        Icon, 
        Scope, 
        Name, 
        Arguments, 
        Postfix
    };

    static const int     ColumnCount;

    enum CompletionProperty
    {
        NoProperty, 
        FirstProperty, 
        Public, 
        Protected, 
        Private, 
        Static, 
        Const, 
        Namespace, 
        Class, 
        Struct, 
        Union, 
        Function, 
        Variable, 
        Enum, 
        Template, 
        TypeAlias, 
        Virtual, 
        Override, 
        Inline, 
        Friend, 
        Signal, 
        Slot, 
        LocalScope, 
        NamespaceScope, 
        GlobalScope, 
        LastProperty
    };

    typedef QFlags<KTextEditor::CodeCompletionModel::CompletionProperty> CompletionProperties;

    enum HighlightMethod
    {
        NoHighlighting, 
        InternalHighlighting, 
        CustomHighlighting
    };

    typedef QFlags<KTextEditor::CodeCompletionModel::HighlightMethod> HighlightMethods;

    enum ExtraItemDataRoles
    {
        CompletionRole, 
        ScopeIndex, 
        MatchQuality, 
        SetMatchContext, 
        HighlightingMethod, 
        CustomHighlight, 
        InheritanceDepth, 
        IsExpandable, 
        ExpandingWidget, 
        ItemSelected, 
        ArgumentHintDepth, 
        BestMatchesCount, 
        AccessibilityNext, 
        AccessibilityPrevious, 
        AccessibilityAccept
    };

    static const int     LastItemDataRole;
    void                 setRowCount (int);

    enum InvocationType
    {
        AutomaticInvocation, 
        UserInvocation, 
        ManualInvocation
    };

    virtual void         completionInvoked (KTextEditor::View*, const KTextEditor::Range&, KTextEditor::CodeCompletionModel::InvocationType);
    virtual void         executeCompletionItem (KTextEditor::Document*, const KTextEditor::Range&, int) const;
    virtual int          columnCount (const QModelIndex& = QModelIndex ()) const;
    virtual QModelIndex  index (int, int, const QModelIndex& = QModelIndex ()) const;
    virtual QMap<int, QVariant> itemData (const QModelIndex&) const;
    virtual QModelIndex  parent (const QModelIndex&) const;
    virtual int          rowCount (const QModelIndex& = QModelIndex ()) const;

// Subclasses for QObject

public:
%ConvertToSubClassCode

    if (dynamic_cast<KTextEditor::CodeCompletionModel*>(sipCpp))
        sipClass = sipClass_KTextEditor_CodeCompletionModel;
    else if (dynamic_cast<KTextEditor::ConfigPage*>(sipCpp))
        sipClass = sipClass_KTextEditor_ConfigPage;
    else if (dynamic_cast<KTextEditor::Document*>(sipCpp))
        sipClass = sipClass_KTextEditor_Document;
    else if (dynamic_cast<KTextEditor::Editor*>(sipCpp))
        sipClass = sipClass_KTextEditor_Editor;
    else if (dynamic_cast<KTextEditor::EditorChooser*>(sipCpp))
        sipClass = sipClass_KTextEditor_EditorChooser;
    else if (dynamic_cast<KTextEditor::Plugin*>(sipCpp))
        sipClass = sipClass_KTextEditor_Plugin;
    else if (dynamic_cast<KTextEditor::SmartCursorNotifier*>(sipCpp))
        sipClass = sipClass_KTextEditor_SmartCursorNotifier;
    else if (dynamic_cast<KTextEditor::SmartRangeNotifier*>(sipCpp))
        sipClass = sipClass_KTextEditor_SmartRangeNotifier;
    else if (dynamic_cast<KTextEditor::View*>(sipCpp))
        sipClass = sipClass_KTextEditor_View;
    else if (dynamic_cast<KTextEditor::View*>(sipCpp))
        sipClass = sipClass_KTextEditor_View;
    else
        sipClass = NULL;
%End


};  // class CodeCompletionModel

};  // namespace KTextEditor