External GUI Resources

From ParaQ Wiki
Revision as of 19:58, 31 January 2007 by Clinton (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.