38 #ifndef PYGOTOASSIGNMENT_H
39 #define PYGOTOASSIGNMENT_H
45 #include "wordclick.h"
47 #include "../../python/pythonJedi.h"
63 PyAssignment(
const QString &path,
int line,
int column,
const QString &fullName) :
69 m_modulePath.replace(
".pyc",
".py");
74 return (m_modulePath == rhs.m_modulePath) && \
75 (m_line == rhs.m_line) && \
76 (m_column == rhs.m_column) && \
77 (m_fullName == rhs.m_fullName);
102 virtual void onStateChanged(
bool state);
104 void setDefaultWordClickMode(
int mode) { m_defaultMode = mode; }
105 int defaultWordClickMode()
const {
return m_defaultMode; }
107 bool mouseClickEnabled()
const {
return m_mouseClickEnabled; }
108 void setMouseClickEnabled(
bool enabled);
110 virtual QList<QAction*> actions()
const;
114 virtual void checkWordCursor(
const QTextCursor &cursor);
115 void checkWordCursorWithMode(
const QTextCursor &cursor,
int mode);
116 QList<PyAssignment> unique(
const QList<PyAssignment> &assignments)
const;
117 virtual void clearSelection();
118 void performGoto(
const QList<PyAssignment> &assignments);
120 void timerEvent(QTimerEvent *event)
override;
123 QObject *m_pPythonEngine;
124 bool m_gotoRequested;
125 int m_gotoRequestedTimerId;
126 static const int gotoRequestedTimeoutMs = 3000;
128 QList<PyAssignment> m_assignments;
129 QAction *m_pActionGotoDefinition;
130 QAction *m_pActionGotoAssignment;
131 QAction *m_pActionGotoAssignmentExtended;
133 bool m_mouseClickEnabled;
136 void requestGotoDefinition();
137 void requestGotoAssignment();
138 void requestGotoAssignmentEx();
139 void onJediAssignmentResultsAvailable(QVector<ito::JediAssignment> assignments);
140 void onWordClicked(
const QTextCursor &cursor) { performGoto(m_assignments); }
141 void onKeyReleasedGoto(QKeyEvent *e);
146 void noResultsFound();
Definition: wordclick.h:71
Definition: apiFunctionsGraph.cpp:39
Definition: pyGotoAssignment.h:95
Definition: pyGotoAssignment.h:55