Overview | Modules | Class Hierarchy | Classes | Members

# tlp::ImportCSVDataConfigurationWidget Class Reference

`#include <ImportCSVDataConfigurationWidget.h>`

Inherits tlp::CSVContentHandler.

Inheritance diagram for tlp::ImportCSVDataConfigurationWidget:

[legend]
Collaboration diagram for tlp::ImportCSVDataConfigurationWidget:

[legend]
List of all members.

## Public Types

- enum PropertyType {
  AutoDetect, Double, Layout, String,
  Int, Color, Size, Bool,
  DoubleVector, StringVector, IntVector, CoordVector,
  ColorVector, SizeVector, BoolVector
  }
- enum PropertyOrientation { Column, Row }

## Signals

- void csvFileChange (QString newFile)
- void separatorChange (QString newSeparator)
- void useFirstRowAsPropertyNameChange (bool useFirstRowAsPropName)
- void propertiesOrientationChange (ImportCSVDataConfigurationWidget::PropertyOrientation orientation)

## Public Member Functions

- ImportCSVDataConfigurationWidget (QWidget *parent=NULL)
- virtual ~ImportCSVDataConfigurationWidget ()
- QString getSeparator () const
- QString getCsvFile () const
- bool useFirstRowAsPropertyName () const
- unsigned int numberOfPreviews () const
- PropertyOrientation getPropertyOrientation () const
- void clearPropertiesTypeList ()
- void addPropertyToPropertyList (const std::string &propertyName, bool isEditable, PropertyType propertyType=AutoDetect)
- QString getPropertyName (unsigned int propertyNumber) const
- ImportCSVDataConfigurationWidget::PropertyType getPropertyType (unsigned int propertyNumber) const
- bool useProperty (unsigned int propertyNumber)
- bool checkIfMoreThanOnePropertyHaveTheName (const QString &name)
- void begin ()
- void token (unsigned int row, unsigned int column, const std::string &token)
- void end (unsigned int rowNumber, unsigned int columnNumber)

## Protected Member Functions

- virtual PropertyConfigurationWidget * createPropertyConfigurationWidget (unsigned int propertyNumber, const QString &propertyName, bool propertyNameIsEditable, ImportCSVDataConfigurationWidget::PropertyType defaultPropertyType, QWidget *parent)
- virtual QTableWidget * buildPreviewWidget (QWidget *parent)

## Protected Attributes

- std::vector< PropertyConfigurationWidget * > propertyWidgets
- PropertyNameValidator * propertyNameValidator
- QTableWidget * previewWidget

## Member Enumeration Documentation

enum tlp::ImportCSVDataConfigurationWidget::PropertyOrientation

Enumerator:

  Column |
  Row |

enum tlp::ImportCSVDataConfigurationWidget::PropertyType

Enumerator:

  AutoDetect |
  Double |
  Layout |
  String |
  Int |
  Color |
  Size |
  Bool |
  DoubleVector |
  StringVector |
  IntVector |
  CoordVector |
  ColorVector |
  SizeVector |
  BoolVector |

## Constructor & Destructor Documentation

tlp::ImportCSVDataConfigurationWidget::ImportCSVDataConfigurationWidget | ( | QWidget * | parent = `NULL` | ) |

virtual tlp::ImportCSVDataConfigurationWidget::~ImportCSVDataConfigurationWidget | ( |  | ) | `[virtual]`

## Member Function Documentation

void tlp::ImportCSVDataConfigurationWidget::addPropertyToPropertyList | ( | const std::string & | propertyName,
|  | bool | isEditable,
|  | PropertyType | propertyType = `AutoDetect`
| ) |

| Add a property to the current property list.

void tlp::ImportCSVDataConfigurationWidget::begin | ( |  | ) | `[virtual]`

| Function called at the beginning of the file parsing. Implements tlp::CSVContentHandler.

