]> SALOME platform Git repositories - modules/gui.git/blobdiff - tools/PyEditor/src/python/PyEditorPy.sip
Salome HOME
Update copyrights
[modules/gui.git] / tools / PyEditor / src / python / PyEditorPy.sip
index 372cc2898b7fc123bc3b38bbf4594d7e0b10265e..6f27d9c90ac92a80bf288337fd352027831d99a0 100644 (file)
@@ -1,4 +1,4 @@
-// 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
@@ -66,6 +66,9 @@ public:
 
   void setFont( const QFont& );
   QFont font() const;
+
+  void setCompletionPolicy( int );
+  int completionPolicy() const;
 };
 
 class PyEditor_Editor : QPlainTextEdit
@@ -82,10 +85,15 @@ public:
   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* );
@@ -96,3 +104,80 @@ private:
   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& );
+};