tbapi.api.bases.watchlist_cell_value

 1from __future__ import annotations
 2from typing import TYPE_CHECKING
 3from tbapi.common.decorators import tb_class, tb_interface
 4from tbapi.common.converters import to_python_datetime, to_net_datetime
 5from datetime import datetime
 6from Tickblaze.Scripts.Api.Bases import WatchlistCellValue as _WatchlistCellValue
 7from typing import Any, overload
 8from abc import ABC, abstractmethod
 9if TYPE_CHECKING:
10    from tbapi.api.models.color import Color
11
12@tb_class(_WatchlistCellValue)
13class WatchlistCellValue():
14    """Represents a cell in the watchlist with value and associated colors."""
15
16    @overload
17    @staticmethod
18    def new() -> "WatchlistCellValue":
19        """Constructor overload with arguments: """
20        ...
21    @staticmethod
22    def new(*args, **kwargs):
23        """Generic factory method for WatchlistCellValue. Use overloads for IDE type hints."""
24        return WatchlistCellValue(*args, **kwargs)
25
26    @property
27    def value(self) -> float:
28        """The value of the watchlist cell."""
29        val = self._value.Value
30        return val
31    @value.setter
32    def value(self, val: float):
33        tmp = self._value
34        tmp.Value = val
35        self._value = tmp
36    @property
37    def display_value(self) -> str:
38        """The string value of the watchlist cell."""
39        val = self._value.DisplayValue
40        return val
41    @display_value.setter
42    def display_value(self, val: str):
43        tmp = self._value
44        tmp.DisplayValue = val
45        self._value = tmp
46    @property
47    def background(self) -> Color:
48        """The background color of the watchlist cell."""
49        from tbapi.api.models.color import Color
50        val = self._value.Background
51        return Color(_existing=val)
52    @background.setter
53    def background(self, val: Color):
54        tmp = self._value
55        tmp.Background = val._value
56        self._value = tmp
57    @property
58    def foreground(self) -> Color:
59        """The foreground color of the watchlist cell."""
60        from tbapi.api.models.color import Color
61        val = self._value.Foreground
62        return Color(_existing=val)
63    @foreground.setter
64    def foreground(self, val: Color):
65        tmp = self._value
66        tmp.Foreground = val._value
67        self._value = tmp
@tb_class(_WatchlistCellValue)
class WatchlistCellValue:
20@tb_class(_WatchlistCellValue)
21class WatchlistCellValue():
22    """Represents a cell in the watchlist with value and associated colors."""
23
24    @overload
25    @staticmethod
26    def new() -> "WatchlistCellValue":
27        """Constructor overload with arguments: """
28        ...
29    @staticmethod
30    def new(*args, **kwargs):
31        """Generic factory method for WatchlistCellValue. Use overloads for IDE type hints."""
32        return WatchlistCellValue(*args, **kwargs)
33
34    @property
35    def value(self) -> float:
36        """The value of the watchlist cell."""
37        val = self._value.Value
38        return val
39    @value.setter
40    def value(self, val: float):
41        tmp = self._value
42        tmp.Value = val
43        self._value = tmp
44    @property
45    def display_value(self) -> str:
46        """The string value of the watchlist cell."""
47        val = self._value.DisplayValue
48        return val
49    @display_value.setter
50    def display_value(self, val: str):
51        tmp = self._value
52        tmp.DisplayValue = val
53        self._value = tmp
54    @property
55    def background(self) -> Color:
56        """The background color of the watchlist cell."""
57        from tbapi.api.models.color import Color
58        val = self._value.Background
59        return Color(_existing=val)
60    @background.setter
61    def background(self, val: Color):
62        tmp = self._value
63        tmp.Background = val._value
64        self._value = tmp
65    @property
66    def foreground(self) -> Color:
67        """The foreground color of the watchlist cell."""
68        from tbapi.api.models.color import Color
69        val = self._value.Foreground
70        return Color(_existing=val)
71    @foreground.setter
72    def foreground(self, val: Color):
73        tmp = self._value
74        tmp.Foreground = val._value
75        self._value = tmp

Represents a cell in the watchlist with value and associated colors.

WatchlistCellValue(*args, **kwargs)
162        def __init__(self, *args, **kwargs):
163            pass
@staticmethod
def new(*args, **kwargs):
29    @staticmethod
30    def new(*args, **kwargs):
31        """Generic factory method for WatchlistCellValue. Use overloads for IDE type hints."""
32        return WatchlistCellValue(*args, **kwargs)

Generic factory method for WatchlistCellValue. Use overloads for IDE type hints.

value: float
34    @property
35    def value(self) -> float:
36        """The value of the watchlist cell."""
37        val = self._value.Value
38        return val

The value of the watchlist cell.

display_value: str
44    @property
45    def display_value(self) -> str:
46        """The string value of the watchlist cell."""
47        val = self._value.DisplayValue
48        return val

The string value of the watchlist cell.

background: tbapi.api.models.color.Color
54    @property
55    def background(self) -> Color:
56        """The background color of the watchlist cell."""
57        from tbapi.api.models.color import Color
58        val = self._value.Background
59        return Color(_existing=val)

The background color of the watchlist cell.

foreground: tbapi.api.models.color.Color
65    @property
66    def foreground(self) -> Color:
67        """The foreground color of the watchlist cell."""
68        from tbapi.api.models.color import Color
69        val = self._value.Foreground
70        return Color(_existing=val)

The foreground color of the watchlist cell.