Overview | Modules | Class Hierarchy | Classes | Members

Public Member Functions
tlp::GraphPropertiesSelectionWidget Class Reference

A widget which allows the user to select a subset of graph properties. More...

`#include <GraphPropertiesSelectionWidget.h>`

Inheritance diagram for tlp::GraphPropertiesSelectionWidget:
[legend]
Collaboration diagram for tlp::GraphPropertiesSelectionWidget:
[legend]

List of all members.

## Public Member Functions

- GraphPropertiesSelectionWidget (QWidget *parent=NULL, const StringsListSelectionWidget::ListType &listType=StringsListSelectionWidget::SIMPLE_LIST, const unsigned int maxNbSelectedProperties=0)
- GraphPropertiesSelectionWidget (Graph *graph, QWidget *parent=0, const StringsListSelectionWidget::ListType &listType=StringsListSelectionWidget::SIMPLE_LIST, const unsigned int maxNbSelectedProperties=0, const std::vector< std::string > &propertiesTypes=std::vector< std::string >(), const bool includeViewProperties=false)
- void setWidgetParameters (Graph *graph, const std::vector< std::string > &propertiesTypes=std::vector< std::string >(), const bool includeViewProperties=false)
- void setInputPropertiesList (std::vector< std::string > &inputPropertiesList)
- void setOutputPropertiesList (std::vector< std::string > &outputPropertiesList)
- std::vector< std::string > getSelectedProperties () const
- void clearLists ()

## Detailed Description

A widget which allows the user to select a subset of graph properties.

This widget allows the user to select a subset of graph properties. The properties to select can be filtered according to their datatypes.

## Constructor & Destructor Documentation

tlp::GraphPropertiesSelectionWidget::GraphPropertiesSelectionWidget | ( | QWidget * | parent = `NULL`,
|  | const StringsListSelectionWidget::ListType & | listType = `StringsListSelectionWidget::SIMPLE_LIST`,
|  | const unsigned int | maxNbSelectedProperties = `0`
| ) |  |

Default Constructor (usefull for qt designer)

tlp::GraphPropertiesSelectionWidget::GraphPropertiesSelectionWidget | ( | Graph * | graph,
|  | QWidget * | parent = `0`,
|  | const StringsListSelectionWidget::ListType & | listType = `StringsListSelectionWidget::SIMPLE_LIST`,
|  | const unsigned int | maxNbSelectedProperties = `0`,
|  | const std::vector< std::string > & | propertiesTypes = `std::vector< std::string >()`,
|  | const bool | includeViewProperties = `false`
| ) |  |

Constructor which creates a GraphPropertiesSelectionWidget for a given graph

Parameters:

  graph | The graph on which we want to select properties
  propertiesType | To select properties with particular datatypes, fill a vector of string with the wanted datatypes name and passed it as parameter of this constructor. The datatypes name must be the same as those returned by the getTypename method of the PropertyInterface class (e.g. "int", "double", "string"). If the vector is empty, there is no restriction on property datatypes.
  includeViewProperties | If true, the view properties (e.g. "viewLabel", "viewMetric") will be selectable

## Member Function Documentation

void tlp::GraphPropertiesSelectionWidget::clearLists | ( |  | ) |

Method which clears the content of the input list and the output list

std::vector<std::string> tlp::GraphPropertiesSelectionWidget::getSelectedProperties | ( |  | ) | const

Method which returns the names of the graph properties selected by the user

void tlp::GraphPropertiesSelectionWidget::setInputPropertiesList | ( | std::vector< std::string > & | inputPropertiesList | ) |

Method to set the input graph properties list If there is datatypes restriction, the types of properties are checked before inserting them in the input list

Parameters:

  inputPropertiesList | A vector containing input properties names

void tlp::GraphPropertiesSelectionWidget::setOutputPropertiesList | ( | std::vector< std::string > & | outputPropertiesList | ) |

Method to set the output graph properties list If there is datatypes restriction, the types of properties are checked before inserting them in the output list

Parameters:

  outputPropertiesList | A vector containing output properties names

void tlp::GraphPropertiesSelectionWidget::setWidgetParameters | ( | Graph * | graph,
|  | const std::vector< std::string > & | propertiesTypes = `std::vector< std::string >()`,
|  | const bool | includeViewProperties = `false`
| ) |  |

Method to set the widget parameters

Parameters:

  graph | The graph on which we want to select properties
  propertiesType | To select properties with particular datatypes, fill a vector of string with the wanted datatypes name and passed it as parameter of this constructor. The datatypes name must be the same as those returned by the getTypename method of the PropertyInterface class (e.g. "int", "double", "string"). If the vector is empty, there is no restriction on property datatypes.
  includeViewProperties | If true, the view properties (e.g. "viewLabel", "viewMetric") will be selectable

Tulip Software by LaBRI Visualization Team 2001 - 2012