18 #ifndef MILXQTPYTHONPLUGIN_H 19 #define MILXQTPYTHONPLUGIN_H 21 #include <QSyntaxHighlighter> 23 #include <milxQtMain.h> 24 #include <milxQtFile.h> 25 #include <milxQtUnifiedWindow.h> 26 #include <milxQtPluginInterface.h> 30 const int consoleMinHeight = 96;
55 void open(QString filename);
56 void save(QString filename);
63 {
return Qt::BottomDockWidgetArea; }
73 void resizeForFloat(
bool floating);
87 QPointer<QDockWidget>
dock;
89 QPointer<milxQtMain> MainWindow;
95 void createConnections();
125 void highlightBlock(
const QString &text);
128 struct HighlightingRule
131 QTextCharFormat format;
133 QList<HighlightingRule> highlightingRules;
134 QStringList keywords;
136 QTextCharFormat keywordFormat;
137 QTextCharFormat singleLineCommentFormat;
138 QTextCharFormat multiLineCommentFormat;
139 QTextCharFormat multiLineEscapeFormat;
140 QTextCharFormat quotationFormat;
141 QTextCharFormat singleQuotationFormat;
143 QRegExp commentStartExpression;
144 QRegExp commentEndExpression;
145 QRegExp escapeStartExpression;
146 QRegExp escapeEndExpression;
149 #endif // MILXQTPYTHONPLUGIN_H QPointer< milxQtPythonConsole > pyConsole
Python Console widget.
bool hasSaveSupport()
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 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.
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].
bool hasCollectionSupport()
Does the plugin support collections (PolyData collection etc.). [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.
Syntax highlighting for Python to be applied to the console (such as milxQtPythonConsole).
virtual void SetInputCollection(vtkPolyDataCollection *collection, QStringList &filenames)=0
Pass a collection to internal plugin class. [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 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...
QPointer< QDockWidget > dock
Dock widget.
QString strippedBaseName()
Returns the stripped (path removed) base (no suffix) name of the data.
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]...
bool hasOpenSupport()
Does the plugin support opening files? [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.
Qt::DockWidgetArea dockDefaultArea()
Return the default dock widget area (if one is provided by plugin). [Implement this in your plugin]...
A simple console for python scripting with some syntax highlighting.
virtual void save(QString filename)=0
Save the result as a file using the plugin. [Implement this in your plugin].
PythonQtObjectPtr mainContext
Python Context to Python Intepreter.