Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerScriptedFileDialog.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Kitware Inc.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  This file was originally developed by Julien Finet, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerScriptedFileDialog_h
22 #define __qSlicerScriptedFileDialog_h
23 
24 // SlicerQt includes
25 #include "qSlicerFileDialog.h"
26 #include "qSlicerBaseQTGUIExport.h"
27 
28 // Forward Declare PyObject*
29 #ifndef PyObject_HEAD
30 struct _object;
31 typedef _object PyObject;
32 #endif
33 class qSlicerScriptedFileDialogPrivate;
34 
35 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerScriptedFileDialog
37 {
38  Q_OBJECT
39 
40 public:
42  qSlicerScriptedFileDialog(QObject* parent = 0);
43  virtual ~qSlicerScriptedFileDialog();
44 
45  QString pythonSource()const;
46 
48  bool setPythonSource(const QString& newPythonSource, const QString& className = QLatin1String(""));
49 
51  Q_INVOKABLE PyObject* self() const;
52 
54  virtual bool isMimeDataAccepted(const QMimeData* mimeData)const;
56  virtual void dropEvent(QDropEvent* event);
58  virtual bool exec(const qSlicerIO::IOProperties& ioProperties =
60 
63  Q_INVOKABLE const qSlicerIO::IOProperties& ioProperties()const;
66  Q_INVOKABLE const QMimeData* mimeData()const;
69  Q_INVOKABLE QDropEvent* dropEvent()const;
70 
71 public Q_SLOTS:
72  void acceptMimeData(bool accept);
73 
74 protected:
75  QScopedPointer<qSlicerScriptedFileDialogPrivate> d_ptr;
76 
77 private:
78  Q_DECLARE_PRIVATE(qSlicerScriptedFileDialog);
79  Q_DISABLE_COPY(qSlicerScriptedFileDialog);
80 };
81 
82 #endif
_object PyObject
virtual bool exec(const qSlicerIO::IOProperties &ioProperties=qSlicerIO::IOProperties())
virtual void dropEvent(QDropEvent *event)
qSlicerStandardFileDialog Superclass
QScopedPointer< qSlicerScriptedFileDialogPrivate > d_ptr
_object PyObject
virtual bool isMimeDataAccepted(const QMimeData *mimeData) const