# Path: vnpy/trader/ui/qt.py
# def create_qapp(app_name: str = "Veighna Trader") -> QtWidgets.QApplication:
#     def excepthook(exctype: type, value: Exception, tb: types.TracebackType) -> None:
#     def __init__(self, parent: QtWidgets.QWidget = None):
#     def init_ui(self) -> None:
#     def show_exception(self, msg: str) -> None:
#     def _copy_text(self) -> None:
#     def _open_community(self) -> None:
# class ExceptionWidget(QtWidgets.QWidget):
# 
# Path: vnpy/trader/object.py
# class BarData(BaseData):
#     """
#     Candlestick bar data of a certain trading period.
#     """
# 
#     symbol: str
#     exchange: Exchange
#     datetime: datetime
# 
#     interval: Interval = None
#     volume: float = 0
#     turnover: float = 0
#     open_interest: float = 0
#     open_price: float = 0
#     high_price: float = 0
#     low_price: float = 0
#     close_price: float = 0
# 
#     def __post_init__(self):
#         """"""
#         self.vt_symbol = f"{self.symbol}.{self.exchange.value}"


from abc import abstractmethod
from typing import List, Dict, Tuple
from vnpy.trader.ui import QtCore, QtGui, QtWidgets
from vnpy.trader.object import BarData
from .base import BLACK_COLOR, UP_COLOR, DOWN_COLOR, PEN_WIDTH, BAR_WIDTH
from .manager import BarManager
import pyqtgraph as pg





class ChartItem(pg.GraphicsObject):
    """"""

    def __init__(self, manager: BarManager):
        """"""
        super().__init__()

        self._manager: BarManager = manager


# Path: vnpy/trader/ui/qt.py
# def create_qapp(app_name: str = "Veighna Trader") -> QtWidgets.QApplication:
#     def excepthook(exctype: type, value: Exception, tb: types.TracebackType) -> None:
#     def __init__(self, parent: QtWidgets.QWidget = None):
#     def init_ui(self) -> None:
#     def show_exception(self, msg: str) -> None:
#     def _copy_text(self) -> None:
#     def _open_community(self) -> None:
# class ExceptionWidget(QtWidgets.QWidget):
# 
# Path: vnpy/trader/object.py
# class BarData(BaseData):
#     """
#     Candlestick bar data of a certain trading period.
#     """
# 
#     symbol: str
#     exchange: Exchange
#     datetime: datetime
# 
#     interval: Interval = None
#     volume: float = 0
#     turnover: float = 0
#     open_interest: float = 0
#     open_price: float = 0
#     high_price: float = 0
#     low_price: float = 0
#     close_price: float = 0
# 
#     def __post_init__(self):
#         """"""
#         self.vt_symbol = f"{self.symbol}.{self.exchange.value}"


# Path: vnpy/chart/item.py
from abc import abstractmethod
from typing import List, Dict, Tuple
from vnpy.trader.ui import QtCore, QtGui, QtWidgets
from vnpy.trader.object import BarData
from .base import BLACK_COLOR, UP_COLOR, DOWN_COLOR, PEN_WIDTH, BAR_WIDTH
from .manager import BarManager
import pyqtgraph as pg






class ChartItem(pg.GraphicsObject):
    """"""

    def __init__(self, manager: BarManager):
        """"""
        super().__init__()

        self._manager: BarManager = manager


        self._bar_picutures: Dict[int, QtGui.QPicture] = {}