OpenStructure
Public Slots | Signals | Public Member Functions | Data Fields | Protected Slots | Protected Member Functions | Protected Attributes
PythonShellWidget Class Reference

#include <python_shell_widget.hh>

Inherits QPlainTextEdit.

Public Slots

void InsertCompletion (const QString &completion)
 
void InsertPathCompletion (const QString &completion)
 
void AppendOutput (unsigned int id, const QString &output)
 
void AppendError (unsigned int id, const QString &output)
 
void OutputFinished (unsigned int id, bool error)
 
void Complete (bool inline_completion=true)
 
void Recomplete (const QString &completion)
 
void OnSingleLineStateEntered ()
 
void OnMultiLineActiveStateEntered ()
 
void OnMultiLineInactiveStateEntered ()
 
void OnHistoryUpStateEntered ()
 
void OnHistoryDownStateEntered ()
 
void OnExecuteStateEntered ()
 
void NewLineAtEnd ()
 
void NewLineAtCursor ()
 
void OnReadonlyEntered ()
 
void OnReadwriteEntered ()
 
void OnMixedToReadwrite ()
 

Signals

void Execute (const QString &command)
 
void RequestCompletion (const QRect &rect, bool inline_completion)
 
void SetCompletionPrefix (const QString &prefix)
 
void RequestPathCompletion (const QRect &rect, bool inline_completion)
 
void SetPathCompletionPrefix (const QString &prefix)
 

Public Member Functions

 PythonShellWidget (QWidget *parent=NULL)
 
GutterBlockList GetGutterBlocks (const QRect &rect)
 
void SetTabWidth (int width)
 
int GetTabWidth () const
 
QString GetCommand ()
 
QTextBlock GetEditStartBlock ()
 

Data Fields

int tab_width_
 

Protected Slots

void handle_completion_ ()
 
void handle_output_toggle_ ()
 
void handle_wrap_to_function_ ()
 
void handle_select_all_ ()
 
void handle_select_all_rw_ ()
 
void handle_delete_ ()
 
void handle_backspace_ ()
 
void handle_clear_all_ ()
 

Protected Member Functions

virtual void resizeEvent (QResizeEvent *event)
 
virtual void showEvent (QShowEvent *event)
 
virtual void insertFromMimeData (const QMimeData *source)
 
void set_output_visible_ (bool flag=true)
 
void setup_readonly_state_machine_ ()
 
void setup_state_machine_ ()
 
void wrap_into_function_ (const QString &command)
 
void set_command_ (const QString &command)
 
void set_block_edit_mode_ (BlockEditMode flag)
 
BlockEditMode get_block_edit_mode_ ()
 
void set_block_type_ (const QTextBlock &start, const QTextBlock &end, BlockType type)
 

Protected Attributes

PythonSyntaxHighlighter highlighter_
 
PythonCompletercompleter_
 
PathCompleterpath_completer_
 
BlockEditMode block_edit_mode_
 
ShellHistory history_
 
Guttergutter_
 
bool output_visible_
 
int completion_start_
 
int completion_end_
 
QTextBlock block_edit_start_
 
OutputBlockList output_blocks_
 
StateMachinemachine_
 
StateMachinereadonly_machine_
 
Statereadwrite_state_
 
Statemultiline_active_state_
 

Detailed Description

Definition at line 47 of file python_shell_widget.hh.

Constructor & Destructor Documentation

◆ PythonShellWidget()

PythonShellWidget ( QWidget *  parent = NULL)

Member Function Documentation

◆ AppendError

void AppendError ( unsigned int  id,
const QString &  output 
)
slot

◆ AppendOutput

void AppendOutput ( unsigned int  id,
const QString &  output 
)
slot

◆ Complete

void Complete ( bool  inline_completion = true)
slot

◆ Execute

void Execute ( const QString &  command)
signal

◆ get_block_edit_mode_()

BlockEditMode get_block_edit_mode_ ( )
protected

◆ GetCommand()

QString GetCommand ( )

◆ GetEditStartBlock()

QTextBlock GetEditStartBlock ( )

◆ GetGutterBlocks()

GutterBlockList GetGutterBlocks ( const QRect &  rect)

◆ GetTabWidth()

int GetTabWidth ( ) const

◆ handle_backspace_

void handle_backspace_ ( )
protectedslot

◆ handle_clear_all_

void handle_clear_all_ ( )
protectedslot

◆ handle_completion_

void handle_completion_ ( )
protectedslot

◆ handle_delete_

void handle_delete_ ( )
protectedslot

◆ handle_output_toggle_

void handle_output_toggle_ ( )
protectedslot

◆ handle_select_all_

void handle_select_all_ ( )
protectedslot

◆ handle_select_all_rw_

void handle_select_all_rw_ ( )
protectedslot

◆ handle_wrap_to_function_

void handle_wrap_to_function_ ( )
protectedslot

◆ InsertCompletion

void InsertCompletion ( const QString &  completion)
slot

◆ insertFromMimeData()

virtual void insertFromMimeData ( const QMimeData *  source)
protectedvirtual

◆ InsertPathCompletion

void InsertPathCompletion ( const QString &  completion)
slot

◆ NewLineAtCursor

void NewLineAtCursor ( )
slot

◆ NewLineAtEnd

void NewLineAtEnd ( )
slot

◆ OnExecuteStateEntered

void OnExecuteStateEntered ( )
slot

◆ OnHistoryDownStateEntered

void OnHistoryDownStateEntered ( )
slot

◆ OnHistoryUpStateEntered

void OnHistoryUpStateEntered ( )
slot

◆ OnMixedToReadwrite

void OnMixedToReadwrite ( )
slot

◆ OnMultiLineActiveStateEntered

void OnMultiLineActiveStateEntered ( )
slot

◆ OnMultiLineInactiveStateEntered

void OnMultiLineInactiveStateEntered ( )
slot

◆ OnReadonlyEntered

void OnReadonlyEntered ( )
slot

◆ OnReadwriteEntered

void OnReadwriteEntered ( )
slot

◆ OnSingleLineStateEntered

void OnSingleLineStateEntered ( )
slot

◆ OutputFinished

void OutputFinished ( unsigned int  id,
bool  error 
)
slot

◆ Recomplete

void Recomplete ( const QString &  completion)
slot

◆ RequestCompletion

void RequestCompletion ( const QRect &  rect,
bool  inline_completion 
)
signal

◆ RequestPathCompletion

void RequestPathCompletion ( const QRect &  rect,
bool  inline_completion 
)
signal

◆ resizeEvent()

virtual void resizeEvent ( QResizeEvent *  event)
protectedvirtual

◆ set_block_edit_mode_()

void set_block_edit_mode_ ( BlockEditMode  flag)
protected

◆ set_block_type_()

void set_block_type_ ( const QTextBlock &  start,
const QTextBlock &  end,
BlockType  type 
)
protected

◆ set_command_()

void set_command_ ( const QString &  command)
protected

◆ set_output_visible_()

void set_output_visible_ ( bool  flag = true)
protected

◆ SetCompletionPrefix

void SetCompletionPrefix ( const QString &  prefix)
signal

◆ SetPathCompletionPrefix

void SetPathCompletionPrefix ( const QString &  prefix)
signal

◆ SetTabWidth()

void SetTabWidth ( int  width)

◆ setup_readonly_state_machine_()

void setup_readonly_state_machine_ ( )
protected

◆ setup_state_machine_()

void setup_state_machine_ ( )
protected

◆ showEvent()

virtual void showEvent ( QShowEvent *  event)
protectedvirtual

◆ wrap_into_function_()

void wrap_into_function_ ( const QString &  command)
protected

Field Documentation

◆ block_edit_mode_

BlockEditMode block_edit_mode_
protected

Definition at line 115 of file python_shell_widget.hh.

◆ block_edit_start_

QTextBlock block_edit_start_
protected

Definition at line 121 of file python_shell_widget.hh.

◆ completer_

PythonCompleter* completer_
protected

Definition at line 113 of file python_shell_widget.hh.

◆ completion_end_

int completion_end_
protected

Definition at line 120 of file python_shell_widget.hh.

◆ completion_start_

int completion_start_
protected

Definition at line 119 of file python_shell_widget.hh.

◆ gutter_

Gutter* gutter_
protected

Definition at line 117 of file python_shell_widget.hh.

◆ highlighter_

PythonSyntaxHighlighter highlighter_
protected

Definition at line 112 of file python_shell_widget.hh.

◆ history_

ShellHistory history_
protected

Definition at line 116 of file python_shell_widget.hh.

◆ machine_

StateMachine* machine_
protected

Definition at line 123 of file python_shell_widget.hh.

◆ multiline_active_state_

State* multiline_active_state_
protected

Definition at line 126 of file python_shell_widget.hh.

◆ output_blocks_

OutputBlockList output_blocks_
protected

Definition at line 122 of file python_shell_widget.hh.

◆ output_visible_

bool output_visible_
protected

Definition at line 118 of file python_shell_widget.hh.

◆ path_completer_

PathCompleter* path_completer_
protected

Definition at line 114 of file python_shell_widget.hh.

◆ readonly_machine_

StateMachine* readonly_machine_
protected

Definition at line 124 of file python_shell_widget.hh.

◆ readwrite_state_

State* readwrite_state_
protected

Definition at line 125 of file python_shell_widget.hh.

◆ tab_width_

int tab_width_

Definition at line 60 of file python_shell_widget.hh.


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