Beispiel #1
0
    def __init__(self,
                 main_model: MainModel,
                 notification_controller: NotificationController,
                 running: bool = False):
        Thread.__init__(self)
        QObject.__init__(self)

        self.setName("Algoritmo V5")
        self.setDaemon(True)
        self.env_settings = QSettings()
        self.settings_model: SettingsModel = main_model.settings_model

        self.refresh: int = (lambda: self.settings_model.get_sync_time())
        self.running = running
        self.notification_controller = notification_controller

        # set istanza di NetworkModel nei moduli per poter gestire i segnali di errore
        tree_builder.set_model(main_model.network_model)
        os_handler.set_network_model(main_model.network_model)
        os_handler.set_settings_model(main_model.settings_model)

        self.main_model = main_model

        self.compare_snap_client = CompareSnapClient()
        self.strategy: dict[Policy, Strategy] = {
            Policy.Client: ClientStrategy(),
            Policy.Manual: ManualStrategy()
        }

        self.logger = logging.getLogger("decision_engine")
        self.condition = Condition()
Beispiel #2
0
 def __init__(self):
     QObject.__init__(self)
     self.amounts = LedgerAmounts(
         "amount_acc")  # store last amount for [book, account, asset]
     self.values = LedgerAmounts(
         "value_acc")  # together with corresponding value
     self.main_window = None
     self.progress_bar = None
Beispiel #3
0
 def __init__(self):
     QObject.__init__(self)
     self.current = {}
     self.current_seq = -1
     self.amounts = LedgerAmounts(
     )  # store last amount for [book, account, asset]
     self.values = LedgerAmounts()  # together with corresponding value
     self.sids = {}  # and keep sid of operation that modified it
     self.main_window = None
     self.progress_bar = None
Beispiel #4
0
    def __init__(self):
        QObject.__init__(self)

        self._tableModel = DHLTableModel()
        #self._slectionModel=self.
        #self._currentList=None  # type: QStringListModel
        self._channelCount = 0  # type: int
        self._active_channel = 0  # type: int
        self._figure = None  # type: Figure
        #self._tableModelSelectIndex=0 #

        self._acqs = []  # type: typing.List[ismrmrd.Acquisition]

        # 当前行/当前通道原始数据
        self._currentLineData = None  # type: np.array

        # 当前行用于渲染的数据
        self._currentLineListModel = QStringListModel(
        )  # type: QStringListModel
        #self._currentLineListModel.setStringList(['1','2','3'])

        #self.channelCountChanged.connect(self.safe_update_list_model)
        #self.currentChannelIndexChanged.connect(self.safe_update_list_model)

        self._canvas = None  # type: FigureCanvas
        self._figure = None  # type: Figure
        self._axes = None

        self._tableview = None  # type: QTableView

        self._selectionModel = None  # type: QItemSelectionModel

        self._listview = None  # type: QListView
        self._listViewSelectionModel = None  # type: QItemSelectionModel
        self._tableModelSelectIndex = 0  # ?
        self.stop_update_whole_view = False  # global backend data fix in progress
        self.stop_update_list_data = False

        pass
Beispiel #5
0
 def __init__(self, mediaPlayer):
     QObject.__init__(self)
     self.mediaPlayer = mediaPlayer
Beispiel #6
0
 def __init__(self):
     QObject.__init__(self)
Beispiel #7
0
 def __init__(self, widget, channel_name):
     QObject.__init__(self)
     self.widget = widget
     self.channel_name = channel_name
     channels_for_names[self.channel_name] = self
Beispiel #8
0
 def __init__(self):
     QObject.__init__(self)
     os.path.join(os.path.dirname(__file__), "main.qml")
Beispiel #9
0
 def __init__(self, name="", parent=None):
     QObject.__init__(self, parent)
     self.setObjectName(name)
Beispiel #10
0
 def __init__(self, app_core: CoreApp):
     QObject.__init__(self, None)  # parent null args removed
     self.app_core = app_core
     self.optionsMap: Dict[str, Category] = {}
Beispiel #11
0
 def __init__(self, queue):
     QObject.__init__(self)
     self.queue = queue
 def __init__(self):
     QObject.__init__(self)
     self._deg = 0
     self._min = 0
     self._sec = 0
     self._deg_float = 0.0
Beispiel #13
0
 def __init__(self):
     # Initialize the parent object. If omitted, GUI will not start
     QObject.__init__(self)
     # Initialize the counter internal value. Because we propagate count as
     # a property to QML, getter, setter and notifier must be made
     self._count = 0