virtual QTableWidget* tlp::ImportCSVDataConfigurationWidget::buildPreviewWidget | ( | QWidget * | parent | ) | `[protected, virtual]`

| Create and return the table widget preview widget.

bool tlp::ImportCSVDataConfigurationWidget::checkIfMoreThanOnePropertyHaveTheName | ( | const QString & | name | ) |

void tlp::ImportCSVDataConfigurationWidget::clearPropertiesTypeList | ( |  | ) |

| Empty the properties list.

virtual PropertyConfigurationWidget* tlp::ImportCSVDataConfigurationWidget::createPropertyConfigurationWidget | ( | unsigned int | propertyNumber,
|  | const QString & | propertyName,
|  | bool | propertyNameIsEditable,
|  | ImportCSVDataConfigurationWidget::PropertyType | defaultPropertyType,
|  | QWidget * | parent
| ) | `[protected, virtual]`

Build the property configuration widget from given parameters.

Parameters:

  | propertyNumber | the property number.
  | propertyName |
  | isEditable | Is the property name editable?
  | defaultPropertyType | the default property type.

void tlp::ImportCSVDataConfigurationWidget::csvFileChange | ( | QString | newFile | ) | `[signal]`

void tlp::ImportCSVDataConfigurationWidget::end | ( | unsigned int | rowNumber,
|  | unsigned int | columnNumber
| ) | `[virtual]`

Function called at the end of the parsing.

Parameters:

  | rowNumber | the number of row read in the file.
  | columnNumber | The column number for the line with the greatest column number.

Implements tlp::CSVContentHandler.

QString tlp::ImportCSVDataConfigurationWidget::getCsvFile | ( |  | ) | const`[inline]`

QString tlp::ImportCSVDataConfigurationWidget::getPropertyName | ( | unsigned int | propertyNumber | ) | const

PropertyOrientation tlp::ImportCSVDataConfigurationWidget::getPropertyOrientation | ( |  | ) | const`[inline]`

ImportCSVDataConfigurationWidget::PropertyType tlp::ImportCSVDataConfigurationWidget::getPropertyType | ( | unsigned int | propertyNumber | ) | const

QString tlp::ImportCSVDataConfigurationWidget::getSeparator | ( |  | ) | const`[inline]`

unsigned int tlp::ImportCSVDataConfigurationWidget::numberOfPreviews | ( |  | ) | const`[inline]`

void tlp::ImportCSVDataConfigurationWidget::propertiesOrientationChange | ( | ImportCSVDataConfigurationWidget::PropertyOrientation | orientation | ) | `[signal]`

void tlp::ImportCSVDataConfigurationWidget::separatorChange | ( | QString | newSeparator | ) | `[signal]`

void tlp::ImportCSVDataConfigurationWidget::token | ( | unsigned int | row,
|  | unsigned int | column,
|  | const std::string & | token
| ) | `[virtual]`

Function called for each tokens found in the file.

Parameters:

  | row | The row position of the token.
  | column | The column position of the token.
  | token | The token.

Implements tlp::CSVContentHandler.

bool tlp::ImportCSVDataConfigurationWidget::useFirstRowAsPropertyName | ( |  | ) | const`[inline]`

void tlp::ImportCSVDataConfigurationWidget::useFirstRowAsPropertyNameChange | ( | bool | useFirstRowAsPropName | ) | `[signal]`

bool tlp::ImportCSVDataConfigurationWidget::useProperty | ( | unsigned int | propertyNumber | ) |

| Return true if the property with the given number must be loaded in the graph.

## Member Data Documentation

QTableWidget* tlp::ImportCSVDataConfigurationWidget::previewWidget `[protected]`

PropertyNameValidator* tlp::ImportCSVDataConfigurationWidget::propertyNameValidator `[protected]`

std::vector<PropertyConfigurationWidget*> tlp::ImportCSVDataConfigurationWidget::propertyWidgets `[protected]`

Tulip Software by LaBRI Visualization Team 2001 - 2010