1 #ifndef _MILXQTPythonConsole_H 2 #define _MILXQTPythonConsole_H 78 milxQtPythonConsole(QWidget* parent,
const PythonQtObjectPtr& context, Qt::WindowFlags i = 0);
84 void executeLine(
bool storeOnly);
87 void keyPressEvent (QKeyEvent * e);
90 void consoleMessage(
const QString & message);
102 _historyPosition = 0;
112 void stdOut(
const QString& s);
114 void stdErr(
const QString& s);
116 void insertCompletion(
const QString&);
119 void appendCommandPrompt(
bool storeOnly =
false);
141 void handleTabCompletion();
144 int commandPromptPosition();
148 bool verifySelectionBeforeDeletion();
151 void setCurrentFont(
const QColor& color = QColor(0,0,0),
bool bold =
false);
154 void changeHistory();
163 void writeSettings();
166 void createActions();
169 void createConnections();
172 void contextMenuEvent(QContextMenuEvent *currentEvent);
176 void executeCode(
const QString& code);
178 PythonQtObjectPtr _context;
180 QStringList _history;
181 int _historyPosition;
183 QString _clickedAnchor;
185 QString _commandPrompt;
187 QString _currentMultiLineCode;
192 QTextCharFormat _defaultTextCharacterFormat;
193 QCompleter* _completer;
198 #endif //_MILXQTPythonConsole_H void clearError()
returns true if python cerr had an error
This file defines all the defines, aliases and frequently used functions and variables.
bool hadError()
returns true if python cerr had an error
void setHistory(const QStringList &h)
set history
QAction * copyAct
Copy action for text.
QAction * clearAct
clear action for text
QAction * pasteAct
Paste action for text.
QStringList history()
get history
#define MILXQT_PLUGIN_EXPORT
Define Windows Plugin DLL importing.
QAction * cutAct
Cut action for text.
A simple console for python scripting with some syntax highlighting.