-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
class PyConsole_Interp;
class PyConsole_Editor;
-class PyConsole_EnhInterp;
class PYCONSOLE_EXPORT PyConsole_Console : public QWidget, public SUIT_PopupClient
{
//! Context popup menu actions flags
enum
{
- CopyId = 0x01, //!< "Copy" menu action
- PasteId = 0x02, //!< "Paste" menu action
- ClearId = 0x04, //!< "Clear" menu action
- SelectAllId = 0x08, //!< "Select All" menu action
- DumpCommandsId = 0x16, //!< "DumpCommands" menu action
- All = CopyId | PasteId | ClearId | SelectAllId | DumpCommandsId //!< all menu actions
+ CopyId = 0x01, //!< "Copy" menu action
+ PasteId = 0x02, //!< "Paste" menu action
+ ClearId = 0x04, //!< "Clear" menu action
+ SelectAllId = 0x08, //!< "Select All" menu action
+ DumpCommandsId = 0x10, //!< "DumpCommands" menu action
+ StartLogId = 0x20, //!< "Start log" menu action
+ StopLogId = 0x40, //!< "Stop log" menu action
+ All = 0xFF, //!< all menu actions
};
public:
virtual ~PyConsole_Console();
//! \brief Get python interperter
- PyConsole_Interp* getInterp() { return myInterp; }
+ PyConsole_Interp* getInterp() const;
QFont font() const;
virtual void setFont( const QFont& );
void setMenuActions( const int );
int menuActions() const;
+ void startLog( const QString& );
+ void stopLog();
+
protected:
void createActions();
void updateActions();
PyConsole_Console( QWidget* parent, PyConsole_Interp*, PyConsole_Editor*);
-
- PyConsole_Interp* myInterp; //!< python interpreter
PyConsole_Editor* myEditor; //!< python console editor widget
QMap<int, QAction*> myActions; //!< menu actions list
};
Q_OBJECT
public:
- PyConsole_EnhConsole( QWidget* parent, PyConsole_EnhInterp* interp = 0);
+ PyConsole_EnhConsole( QWidget* parent, PyConsole_Interp* interp = 0 );
virtual ~PyConsole_EnhConsole() {}
};