Skip to content

Commit

Permalink
Merge pull request #1141 from zdomke/dev_remove_qvariant
Browse files Browse the repository at this point in the history
DEP: Remove References to Deprecated QVariant
  • Loading branch information
jbellister-slac authored Dec 19, 2024
2 parents 583ac93 + 84aab75 commit 3fde371
Showing 1 changed file with 6 additions and 8 deletions.
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

0 comments on commit 3fde371

Please sign in to comment.