5 #ifndef pqPythonTextArea_h 6 #define pqPythonTextArea_h 46 const QTextEdit*
getTextEdit()
const {
return this->TextEdit; }
65 bool openFile(
const QString& filename, vtkTypeUInt32
location = 0x10 );
72 void setDefaultSaveDirectory(
const QString&
dir);
88 const QString& getFilename()
const;
105 void setText(
const QString& text);
112 template <
typename T>
115 static_assert(
sizeof(T) == 0,
"Only specializations of linkTo(T* t) can be used");
127 bool isLinkedTo(
const QObject* obj)
const {
return this->TextLinker.isLinkedTo(obj); }
132 bool isLinked()
const {
return this->TextLinker.isLinked(); }
138 QString
getLinkedName()
const {
return this->TextLinker.getSecondObjectName(); }
151 void fileOpened(
const QString&);
157 void fileSaved(
const QString&);
163 void contentChanged();
171 bool eventFilter(QObject* obj, QEvent* event)
override;
181 QPointer<QTextEdit> TextEdit;
186 QPointer<pqPythonLineNumberArea> LineNumberArea;
191 QPointer<pqPythonSyntaxHighlighter> SyntaxHighlighter;
196 QPointer<pqPythonFileIO> FileIO;
203 QUndoStack UndoStack;
213 #include "pqPythonTextArea.txx" 215 #endif // pqPythonTextArea_h
QString getLinkedName() const
Returns the linked text name.
const QTextEdit * getTextEdit() const
Returns the underlying text edit.
const QUndoStack & getUndoStack() const
bool isLinkedTo(const QObject *obj) const
Returns true if the parameter is linked to this text area.
void linkTo(T *)
Link the current text area to an arbitrary QTextEdit like object.
A python text editor widget.
This class is a helper object to attach to a QTextEdit to add Python syntax highlighting to the text ...
Ease of use object that connects two pqLinkedObjectInterface together.
bool isLinked() const
Returns true if this text area is linked.
QTextEdit * getTextEdit()
Returns the underlying text edit.
QWidget that displays line number for a QTextEdit.