itom
Loading...
Searching...
No Matches
pythonJedi.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2023, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#ifndef PYTHONJEDI_H
24#define PYTHONJEDI_H
25
26#include <QMetaType>
27#include <qobject.h>
28#include <qpointer.h>
29#include <qstring.h>
30#include <qvector.h>
31#include <qstringlist.h>
32
33namespace ito {
34//--------------------------------------------------------------------------------------
36{
37 QString m_source;
38 int m_line;
39 int m_col;
40 QString m_path;
41 QByteArray m_callbackFctName;
42 QPointer<QObject> m_sender;
43};
44
45//--------------------------------------------------------------------------------------
47{
48 JediCalltip() : m_column(-1), m_bracketStartCol(-1), m_bracketStartLine(-1){};
50 const QString& methodName,
51 const QStringList& params,
52 int column,
53 int bracketStartLine,
54 int bracketStartCol) :
55 m_calltipMethodName(methodName),
56 m_calltipParams(params), m_column(column), m_bracketStartCol(bracketStartCol),
57 m_bracketStartLine(bracketStartLine)
58 {
59 }
60
61 QString m_calltipMethodName;
62 QStringList m_calltipParams;
63 int m_column;
64 int m_bracketStartCol;
65 int m_bracketStartLine;
66};
67
68//--------------------------------------------------------------------------------------
70{
71 QString m_source;
72 int m_line;
73 int m_col;
74 QString m_path;
75 QString m_prefix;
76 int m_requestId;
77 QByteArray m_callbackFctName;
78 QPointer<QObject> m_sender;
79};
80
81//--------------------------------------------------------------------------------------
83{
86 const QString& name,
87 const QStringList& tooltips,
88 const QString& icon = QString(),
89 const QString& description = QString()) :
90 m_name(name),
91 m_tooltips(tooltips), m_icon(icon), m_description(description)
92 {
93 }
94
95 QString m_name;
96 QStringList m_tooltips;
97 QString m_icon;
98 QString m_description;
99};
100
101//--------------------------------------------------------------------------------------
103{
104 QString m_source;
105 int m_line;
106 int m_col;
107 QString m_path;
108 int m_mode;
109 QByteArray m_callbackFctName;
110 QPointer<QObject> m_sender;
111};
112
113//--------------------------------------------------------------------------------------
115{
116 JediAssignment(){};
117 JediAssignment(const QString& path, int line, int column, const QString& fullName) :
118 m_path(path), m_line(line), m_column(column), m_fullName(fullName)
119 {
120 }
121
122 QString m_path; // File path of the module where the assignment can be found
123 int m_line; // line number
124 int m_column; // column number
125 QString m_fullName; // assignment full name
126};
127
128//--------------------------------------------------------------------------------------
130{
131 QString m_source;
132 int m_line;
133 int m_col;
134 QString m_path;
135 QByteArray m_callbackFctName;
136 QPointer<QObject> m_sender;
137};
138
139//--------------------------------------------------------------------------------------
141{
142 JediGetHelp(){};
143 JediGetHelp(const QString& description, const QStringList& tooltips) :
144 m_description(description), m_tooltips(tooltips)
145 {
146 }
147
148 QString m_description;
149 QStringList m_tooltips;
150};
151
152//--------------------------------------------------------------------------------------
154{
155 QString m_code;
156 int m_line;
157 int m_col;
158 QString m_filepath;
159 bool m_fileModified;
162 QByteArray m_callbackFctName;
163 QPointer<QObject> m_sender;
164};
165
166//-------------------------------------------------------------------------------------
168{
169 int lineNumber;
170 int startColumnIndex;
171 int oldWordSize;
172};
173
174//--------------------------------------------------------------------------------------
176{
177 JediRename(){};
178
179 QString m_filePath;
180 bool m_untitledFile;
183
185 /* The project is defined by jedi.api.project.get_default_project()
186 */
187 bool m_fileInProject;
188
189 QVector<FileRenameItem> m_items;
190};
191
192} // end namespace ito
193
194Q_DECLARE_METATYPE(ito::JediCalltip)
195Q_DECLARE_METATYPE(ito::JediCompletion)
196Q_DECLARE_METATYPE(ito::JediAssignment)
197Q_DECLARE_METATYPE(ito::JediGetHelp)
198Q_DECLARE_METATYPE(ito::JediRename)
199Q_DECLARE_METATYPE(ito::FileRenameItem)
200
201#endif
Definition apiFunctionsGraph.cpp:40
Definition pythonJedi.h:168
Definition pythonJedi.h:115
Definition pythonJedi.h:103
Definition pythonJedi.h:47
Definition pythonJedi.h:36
Definition pythonJedi.h:83
QStringList m_tooltips
can be multiple tooltips for overloaded methods
Definition pythonJedi.h:96
Definition pythonJedi.h:70
Definition pythonJedi.h:141
QStringList m_tooltips
can be multiple tooltips for overloaded methods
Definition pythonJedi.h:149
Definition pythonJedi.h:130
Definition pythonJedi.h:176
bool m_mainFile
defines if this file is with the project of the initial file of the rename operation.
Definition pythonJedi.h:182
QString m_filePath
either a true filepath or a non-existing dummy file in the current dir, if the file is untitled.
Definition pythonJedi.h:179
QString m_untitledFilename
null if a real file
Definition pythonJedi.h:181
Definition pythonJedi.h:154
QString m_untitledName
only != null, if this file is unsafed
Definition pythonJedi.h:161
QString m_filepath
full filepath, or a non-existing py-file in the current directory in case of an unsafed file
Definition pythonJedi.h:158
bool m_untitledFile
true if file has not been safed yet
Definition pythonJedi.h:160