Commit 779dd737 authored by Mathieu Westphal's avatar Mathieu Westphal Committed by Kitware Robot

Merge topic 'AddPluginDescriptionInPluginManager'

804e22f7 Enabling to select any line to load a plugin
2b639a64 Correct style of touched files
e64ed5c7 Copy Plugin description in the Plugin macro
c93bc323 Adding support for showing Plugin description
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel's avatarBen Boeckel <ben.boeckel@kitware.com>
Acked-by: Joachim Pouderoux's avatarJoachim Pouderoux <joachim.pouderoux@kitware.com>
Merge-request: !2837
parents a5e93a81 804e22f7
Pipeline #121580 failed with stage
in 0 seconds
......@@ -739,6 +739,7 @@ ENDMACRO()
# html/css/png/jpg files that comprise of the documentation for the plugin. In
# addition, CMake will automatically generate documentation for any proxies
# defined in XMLs for this plugin.
# DESCRIPTION (optional) : A description of the plugin, to be shown in the plugin manager
# EULA (optional) :- a text file with the text for the EULA for the plugin.
# the user is required to accept the EULA before the plugin
# can be loaded.
......@@ -758,6 +759,7 @@ ENDMACRO()
# [REQUIRED_ON_CLIENT]
# [REQUIRED_PLUGINS pluginname1 pluginname2]
# [CS_KITS kit1 kit2...]
# [DESCRIPTION description]
# [EULA eulafile]
# [EXCLUDE_FROM_DEFAULT_TARGET]
# )
......@@ -779,6 +781,7 @@ FUNCTION(ADD_PARAVIEW_PLUGIN NAME VERSION)
SET(ARG_AUTOLOAD)
SET(ARG_CS_KITS)
SET(ARG_DOCUMENTATION_DIR)
SET(ARG_DESCRIPTION)
SET(ARG_EULA)
SET(PLUGIN_NAME "${NAME}")
......@@ -787,6 +790,7 @@ FUNCTION(ADD_PARAVIEW_PLUGIN NAME VERSION)
SET(PLUGIN_REQUIRED_ON_CLIENT 1)
SET(PLUGIN_REQUIRED_PLUGINS)
SET(HAVE_REQUIRED_PLUGINS 0)
SET(PLUGIN_DESCRIPTION)
SET(BINARY_RESOURCES_INIT)
SET(QRC_RESOURCES_INIT)
SET(EXTRA_INCLUDES)
......@@ -804,7 +808,7 @@ FUNCTION(ADD_PARAVIEW_PLUGIN NAME VERSION)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
PV_PLUGIN_PARSE_ARGUMENTS(ARG
"DOCUMENTATION_DIR;SERVER_MANAGER_SOURCES;SERVER_MANAGER_XML;SERVER_SOURCES;PYTHON_MODULES;GUI_INTERFACES;GUI_RESOURCES;GUI_RESOURCE_FILES;GUI_SOURCES;SOURCES;REQUIRED_PLUGINS;REQUIRED_ON_SERVER;REQUIRED_ON_CLIENT;EXCLUDE_FROM_DEFAULT_TARGET;AUTOLOAD;CS_KITS;EULA"
"DOCUMENTATION_DIR;SERVER_MANAGER_SOURCES;SERVER_MANAGER_XML;SERVER_SOURCES;PYTHON_MODULES;GUI_INTERFACES;GUI_RESOURCES;GUI_RESOURCE_FILES;GUI_SOURCES;SOURCES;REQUIRED_PLUGINS;REQUIRED_ON_SERVER;REQUIRED_ON_CLIENT;EXCLUDE_FROM_DEFAULT_TARGET;AUTOLOAD;CS_KITS;DESCRIPTION;EULA"
"" ${ARGN} )
PV_PLUGIN_LIST_CONTAINS(reqired_server_arg "REQUIRED_ON_SERVER" ${ARGN})
......@@ -829,6 +833,10 @@ FUNCTION(ADD_PARAVIEW_PLUGIN NAME VERSION)
SET(HAVE_REQUIRED_PLUGINS 1)
ENDIF()
IF(ARG_DESCRIPTION)
SET(PLUGIN_DESCRIPTION "${ARG_DESCRIPTION}")
ENDIF()
IF(ARG_SERVER_MANAGER_SOURCES OR ARG_SERVER_MANAGER_XML)
ADD_SERVER_MANAGER_EXTENSION(SM_SRCS ${NAME} ${VERSION} "${ARG_SERVER_MANAGER_XML}"
${ARG_SERVER_MANAGER_SOURCES})
......
......@@ -29,14 +29,14 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
========================================================================*/
/// This is an auto-generated file. Please do not edit.
// This is an auto-generated file. Please do not edit.
/// This file is used to wrap a ParaView plugin.
// This file is used to wrap a ParaView plugin.
#cmakedefine plugin_type_python
#cmakedefine plugin_type_servermanager
#cmakedefine plugin_type_gui
/// this is set when the plugin has source headers that are wrapped.
// this is set when the plugin has source headers that are wrapped.
#cmakedefine INITIALIZE_WRAPPING
#cmakedefine INITIALIZE_EXTRA_CS_MODULES
......@@ -44,17 +44,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "vtkPVPlugin.h"
#ifdef plugin_type_gui
# include "vtkPVGUIPluginInterface.h"
# include <QObject>
# include <QtPlugin>
#include "vtkPVGUIPluginInterface.h"
#include <QObject>
#include <QtPlugin>
#endif
#ifdef plugin_type_servermanager
# include "vtkPVServerManagerPluginInterface.h"
#include "vtkPVServerManagerPluginInterface.h"
#endif
#ifdef plugin_type_python
# include "vtkPVPythonPluginInterface.h"
#include "vtkPVPythonPluginInterface.h"
#endif
class @PLUGIN_NAME@_Plugin :
......@@ -77,67 +77,77 @@ class @PLUGIN_NAME@_Plugin :
Q_OBJECT
Q_INTERFACES(vtkPVGUIPluginInterface)
Q_PLUGIN_METADATA(IID "com.kitware/paraview/@PLUGIN_NAME@_Plugin")
//#endif
#endif
public:
@PLUGIN_NAME@_Plugin();
// Description:
// Returns the name for this plugin.
const char* GetPluginName() override
{return "@PLUGIN_NAME@"; }
// Description:
// Returns the version for this plugin.
const char* GetPluginVersionString() override
{ return "@PLUGIN_VERSION@"; }
// Description:
// Returns true if this plugin is required on the server.
bool GetRequiredOnServer() override
{ return @PLUGIN_REQUIRED_ON_SERVER@; }
// Description:
// Returns true if this plugin is required on the client.
bool GetRequiredOnClient() override
{ return @PLUGIN_REQUIRED_ON_CLIENT@; }
// Description:
// Returns a ';' separated list of plugin names required by this plugin.
const char* GetRequiredPlugins() override
{
return "@PLUGIN_REQUIRED_PLUGINS@";
}
/**
* Returns the name for this plugin.
*/
const char* GetPluginName() override {return "@PLUGIN_NAME@"; }
/**
* Returns the version for this plugin.
*/
const char* GetPluginVersionString() override { return "@PLUGIN_VERSION@"; }
/**
* Returns true if this plugin is required on the server.
*/
bool GetRequiredOnServer() override { return @PLUGIN_REQUIRED_ON_SERVER@; }
/**
* Returns true if this plugin is required on the client.
*/
bool GetRequiredOnClient() override { return @PLUGIN_REQUIRED_ON_CLIENT@; }
/**
* Returns a ';' separated list of plugin names required by this plugin.
*/
const char* GetRequiredPlugins() override { return "@PLUGIN_REQUIRED_PLUGINS@"; }
/**
* Returns a description of this plugin.
*/
const char* GetDescription() override { return "@PLUGIN_DESCRIPTION@"; }
/**
* Returns EULA for the plugin, if any. If none, this will return nullptr.
*/
const char* GetEULA() override;
// Description:
// Provides access to binary resources compiled into the plugin.
// This is primarily used to compile in icons and compressed help project
// (qch) files into plugins.
/**
* Provides access to binary resources compiled into the plugin.
* This is primarily used to compile in icons and compressed help project
* (qch) files into plugins.
*/
void GetBinaryResources(std::vector<std::string>& resources) override;
#ifdef plugin_type_servermanager
// Description:
// Obtain the server-manager configuration xmls, if any.
void GetXMLs(std::vector<std::string> &xmls) override;
// Description:
// Returns the callback function to call to initialize the interpretor for the
// new vtk/server-manager classes added by this plugin. Returning NULL is
// perfectly valid.
/**
* Obtain the server-manager configuration xmls, if any.
*/
void GetXMLs(std::vector<std::string>& xmls) override;
/**
* Returns the callback function to call to initialize the interpretor for the
* new vtk/server-manager classes added by this plugin. Returning NULL is
* perfectly valid.
*/
vtkClientServerInterpreterInitializer::InterpreterInitializationCallback
GetInitializeInterpreterCallback() override;
#endif
#ifdef plugin_type_gui
/// Returns the list of ParaView-Interfaces provided by this plugin.
/**
* Returns the list of ParaView-Interfaces provided by this plugin.
*/
QObjectList interfaces() override;
#endif
#ifdef plugin_type_python
void GetPythonSourceList(std::vector<std::string>& modules,
std::vector<std::string>& sources,
std::vector<int> &package_flags) override;
std::vector<int>& package_flags) override;
#endif
};
......@@ -80,6 +80,11 @@ public:
*/
virtual const char* GetRequiredPlugins() = 0;
/**
* Returns a description of this plugin.
*/
virtual const char* GetDescription() = 0;
/**
* Returns EULA for the plugin, if any. If none, this will return nullptr.
*/
......
......@@ -101,40 +101,55 @@ public:
return instance;
}
// Description:
// Returns the name for this plugin.
/**
* Returns the name for this plugin.
*/
const char* GetPluginName() override { return this->PluginName.c_str(); }
// Description:
// Returns the version for this plugin.
/**
* Returns the version for this plugin.
*/
const char* GetPluginVersionString() override { return "1.0"; }
// Description:
// Returns true if this plugin is required on the server.
/**
* Returns true if this plugin is required on the server.
*/
bool GetRequiredOnServer() override { return true; }
// Description:
// Returns true if this plugin is required on the client.
/**
* Returns true if this plugin is required on the client.
*/
bool GetRequiredOnClient() override { return false; }
// Description:
// Returns a ';' separated list of plugin names required by this plugin.
/**
* Returns a ';' separated list of plugin names required by this plugin.
*/
const char* GetRequiredPlugins() override { return ""; }
// Description:
// Obtain the server-manager configuration xmls, if any.
/**
* Returns a description of this plugin.
*/
const char* GetDescription() override { return ""; }
/**
* Obtain the server-manager configuration xmls, if any.
*/
void GetXMLs(std::vector<std::string>& xmls) override { xmls.push_back(this->XML); }
// Description:
// Returns the callback function to call to initialize the interpretor for the
// new vtk/server-manager classes added by this plugin. Returning NULL is
// perfectly valid.
/**
* Returns the callback function to call to initialize the interpretor for the
* new vtk/server-manager classes added by this plugin. Returning NULL is
* perfectly valid.
*/
vtkClientServerInterpreterInitializer::InterpreterInitializationCallback
GetInitializeInterpreterCallback() override
{
return NULL;
}
/**
* Returns EULA for the plugin, if any. If none, this will return nullptr.
*/
const char* GetEULA() override { return nullptr; }
};
......
......@@ -33,6 +33,7 @@ public:
std::string Name;
std::string FileName;
std::string RequiredPlugins;
std::string Description;
std::string Version;
std::string StatusMessage;
bool AutoLoadForce;
......@@ -81,6 +82,12 @@ public:
}
this->RequiredPlugins = temp_ptr;
if (!stream.GetArgument(0, offset++, &temp_ptr))
{
return false;
}
this->Description = temp_ptr;
if (!stream.GetArgument(0, offset++, &temp_ptr))
{
return false;
......@@ -113,8 +120,8 @@ public:
void operator<<(vtkClientServerStream& stream, const vtkItem& item)
{
stream << item.Name.c_str() << item.FileName.c_str() << item.RequiredPlugins.c_str()
<< item.Version.c_str() << item.AutoLoad << item.Loaded << item.RequiredOnClient
<< item.RequiredOnServer;
<< item.Description.c_str() << item.Version.c_str() << item.AutoLoad << item.Loaded
<< item.RequiredOnClient << item.RequiredOnServer;
}
}
......@@ -127,7 +134,7 @@ vtkStandardNewMacro(vtkPVPluginsInformation);
vtkPVPluginsInformation::vtkPVPluginsInformation()
{
this->RootOnly = 1;
this->SearchPaths = NULL;
this->SearchPaths = nullptr;
this->Internals = new vtkInternals();
}
......@@ -135,7 +142,7 @@ vtkPVPluginsInformation::vtkPVPluginsInformation()
vtkPVPluginsInformation::~vtkPVPluginsInformation()
{
delete this->Internals;
this->Internals = NULL;
this->Internals = nullptr;
this->SetSearchPaths(0);
}
......@@ -178,7 +185,7 @@ void vtkPVPluginsInformation::CopyToStream(vtkClientServerStream* stream)
void vtkPVPluginsInformation::CopyFromStream(const vtkClientServerStream* stream)
{
int offset = 0;
const char* search_paths = NULL;
const char* search_paths = nullptr;
if (!stream->GetArgument(0, offset++, &search_paths))
{
vtkErrorMacro("Error parsing SearchPaths.");
......@@ -218,12 +225,13 @@ void vtkPVPluginsInformation::CopyFromObject(vtkObject*)
item.AutoLoadForce = false;
vtkPVPlugin* plugin = tracker->GetPlugin(cc);
item.Loaded = plugin != NULL;
item.Loaded = plugin != nullptr;
if (plugin)
{
item.RequiredPlugins = plugin->GetRequiredPlugins();
item.RequiredOnClient = plugin->GetRequiredOnClient();
item.RequiredOnServer = plugin->GetRequiredOnServer();
item.Description = plugin->GetDescription();
item.Version = plugin->GetPluginVersionString();
}
else
......@@ -283,7 +291,7 @@ const char* vtkPVPluginsInformation::GetPluginName(unsigned int cc)
{
return (*this->Internals)[cc].Name.c_str();
}
return NULL;
return nullptr;
}
//----------------------------------------------------------------------------
......@@ -292,10 +300,10 @@ const char* vtkPVPluginsInformation::GetPluginStatusMessage(unsigned int cc)
if (cc < this->GetNumberOfPlugins())
{
const char* reply = (*this->Internals)[cc].StatusMessage.c_str();
return (strlen(reply) == 0 ? NULL : reply);
return (strlen(reply) == 0 ? nullptr : reply);
}
return NULL;
return nullptr;
}
//----------------------------------------------------------------------------
......@@ -305,7 +313,7 @@ const char* vtkPVPluginsInformation::GetPluginFileName(unsigned int cc)
{
return (*this->Internals)[cc].FileName.c_str();
}
return NULL;
return nullptr;
}
//----------------------------------------------------------------------------
......@@ -315,7 +323,7 @@ const char* vtkPVPluginsInformation::GetPluginVersion(unsigned int cc)
{
return (*this->Internals)[cc].Version.c_str();
}
return NULL;
return nullptr;
}
//----------------------------------------------------------------------------
......@@ -335,7 +343,17 @@ const char* vtkPVPluginsInformation::GetRequiredPlugins(unsigned int cc)
{
return (*this->Internals)[cc].RequiredPlugins.c_str();
}
return NULL;
return nullptr;
}
//----------------------------------------------------------------------------
const char* vtkPVPluginsInformation::GetDescription(unsigned int cc)
{
if (cc < this->GetNumberOfPlugins())
{
return (*this->Internals)[cc].Description.c_str();
}
return nullptr;
}
//----------------------------------------------------------------------------
......
......@@ -46,6 +46,7 @@ public:
const char* GetRequiredPlugins(unsigned int);
bool GetRequiredOnServer(unsigned int);
bool GetRequiredOnClient(unsigned int);
const char* GetDescription(unsigned int);
bool GetAutoLoad(unsigned int);
//@}
......
......@@ -49,6 +49,7 @@ public:
bool GetRequiredOnServer() override { return true; }
bool GetRequiredOnClient() override { return false; }
const char* GetRequiredPlugins() override { return ""; }
const char* GetDescription() override { return ""; }
const char* GetEULA() override { return nullptr; }
//@}
......
......@@ -38,6 +38,7 @@ class vtkPVInitializerPlugin : public vtkPVPlugin,
bool GetRequiredOnServer() override { return false; }
bool GetRequiredOnClient() override { return false; }
const char* GetRequiredPlugins() override { return ""; }
const char* GetDescription() override { return ""; }
void GetBinaryResources(std::vector<std::string>&) override { }
const char* GetEULA() override { return nullptr; }
......
......@@ -48,6 +48,7 @@ if(PARAVIEW_USE_MPI)
${MPI_INCLUDE_PATH})
ADD_PARAVIEW_PLUGIN( Adios "1.4"
DESCRIPTION "Reader for *.bp files based on Adios"
SERVER_MANAGER_XML
Adios.xml
SERVER_MANAGER_SOURCES
......
......@@ -24,6 +24,7 @@ ELSE ()
ENDIF ()
ADD_PARAVIEW_PLUGIN(AnalyzeNIfTIIO "1.0"
DESCRIPTION "Reader/Writer for Analyze and NifTI files"
SERVER_MANAGER_SOURCES vtkAnalyzeReader.cxx
vtkAnalyzeWriter.cxx
vtkNIfTIReader.cxx
......
......@@ -10,6 +10,7 @@ include(ParaViewPlugins)
include_directories(${VTK_INCLUDE_DIRS})
add_paraview_plugin(DigitalRockPhysics "1.0"
DESCRIPTION "Digital Rock Physics analysis filters"
SERVER_MANAGER_XML DigitalRockPhysics.xml
SERVER_MANAGER_SOURCES vtkPMaterialClusterAnalysisFilter.cxx
vtkPMaterialClusterExplodeFilter.cxx)
......
......@@ -6,6 +6,7 @@ include_directories(
add_paraview_plugin(
EyeDomeLightingView "1.0"
DESCRIPTION "Add 3D View with eye-dome Lighting support"
REQUIRED_ON_SERVER
REQUIRED_ON_CLIENT
SERVER_MANAGER_SOURCES
......
......@@ -44,6 +44,7 @@ if(PARAVIEW_USE_MPI)
endif()
ADD_PARAVIEW_PLUGIN(GMVReader "1.0"
DESCRIPTION "Reader for binary or ASCII files stored in General Mesh Viewer file format"
REQUIRED_ON_SERVER
SERVER_MANAGER_XML GMVReaderSM.xml
SERVER_MANAGER_SOURCES vtkGMVReader.cxx)
......
......@@ -29,6 +29,7 @@ mark_as_advanced(GIO_DEBUG_LOG)
# Create the plugin
add_paraview_plugin(GenericIOReader "1.0"
DESCRIPTION "GenericIO Reader for HACC data"
SERVER_MANAGER_XML vtkGenIOReader.xml
SERVER_MANAGER_SOURCES vtkGenIOReader.cxx
SERVER_SOURCES ${SRC_LIST}
......
......@@ -14,6 +14,7 @@ include_directories(
add_paraview_plugin(
GmshReader "1.0"
DESCRIPTION "Reader for visualization of high-order polynomial solutions under the Gmsh format"
SERVER_MANAGER_XML
GmshReaderServerManager.xml
SERVER_MANAGER_SOURCES
......
......@@ -3,6 +3,7 @@ include_directories(${VTK_INCLUDE_DIRS})
add_paraview_plugin(
InSituExodus
"1.0"
DESCRIPTION "Experimental memory-conserving Exodus II file reader."
SERVER_MANAGER_XML InSituExodus.xml
)
......
......@@ -22,6 +22,7 @@ if (PARAVIEW_BUILD_QT_GUI)
CLASS_NAME pqIntegrationModelSurfaceHelperWidget)
add_paraview_plugin(LagrangianParticleTracker "1.0"
DESCRIPTION "Highly customizable filter for particle tracking"
REQUIRED_ON_SERVER
REQUIRED_ON_CLIENT
SERVER_MANAGER_XML
......
......@@ -18,6 +18,7 @@ SET(SM_SRC
)
ADD_PARAVIEW_PLUGIN(${PLUGIN_NAME} ${PLUGIN_VERSION}
DESCRIPTION "Filters for Flux and Circulation Fields"
REQUIRED_ON_SERVER
SERVER_MANAGER_XML ${SM_XML}
SERVER_MANAGER_SOURCES ${SM_SRC}
......
......@@ -21,6 +21,7 @@ if (PARAVIEW_ENABLE_PYTHON)
message(STATUS "netcdftime Python module not found! NetCDFTimeAnnotationPlugin not be available until it is installed.")
else()
add_paraview_plugin(NetCDFTimeAnnotationPlugin "1.0"
DESCRIPTION "Provides NetCDF Time Annotation filter"
SERVER_MANAGER_XML NetCDFTimeAnnotation.xml
REQUIRED_ON_SERVER)
......
......@@ -18,6 +18,7 @@ include_directories(
add_paraview_plugin(
PanoramicProjectionView "1.0"
DESCRIPTION "Add a panoramic projection 3D view"
REQUIRED_ON_SERVER
REQUIRED_ON_CLIENT
SERVER_MANAGER_SOURCES
......
......@@ -41,6 +41,7 @@ encode_files_as_strings(ENCODED_STRING_FILES
add_paraview_plugin(
StreamLinesRepresentation "0.1"
DESCRIPTION "Add animated Stream Lines representation for any type of dataset"
SERVER_MANAGER_XML StreamLinesRepresentation.xml
SERVER_MANAGER_SOURCES
vtkStreamLinesRepresentation.cxx
......
......@@ -6,6 +6,7 @@ include_directories(
add_paraview_plugin(
SurfaceLIC "2.0"
DESCRIPTION "Add Surface-LIC vector visualization representation"
DOCUMENTATION_DIR "${CMAKE_CURRENT_SOURCE_DIR}/doc"
SERVER_MANAGER_XML vtkSurfaceLICRepresentation.xml
SERVER_MANAGER_SOURCES vtkSurfaceLICRepresentation.cxx
......
include_directories(${VTK_INCLUDE_DIRS})
add_paraview_plugin(ThickenLayeredCells "1.0"
DESCRIPTION "Filter to thicken layered cells"
SERVER_MANAGER_XML ThickenLayeredCells.xml
SERVER_MANAGER_SOURCES vtkThickenLayeredCells.cxx)
......@@ -106,6 +106,7 @@ ADD_PARAVIEW_DOCK_WINDOW(
# create a plugin for this starter
ADD_PARAVIEW_PLUGIN(
VRPlugin "1.0"
DESCRIPTION "Virtual Reality Devices and Interactor styles"
GUI_INTERFACES ${IFACES} ${IFACES_WINDOW}
GUI_SOURCES
pqVRAddConnectionDialog.cxx
......
......@@ -8,6 +8,7 @@ else()
endif()
add_paraview_plugin(VTKmFilters "0.1"
DESCRIPTION "VTKm many-core filters"
REQUIRED_ON_SERVER
SERVER_MANAGER_XML VTKmSM.xml
)
......
......@@ -39,6 +39,7 @@ INCLUDE_DIRECTORIES(${VAPOR_NETCDF_INCLUDE_DIRS})
#TODO: GUI XML should not be necessary. Why are hints in server xml not working for the plugin?
ADD_PARAVIEW_PLUGIN(VDFReaderPlugin "1.0"
DESCRIPTION "Plugin to read NCAR VDR files"
SERVER_MANAGER_XML VDFReader.xml
SERVER_MANAGER_SOURCES vtkVDFReader.cxx
REQUIRED_ON_SERVER
......
......@@ -309,9 +309,7 @@ vtkPVPluginsInformation* pqPluginDialog::getPluginInfo(
vtkPVPluginsInformation* info = pm->loadedExtensions(
this->Server, (pluginNode->treeWidget() == this->Ui->remotePlugins) ? true : false);
index = (pluginNode && pluginNode->type() == QTreeWidgetItem::UserType)
? pluginNode->data(NameCol, Qt::UserRole).toUInt()
: 0;
index = pluginNode ? pluginNode->data(NameCol, Qt::UserRole).toUInt() : 0;
if (info && info->GetNumberOfPlugins() > index)
{
......@@ -325,7 +323,7 @@ vtkPVPluginsInformation* pqPluginDialog::getPluginInfo(
void pqPluginDialog::addInfoNodes(QTreeWidgetItem* pluginNode, vtkPVPluginsInformation* plInfo,
unsigned int index, bool vtkNotUsed(remote))
{
Qt::ItemFlags infoFlags(Qt::ItemIsEnabled);
Qt::ItemFlags infoFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
// set icon hint
if (plInfo->GetPluginLoaded(index))
......@@ -341,11 +339,27 @@ void pqPluginDialog::addInfoNodes(QTreeWidgetItem* pluginNode, vtkPVPluginsInfor
pluginNode->setText(ValueCol, "Not Loaded");
}
QVariant vdata;
vdata.setValue(index);
QStringList infoText;
// Version
infoText << tr("Version") << tr(plInfo->GetPluginVersion(index));
QTreeWidgetItem* infoNode = new QTreeWidgetItem(pluginNode, infoText);
infoNode->setFlags(infoFlags);
infoNode->setData(NameCol, Qt::UserRole, vdata);
// Description
if (strlen(plInfo->GetDescription(index)) > 0)
{
infoText.clear();
infoText << tr("Description");
infoText << tr(plInfo->GetDescription(index));
infoNode = new QTreeWidgetItem(pluginNode, infoText);
infoNode->setFlags(infoFlags);
infoNode->setToolTip(ValueCol, tr(plInfo->GetDescription(index)));
infoNode->setData(NameCol, Qt::UserRole, vdata);
}
// Location
infoText.clear();
......@@ -353,6 +367,7 @@ void pqPluginDialog::addInfoNodes(QTreeWidgetItem* pluginNode, vtkPVPluginsInfor
infoNode = new QTreeWidgetItem(pluginNode, infoText);
infoNode->setFlags(infoFlags);
infoNode->setToolTip(ValueCol, tr(plInfo->GetPluginFileName(index)));
infoNode->setData(NameCol, Qt::UserRole, vdata);
// Depended Plugins
if (plInfo->GetRequiredPlugins(index))
......@@ -363,6 +378,7 @@ void pqPluginDialog::addInfoNodes(QTreeWidgetItem* pluginNode, vtkPVPluginsInfor
infoNode = new QTreeWidgetItem(pluginNode, infoText);
infoNode->setFlags(infoFlags);
infoNode->setToolTip(ValueCol, tr(plInfo->GetRequiredPlugins(index)));
infoNode->setData(NameCol, Qt::UserRole, vdata);
}
// Load status
......@@ -375,6 +391,7 @@ void pqPluginDialog::addInfoNodes(QTreeWidgetItem* pluginNode, vtkPVPluginsInfor
{
infoNode->setToolTip(ValueCol, tr(plInfo->GetPluginStatusMessage(index)));
}
infoNode->setData(NameCol, Qt::UserRole, vdata);
// AutoLoad setting
infoText.clear();
......@@ -382,6 +399,7 @@ void pqPluginDialog::addInfoNodes(QTreeWidgetItem* pluginNode, vtkPVPluginsInfor
infoNode = new QTreeWidgetItem(pluginNode, infoText);
infoNode->setFlags(infoFlags | Qt::ItemIsUserCheckable);
infoNode->setCheckState(ValueCol, plInfo->GetAutoLoad(index) ? Qt::Checked : Qt::Unchecked);
infoNode->setData(NameCol, Qt::UserRole, vdata);
}
//----------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment