From b218f7894beb0e8ba55dd55fe329b86a03269d31 Mon Sep 17 00:00:00 2001 From: partobm Date: Thu, 31 Oct 2024 18:56:31 -0700 Subject: [PATCH 1/4] feat(signtypespecification_view): added hands and legs tabs --- .DS_Store | Bin 0 -> 6148 bytes src/.DS_Store | Bin 0 -> 6148 bytes src/main/.DS_Store | Bin 0 -> 6148 bytes src/main/python/.DS_Store | Bin 0 -> 8196 bytes src/main/python/constant.py | 42 +- .../python/gui/signtypespecification_view.py | 520 +++++++++++++++++- 6 files changed, 543 insertions(+), 19 deletions(-) create mode 100644 .DS_Store create mode 100644 src/.DS_Store create mode 100644 src/main/.DS_Store create mode 100644 src/main/python/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..beb8fd3cc3b743e2a652fc06b5002544e05b1403 GIT binary patch literal 6148 zcmeHK%Wl&^6upy#)@fN0C4a)du!1v>2**hzRuQ1N*37w{xn~~7V~>Z3Saakb5S59@LK0ZmLAJs~y+})z z(DG48Z-^)6;;O5%=REvT@mGt#7V98o#pa{8(Z7fwzX@$XJB9#@Vf|k{W6GrK5p_+w(~3PgdRVL2kLrihY0qN-d5#Z$qeuZS8KTKhup-z$ozVC?LKMHj==G#+gF-=|Cor0Kfu@ zrNI}!3W8&6Y-pS*L=B87Do|0GK4LIMN4c%z8X9K`6`hzqd@$WJ(S5T5OiO({YTiXIod7HzE*ikDdH!K)QLsMN$145r!AA95&#T=iu<`X;`P z&g^cbQhO7TG6S>Ubap1`e!J{s06?@RK@Fe`01hf)rijB2Li40clChpFqR`I>&Lj2U zN6KG{Wyk+yfc7pAK1?8l2p0E`j>HM-{)ZO*_jAw(4r$!6pWB{)750*DdFxcgV=s(*L!A%? zJq)?M4&y*2Ej5XQkFS<`r zKUU9rVIc4TYuU6ohnKm*$P6$8%)t6EV6QxrphzDkX8CXvSM6TUww{UH?wl1xbYOO@QM>@%Bie7|(*P_)*p?FzqJ$SXE2bJ1w3ofpk(%n*|6!xkw|n- zhe4c_%kLtylFj7{PQh7qZkzXN)J)pRFs`=;*HpVuD)gsz+rJEYqgHYKL`6wEh>ZuA z9>T{+J?jaAz>TbB&EgbZ&~RY@J&1AgL$o?%&yygw(QB5lX*44YUZ3 z8Wj(Q8DIvMfdM)nBr2h2F*T@<4lMK&0FkbdTF|D;AjL?Fp2gH4_Miw8ifBTGePRd` zj_uO=c@|THCLDx)dyuO&}g1h_de94ae#-bMEf(8Io(& z#y`MV+gVun7g*X@*jn1!TIrjQLpYAY#%P>LW`1vH-g`6i+kHFt_5gt7tEFLpJ^-+= z3bfm?X;Q?vsQXHb?m2=;&>o-&KGtQR;O)~k9fkqJfMLKeU>GnA{0$7?nJtQSz`3tR zO=}o14E&c2i1&koRiLY}rck~*u#qVMVjFhLf->d-(#Fx~YOE=grsz{;4@8?1onjDW zj^mC{M|3sT6e@Ed${dKEndl6K$l1}(k?KHPg{CzO7zXw;AaeJ1%+@`qz{Z~Z-J6Jb zF^G788X~Ahu@3x@1tnos1P%-mNHObY*bWFE4OVX(tXiQARS5TLk+aRUg0-ZgSMWZl zL}8K+4Sgmpt!;-6XRM6XZapk4^R+_ir`06y#|z?Wn)4{A%YHB$(lyWS9^)+aLq=n1 z5SA#aJh&IK5?{;nDk~+@wx9;Atd;fb-mR^X%l*#q)sgLfXY1<4p?>Gm$mQ+rtaUOs zcM_H$y(wH}l2rtZyfKr2Xiz;~jQq*NN_~ zlU+SM-MxLMdQP7?eb%#21b*>JITi~Y;}MVZQI*bxMa~N0CY?*^dMX6Z?rPAxOG}Ht zx~4ZOsMGzcL;AWIQ_2>~aafvMT1sd-w@aSC@2^kqc<)GxF^{4to`h-0+5Ce9>7GdG z$^={DIQc44Jy{V$$t;Z%M9*%pnR^)d0gWbEo~J2anfK$^XJwk-5Sqdp?rAEf!joJ^ zq2d=qR?c1jrWnn+Q+46I5^TsR0U+llu9PjCWTzQtG@Em8>ro3Xz!=i3i`*eIWRZBpCjlvwW#yrzev8j(j~d8R6!a}#EyOJ1 ztc*QEI|C7Z30sFyMM}dn{{l63$5RGYFpffuq$Y7hzBgzeMr{ry^dCX8*K>=Qf4Ap8 zj8O_P`u0&fgiXX0QADqYYm4wYkvd7Uxn<E0(iai dhat)istOxdV@)CUU@;#8Bn_r94E#|Begav*E`0z1 literal 0 HcmV?d00001 diff --git a/src/main/python/constant.py b/src/main/python/constant.py index 18da0ef9..65f5b053 100644 --- a/src/main/python/constant.py +++ b/src/main/python/constant.py @@ -369,7 +369,47 @@ "TWO_HANDS_BOTH_MVMT_DIFF": "2h.both move.move differently", "TWO_HANDS_BOTH_MVMT_SAME": "2h.both move.move similarly", "TWO_HANDS_BOTH_MVMT_SEQ": "2h.both move.move similarly.sequential", - "TWO_HANDS_BOTH_MVMT_SIMU": "2h.both move.move similarly.simultaneous" + "TWO_HANDS_BOTH_MVMT_SIMU": "2h.both move.move similarly.simultaneous", + + "ONE_ARM": "1a", + "TWO_ARMS": "2a", + "ONE_ARM_MVMT": "1a-mvmt", + "ONE_ARM_NO_MVMT": "1a-no-mvmt", + "TWO_ARMS_SAME_ACONF": "2a-same-aconf", + "TWO_ARMS_DIFF_ACONF": "2a-diff-aconf", + "TWO_ARMS_MAINT_CONT": "2a-contact", + "TWO_ARMS_NO_CONT": "2a-no-contact", + "TWO_ARMS_BISYM": "2a-sym", + "TWO_ARMS_NO_BISYM": "2a-no-sym", + "TWO_ARMS_NO_MVMT": "2a-no-mvmt", + "TWO_ARMS_ONE_MVMT": "2a-1-mvmt", + "TWO_ARMS_BOTH_MVMT": "2a-2-mvmt", + "TWO_ARMS_ONLY_A1": "2a-a1", + "TWO_ARMS_ONLY_A2": "2a-a2", + "TWO_ARMS_BOTH_MVMT_DIFF": "2a-mvmt-diff", + "TWO_ARMS_BOTH_MVMT_SAME": "2a-mvmt-same", + "TWO_ARMS_BOTH_MVMT_SEQ": "2a-mvmt-seq", + "TWO_ARMS_BOTH_MVMT_SIMU": "2a-mvmt-simu", + + "ONE_LEG": "1l", + "TWO_LEGS": "2l", + "ONE_LEG_MVMT": "1l-mvmt", + "ONE_LEG_NO_MVMT": "1l-no-mvmt", + "TWO_LEGS_SAME_LCONF": "2l-same-lconf", + "TWO_LEGS_DIFF_LCONF": "2l-diff-lconf", + "TWO_LEGS_MAINT_CONT": "2l-contact", + "TWO_LEGS_NO_CONT": "2l-no-contact", + "TWO_LEGS_BISYM": "2l-sym", + "TWO_LEGS_NO_BISYM": "2l-no-sym", + "TWO_LEGS_NO_MVMT": "2l-no-mvmt", + "TWO_LEGS_ONE_MVMT": "2l-1-mvmt", + "TWO_LEGS_BOTH_MVMT": "2l-2-mvmt", + "TWO_LEGS_ONLY_L1": "2l-l1", + "TWO_LEGS_ONLY_L2": "2l-l2", + "TWO_LEGS_BOTH_MVMT_DIFF": "2l-mvmt-diff", + "TWO_LEGS_BOTH_MVMT_SAME": "2l-mvmt-same", + "TWO_LEGS_BOTH_MVMT_SEQ": "2l-mvmt-seq", + "TWO_LEGS_BOTH_MVMT_SIMU": "2l-mvmt-simu", } diff --git a/src/main/python/gui/signtypespecification_view.py b/src/main/python/gui/signtypespecification_view.py index dd3a0723..33011864 100644 --- a/src/main/python/gui/signtypespecification_view.py +++ b/src/main/python/gui/signtypespecification_view.py @@ -15,7 +15,9 @@ QGroupBox, QSpacerItem, QSizePolicy, - QAbstractButton + QAbstractButton, + QTabWidget, + QWidget ) from PyQt5.QtCore import ( @@ -32,25 +34,37 @@ class SigntypeSpecificationPanel(QFrame): def __init__(self, **kwargs): super().__init__(**kwargs) + self.buttongroups = [] - main_layout = QVBoxLayout() + self.tabs = QTabWidget() - self.buttongroups = [] + # Create tabs + self.hands_tab = QWidget() + self.arms_tab = QWidget() + self.legs_tab = QWidget() - # TODO should button properties be integers instead of strings, - # so it's easier to add more user-specified options? + # Add tabs to tab widget + self.tabs.addTab(self.hands_tab, "Hands") + self.tabs.addTab(self.arms_tab, "Arms") + self.tabs.addTab(self.legs_tab, "Legs") + # Initialize layouts for each tab + self.hands_layout = QVBoxLayout(self.hands_tab) + self.arms_layout = QVBoxLayout(self.arms_tab) + self.legs_layout = QVBoxLayout(self.legs_tab) + + # Hands tab controls # buttons and groups for highest level self.handstype_group = SigntypeButtonGroup(prt=self) self.handstype_unspec_radio = SigntypeRadioButton("Unspecified", parentbutton=None) self.handstype_unspec_radio.setProperty('abbreviation.path', 'Unspecified') self.handstype_unspec_radio.setProperty('abbreviation.include', True) - self.addedinfobutton = AddedInfoPushButton("Notes") + self.addedinfobutton_hands = AddedInfoPushButton("Notes") self.handstype_1h_radio = SigntypeRadioButton("1 hand", parentbutton=None) self.handstype_1h_radio.setProperty('abbreviation.path', SIGN_TYPE["ONE_HAND"]) self.handstype_1h_radio.setProperty('abbreviation.include', True) self.handstype_2h_radio = SigntypeRadioButton("2 hands", parentbutton=None) - self.handstype_2h_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_HANDS"]) + self.handstype_2h_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_HANDS"]) self.handstype_2h_radio.setProperty('abbreviation.include', True) self.handstype_group.addButton(self.handstype_unspec_radio) self.handstype_group.addButton(self.handstype_1h_radio) @@ -166,7 +180,7 @@ def __init__(self, **kwargs): self.handstype_2hmvmtseq_radio.setProperty('abbreviation.include', True) self.handstype_2hmvmtsimult_radio = SigntypeRadioButton("Simultaneous", parentbutton=self.handstype_2hmvmtbothsame_radio) - self.handstype_2hmvmtsimult_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_HANDS_BOTH_MVMT_SIMU"] ) + self.handstype_2hmvmtsimult_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_HANDS_BOTH_MVMT_SIMU"]) self.handstype_2hmvmtsimult_radio.setProperty('abbreviation.include', True) self.handstype_mvmttimingreln_group.addButton(self.handstype_2hmvmtseq_radio) self.handstype_mvmttimingreln_group.addButton(self.handstype_2hmvmtsimult_radio) @@ -177,7 +191,7 @@ def __init__(self, **kwargs): self.firstrow_layout = QHBoxLayout() self.firstrow_layout.addWidget(self.handstype_unspec_radio) self.firstrow_layout.addStretch() - self.firstrow_layout.addWidget(self.addedinfobutton) + self.firstrow_layout.addWidget(self.addedinfobutton_hands) self.signtype_layout.addLayout(self.firstrow_layout) self.signtype_layout.addWidget(self.handstype_1h_radio) @@ -283,13 +297,475 @@ def __init__(self, **kwargs): self.signtype_box.setLayout(self.signtype_layout) # end layout for sign type (highest level) - main_layout.addWidget(self.signtype_box) + self.hands_layout.addWidget(self.signtype_box) + + # Arms tab controls + self.armstype_group = SigntypeButtonGroup(prt=self) + self.armstype_unspec_radio = SigntypeRadioButton("Unspecified", parentbutton=None) + self.armstype_unspec_radio.setProperty('abbreviation.path', 'Unspecified') + self.armstype_unspec_radio.setProperty('abbreviation.include', True) + self.addedinfobutton_arms = AddedInfoPushButton("Notes") + self.armstype_1a_radio = SigntypeRadioButton("1 arm", parentbutton=None) + self.armstype_1a_radio.setProperty('abbreviation.path', SIGN_TYPE["ONE_ARM"]) + self.armstype_1a_radio.setProperty('abbreviation.include', True) + self.armstype_2a_radio = SigntypeRadioButton("2 arms", parentbutton=None) + self.armstype_2a_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS"]) + self.armstype_2a_radio.setProperty('abbreviation.include', True) + self.armstype_group.addButton(self.armstype_unspec_radio) + self.armstype_group.addButton(self.armstype_1a_radio) + self.armstype_group.addButton(self.armstype_2a_radio) + self.buttongroups.append(self.armstype_group) + + # buttons and groups for 1-armed signs + self.armstype_1a_group = SigntypeButtonGroup(prt=self) + self.armstype_1amove_radio = SigntypeRadioButton('The arm moves', parentbutton=self.armstype_1a_radio) + self.armstype_1amove_radio.setProperty('abbreviation.path', SIGN_TYPE["ONE_ARM_MVMT"]) + self.armstype_1amove_radio.setProperty('abbreviation.include', True) + self.armstype_1anomove_radio = SigntypeRadioButton("The arm doesn\'t move", + parentbutton=self.armstype_1a_radio) + self.armstype_1anomove_radio.setProperty('abbreviation.path', SIGN_TYPE["ONE_ARM_NO_MVMT"]) + self.armstype_1anomove_radio.setProperty('abbreviation.include', True) + self.armstype_1a_group.addButton(self.armstype_1amove_radio) + self.armstype_1a_group.addButton(self.armstype_1anomove_radio) + self.buttongroups.append(self.armstype_1a_group) + + # buttons and groups for 2-arm contact relation + self.armstype_contactreln_group = SigntypeButtonGroup(prt=self) + self.armstype_2acontactyes_radio = SigntypeRadioButton("A1 and A2 maintain contact throughout sign", + parentbutton=self.armstype_2a_radio) + self.armstype_2acontactyes_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_MAINT_CONT"]) + self.armstype_2acontactyes_radio.setProperty('abbreviation.include', True) + self.armstype_2acontactno_radio = SigntypeRadioButton("A1 and A2 do not maintain contact", + parentbutton=self.armstype_2a_radio) + self.armstype_2acontactno_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_NO_CONT"]) + self.armstype_2acontactno_radio.setProperty('abbreviation.include', False) + self.armstype_contactreln_group.addButton(self.armstype_2acontactyes_radio) + self.armstype_contactreln_group.addButton(self.armstype_2acontactno_radio) + self.buttongroups.append(self.armstype_contactreln_group) + + # buttons and groups for bilateral symmetry relation + self.armstype_symmetryreln_group = SigntypeButtonGroup(prt=self) + self.armstype_2asymmetryyes_radio = SigntypeRadioButton("A1 and A2 are bilaterally symmetric", + parentbutton=self.armstype_2a_radio) + self.armstype_2asymmetryyes_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_BISYM"]) + self.armstype_2asymmetryyes_radio.setProperty('abbreviation.include', True) + self.armstype_2asymmetryno_radio = SigntypeRadioButton("A1 and A2 are not bilaterally symmetric", + parentbutton=self.armstype_2a_radio) + self.armstype_2asymmetryno_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_NO_BISYM"]) + self.armstype_2asymmetryno_radio.setProperty('abbreviation.include', False) + self.armstype_symmetryreln_group.addButton(self.armstype_2asymmetryyes_radio) + self.armstype_symmetryreln_group.addButton(self.armstype_2asymmetryno_radio) + self.buttongroups.append(self.armstype_symmetryreln_group) + + # buttons and groups for 2-armed movement relation + self.armstype_mvmtreln_group = SigntypeButtonGroup(prt=self) + self.armstype_2amvmtneither_radio = SigntypeRadioButton("Neither arm moves", + parentbutton=self.armstype_2a_radio) + self.armstype_2amvmtneither_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_NO_MVMT"]) + self.armstype_2amvmtneither_radio.setProperty('abbreviation.include', True) + self.armstype_2amvmtone_radio = SigntypeRadioButton("Only 1 arm moves", parentbutton=self.armstype_2a_radio) + self.armstype_2amvmtone_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_ONE_MVMT"]) + self.armstype_2amvmtone_radio.setProperty('abbreviation.include', False) + self.armstype_2amvmtboth_radio = SigntypeRadioButton("Both arms move", parentbutton=self.armstype_2a_radio) + self.armstype_2amvmtboth_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_BOTH_MVMT"]) + self.armstype_2amvmtboth_radio.setProperty('abbreviation.include', False) + self.armstype_mvmtreln_group.addButton(self.armstype_2amvmtneither_radio) + self.armstype_mvmtreln_group.addButton(self.armstype_2amvmtone_radio) + self.armstype_mvmtreln_group.addButton(self.armstype_2amvmtboth_radio) + self.buttongroups.append(self.armstype_mvmtreln_group) + + # buttons and groups for movement relations in 2-armed signs where only one arm moves + self.armstype_mvmtonearmreln_group = SigntypeButtonGroup(prt=self) + self.armstype_2amvmtoneA1_radio = SigntypeRadioButton("Only A1 moves", + parentbutton=self.armstype_2amvmtone_radio) + self.armstype_2amvmtoneA1_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_ONLY_A1"]) + self.armstype_2amvmtoneA1_radio.setProperty('abbreviation.include', True) + self.armstype_2amvmtoneA2_radio = SigntypeRadioButton("Only A2 moves", + parentbutton=self.armstype_2amvmtone_radio) + self.armstype_2amvmtoneA2_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_ONLY_A2"]) + self.armstype_2amvmtoneA2_radio.setProperty('abbreviation.include', True) + self.armstype_mvmtonearmreln_group.addButton(self.armstype_2amvmtoneA1_radio) + self.armstype_mvmtonearmreln_group.addButton(self.armstype_2amvmtoneA2_radio) + self.buttongroups.append(self.armstype_mvmtonearmreln_group) + + # buttons and groups for movement relations in 2-armed signs where both arms move + self.armstype_mvmtbotharmreln_group = SigntypeButtonGroup(prt=self) + self.armstype_2amvmtbothdiff_radio = SigntypeRadioButton("A1 and A2 move differently", + parentbutton=self.armstype_2amvmtboth_radio) + self.armstype_2amvmtbothdiff_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_BOTH_MVMT_DIFF"]) + self.armstype_2amvmtbothdiff_radio.setProperty('abbreviation.include', True) + self.armstype_2amvmtbothsame_radio = SigntypeRadioButton("A1 and A2 move similarly", + parentbutton=self.armstype_2amvmtboth_radio) + self.armstype_2amvmtbothsame_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_BOTH_MVMT_SAME"]) + self.armstype_2amvmtbothsame_radio.setProperty('abbreviation.include', True) + self.armstype_mvmtbotharmreln_group.addButton(self.armstype_2amvmtbothdiff_radio) + self.armstype_mvmtbotharmreln_group.addButton(self.armstype_2amvmtbothsame_radio) + self.buttongroups.append(self.armstype_mvmtbotharmreln_group) + + # buttons and groups for movement timing relations in 2-handed signs + self.armstype_mvmttimingreln_group = SigntypeButtonGroup(prt=self) + self.armstype_2amvmtseq_radio = SigntypeRadioButton("Sequential", + parentbutton=self.armstype_2amvmtbothsame_radio) + self.armstype_2amvmtseq_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_BOTH_MVMT_SEQ"]) + self.armstype_2amvmtseq_radio.setProperty('abbreviation.include', True) + self.armstype_2amvmtsimult_radio = SigntypeRadioButton("Simultaneous", + parentbutton=self.armstype_2amvmtbothsame_radio) + self.armstype_2amvmtsimult_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_ARMS_BOTH_MVMT_SIMU"]) + self.armstype_2amvmtsimult_radio.setProperty('abbreviation.include', True) + self.armstype_mvmttimingreln_group.addButton(self.armstype_2amvmtseq_radio) + self.armstype_mvmttimingreln_group.addButton(self.armstype_2amvmtsimult_radio) + self.buttongroups.append(self.armstype_mvmttimingreln_group) + + # begin layout for sign type (highest level) + self.signtype_layout = QVBoxLayout() + self.firstrow_layout = QHBoxLayout() + self.firstrow_layout.addWidget(self.armstype_unspec_radio) + self.firstrow_layout.addStretch() + self.firstrow_layout.addWidget(self.addedinfobutton_arms) + self.signtype_layout.addLayout(self.firstrow_layout) + self.signtype_layout.addWidget(self.armstype_1a_radio) + + ## begin layout for 1-armed sign options + self.onearm_spacedlayout = QHBoxLayout() + self.onearm_spacedlayout.addSpacerItem(QSpacerItem(30, 0, QSizePolicy.Minimum, QSizePolicy.Maximum)) + self.onearm_layout = QVBoxLayout() + self.onearm_layout.addWidget(self.armstype_1amove_radio) + self.onearm_layout.addWidget(self.armstype_1anomove_radio) + self.onearm_spacedlayout.addLayout(self.onearm_layout) + self.signtype_layout.addLayout(self.onearm_spacedlayout) + self.armstype_1a_radio.setchildlayout(self.onearm_spacedlayout) + ## end layout for 1-armed sign options + + self.signtype_layout.addWidget(self.armstype_2a_radio) + + ## begin layout for 2-arm sign options + self.twoarm_spacedlayout = QHBoxLayout() + self.twoarm_spacedlayout.addSpacerItem(QSpacerItem(30, 0, QSizePolicy.Minimum, QSizePolicy.Maximum)) + self.twoarm_col1_layout = QVBoxLayout() + + ### begin layout for 2-arm contact relation + self.contact_layout = QVBoxLayout() + self.contact_layout.addWidget(self.armstype_2acontactyes_radio) + self.contact_layout.addWidget(self.armstype_2acontactno_radio) + self.contact_box = QGroupBox("Contact relation") + self.contact_box.setLayout(self.contact_layout) + self.twoarm_col1_layout.addWidget(self.contact_box) + ### end layout for 2-arm contact relation + + ### begin layout for 2-armed bilateral symmetry relation + self.symmetry_layout = QVBoxLayout() + self.symmetry_layout.addWidget(self.armstype_2asymmetryyes_radio) + self.symmetry_layout.addWidget(self.armstype_2asymmetryno_radio) + self.symmetry_box = QGroupBox("Bilateral symmetry relation") + self.symmetry_box.setLayout(self.symmetry_layout) + self.twoarm_col1_layout.addWidget(self.symmetry_box) + ### end layout for 2-arm contact relation + + self.twoarm_col1_layout.addStretch(1) + + ### begin layout for 2-armed movement relation + self.movement_layout = QVBoxLayout() + self.movement_layout.addWidget(self.armstype_2amvmtneither_radio) + self.movement_layout.addWidget(self.armstype_2amvmtone_radio) + + #### begin layout for 2-armed movement relation in which only one arm moves + self.movement_1a_spacedlayout = QHBoxLayout() + self.movement_1a_spacedlayout.addSpacerItem(QSpacerItem(30, 0, QSizePolicy.Minimum, QSizePolicy.Maximum)) + self.movement_1a_layout = QVBoxLayout() + self.movement_1a_layout.addWidget(self.armstype_2amvmtoneA1_radio) + self.movement_1a_layout.addWidget(self.armstype_2amvmtoneA2_radio) + self.movement_1a_spacedlayout.addLayout(self.movement_1a_layout) + self.movement_layout.addLayout(self.movement_1a_spacedlayout) + self.armstype_2amvmtone_radio.setchildlayout(self.movement_1a_spacedlayout) + #### end layout for 2-armed movement relation in which only one arm moves + + self.movement_layout.addWidget(self.armstype_2amvmtboth_radio) + + #### begin layout for 2-armed movement relation in which both arms move + self.movement_2a_spacedlayout = QHBoxLayout() + self.movement_2a_spacedlayout.addSpacerItem(QSpacerItem(30, 0, QSizePolicy.Minimum, QSizePolicy.Maximum)) + self.movement_2a_layout = QVBoxLayout() + self.movement_2a_layout.addWidget(self.armstype_2amvmtbothdiff_radio) + self.movement_2a_layout.addWidget(self.armstype_2amvmtbothsame_radio) + + #### begin layout for 2-armed movement relation in which both arms move similarly + self.similarmvmt_spacedlayout = QHBoxLayout() + self.similarmvmt_spacedlayout.addSpacerItem(QSpacerItem(30, 0, QSizePolicy.Minimum, QSizePolicy.Maximum)) + self.similarmvmt_layout = QVBoxLayout() + self.similarmvmt_layout.addWidget(self.armstype_2amvmtseq_radio) + self.similarmvmt_layout.addWidget(self.armstype_2amvmtsimult_radio) + + self.movement_2a_spacedlayout.addLayout(self.movement_2a_layout) + self.movement_layout.addLayout(self.movement_2a_spacedlayout) + self.armstype_2amvmtboth_radio.setchildlayout(self.movement_2a_spacedlayout) + #### end layout for 2-armed movement relation in which both arms move + + self.movement_layout.addWidget(self.armstype_2amvmtboth_radio) + + self.movement_box = QGroupBox("Movement relation") + self.movement_box.setLayout(self.movement_layout) + ### end layout for 2-armed movement relation + + self.twoarm_spacedlayout.addLayout(self.twoarm_col1_layout) + self.twoarm_spacedlayout.addWidget(self.movement_box) + + self.signtype_layout.addLayout(self.twoarm_spacedlayout) + + self.armstype_2a_radio.setchildlayout(self.twoarm_spacedlayout) + ## end layout for 2-armed sign options + + self.signtype_box = QGroupBox("Sign type") + self.signtype_box.setLayout(self.signtype_layout) + # end layout for sign type (highest level) + + self.arms_layout.addWidget(self.signtype_box) + + # Legs tab controls + self.legstype_group = SigntypeButtonGroup(prt=self) + self.legstype_unspec_radio = SigntypeRadioButton("Unspecified", parentbutton=None) + self.legstype_unspec_radio.setProperty('abbreviation.path', 'Unspecified') + self.legstype_unspec_radio.setProperty('abbreviation.include', True) + self.addedinfobutton_legs = AddedInfoPushButton("Notes") # Separate addedinfo button for legs + self.legstype_1l_radio = SigntypeRadioButton("1 leg", parentbutton=None) + self.legstype_1l_radio.setProperty('abbreviation.path', SIGN_TYPE["ONE_LEG"]) # Assuming SIGN_TYPE has ONE_LEG + self.legstype_1l_radio.setProperty('abbreviation.include', True) + self.legstype_2l_radio = SigntypeRadioButton("2 legs", parentbutton=None) + self.legstype_2l_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS"]) # Assuming SIGN_TYPE has TWO_LEGS + self.legstype_2l_radio.setProperty('abbreviation.include', True) + self.legstype_group.addButton(self.legstype_unspec_radio) + self.legstype_group.addButton(self.legstype_1l_radio) + self.legstype_group.addButton(self.legstype_2l_radio) + self.buttongroups.append(self.legstype_group) + + # buttons and groups for 1-legged signs + self.legstype_1l_group = SigntypeButtonGroup(prt=self) + self.legstype_1lmove_radio = SigntypeRadioButton('The leg moves', parentbutton=self.legstype_1l_radio) + self.legstype_1lmove_radio.setProperty('abbreviation.path', SIGN_TYPE["ONE_LEG_MVMT"]) # Assuming SIGN_TYPE has ONE_LEG_MVMT + self.legstype_1lmove_radio.setProperty('abbreviation.include', True) + self.legstype_1lnomove_radio = SigntypeRadioButton("The leg doesn\'t move", + parentbutton=self.legstype_1l_radio) + self.legstype_1lnomove_radio.setProperty('abbreviation.path', SIGN_TYPE["ONE_LEG_NO_MVMT"]) # Assuming SIGN_TYPE has ONE_LEG_NO_MVMT + self.legstype_1lnomove_radio.setProperty('abbreviation.include', True) + self.legstype_1l_group.addButton(self.legstype_1lmove_radio) + self.legstype_1l_group.addButton(self.legstype_1lnomove_radio) + self.buttongroups.append(self.legstype_1l_group) + + # buttons and groups for 2-leg contact relation + self.legstype_contactreln_group = SigntypeButtonGroup(prt=self) + self.legstype_2lcontactyes_radio = SigntypeRadioButton("L1 and L2 maintain contact throughout sign", + parentbutton=self.legstype_2l_radio) + self.legstype_2lcontactyes_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_MAINT_CONT"]) + self.legstype_2lcontactyes_radio.setProperty('abbreviation.include', True) + self.legstype_2lcontactno_radio = SigntypeRadioButton("L1 and L2 do not maintain contact", + parentbutton=self.legstype_2l_radio) + self.legstype_2lcontactno_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_NO_CONT"]) + self.legstype_2lcontactno_radio.setProperty('abbreviation.include', False) + self.legstype_contactreln_group.addButton(self.legstype_2lcontactyes_radio) + self.legstype_contactreln_group.addButton(self.legstype_2lcontactno_radio) + self.buttongroups.append(self.legstype_contactreln_group) + + # buttons and groups for bilateral symmetry relation + self.legstype_symmetryreln_group = SigntypeButtonGroup(prt=self) + self.legstype_2lsymmetryyes_radio = SigntypeRadioButton("L1 and L2 are bilaterally symmetric", + parentbutton=self.legstype_2l_radio) + self.legstype_2lsymmetryyes_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_BISYM"]) + self.legstype_2lsymmetryyes_radio.setProperty('abbreviation.include', True) + self.legstype_2lsymmetryno_radio = SigntypeRadioButton("L1 and L2 are not bilaterally symmetric", + parentbutton=self.legstype_2l_radio) + self.legstype_2lsymmetryno_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_NO_BISYM"]) + self.legstype_2lsymmetryno_radio.setProperty('abbreviation.include', False) + self.legstype_symmetryreln_group.addButton(self.legstype_2lsymmetryyes_radio) + self.legstype_symmetryreln_group.addButton(self.legstype_2lsymmetryno_radio) + self.buttongroups.append(self.legstype_symmetryreln_group) + + # buttons and groups for 2-leg movement relation + self.legstype_mvmtreln_group = SigntypeButtonGroup(prt=self) + self.legstype_2lmvmtneither_radio = SigntypeRadioButton("Neither leg moves", + parentbutton=self.legstype_2l_radio) + self.legstype_2lmvmtneither_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_NO_MVMT"]) + self.legstype_2lmvmtneither_radio.setProperty('abbreviation.include', True) + self.legstype_2lmvmtone_radio = SigntypeRadioButton("Only 1 leg moves", parentbutton=self.legstype_2l_radio) + self.legstype_2lmvmtone_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_ONE_MVMT"]) + self.legstype_2lmvmtone_radio.setProperty('abbreviation.include', False) + self.legstype_2lmvmtboth_radio = SigntypeRadioButton("Both legs move", parentbutton=self.legstype_2l_radio) + self.legstype_2lmvmtboth_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_BOTH_MVMT"]) + self.legstype_2lmvmtboth_radio.setProperty('abbreviation.include', False) + self.legstype_mvmtreln_group.addButton(self.legstype_2lmvmtneither_radio) + self.legstype_mvmtreln_group.addButton(self.legstype_2lmvmtone_radio) + self.legstype_mvmtreln_group.addButton(self.legstype_2lmvmtboth_radio) + self.buttongroups.append(self.legstype_mvmtreln_group) + + # buttons and groups for 2-legged movement relation + self.legstype_mvmtreln_group = SigntypeButtonGroup(prt=self) + self.legstype_2lmvmtneither_radio = SigntypeRadioButton("Neither leg moves", + parentbutton=self.legstype_2l_radio) + self.legstype_2lmvmtneither_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_NO_MVMT"]) + self.legstype_2lmvmtneither_radio.setProperty('abbreviation.include', True) + self.legstype_2lmvmtone_radio = SigntypeRadioButton("Only 1 leg moves", parentbutton=self.legstype_2l_radio) + self.legstype_2lmvmtone_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_ONE_MVMT"]) + self.legstype_2lmvmtone_radio.setProperty('abbreviation.include', False) + self.legstype_2lmvmtboth_radio = SigntypeRadioButton("Both legs move", parentbutton=self.legstype_2l_radio) + self.legstype_2lmvmtboth_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_BOTH_MVMT"]) + self.legstype_2lmvmtboth_radio.setProperty('abbreviation.include', False) + self.legstype_mvmtreln_group.addButton(self.legstype_2lmvmtneither_radio) + self.legstype_mvmtreln_group.addButton(self.legstype_2lmvmtone_radio) + self.legstype_mvmtreln_group.addButton(self.legstype_2lmvmtboth_radio) + self.buttongroups.append(self.legstype_mvmtreln_group) + + # buttons and groups for movement relations in 2-legged signs where only one leg moves + self.legstype_mvmtonelegreln_group = SigntypeButtonGroup(prt=self) + self.legstype_2lmvmtoneL1_radio = SigntypeRadioButton("Only L1 moves", + parentbutton=self.legstype_2lmvmtone_radio) + self.legstype_2lmvmtoneL1_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_ONLY_L1"]) + self.legstype_2lmvmtoneL1_radio.setProperty('abbreviation.include', True) + self.legstype_2lmvmtoneL2_radio = SigntypeRadioButton("Only L2 moves", + parentbutton=self.legstype_2lmvmtone_radio) + self.legstype_2lmvmtoneL2_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_ONLY_L2"]) + self.legstype_2lmvmtoneL2_radio.setProperty('abbreviation.include', True) + self.legstype_mvmtonelegreln_group.addButton(self.legstype_2lmvmtoneL1_radio) + self.legstype_mvmtonelegreln_group.addButton(self.legstype_2lmvmtoneL2_radio) + self.buttongroups.append(self.legstype_mvmtonelegreln_group) + + # buttons and groups for movement relations in 2-legged signs where both legs move + self.legstype_mvmtbothlegreln_group = SigntypeButtonGroup(prt=self) + self.legstype_2lmvmtbothdiff_radio = SigntypeRadioButton("L1 and L2 move differently", + parentbutton=self.legstype_2lmvmtboth_radio) + self.legstype_2lmvmtbothdiff_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_BOTH_MVMT_DIFF"]) + self.legstype_2lmvmtbothdiff_radio.setProperty('abbreviation.include', True) + self.legstype_2lmvmtbothsame_radio = SigntypeRadioButton("L1 and L2 move similarly", + parentbutton=self.legstype_2lmvmtboth_radio) + self.legstype_2lmvmtbothsame_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_BOTH_MVMT_SAME"]) + self.legstype_2lmvmtbothsame_radio.setProperty('abbreviation.include', True) + self.legstype_mvmtbothlegreln_group.addButton(self.legstype_2lmvmtbothdiff_radio) + self.legstype_mvmtbothlegreln_group.addButton(self.legstype_2lmvmtbothsame_radio) + self.buttongroups.append(self.legstype_mvmtbothlegreln_group) + + # buttons and groups for movement timing relations in 2-legged signs + self.legstype_mvmttimingreln_group = SigntypeButtonGroup(prt=self) + self.legstype_2lmvmtseq_radio = SigntypeRadioButton("Sequential", + parentbutton=self.legstype_2lmvmtbothsame_radio) + self.legstype_2lmvmtseq_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_BOTH_MVMT_SEQ"]) + self.legstype_2lmvmtseq_radio.setProperty('abbreviation.include', True) + self.legstype_2lmvmtsimult_radio = SigntypeRadioButton("Simultaneous", + parentbutton=self.legstype_2lmvmtbothsame_radio) + self.legstype_2lmvmtsimult_radio.setProperty('abbreviation.path', SIGN_TYPE["TWO_LEGS_BOTH_MVMT_SIMU"]) + self.legstype_2lmvmtsimult_radio.setProperty('abbreviation.include', True) + self.legstype_mvmttimingreln_group.addButton(self.legstype_2lmvmtseq_radio) + self.legstype_mvmttimingreln_group.addButton(self.legstype_2lmvmtsimult_radio) + self.buttongroups.append(self.legstype_mvmttimingreln_group) + + # begin layout for sign type (highest level) - Legs + self.signtype_layout = QVBoxLayout() # Separate layout for legs + self.firstrow_layout = QHBoxLayout() + self.firstrow_layout.addWidget(self.legstype_unspec_radio) + self.firstrow_layout.addStretch() + self.firstrow_layout.addWidget(self.addedinfobutton_legs) # Add legs addedinfo button + self.signtype_layout.addLayout(self.firstrow_layout) + self.signtype_layout.addWidget(self.legstype_1l_radio) + + ## begin layout for 1-legged sign options + self.oneleg_spacedlayout = QHBoxLayout() + self.oneleg_spacedlayout.addSpacerItem(QSpacerItem(30, 0, QSizePolicy.Minimum, QSizePolicy.Maximum)) + self.oneleg_layout = QVBoxLayout() + self.oneleg_layout.addWidget(self.legstype_1lmove_radio) + self.oneleg_layout.addWidget(self.legstype_1lnomove_radio) + self.oneleg_spacedlayout.addLayout(self.oneleg_layout) + self.signtype_layout.addLayout(self.oneleg_spacedlayout) + self.legstype_1l_radio.setchildlayout(self.oneleg_spacedlayout) + ## end layout for 1-legged sign options + + self.signtype_layout.addWidget(self.legstype_2l_radio) + + ## begin layout for 2-leg sign options + self.twoleg_spacedlayout = QHBoxLayout() + self.twoleg_spacedlayout.addSpacerItem(QSpacerItem(30, 0, QSizePolicy.Minimum, QSizePolicy.Maximum)) + self.twoleg_col1_layout = QVBoxLayout() + + ### begin layout for 2-leg contact relation + self.contact_layout = QVBoxLayout() + self.contact_layout.addWidget(self.legstype_2lcontactyes_radio) + self.contact_layout.addWidget(self.legstype_2lcontactno_radio) + self.contact_box = QGroupBox("Contact relation") + self.contact_box.setLayout(self.contact_layout) + self.twoleg_col1_layout.addWidget(self.contact_box) + ### end layout for 2-handed contact relation + + ### begin layout for 2-leg bilateral symmetry relation + self.symmetry_layout = QVBoxLayout() + self.symmetry_layout.addWidget(self.legstype_2lsymmetryyes_radio) + self.symmetry_layout.addWidget(self.legstype_2lsymmetryno_radio) + self.symmetry_box = QGroupBox("Bilateral symmetry relation") + self.symmetry_box.setLayout(self.symmetry_layout) + self.twoleg_col1_layout.addWidget(self.symmetry_box) + ### end layout for 2-leg contact relation + + self.twoleg_col1_layout.addStretch(1) + + ### begin layout for 2-handed movement relation + self.movement_layout = QVBoxLayout() + self.movement_layout.addWidget(self.legstype_2lmvmtneither_radio) + self.movement_layout.addWidget(self.legstype_2lmvmtone_radio) + + #### begin layout for 2-leg movement relation in which only one leg moves + self.movement_1l_spacedlayout = QHBoxLayout() + self.movement_1l_spacedlayout.addSpacerItem(QSpacerItem(30, 0, QSizePolicy.Minimum, QSizePolicy.Maximum)) + self.movement_1l_layout = QVBoxLayout() + self.movement_1l_layout.addWidget(self.legstype_2lmvmtoneL1_radio) + self.movement_1l_layout.addWidget(self.legstype_2lmvmtoneL2_radio) + self.movement_1l_spacedlayout.addLayout(self.movement_1l_layout) + self.movement_layout.addLayout(self.movement_1l_spacedlayout) + self.legstype_2lmvmtone_radio.setchildlayout(self.movement_1l_spacedlayout) + #### end layout for 2-leg movement relation in which only one leg moves + + self.movement_layout.addWidget(self.legstype_2lmvmtboth_radio) + + #### begin layout for 2-leg movement relation in which both legs move + self.movement_2l_spacedlayout = QHBoxLayout() + self.movement_2l_spacedlayout.addSpacerItem(QSpacerItem(30, 0, QSizePolicy.Minimum, QSizePolicy.Maximum)) + self.movement_2l_layout = QVBoxLayout() + self.movement_2l_layout.addWidget(self.legstype_2lmvmtbothdiff_radio) + self.movement_2l_layout.addWidget(self.legstype_2lmvmtbothsame_radio) + + #### begin layout for 2-leg movement relation in which both hands move similarly + self.similarmvmt_spacedlayout = QHBoxLayout() + self.similarmvmt_spacedlayout.addSpacerItem(QSpacerItem(30, 0, QSizePolicy.Minimum, QSizePolicy.Maximum)) + self.similarmvmt_layout = QVBoxLayout() + self.similarmvmt_layout.addWidget(self.legstype_2lmvmtseq_radio) + self.similarmvmt_layout.addWidget(self.legstype_2lmvmtsimult_radio) + + self.movement_2l_spacedlayout.addLayout(self.movement_2l_layout) + self.movement_layout.addLayout(self.movement_2l_spacedlayout) + self.legstype_2lmvmtboth_radio.setchildlayout(self.movement_2l_spacedlayout) + #### end layout for 2-leg movement relation in which both hands move + + self.movement_layout.addWidget(self.legstype_2lmvmtboth_radio) + + self.movement_box = QGroupBox("Movement relation") + self.movement_box.setLayout(self.movement_layout) + ### end layout for 2-leg movement relation + + self.twoleg_spacedlayout.addLayout(self.twoleg_col1_layout) + self.twoleg_spacedlayout.addWidget(self.movement_box) + + self.signtype_layout.addLayout(self.twoleg_spacedlayout) + + self.legstype_2l_radio.setchildlayout(self.twoleg_spacedlayout) + ## end layout for 2-leg sign options + + self.signtype_box = QGroupBox("Sign type") + self.signtype_box.setLayout(self.signtype_layout) + # end layout for sign type (highest level) + + self.legs_layout.addWidget(self.signtype_box) + + # Add the tab widget to the main layout + main_layout = QVBoxLayout() + main_layout.addWidget(self.tabs) self.setLayout(main_layout) # ensure that Unspecified is selected by default # TODO KV keep this? or does loadspecs preclude it? # self.handstype_unspec_radio.toggle() - def setsigntype(self, signtype): # clear all self.clear() @@ -313,9 +789,10 @@ def setsigntype(self, signtype): print(spec[0]) signtype.specslist.remove(spec) - self.addedinfobutton.addedinfo = deepcopy(signtype.addedinfo) + self.addedinfobutton_hands.addedinfo = deepcopy(signtype.addedinfo) + + # uncheck all buttons - # uncheck all buttons def clear(self): for g in self.buttongroups: g.setExclusive(False) @@ -336,13 +813,22 @@ def getsigntype(self): return signtype + # return the button group that contains the given button + # in theory I suppose a button could be in more than one button group? + # ... but here we assume there's only one, so the first hit is returned + + def getButtonGroup(self, thebutton): + groups = [bg for bg in self.buttongroups if thebutton in bg.buttons()] + return groups[0] + + # return the button group that contains the given button # in theory I suppose a button could be in more than one button group? # ... but here we assume there's only one, so the first hit is returned def getButtonGroup(self, thebutton): groups = [bg for bg in self.buttongroups if thebutton in bg.buttons()] return groups[0] - + def symmetry_dependencies_warning(self): conflict = False if self.handstype_2hsymmetryyes_radio.isChecked(): @@ -357,7 +843,7 @@ def symmetry_dependencies_warning(self): msg += "- Movement relation (hands move differently)\n" conflict = True if conflict == True: - return msg + return msg return "pass" @@ -542,6 +1028,4 @@ def handle_button_click(self, button): elif standard == QDialogButtonBox.RestoreDefaults: # TODO KV - problem: not all relevant radio buttons are enabled when restoring default - self.signtype_widget.setsigntype(self.get_default_signtype()) - - + self.signtype_widget.setsigntype(self.get_default_signtype()) \ No newline at end of file From 05fd5e65bb0ff8752bbb565ae1ef3295d93473bd Mon Sep 17 00:00:00 2001 From: partobm Date: Thu, 31 Oct 2024 19:12:18 -0700 Subject: [PATCH 2/4] fix(SignTypeSpecificationView): removed "Sign Type" labels --- src/main/python/gui/signtypespecification_view.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/python/gui/signtypespecification_view.py b/src/main/python/gui/signtypespecification_view.py index 33011864..1442d5f0 100644 --- a/src/main/python/gui/signtypespecification_view.py +++ b/src/main/python/gui/signtypespecification_view.py @@ -293,7 +293,7 @@ def __init__(self, **kwargs): self.handstype_2h_radio.setchildlayout(self.twohand_spacedlayout) ## end layout for 2-handed sign options - self.signtype_box = QGroupBox("Sign type") + self.signtype_box = QGroupBox() self.signtype_box.setLayout(self.signtype_layout) # end layout for sign type (highest level) @@ -514,7 +514,7 @@ def __init__(self, **kwargs): self.armstype_2a_radio.setchildlayout(self.twoarm_spacedlayout) ## end layout for 2-armed sign options - self.signtype_box = QGroupBox("Sign type") + self.signtype_box = QGroupBox() self.signtype_box.setLayout(self.signtype_layout) # end layout for sign type (highest level) @@ -752,7 +752,7 @@ def __init__(self, **kwargs): self.legstype_2l_radio.setchildlayout(self.twoleg_spacedlayout) ## end layout for 2-leg sign options - self.signtype_box = QGroupBox("Sign type") + self.signtype_box = QGroupBox() self.signtype_box.setLayout(self.signtype_layout) # end layout for sign type (highest level) From 2f88bd96145a79fcd5eaf6da6aef8ab8e47e22b4 Mon Sep 17 00:00:00 2001 From: partobm Date: Sun, 10 Nov 2024 19:56:55 -0800 Subject: [PATCH 3/4] fix(SignTypeSpecificationView): save button error --- .DS_Store | Bin 6148 -> 6148 bytes src/.DS_Store | Bin 6148 -> 6148 bytes src/main/.DS_Store | Bin 6148 -> 6148 bytes .../python/gui/signtypespecification_view.py | 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.DS_Store b/.DS_Store index beb8fd3cc3b743e2a652fc06b5002544e05b1403..94ad5d2f91d18e89e8752c26317bb0be8091e09e 100644 GIT binary patch delta 60 zcmZoMXfc@J&&aKaY diff --git a/src/.DS_Store b/src/.DS_Store index f15fb4515441fa248d3178256f30319f18f86631..15340eca19490d0877b41be3f3580ce3c163b288 100644 GIT binary patch delta 62 zcmZoMXfc@J&&aYdU^gQp%VZv=d+cVWItqpcW|KcM*^9C;4VE-pn$wL1i;L$6tN`9SjX_ diff --git a/src/main/.DS_Store b/src/main/.DS_Store index 6bcc3b8f0bfb7c61fab07d7ee64b35e3e3d6f5e7..dee9956e4c370d44b8d7d66a6c489d0a9559e803 100644 GIT binary patch delta 66 zcmZoMXfc@J&&awlU^gQp>tr6LXY6LCItqpcW|Mz1*-Nr96fjgWlrUs44VE-pn$wL1r^M$6tN`9&QbI diff --git a/src/main/python/gui/signtypespecification_view.py b/src/main/python/gui/signtypespecification_view.py index 1442d5f0..f6cf7592 100644 --- a/src/main/python/gui/signtypespecification_view.py +++ b/src/main/python/gui/signtypespecification_view.py @@ -802,7 +802,7 @@ def clear(self): g.setExclusive(True) def getsigntype(self): - addedinfo = self.addedinfobutton.addedinfo + addedinfo = self.addedinfobutton_arms.addedinfo allbuttons = [btn for btngrp in self.buttongroups for btn in btngrp.buttons()] # when saving, only use options that are both checked AND enabled! From f30d0080ba585523badba6a170d038ee0f3767cf Mon Sep 17 00:00:00 2001 From: kvesik <33950744+kvesik@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:42:54 -0800 Subject: [PATCH 4/4] make sure changes to signtype made from signsummary panel set the unsaved_changes flag to True, just like if they'd been made from the sign level menu --- src/main/python/gui/panel.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/python/gui/panel.py b/src/main/python/gui/panel.py index 124ddc23..c2cdab0c 100644 --- a/src/main/python/gui/panel.py +++ b/src/main/python/gui/panel.py @@ -719,13 +719,9 @@ def handle_xslot_clicked(self): def handle_signtype_clicked(self): signtypedialog = SigntypeSelectorDialog(self.mainwindow.current_sign.signtype, parent=self) - signtypedialog.saved_signtype.connect(self.handle_save_signtype) + signtypedialog.saved_signtype.connect(self.mainwindow.signlevel_panel.handle_save_signtype) signtypedialog.exec_() - def handle_save_signtype(self, signtype): - self.sign.signtype = signtype - self.refreshsign() - def open_module_dialog(self, modulekey, moduletype): modules_list = self.sign.getmoduledict(moduletype) module_to_edit = modules_list[modulekey]