mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
feat: start method for BECFigure, jupyter console .ui added to git
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
# pylint: disable = no-name-in-module,missing-module-docstring
|
||||
import itertools
|
||||
import os
|
||||
import sys
|
||||
from typing import Literal, Optional
|
||||
|
||||
import numpy as np
|
||||
@ -106,7 +107,7 @@ class BECFigure(BECConnector, pg.GraphicsLayoutWidget):
|
||||
)
|
||||
|
||||
# TODO debug 1dwaveform
|
||||
self.add_widget(widget_type="Waveform1D", widget_id="widget_2", row=1, col=0)
|
||||
# self.add_widget(widget_type="Waveform1D", widget_id="widget_2", row=1, col=0)
|
||||
|
||||
# def show(self): # TODO check if useful for anything
|
||||
# self.window = QMainWindow()
|
||||
@ -277,6 +278,14 @@ class BECFigure(BECConnector, pg.GraphicsLayoutWidget):
|
||||
if widget_id not in existing_ids:
|
||||
return widget_id
|
||||
|
||||
def start(self):
|
||||
app = QApplication(sys.argv)
|
||||
win = QMainWindow()
|
||||
win.setCentralWidget(self)
|
||||
win.show()
|
||||
|
||||
sys.exit(app.exec_())
|
||||
|
||||
|
||||
##################################################
|
||||
##################################################
|
||||
@ -330,18 +339,21 @@ class DebugWindow(QWidget):
|
||||
self.console.set_default_style("linux")
|
||||
|
||||
|
||||
if __name__ == "__main__": # pragma: no cover
|
||||
import sys
|
||||
widget = BECFigure()
|
||||
|
||||
bec_dispatcher = BECDispatcher()
|
||||
client = bec_dispatcher.client
|
||||
client.start()
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
win = DebugWindow()
|
||||
win.show()
|
||||
|
||||
sys.exit(app.exec_())
|
||||
widget.start()
|
||||
# if __name__ == "__main__": # pragma: no cover
|
||||
# import sys
|
||||
#
|
||||
# bec_dispatcher = BECDispatcher()
|
||||
# client = bec_dispatcher.client
|
||||
# client.start()
|
||||
#
|
||||
# app = QApplication(sys.argv)
|
||||
# win = DebugWindow()
|
||||
# win.show()
|
||||
#
|
||||
# sys.exit(app.exec_())
|
||||
|
||||
# if __name__ == "__main__": # pragma: no cover
|
||||
# from PyQt6.QtWidgets import QApplication
|
||||
|
35
bec_widgets/widgets/figure/figure_debug_minimal.ui
Normal file
35
bec_widgets/widgets/figure/figure_debug_minimal.ui
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>901</width>
|
||||
<height>1000</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QSplitter" name="splitter_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="glw" native="true"/>
|
||||
</widget>
|
||||
<widget class="QWidget" name="widget_console" native="true"/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Reference in New Issue
Block a user