1 // Copyright (C) 2007-2016 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 : PyConsole_Event.cxx
23 // Author : Vadim SANDLER (Open CASCADE S.A.S), Adrien Bruneton (CEA/DEN)
25 #include "PyConsole_Event.h"
28 \class PyConsole_PrintEvent
29 \brief Python command output backend event.
35 \param message message text (python trace)
36 \param isError default to \c false - if \c true indicates that an error is being printed.
38 PyConsole_PrintEvent::PyConsole_PrintEvent( const QString& message, bool isError )
39 : QEvent( (QEvent::Type)EVENT_ID ), myText( message ), myError( isError )
45 \return message text (python trace)
47 QString PyConsole_PrintEvent::text() const
54 \return \c true if this is an error message
56 bool PyConsole_PrintEvent::isError() const
62 \class PyConsole_CompletionEvent
63 \brief Python command completion event.
69 \param request python request
70 \param s status of execution of completion command
71 \param ms command matches (completions)
72 \param d docstring of the match (in case if there is sinlge match)
74 PyConsole_CompletionEvent::PyConsole_CompletionEvent( PyInterp_Request* request,
76 const QStringList& ms,
78 : PyInterp_Event( (QEvent::Type)EVENT_ID, request ),
79 myStatus( s ), myMatches( ms ), myDoc( d )
83 \brief Get status of execution of completion command
84 \return execution status
86 bool PyConsole_CompletionEvent::status() const
92 \brief Get matches (completions)
93 \return detected command matches (completions)
95 QStringList PyConsole_CompletionEvent::matches() const
102 \return docstring of the match (in case if there is sinlge match)
104 QString PyConsole_CompletionEvent::doc() const