73 void setPrefix(
const QString &prefix);
76 virtual bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent)
const;
78 Qt::CaseSensitivity m_caseSensitivity;
79 QList<QRegularExpression> m_filterPatterns;
80 QList<QRegularExpression> m_filterPatternsCaseSensitive;
81 QList<QRegularExpression> m_sortPatterns;
124 CodeCompletionMode(
const QString &name,
const QString &description =
"", QObject *parent = NULL);
136 FilterMode filterMode()
const;
137 void setFilterMode(FilterMode mode);
139 Qt::Key triggerKey()
const;
140 void setTriggerKey(Qt::Key key);
142 bool selectWithReturn()
const;
143 void setSelectWithReturn(
bool select);
145 int triggerLength()
const;
146 void setTriggerLength(
int length);
148 QStringList triggerSymbols()
const;
149 void setTriggerSymbols(
const QStringList &symbols);
151 bool caseSensitive()
const;
152 void setCaseSensitive(
bool cs);
154 QString completionPrefix()
const;
156 bool showTooltips()
const;
157 void setShowTooltips(
bool show);
159 int tooltipsMaxLength()
const;
160 void setTooltipsMaxLength(
int length);
162 virtual void onStateChanged(
bool state);
164 virtual void onUninstall();
169 void onJediCompletionResultAvailable(
int line,
int col,
int requestId, QVector<ito::JediCompletion> completions);
171 virtual void onKeyPressed(QKeyEvent *e);
172 virtual void onKeyReleased(QKeyEvent *e);
173 virtual void onFocusIn(QFocusEvent *e);
175 void insertCompletion(
const QString &completion);
176 void onSelectedCompletionChanged(
const QString &completion);
177 void displayCompletionTooltip(
const QString &completion)
const;
180 bool requestCompletion();
182 void createCompleter();
185 void handleCompleterEvents(QKeyEvent *e);
186 bool isPopupVisible()
const;
187 void resetSyncDataAndHidePopup();
188 bool isShortcut(QKeyEvent *e)
const;
189 QRect getPopupRect()
const;
190 void showPopup(
int index = 0);
191 void showCompletions(
const QVector<JediCompletion> &completions);
192 QStandardItemModel* updateModel(
const QVector<JediCompletion> &completions);
197 QPair<QStringList, QString> parseTooltipDocstring(
const QString &docstring)
const;
199 static bool isNavigationKey(QKeyEvent *e);
202 QObject *m_pPythonEngine;
205 QMap<QString, QList<QPair<QStringList, QString>>> m_tooltips;
207 QCompleter *m_pCompleter;
208 QString m_completionPrefix;
209 bool m_caseSensitive;
210 int m_lastCursorColumn;
211 int m_lastCursorLine;
212 Qt::Key m_triggerKey;
215 QString m_currentCompletion;
216 QStringList m_triggerSymbols;
218 FilterMode m_filterMode;
219 int m_tooltipsMaxLength;
220 bool m_selectWithReturn;