SMILX  1.01
milxQtFiniteTransformPlugin.h
1 /*=========================================================================
2  The Software is copyright (c) Commonwealth Scientific and Industrial Research Organisation (CSIRO)
3  ABN 41 687 119 230.
4  All rights reserved.
5 
6  Licensed under the CSIRO BSD 3-Clause License
7  You may not use this file except in compliance with the License.
8  You may obtain a copy of the License in the file LICENSE.md or at
9 
10  https://stash.csiro.au/projects/SMILI/repos/smili/browse/license.txt
11 
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17 =========================================================================*/
18 #ifndef MILXQTFiniteTransformPLUGIN_H
19 #define MILXQTFiniteTransformPLUGIN_H
20 
21 #include <QThread>
22 #include <QMenu>
23 #include <QDockWidget>
24 //VTK
25 #include <vtkPolyDataCollection.h>
26 
27 #include "milxQtAliases.h"
28 #include "milxQtPluginInterface.h"
29 #include "milxQtRenderWindow.h"
30 #include "milxQtImage.h"
31 #include "milxQtModel.h"
32 
41 {
42  Q_OBJECT
43 
44 public:
49  milxQtFiniteTransformPlugin(QObject *theParent = 0);
50  virtual ~milxQtFiniteTransformPlugin();
51 
56  virtual QString name();
57 
62  inline virtual bool hasOpenSupport()
63  { return true; }
68  virtual QString openFileSupport();
73  virtual QStringList openExtensions();
78  inline virtual bool hasSaveSupport()
79  { return true; }
84  virtual QString saveFileSupport();
89  virtual QStringList saveExtensions();
90 
95  inline virtual bool hasCollectionSupport()
96  { return false; }
101  virtual void SetInputCollection(vtkPolyDataCollection* collection, QStringList &filenames);
102 
107  virtual void open(QString filename);
112  virtual void save(QString filename);
113 
123  virtual milxQtModel* modelResult();
128  virtual milxQtImage* imageResult();
133  virtual QDockWidget* dockWidget();
134 
139  inline virtual Qt::DockWidgetArea dockDefaultArea()
140  { return Qt::LeftDockWidgetArea; }
141 
146  virtual bool isPluginWindow(QWidget *window);
147 
148 public slots:
153  virtual void loadExtension();
161  virtual void update() {}
166  virtual void preStartTasks();
171  virtual void postStartTasks();
172 
173 protected:
174  QList< QPointer<milxQtImage> > images;
175 
176 private:
177 
178 };
179 
181 {
182  Q_OBJECT
183  Q_INTERFACES(milxQtPluginFactory)
184 
185 public:
186  milxQtPluginInterface* newPlugin(QObject *theParent = 0)
187  { return new milxQtFiniteTransformPlugin(theParent); }
188 };
189 
190 #endif // MILXQTFiniteTransformPLUGIN_H
virtual bool hasOpenSupport()
Does the plugin support opening files? [Implement this in your plugin].
virtual QDockWidget * dockWidget()=0
Return the dock widget (if one is provided by plugin). [Implement this in your plugin].
virtual QString saveFileSupport()=0
Get the file support string for saving (extension wildcard list). [Implement this in your plugin]...
virtual milxQtImage * imageResult()=0
Get the image result. The result can then be displayed in milxQtMain etc.[Implement this in your plug...
This file defines all the defines, aliases and frequently used functions and variables.
This class represents the MILX Qt Render Window Display object using QVTK.
virtual QStringList saveExtensions()=0
Get a list of supported file format extensions. [Implement this in your plugin].
This class represents the MILX Qt Image Display object using VTK.
Definition: milxQtImage.h:118
virtual QStringList openExtensions()=0
Get a list of supported file format extensions. [Implement this in your plugin].
virtual void loadExtension()=0
Load the extension. [Implement this in your plugin].
virtual void postStartTasks()=0
Tasks to complete after running or starting the thread. [Implement this].
virtual QString name()=0
Get the Name of the plugin. [Implement this in your plugin].
This class represents the MILX Qt Model/Mesh Display object using VTK.
Definition: milxQtModel.h:115
virtual bool hasSaveSupport()
Does the plugin support opening files? [Implement this in your plugin].
virtual void SetInputCollection(vtkPolyDataCollection *collection, QStringList &filenames)=0
Pass a collection to internal plugin class. [Implement this in your plugin].
virtual bool hasCollectionSupport()
Does the plugin support collections (PolyData collection etc.). [Implement this in your plugin]...
virtual void preStartTasks()=0
Tasks to complete before running or starting the thread. [Implement this].
The interface for any plugins that can be made for milxQtMain.
virtual bool isPluginWindow(QWidget *window)=0
Is the window provided a plugin generated window? In this case a milxQtShapeModel window...
virtual milxQtModel * modelResult()=0
Get the model result. The result can then be displayed in milxQtMain etc. [Implement this in your plu...
virtual milxQtRenderWindow * genericResult()=0
Get the generic result, which is a milxQtRenderWindow. The result can then be displayed in milxQtMain...
virtual QString openFileSupport()=0
Get the file support string for opening (extension wildcard list). [Implement this in your plugin]...
virtual void open(QString filename)=0
Open the file using the plugin. [Implement this in your plugin].
#define MILXQT_PLUGIN_EXPORT
Define Windows Plugin DLL importing.
The interface for the Finite Transform plugin for milxQt.
virtual void update()
Update the plugin. [Implement this in your plugin].
virtual void save(QString filename)=0
Save the result as a file using the plugin. [Implement this in your plugin].
virtual Qt::DockWidgetArea dockDefaultArea()
Return the default dock widget area (if one is provided by plugin). [Implement this in your plugin]...