1 // Copyright (C) 2007-2023 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : PyConsolePy.sip
23 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
28 %Import QtCore/QtCoremod.sip
29 %Import QtGui/QtGuimod.sip
31 %Import QtWidgets/QtWidgetsmod.sip
34 class PyConsole_Editor : QTextEdit
37 #include <PyConsole_Editor.h>
41 explicit PyConsole_Editor( QWidget* /TransferThis/ = 0 );
42 virtual ~PyConsole_Editor();
44 virtual void addText( const QString&, const bool = false, const bool = false );
45 bool isCommand( const QString& ) const;
47 virtual void exec( const QString& );
48 void execAndWait( const QString& );
51 void setIsSync( const bool );
53 bool isSuppressOutput() const;
54 void setIsSuppressOutput( const bool );
56 bool isShowBanner() const;
57 void setIsShowBanner( const bool );
59 void setAutoCompletion( bool );
60 bool autoCompletion() const;
62 bool isLogging() const;
64 virtual QSize sizeHint() const;
66 bool startLog( const QString& );
67 bool dump( const QString& );
70 void updateDoc( const QString& );
81 virtual void dropEvent( QDropEvent* );
82 virtual void mousePressEvent( QMouseEvent* );
83 virtual void mouseReleaseEvent( QMouseEvent* );
84 virtual void keyPressEvent ( QKeyEvent* );
85 virtual void customEvent( QEvent* );
86 virtual void insertFromMimeData( const QMimeData* );
87 void putLog( const QString& );
89 virtual QString getDumpFileName();
90 virtual QString getLogFileName();
93 PyConsole_Editor( const PyConsole_Editor& );
94 PyConsole_Editor& operator=( const PyConsole_Editor& );
97 class PyConsole_Console : QWidget
100 #include <PyConsole_Console.h>
104 explicit PyConsole_Console( QWidget* /TransferThis/ = 0 );
105 virtual ~PyConsole_Console();
108 virtual void setFont( const QFont& );
111 void setIsSync( const bool );
113 bool isSuppressOutput() const;
114 void setIsSuppressOutput( const bool );
116 bool isShowBanner() const;
117 void setIsShowBanner( const bool );
119 void setAutoCompletion( bool );
120 bool autoCompletion() const;
122 void exec( const QString& );
123 void execAndWait( const QString& );
125 void setMenuActions( const int );
126 int menuActions() const;
128 void startLog( const QString& );
132 virtual void contextMenuEvent( QContextMenuEvent* );
135 PyConsole_Console( const PyConsole_Console& );
136 PyConsole_Console& operator=( const PyConsole_Console& );