Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkPythonTextEditor.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef QMITKPYTHONTEXTEDITOR_H_
18 #define QMITKPYTHONTEXTEDITOR_H_
19 
20 #include <QTextEdit>
21 #include <QDragEnterEvent>
22 #include <QDropEvent>
23 #include <MitkQtPythonExports.h>
24 struct QmitkPythonTextEditorData;
25 
28 class MITKQTPYTHON_EXPORT QmitkPythonTextEditor : public QWidget
29 {
30  Q_OBJECT
31 
32 public:
33  QmitkPythonTextEditor(QWidget *parent = 0);
34  virtual ~QmitkPythonTextEditor();
35 public slots:
36  void Paste(const QString& command);
37 
38 protected slots:
39  void on_SaveScript_triggered(bool checked=false);
40  void on_LoadScript_triggered(bool checked=false);
41  void on_RunScript_triggered(bool checked=false);
42 
43 protected:
44  void dragEnterEvent(QDragEnterEvent *event);
45  void dropEvent(QDropEvent *event);
46  //bool canInsertFromMimeData( const QMimeData *source ) const;
47  QString ReadFile(const QString &filename);
48 
49 private:
50  QmitkPythonTextEditorData* d;
51 };
52 
53 #endif
this is a python text editor with syntax highlightning
static const std::string filename