Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEP: Remove References to Deprecated QVariant #1141

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions pydm/widgets/archiver_time_plot_editor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any, Optional
from qtpy.QtCore import Qt, QModelIndex, QObject
from qtpy.QtGui import QColor
from .archiver_time_plot import ArchivePlotCurveItem, FormulaCurveItem
from .archiver_time_plot import ArchivePlotCurveItem
from .baseplot import BasePlot, BasePlotCurveItem
from .baseplot_table_model import BasePlotCurvesModel
from .baseplot_curve_editor import BasePlotCurveEditorDialog, PlotStyleColumnDelegate
Expand Down Expand Up @@ -39,15 +39,13 @@ def data(self, index, role=Qt.DisplayRole):
def get_data(self, column_name: str, curve: BasePlotCurveItem) -> Any:
"""Get data for the input column name"""
if column_name == "Channel":
if isinstance(curve, FormulaCurveItem):
if curve.formula is None:
return ""
return str(curve.formula)
if hasattr(curve, "address"):
return curve.address
elif hasattr(curve, "formula"):
return curve.formula
# We are either a Formula or a PV (for now at leasts)
else:
if curve.address is None:
return ""
return str(curve.address)
return None

elif column_name == "Live Data":
return bool(curve.liveData)
Expand Down
Loading