-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
void setFont( const QFont& );
QFont font() const;
+
+ void setCompletionPolicy( int );
+ int completionPolicy() const;
};
class PyEditor_Editor : QPlainTextEdit
const PyEditor_Settings& settings() const;
QString text() const;
+ QStringList keywords() const;
+ void appendKeywords( const QStringList&, int, const QColor& = QColor() );
+ void removeKeywords( const QStringList& );
+
public slots:
void deleteSelected();
void append( const QString& );
void setText( const QString& text );
+ void setCurrentLine( int );
protected:
virtual void keyPressEvent( QKeyEvent* );
PyEditor_Editor( const PyEditor_Editor& );
PyEditor_Editor& operator=( const PyEditor_Editor& );
};
+
+class PyEditor_FindTool : public QWidget
+{
+%TypeHeaderCode
+#include <PyEditor_FindTool.h>
+%End
+
+public:
+ explicit PyEditor_FindTool( PyEditor_Editor* /TransferThis/, QWidget* /TransferThis/ = 0 );
+
+public slots:
+ void activateFind();
+ void activateReplace();
+
+private:
+ PyEditor_FindTool( const PyEditor_FindTool& );
+ PyEditor_FindTool& operator=( const PyEditor_FindTool& );
+};
+
+class PyEditor_Widget : public QWidget
+{
+%TypeHeaderCode
+#include <PyEditor_Widget.h>
+%End
+
+public:
+ explicit PyEditor_Widget( QWidget* /TransferThis/ = 0 );
+
+ PyEditor_Editor* editor();
+ PyEditor_FindTool* findTool();
+
+ void setSettings( const PyEditor_Settings& );
+ const PyEditor_Settings& settings() const;
+
+ bool isModified();
+
+ QString text() const;
+
+ QStringList keywords() const;
+ void appendKeywords( const QStringList&, int, const QColor& = QColor() );
+ void removeKeywords( const QStringList& );
+
+ int completionPolicy() const;
+ void setCompletionPolicy( int );
+
+public slots:
+ void find();
+ void replace();
+
+ void undo();
+ void redo();
+ void cut();
+ void copy();
+ void paste();
+ void deleteSelected();
+ void selectAll();
+ void clear();
+
+ void setModified( bool );
+
+ void setText( const QString& );
+
+ void setCurrentLine( int );
+
+signals:
+ void modificationChanged( bool );
+ void undoAvailable( bool );
+ void redoAvailable( bool );
+ void copyAvailable( bool );
+ void selectionChanged();
+ void textChanged();
+ void cursorPositionChanged();
+
+private:
+ PyEditor_Widget( const PyEditor_Widget& );
+ PyEditor_Widget& operator=( const PyEditor_Widget& );
+};