mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-17 19:16:26 +02:00
[ui] Components: fix documentation
This commit is contained in:
parent
5a1660a2c0
commit
385d1f7738
1 changed files with 6 additions and 12 deletions
|
@ -7,10 +7,9 @@ import csv
|
||||||
import os
|
import os
|
||||||
|
|
||||||
class CsvData(QObject):
|
class CsvData(QObject):
|
||||||
"""
|
"""Store data from a CSV file."""
|
||||||
Store data from a CSV file
|
|
||||||
"""
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
"""Initialize the object without any parameter."""
|
||||||
super(CsvData, self).__init__()
|
super(CsvData, self).__init__()
|
||||||
self._filepath = ""
|
self._filepath = ""
|
||||||
self._data = QObjectListModel(parent=self) # List of CsvColumn
|
self._data = QObjectListModel(parent=self) # List of CsvColumn
|
||||||
|
@ -43,9 +42,7 @@ class CsvData(QObject):
|
||||||
self.setReady(True)
|
self.setReady(True)
|
||||||
|
|
||||||
def read(self):
|
def read(self):
|
||||||
"""
|
"""Read the CSV file and return a list containing CsvColumn objects."""
|
||||||
Read the CSV file and return a list containing CsvColumn objects
|
|
||||||
"""
|
|
||||||
if not self._filepath or not self._filepath.endswith(".csv") or not os.path.isfile(self._filepath):
|
if not self._filepath or not self._filepath.endswith(".csv") or not os.path.isfile(self._filepath):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
@ -77,10 +74,9 @@ class CsvData(QObject):
|
||||||
|
|
||||||
|
|
||||||
class CsvColumn(QObject):
|
class CsvColumn(QObject):
|
||||||
"""
|
"""Store content of a CSV column."""
|
||||||
Store content of a CSV column
|
|
||||||
"""
|
|
||||||
def __init__(self, title=""):
|
def __init__(self, title=""):
|
||||||
|
"""Initialize the object with optional column title parameter."""
|
||||||
super(CsvColumn, self).__init__()
|
super(CsvColumn, self).__init__()
|
||||||
self._title = title
|
self._title = title
|
||||||
self._content = []
|
self._content = []
|
||||||
|
@ -102,9 +98,7 @@ class CsvColumn(QObject):
|
||||||
|
|
||||||
@Slot(QtCharts.QXYSeries)
|
@Slot(QtCharts.QXYSeries)
|
||||||
def fillChartSerie(self, serie):
|
def fillChartSerie(self, serie):
|
||||||
"""
|
"""Fill XYSerie used for displaying QML Chart."""
|
||||||
Fill XYSerie used for displaying QML Chart
|
|
||||||
"""
|
|
||||||
if not serie:
|
if not serie:
|
||||||
return
|
return
|
||||||
serie.clear()
|
serie.clear()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue