SMILX  1.01
milxQtAnimatePlugin.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 MILXQTANIMATEPLUGIN_H
19 #define MILXQTANIMATEPLUGIN_H
20 
21 #include <milxQtMain.h>
22 #include <milxQtPluginInterface.h>
23 
24 #include "milxQtAnimateModel.h"
25 
31 {
32  Q_OBJECT
33 
34 public:
35  milxQtAnimatePlugin(QObject *theParent = 0);
36  virtual ~milxQtAnimatePlugin();
37 
38  QString name();
39 
40  inline bool hasOpenSupport()
41  { return false; }
42  QString openFileSupport();
43  QStringList openExtensions();
44  inline bool hasSaveSupport()
45  { return false; }
46  QString saveFileSupport();
47  QStringList saveExtensions();
48 
49  inline bool hasCollectionSupport()
50  { return true; }
51  void SetInputCollection(vtkPolyDataCollection* collection, QStringList &filenames);
52 
53  void open(QString filename);
54  void save(QString filename);
55 
59  QDockWidget* dockWidget();
60  inline Qt::DockWidgetArea dockDefaultArea()
61  { return Qt::LeftDockWidgetArea; }
62 
63  bool isPluginWindow(QWidget *window);
64 
68  milxQtAnimateModel* pluginWindow(QWidget *window);
69 
70 public slots:
74  void loadExtension();
75  void update() {}
76  void preStartTasks() {}
77  void postStartTasks() {}
78 
79 protected:
80  QPointer<milxQtAnimateModel> animateModel;
81  QPointer<milxQtMain> MainWindow;
82 
83  void run();
84  void createConnections();
85 
86 private:
87 
88 };
89 
91 {
92  Q_OBJECT
93  Q_INTERFACES(milxQtPluginFactory)
94 
95 public:
96  milxQtPluginInterface* newPlugin(QObject *theParent = 0)
97  { return new milxQtAnimatePlugin(theParent); }
98 };
99 
100 #endif // MILXQTANIMATEPLUGIN_H
This is a plugin for milxQt to do animation from collections.
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 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].
bool hasCollectionSupport()
Does the plugin support collections (PolyData collection etc.). [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
Qt::DockWidgetArea dockDefaultArea()
Return the default dock widget area (if one is provided by plugin). [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].
QPointer< milxQtAnimateModel > animateModel
Model extension.
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.
bool hasSaveSupport()
Does the plugin support opening files? [Implement this in your plugin].
virtual void update()=0
Update the plugin. [Implement this in your plugin].
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.
bool hasOpenSupport()
Does the plugin support opening files? [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].