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>
83 virtual State
validate(QString& input,
int& pos)
const;
107 bool& ok,
String comment =
"");
110 bool operator == (
const Hotkey& hotkey)
const;
113 bool operator == (
const QKeyEvent& e)
const;
119 bool operator < (
const Hotkey& key) {
return this < &key;}
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;
QTextCharFormat comment_format
QStringList BALL_keywords
QTextCharFormat python_format
vector< QRegExp > BALL_patterns
QTextCharFormat my_class_format
QTextCharFormat string_format
vector< QRegExp > python_patterns
QStringList python_keywords
void highlightBlock(const QString &text)
PythonValidator(QObject *parent=0)
virtual State validate(QString &input, int &pos) const
virtual ~PythonValidator()
#define BALL_EMBEDDABLE(TYPE, BASE)
static Hotkey createHotkey(String modifier, String key, String command, bool &ok, String comment="")
bool set(const String &data)
Qt::KeyboardModifiers button_state
void get(String &data) const