itom  4.1.0
pythonJedi.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2020, Institut fuer Technische Optik (ITO),
5  Universitaet 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 <qstring.h>
28 #include <qpointer.h>
29 #include <qobject.h>
30 
31 namespace ito
32 {
33  //--------------------------------------------------------------------------------------
35  {
36  QString m_source;
37  int m_line;
38  int m_col;
39  QString m_path;
40  QByteArray m_callbackFctName;
41  QPointer<QObject> m_sender;
42  };
43 
44  //--------------------------------------------------------------------------------------
45  struct JediCalltip
46  {
47  JediCalltip() : m_column(-1), m_bracketStartCol(-1), m_bracketStartLine(-1) {};
48  JediCalltip(const QString &methodName, const QStringList &params, int column, int bracketStartLine, int bracketStartCol) :
49  m_calltipMethodName(methodName),
50  m_calltipParams(params),
51  m_column(column),
52  m_bracketStartCol(bracketStartCol),
53  m_bracketStartLine(bracketStartLine)
54  {}
55 
56  QString m_calltipMethodName;
57  QStringList m_calltipParams;
58  int m_column;
59  int m_bracketStartCol;
60  int m_bracketStartLine;
61  };
62 
63  //--------------------------------------------------------------------------------------
65  {
66  QString m_source;
67  int m_line;
68  int m_col;
69  QString m_path;
70  QString m_prefix;
71  int m_requestId;
72  QByteArray m_callbackFctName;
73  QPointer<QObject> m_sender;
74  };
75 
76  //--------------------------------------------------------------------------------------
78  {
79  JediCompletion() {};
80  JediCompletion(const QString &name, const QStringList &tooltips, const QString &icon = QString(), const QString &description = QString()) :
81  m_name(name),
82  m_tooltips(tooltips),
83  m_icon(icon),
84  m_description(description)
85  {}
86 
87  QString m_name;
88  QStringList m_tooltips;
89  QString m_icon;
90  QString m_description;
91  };
92 
93  //--------------------------------------------------------------------------------------
95  {
96  QString m_source;
97  int m_line;
98  int m_col;
99  QString m_path;
100  int m_mode;
101  QByteArray m_callbackFctName;
102  QPointer<QObject> m_sender;
103  };
104 
105  //--------------------------------------------------------------------------------------
107  {
108  JediAssignment() {};
109  JediAssignment(const QString &path, int line, int column, const QString &fullName) :
110  m_path(path),
111  m_line(line),
112  m_column(column),
113  m_fullName(fullName)
114  {}
115 
116  QString m_path; // File path of the module where the assignment can be found
117  int m_line; //line number
118  int m_column; //column number
119  QString m_fullName; //assignement full name
120  };
121 
122  //--------------------------------------------------------------------------------------
124  {
125  QString m_source;
126  int m_line;
127  int m_col;
128  QString m_path;
129  QByteArray m_callbackFctName;
130  QPointer<QObject> m_sender;
131  };
132 
133  //--------------------------------------------------------------------------------------
134  struct JediGetHelp
135  {
136  JediGetHelp() {};
137  JediGetHelp(const QString &description, const QStringList &tooltips) :
138  m_description(description),
139  m_tooltips(tooltips)
140  {}
141 
142  QString m_description;
143  QStringList m_tooltips;
144  };
145 
146 } //end namespace ito
147 
148 Q_DECLARE_METATYPE(ito::JediCalltip)
149 Q_DECLARE_METATYPE(ito::JediCompletion)
150 Q_DECLARE_METATYPE(ito::JediAssignment)
151 Q_DECLARE_METATYPE(ito::JediGetHelp)
152 
153 #endif
Definition: pythonJedi.h:134
Definition: pythonJedi.h:94
Definition: apiFunctionsGraph.cpp:39
Definition: pythonJedi.h:77
Definition: pythonJedi.h:45
QStringList m_tooltips
can be multiple tooltips for overloaded methods
Definition: pythonJedi.h:143
Definition: pythonJedi.h:123
Definition: pythonJedi.h:64
Definition: pythonJedi.h:34
QStringList m_tooltips
can be multiple tooltips for overloaded methods
Definition: pythonJedi.h:88
Definition: pythonJedi.h:106