Go to the documentation of this file.
5 #ifndef BALL_VIEW_WIDGETS_PYWIDGET_H
6 #define BALL_VIEW_WIDGETS_PYWIDGET_H
12 #ifndef BALL_DATATYPE_STRING_H
16 #ifndef BALL_VIEW_WIDGETS_DOCKWIDGET_H
20 #ifndef BALL_VIEW_WIDGETS_TEXTEDITORWIDGET_H
24 #include <QtGui/QDragEnterEvent>
25 #include <QtGui/QKeyEvent>
26 #include <QtGui/QDropEvent>
27 #include <QtWidgets/QLineEdit>
28 #include <QtWidgets/QComboBox>
29 #include <QtWidgets/QTabWidget>
30 #include <QtGui/QSyntaxHighlighter>
31 #include <QtGui/QValidator>
32 #include <QtCore/QStringList>
34 #include <QtCore/QThread>
44 class RunPythonThread;
83 virtual State
validate(QString& input,
int& pos)
const;
107 bool& ok,
String comment =
"");
149 void setPyWidget(
PyWidget* pw) { pw_ = pw;}
153 virtual void keyPressEvent(QKeyEvent* event);
165 void setPyWidget(
PyWidget* pw) { pw_ = pw;}
169 virtual void keyPressEvent(QKeyEvent* event);
174 friend class MyLineEdit;
458 #endif // BALL_VIEW_WIDGETS_PYWIDGET_H
PythonValidator(QObject *parent=0)
virtual bool completionSelected_()
vector< QRegExp > python_patterns
String getCurrentLine() const
BALL_DEPRECATED void createMenuHelpEntry_(QMenu *, TextEditorWidget *, const QPoint &)
virtual void modifyHotkeys()
PythonHighlighter highlighter_2_
virtual void finalizeWidget(MainControl &main_control)
void insertHotkey(const Hotkey &hotkey)
bool keyPressed(QKeyEvent *e)
bool started_startup_script_
RunPythonThread * thread_
bool runString(String command)
bool set(const String &data)
virtual void fetchPreferences(INIFile &inifile)
BALL_DEPRECATED void showDocumentation()
void appendText_(TextEditorWidget *te, String text)
virtual void clearHistory_()
bool getClassAndMember_(String toc)
std::list< Hotkey >::iterator findKey_(Hotkey &hotkey)
virtual bool openFile(const String &filename)
virtual void hotkeyItem()
virtual void contentsDropEvent(QDropEvent *e)
BALL_EXPORT bool operator<(const String &s1, const String &s2)
virtual void contentsDragEnterEvent(QDragEnterEvent *e)
virtual void createScript_()
virtual void applyPreferences()
static Hotkey createHotkey(String modifier, String key, String command, bool &ok, String comment="")
virtual void writePreferences(INIFile &inifile)
void setError_(bool state)
virtual bool returnPressed()
void get(String &data) const
PythonSettings * python_settings_
bool parseLine_(String line)
Parse a and execute a given string. If silent_ is set to true, no prompts are being printed.
bool testMultilineStart_(const String &line)
void retrieveHistoryLine_(Position index)
#define BALL_EMBEDDABLE(TYPE, BASE)
void findError_(String result)
void dump(std::ostream &s, Size depth) const
virtual void initializeWidget(MainControl &main_control)
virtual State validate(QString &input, int &pos) const
virtual void scriptDialog(bool run=false)
Open a dialog to select a script.
BALL_DEPRECATED void showClassDocu(String, String)
QStringList BALL_keywords
void map(String modifier, String key, String command, String comment="")
void showEditContextMenu(const QPoint &point)
QStringList python_keywords
QString getCurrentScript()
void appendToHistory_(const String &line)
std::list< Hotkey > hotkeys_
bool isInDirectMode() const
Position history_position_
QComboBox * editor_combo_box_
void showContextMenu(const QPoint &point)
void checkMenu(MainControl &main_control)
Preferences * preferences_
virtual BALL_DEPRECATED void showHelp_()
MyTextEdit * script_edit_
void reactTo(const QKeyEvent &e)
virtual void printCursorPosition_()
void unmap(String modifier, String key)
see above
void finalizePreferencesTab(Preferences &preferences)
BALL_EXPORT bool operator==(const String &s1, const String &s2)
QTextCharFormat my_class_format
QTextCharFormat comment_format
QTextCharFormat python_format
String getCurrentWord_(QTextCursor &text_cursor)
void removeHotkey(const Hotkey &hotkey)
vector< String > history_
TextEditorWidget * text_edit_
bool openFile(const String &filename, bool run, bool is_current=false)
void initializePreferencesTab(Preferences &preferences)
QComboBox * getCompletionBox_()
Qt::KeyboardModifiers button_state
vector< QRegExp > BALL_patterns
String runCommand_(const String &command, bool &state)
virtual void startInterpreter()
QTextCharFormat string_format
virtual ~PythonValidator()
void highlightBlock(const QString &text)
PythonValidator validator_
bool getMembers(const String &classname, QStringList &sl, const String &prefix)
void appendText(const String &text, bool output=false, bool state_message=false)
const char * getPrompt_() const
virtual bool canHandle(const String &fileformat) const