itom  4.1.0
ito::PyAutoIndentMode Class Reference
Inheritance diagram for ito::PyAutoIndentMode:
ito::AutoIndentMode ito::Mode

Public Member Functions

 PyAutoIndentMode (const QString &description="", QObject *parent=NULL)
 
virtual void onInstall (CodeEditor *editor)
 
- Public Member Functions inherited from ito::AutoIndentMode
 AutoIndentMode (const QString &name, const QString &description="", QObject *parent=NULL)
 
virtual void onStateChanged (bool state)
 
void setKeyPressedModifiers (Qt::KeyboardModifiers modifiers)
 
Qt::KeyboardModifiers keyPressedModifiers () const
 
void setAutoStripTrailingSpacesAfterReturn (bool strip)
 
bool autoStripTrailingSpacesAfterReturn () const
 
void enableAutoIndent (bool autoIndent)
 
bool isAutoIndentEnabled () const
 
- 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 onUninstall ()
 
QString name () const
 
bool enabled () const
 
void setEnabled (bool enabled)
 
CodeEditoreditor () const
 
bool onClose () const
 
virtual QList< QAction * > actions () const
 

Protected Member Functions

virtual QPair< QString, QString > getIndent (const QTextCursor &cursor) const
 
QPair< QString, QString > handleIndentBetweenParen (int column, const QString &line, const QPair< QString, QString > &parent_impl, const QTextCursor &cursor) const
 
void handleIndentInsideString (const QChar &c, const QTextCursor &cursor, const QString &fullline, QString &post, QString &pre) const
 
QString handleNewScopeIndentation (const QTextCursor &cursor, const QString &fullline) const
 
void handleIndentInStatement (const QString &fullline, const QString &lastword, QString &post, QString &pre) const
 
void handleIndentAfterParen (const QTextCursor &cursor, QString &post) const
 
bool betweenParen (const QTextCursor &cursor, int column) const
 
QPair< int, QChar > getFirstOpenParen (const QTextCursor &tc, int column) const
 
void getParenPos (const QTextCursor &cursor, int column, int &ol, int &oc, int &cl, int &cc) const
 
void parensCountForBlock (int column, const QTextBlock &block, int &numOpenParentheses, int &numClosedParentheses) const
 
int getIndentOfOpeningParen (const QTextCursor &cursor) const
 
bool checkKwInLine (const QStringList &kwds, const QString &lparam) const
 
- Protected Member Functions inherited from ito::AutoIndentMode
QChar indentChar () const
 
QString singleIndent () const
 

Static Protected Member Functions

static QPair< bool, QChar > isInStringDef (const QString &fullline, int column)
 
static bool isParenOpen (const Utils::ParenthesisInfo &paren)
 
static bool isParenClosed (const Utils::ParenthesisInfo &paren)
 
static QString getFullLine (const QTextCursor &cursor)
 
static QString getLastWordUnstripped (const QTextCursor &cursor)
 
static QString getLastWord (const QTextCursor &cursor)
 
static QChar getPrevChar (const QTextCursor &cursor)
 
static QChar getNextChar (const QTextCursor &cursor)
 
static bool atBlockEnd (const QTextCursor &cursor, const QString &fullline)
 
static bool atBlockStart (const QTextCursor &cursor, const QString &line)
 

Static Protected Attributes

static QStringList newScopeKeywords
 

Additional Inherited Members

- Public Types inherited from ito::Mode
typedef QSharedPointer< ModePtr
 

Member Data Documentation

QStringList ito::PyAutoIndentMode::newScopeKeywords
staticprotected
Initial value:
= QStringList() << "if" << "class" << "def" << "while" << "for" <<
"else" << "elif" << "except" << "finally" << "try" << "with"

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