Skip to content

Commit 0719247

Browse files
committed
Add tabs to SegUI
Added tabs to SegUI. This has broken the layout of the Auto segmentation tab.
1 parent 0693df7 commit 0719247

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

ParticleSpy/SegUI.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77

88
from PyQt5.QtWidgets import QCheckBox, QPushButton, QLabel, QMainWindow, QSpinBox
9-
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QComboBox
9+
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QComboBox, QTabWidget
1010
from PyQt5.QtGui import QPixmap, QImage
1111
from PyQt5.QtCore import Qt
1212
import sys
@@ -33,10 +33,22 @@ def __init__(self,im_hs):
3333
self.prev_params.generate()
3434

3535
offset = 50
36+
37+
self.layout = QVBoxLayout(self)
38+
39+
# Initialize tab screen
40+
self.tabs = QTabWidget()
41+
self.tab1 = QWidget()
42+
self.tab2 = QWidget()
43+
44+
# Add tabs
45+
self.tabs.addTab(self.tab1,"Auto")
46+
self.tabs.addTab(self.tab2,"Manual")
3647

3748
#self.central_widget = QWidget()
3849
#self.setCentralWidget(self.central_widget)
3950
lay = QVBoxLayout()
51+
self.tab1.setLayout(lay)
4052

4153
self.label = QLabel(self)
4254
qi = QImage(self.image.data, self.image.shape[1], self.image.shape[0], self.image.shape[1], QImage.Format_Grayscale8)
@@ -144,6 +156,13 @@ def __init__(self,im_hs):
144156
lay.addWidget(self.gausstxt)
145157
lay.addWidget(self.imagetxt)
146158
lay.addWidget(self.minsizev)
159+
160+
161+
self.layout.addWidget(self.tabs)
162+
self.setLayout(self.layout)
163+
164+
self.setCentralWidget(self.tabs)
165+
147166
self.show()
148167

149168
def getim(self,im_hs):

0 commit comments

Comments
 (0)