Back to index

salome-gui  6.5.0
Public Types | Public Slots | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
PYCONSOLE_EXPORT Protocol Reference


#include <PyConsole_Console.h>

Inheritance diagram for PYCONSOLE_EXPORT:
Inheritance graph
Collaboration diagram for PYCONSOLE_EXPORT:
Collaboration graph

List of all members.

Public Types

enum  {
  CopyId = 0x01, PasteId = 0x02, ClearId = 0x04, SelectAllId = 0x08,
  DumpCommandsId = 0x16, All = CopyId | PasteId | ClearId | SelectAllId | DumpCommandsId
 Context popup menu actions flags. More...

Public Slots

void cut ()
void paste ()
void clear ()
void handleReturn ()
void onPyInterpChanged (PyConsole_Interp *)
void dump ()

Public Member Functions

 PyConsole_Console (QWidget *parent, PyConsole_Interp *interp=0)
virtual ~PyConsole_Console ()
PyConsole_InterpgetInterp ()
 Get python interperter.
QFont font () const
virtual void setFont (const QFont &)
bool isSync () const
void setIsSync (const bool)
bool isSuppressOutput () const
void setIsSuppressOutput (const bool)
bool isShowBanner () const
void setIsShowBanner (const bool)
void exec (const QString &)
void execAndWait (const QString &)
virtual bool eventFilter (QObject *, QEvent *)
virtual QString popupClientType () const
 Get popup client symbolic name.
virtual void contextMenuPopup (QMenu *)
void setMenuActions (const int)
int menuActions () const
 PyConsole_Editor (PyConsole_Interp *theInterp, QWidget *theParent=0)
 ~PyConsole_Editor ()
virtual void addText (const QString &str, const bool newBlock=false)
bool isCommand (const QString &str) const
virtual void exec (const QString &command)
void execAndWait (const QString &command)
bool isSync () const
void setIsSync (const bool)
bool isSuppressOutput () const
void setIsSuppressOutput (const bool)
bool isShowBanner () const
void setIsShowBanner (const bool)
virtual QSize sizeHint () const
 PyConsole_Interp ()
 ~PyConsole_Interp ()

Protected Member Functions

virtual void dropEvent (QDropEvent *event)
virtual void mouseReleaseEvent (QMouseEvent *event)
virtual void keyPressEvent (QKeyEvent *event)
virtual void customEvent (QEvent *event)
virtual PyInterp_Request * createRequest (const QString &)
virtual bool initState ()
virtual bool initContext ()

Private Member Functions

void createActions ()
void updateActions ()

Private Attributes

 python interpreter
 python console editor widget
QMap< int, QAction * > myActions
 menu actions list
QString myCommandBuffer
 python command buffer
QString myCurrentCommand
 currently being printed command
QString myPrompt
 current command line prompt
int myCmdInHistory
 current history command index
QStringList myHistory
 commands history buffer
QEventLoop * myEventLoop
 internal event loop
QString myBanner
 current banner
bool myShowBanner
 'show banner' flag
QStringList myQueue
 python commands queue
bool myIsSync
 synchronous mode flag
bool myIsSuppressOutput
 suppress output flag

Detailed Description


Definition at line 38 of file PyConsole_Console.h.

Member Enumeration Documentation

anonymous enum

Context popup menu actions flags.


"Copy" menu action


"Paste" menu action


"Clear" menu action


"Select All" menu action


"DumpCommands" menu action


all menu actions

Definition at line 44 of file PyConsole_Console.h.

