itom
Loading...
Searching...
No Matches
ito::CodeCompletionMode Class Reference
Inheritance diagram for ito::CodeCompletionMode:
ito::Mode

Public Types

enum  FilterMode { FilterPrefix = 0 , FilterContains = 1 , FilterFuzzy = 2 }
 
- Public Types inherited from ito::Mode
typedef QSharedPointer< ModePtr
 

Public Member Functions

 CodeCompletionMode (const QString &name, const QString &description="", QObject *parent=NULL)
 
FilterMode filterMode () const
 
void setFilterMode (FilterMode mode)
 
Qt::Key triggerKey () const
 
void setTriggerKey (Qt::Key key)
 
bool selectWithReturn () const
 
void setSelectWithReturn (bool select)
 
int triggerLength () const
 
void setTriggerLength (int length)
 
QStringList triggerSymbols () const
 
void setTriggerSymbols (const QStringList &symbols)
 
bool caseSensitive () const
 
void setCaseSensitive (bool cs)
 
QString completionPrefix () const
 
bool showTooltips () const
 
void setShowTooltips (bool show)
 
int tooltipsMaxLength () const
 
void setTooltipsMaxLength (int length)
 
virtual void onStateChanged (bool state)
 
virtual void onInstall (CodeEditor *editor)
 
virtual void onUninstall ()
 
void hidePopup ()
 
- Public Member Functions inherited from ito::Mode
 Mode (const Mode &copy)
 
 Mode (const QString &name, const QString &description="")
 
bool operator== (const Mode &other) const
 
QString name () const
 
bool enabled () const
 
void setEnabled (bool enabled)
 
CodeEditoreditor () const
 
bool onClose () const
 
virtual QList< QAction * > actions () const
 

Protected Member Functions

bool requestCompletion ()
 
void createCompleter ()
 
void handleCompleterEvents (QKeyEvent *e)
 
bool isPopupVisible () const
 
void resetSyncDataAndHidePopup ()
 
bool isShortcut (QKeyEvent *e) const
 
QRect getPopupRect () const
 
void showPopup (int index=0)
 
void showCompletions (const QVector< JediCompletion > &completions)
 
QStandardItemModel * updateModel (const QVector< JediCompletion > &completions)
 
QPair< QStringList, QString > parseTooltipDocstring (const QString &docstring) const
 

Static Protected Member Functions

static bool isNavigationKey (QKeyEvent *e)
 

Private Slots

void onJediCompletionResultAvailable (int line, int col, int requestId, QVector< ito::JediCompletion > completions)
 
virtual void onKeyPressed (QKeyEvent *e)
 
virtual void onKeyReleased (QKeyEvent *e)
 
virtual void onFocusIn (QFocusEvent *e)
 
void insertCompletion (const QString &completion)
 
void onSelectedCompletionChanged (const QString &completion)
 
void displayCompletionTooltip (const QString &completion) const
 

Private Attributes

QObject * m_pPythonEngine
 
QMap< QString, QList< QPair< QStringList, QString > > > m_tooltips
 
bool m_showTooltips
 
QCompleter * m_pCompleter
 
QString m_completionPrefix
 
bool m_caseSensitive
 
int m_lastCursorColumn
 
int m_lastCursorLine
 
Qt::Key m_triggerKey
 
int m_requestId
 auto-incremented number for the last enqueued completion request.
 
int m_lastRequestId
 
QString m_currentCompletion
 
QStringList m_triggerSymbols
 
int m_triggerLen
 
FilterMode m_filterMode
 
int m_tooltipsMaxLength
 
bool m_selectWithReturn
 

Member Function Documentation

◆ onInstall()

void ito::CodeCompletionMode::onInstall ( CodeEditor * editor)
virtual

Reimplemented from ito::Mode.

◆ onStateChanged()

void ito::CodeCompletionMode::onStateChanged ( bool state)
virtual

Reimplemented from ito::Mode.

◆ onUninstall()

void ito::CodeCompletionMode::onUninstall ( )
virtual

Reimplemented from ito::Mode.


The documentation for this class was generated from the following files: