24 #ifndef OST_GUI_PYTHON_SHELL_WIDGET_HH
25 #define OST_GUI_PYTHON_SHELL_WIDGET_HH
34 #include <QPlainTextEdit>
36 namespace ost {
namespace gui {
40 class PythonCompleter;
49 typedef QHash<unsigned int,QTextBlock> OutputBlockList;
55 void SetTabWidth(
int width);
56 int GetTabWidth()
const;
58 QTextBlock GetEditStartBlock();
63 void Execute(
const QString& command);
64 void RequestCompletion(
const QRect& rect,
bool inline_completion);
65 void SetCompletionPrefix(
const QString& prefix);
66 void RequestPathCompletion(
const QRect& rect,
bool inline_completion);
67 void SetPathCompletionPrefix(
const QString& prefix);
70 void InsertCompletion(
const QString& completion);
71 void InsertPathCompletion(
const QString& completion);
72 void AppendOutput(
unsigned int id,
const QString& output);
73 void AppendError(
unsigned int id,
const QString& output);
74 void OutputFinished(
unsigned int id,
bool error);
75 void Complete(
bool inline_completion=
true);
76 void Recomplete(
const QString& completion);
78 void OnSingleLineStateEntered();
79 void OnMultiLineActiveStateEntered();
80 void OnMultiLineInactiveStateEntered();
81 void OnHistoryUpStateEntered();
82 void OnHistoryDownStateEntered();
83 void OnExecuteStateEntered();
85 void NewLineAtCursor();
86 void OnReadonlyEntered();
87 void OnReadwriteEntered();
88 void OnMixedToReadwrite();
90 void handle_completion_();
91 void handle_output_toggle_();
92 void handle_wrap_to_function_();
93 void handle_select_all_();
94 void handle_select_all_rw_();
95 void handle_delete_();
96 void handle_backspace_();
97 void handle_clear_all_();
100 virtual void resizeEvent(QResizeEvent* event);
101 virtual void showEvent(QShowEvent* event);
102 virtual void insertFromMimeData(
const QMimeData * source );
103 void set_output_visible_(
bool flag=
true);
104 void setup_readonly_state_machine_();
105 void setup_state_machine_();
106 void wrap_into_function_(
const QString& command);
107 void set_command_(
const QString& command);
110 void set_block_type_(
const QTextBlock& start,
const QTextBlock&
end,
BlockType type);
pointer_it< T > end(const std::vector< T > &values)
std::vector< GutterBlock > GutterBlockList
#define DLLEXPORT_OST_GUI