External GUI Resources: Difference between revisions

From ParaQ Wiki
Jump to navigationJump to search
No edit summary
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
There is a CMake macro from ParaView 2 PARAVIEW_INCLUDE_GUI_RESOURCES.
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 [http://www.paraview.org/Wiki/ParaView:Extend Extending ParaView]
There is now support for using that macro in ParaView 3.  For a background on this macro, see [http://www.paraview.org/Wiki/ParaView:Extend Extending ParaView]
* Create a MyFancyGUIResources.qrc file (name is arbitrary)
* Create a MyFancyParaViewReader.xml
<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>
  <ParaViewReaders>
   <Reader name="MyFancyReader"
   <Reader name="MyFancyReader"
Line 14: Line 8:
   </Reader>
   </Reader>
  </ParaViewReaders>
  </ParaViewReaders>
* Create a MyFancyParaViewWriter.xml
<ParaViewWriters>
  <Writer name="MyFancyWriter"
          extensions="fancy"
          file_description="MyFancy">
  </Writer>
</ParaViewWriters>
* Then add to MYFANCYParaViewImport.cmake
* Then add to MYFANCYParaViewImport.cmake
  ...
  ...
  PARAVIEW_INCLUDE_GUI_RESOURCES("${MYFANCY_SOURCE_DIR}/MyFancyGUIResources.qrc")
  PARAVIEW_INCLUDE_GUI_RESOURCES("${MYFANCY_SOURCE_DIR}/MyFancyParaViewReader.xml" "${MYFANCY_SOURCE_DIR}/MyFancyParaViewWriter.xml")
  ...
  ...


The reader now shows up in the file dialog with a .MyFancy extension.
The reader and writer now shows up in the file dialog with a .MyFancy extension.

Latest revision as of 22:17, 31 January 2007

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 MyFancyParaViewReader.xml
<ParaViewReaders>
  <Reader name="MyFancyReader"
          extensions="fancy"
          file_description="MyFancy">
  </Reader>
</ParaViewReaders>
  • Create a MyFancyParaViewWriter.xml
<ParaViewWriters>
  <Writer name="MyFancyWriter"
          extensions="fancy"
          file_description="MyFancy">
  </Writer>
</ParaViewWriters>
  • Then add to MYFANCYParaViewImport.cmake
...
PARAVIEW_INCLUDE_GUI_RESOURCES("${MYFANCY_SOURCE_DIR}/MyFancyParaViewReader.xml" "${MYFANCY_SOURCE_DIR}/MyFancyParaViewWriter.xml")
...

The reader and writer now shows up in the file dialog with a .MyFancy extension.