External GUI Resources
From ParaQ Wiki
Jump to navigationJump to search
There is a CMake macro from ParaView 2 PARAVIEW_INCLUDE_GUI_RESOURCES. There is now support for using that macro in ParaView 3. For a background on this macro, see Extending ParaView
- Create a MyFancyGUIResources.qrc file (name is arbitrary)
<RCC> <qresource prefix="/ParaViewReaders" > <file>ParaViewImportReaders.xml</file> </qresource> </RCC>
- Create a ParaViewImportReaders.xml (name is arbitrary, but must match reference in qrc file)
<ParaViewReaders> <Reader name="MyFancyReader" extensions="fancy" file_description="MyFancy"> </Reader> </ParaViewReaders>
- Then add to MYFANCYParaViewImport.cmake
... PARAVIEW_INCLUDE_GUI_RESOURCES("${MYFANCY_SOURCE_DIR}/MyFancyGUIResources.qrc") ...
The reader now shows up in the file dialog with a .MyFancy extension.
- For writers, do the same as above, except follow the convention in Qt/Components/Resources/XML/ParaViewWriters.xml and use /ParaViewWriters as the prefix of the xml resource files.