    CopyId         = 0x01,                                           
    PasteId        = 0x02,                                           
    ClearId        = 0x04,                                           
    SelectAllId    = 0x08,                                           
    DumpCommandsId = 0x16,                                           
    All = CopyId | PasteId | ClearId | SelectAllId | DumpCommandsId  

Constructor & Destructor Documentation

virtual PYCONSOLE_EXPORT::~PyConsole_Console ( ) [virtual]

Member Function Documentation

virtual void PYCONSOLE_EXPORT::addText ( const QString &  str,
const bool  newBlock = false 
) [virtual]
virtual void PYCONSOLE_EXPORT::contextMenuPopup ( QMenu *  ) [virtual]
virtual PyInterp_Request* PYCONSOLE_EXPORT::createRequest ( const QString &  ) [protected, virtual]
virtual void PYCONSOLE_EXPORT::customEvent ( QEvent *  event) [protected, virtual]
virtual void PYCONSOLE_EXPORT::dropEvent ( QDropEvent *  event) [protected, virtual]
virtual bool PYCONSOLE_EXPORT::eventFilter ( QObject ,
QEvent *   
) [virtual]
virtual void PYCONSOLE_EXPORT::exec ( const QString &  command) [virtual]
void PYCONSOLE_EXPORT::exec ( const QString &  )
void PYCONSOLE_EXPORT::execAndWait ( const QString &  command)
void PYCONSOLE_EXPORT::execAndWait ( const QString &  )
QFont PYCONSOLE_EXPORT::font ( ) const

Get python interperter.

Definition at line 59 of file PyConsole_Console.h.

{ return myInterp; } 
virtual bool PYCONSOLE_EXPORT::initContext ( ) [protected, virtual]
virtual bool PYCONSOLE_EXPORT::initState ( ) [protected, virtual]
bool PYCONSOLE_EXPORT::isCommand ( const QString &  str) const
bool PYCONSOLE_EXPORT::isSync ( ) const
bool PYCONSOLE_EXPORT::isSync ( ) const
virtual void PYCONSOLE_EXPORT::keyPressEvent ( QKeyEvent *  event) [protected, virtual]
virtual void PYCONSOLE_EXPORT::mouseReleaseEvent ( QMouseEvent *  event) [protected, virtual]
virtual QString PYCONSOLE_EXPORT::popupClientType ( ) const [inline, virtual]

Get popup client symbolic name.

Definition at line 78 of file PyConsole_Console.h.

{ return QString( "PyConsole" ); }
PYCONSOLE_EXPORT::PyConsole_Console ( QWidget *  parent,
PyConsole_Interp interp = 0 
PYCONSOLE_EXPORT::PyConsole_Editor ( PyConsole_Interp theInterp,
QWidget *  theParent = 0 
virtual void PYCONSOLE_EXPORT::setFont ( const QFont &  ) [virtual]
virtual QSize PYCONSOLE_EXPORT::sizeHint ( ) const [virtual]

Member Data Documentation

QMap<int, QAction*> PYCONSOLE_EXPORT::myActions [private]

menu actions list

Definition at line 91 of file PyConsole_Console.h.

QString PYCONSOLE_EXPORT::myBanner [private]

current banner

Definition at line 88 of file PyConsole_Editor.h.

current history command index

Definition at line 85 of file PyConsole_Editor.h.

python command buffer

Definition at line 82 of file PyConsole_Editor.h.

currently being printed command

Definition at line 83 of file PyConsole_Editor.h.

python console editor widget

Definition at line 90 of file PyConsole_Console.h.

QEventLoop* PYCONSOLE_EXPORT::myEventLoop [private]

internal event loop

Definition at line 87 of file PyConsole_Editor.h.

QStringList PYCONSOLE_EXPORT::myHistory [private]

commands history buffer

Definition at line 86 of file PyConsole_Editor.h.

python interpreter

Definition at line 89 of file PyConsole_Console.h.

suppress output flag

Definition at line 92 of file PyConsole_Editor.h.

synchronous mode flag

Definition at line 91 of file PyConsole_Editor.h.

QString PYCONSOLE_EXPORT::myPrompt [private]

current command line prompt

Definition at line 84 of file PyConsole_Editor.h.

QStringList PYCONSOLE_EXPORT::myQueue [private]

python commands queue

Definition at line 90 of file PyConsole_Editor.h.

'show banner' flag

Definition at line 89 of file PyConsole_Editor.h.

The documentation for this protocol was generated from the following files: