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

Classes

struct  ArgInfo
 
struct  FunctionInfo
 

Public Types

enum  Style { GoogleStyle = 0 , NumpyStyle = 1 }
 
- Public Types inherited from ito::Mode
typedef QSharedPointer< ModePtr
 

Public Member Functions

 PyDocstringGeneratorMode (const QString &name, const QString &description="", QObject *parent=nullptr)
 
virtual void onStateChanged (bool state)
 
void insertDocstring (const QTextCursor &cursor, const QString &quotes="\"\"\"", bool insertOpeningQuotes=true, int overwriteEndLineIdx=-1) const
 
QSharedPointer< OutlineItemgetOutlineOfLineIdx (int lineIdx) const
 
Style docstringStyle () const
 
void setDocstringStyle (const Style &style)
 
- Public Member Functions inherited from ito::Mode
 Mode (const Mode &copy)
 
 Mode (const QString &name, const QString &description="")
 
bool operator== (const Mode &other) const
 
virtual void onInstall (CodeEditor *editor)
 
virtual void onUninstall ()
 
QString name () const
 
bool enabled () const
 
void setEnabled (bool enabled)
 
CodeEditoreditor () const
 
bool onClose () const
 
virtual QList< QAction * > actions () const
 

Protected Member Functions

int lastLineIdxOfDefinition (const QSharedPointer< OutlineItem > &item) const
 
FunctionInfo parseFunctionInfo (const QSharedPointer< OutlineItem > &item, int lastLineIdxOfDefinition) const
 
void parseArgList (const QSharedPointer< OutlineItem > &item, FunctionInfo &info) const
 
QString generateGoogleDoc (const QSharedPointer< OutlineItem > &item, const FunctionInfo &info, int &cursorPos) const
 
QString generateNumpyDoc (const QSharedPointer< OutlineItem > &item, const FunctionInfo &info, int &cursorPos) const
 

Protected Attributes

QSharedPointer< QMenu > m_popupMenu
 
Style m_docstringStyle
 
int m_overwriteEndLineIndex
 

Private Slots

void onKeyPressed (QKeyEvent *e)
 
void mnuInsertDocstring ()
 

Member Function Documentation

◆ onStateChanged()

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

Reimplemented from ito::Mode.


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