19 #include <ctkAbstractPythonManager.h>
20 #include <QDragEnterEvent>
29 struct QmitkCtkPythonShellData
36 : ctkPythonConsole(parent), d( new QmitkCtkPythonShellData )
38 MITK_DEBUG(
"QmitkCtkPythonShell") <<
"retrieving IPythonService";
43 MITK_DEBUG(
"QmitkCtkPythonShell") <<
"checking IPythonService";
44 Q_ASSERT( d->m_PythonService );
46 MITK_DEBUG(
"QmitkCtkPythonShell") <<
"initialize m_PythonService";
47 this->initialize( d->m_PythonService->GetPythonManager() );
49 MITK_DEBUG(
"QmitkCtkPythonShell") <<
"m_PythonService initialized";
56 context->UngetService( d->m_PythonServiceRef );
66 QList<QUrl> urls =
event->mimeData()->urls();
67 for(
int i = 0; i < urls.size(); i++)
80 MITK_DEBUG(
"QmitkCtkPythonShell") <<
"executing command " << command.toStdString();
82 d->m_PythonService->NotifyObserver(command.toStdString());
87 if( this->isVisible() )
89 this->exec( command );
static const int MULTI_LINE_COMMAND
static const int SINGLE_LINE_COMMAND
void executeCommand(const QString &command)
bool canInsertFromMimeData(const QMimeData *source) const
void dragEnterEvent(QDragEnterEvent *event)
static std::string ForceLoadModule()
void dropEvent(QDropEvent *event)
void Paste(const QString &command)
QmitkCtkPythonShell(QWidget *parent=0)
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.