Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef PYCONSOLE_CONSOLE_H
00027 #define PYCONSOLE_CONSOLE_H
00028
00029 #include "PyConsole.h"
00030
00031 #include <SUIT_PopupClient.h>
00032 #include <QWidget>
00033 #include <QMap>
00034
00035 class PyConsole_Interp;
00036 class PyConsole_Editor;
00037
00038 class PYCONSOLE_EXPORT PyConsole_Console : public QWidget, public SUIT_PopupClient
00039 {
00040 Q_OBJECT
00041
00042 public:
00044 enum
00045 {
00046 CopyId = 0x01,
00047 PasteId = 0x02,
00048 ClearId = 0x04,
00049 SelectAllId = 0x08,
00050 DumpCommandsId = 0x16,
00051 All = CopyId | PasteId | ClearId | SelectAllId | DumpCommandsId
00052 };
00053
00054 public:
00055 PyConsole_Console( QWidget* parent, PyConsole_Interp* interp = 0 );
00056 virtual ~PyConsole_Console();
00057
00059 PyConsole_Interp* getInterp() { return myInterp; }
00060 QFont font() const;
00061 virtual void setFont( const QFont& );
00062
00063 bool isSync() const;
00064 void setIsSync( const bool );
00065
00066 bool isSuppressOutput() const;
00067 void setIsSuppressOutput( const bool );
00068
00069 bool isShowBanner() const;
00070 void setIsShowBanner( const bool );
00071
00072 void exec( const QString& );
00073 void execAndWait( const QString& );
00074
00075 virtual bool eventFilter( QObject*, QEvent* );
00076
00078 virtual QString popupClientType() const { return QString( "PyConsole" ); }
00079 virtual void contextMenuPopup( QMenu* );
00080
00081 void setMenuActions( const int );
00082 int menuActions() const;
00083
00084 private:
00085 void createActions();
00086 void updateActions();
00087
00088 private:
00089 PyConsole_Interp* myInterp;
00090 PyConsole_Editor* myEditor;
00091 QMap<int, QAction*> myActions;
00092 };
00093
00094 #endif // PYCONSOLE_CONSOLE_H