astrodatagui: switch alt ids to proper list and fix resizing of other elements due to it

This commit is contained in:
2024-05-13 11:46:41 +02:00
parent 0ad300653e
commit 20ae05d331
2 changed files with 99 additions and 54 deletions
+2 -5
View File
@@ -152,12 +152,9 @@ class AstrodataGUI(QtWidgets.QMainWindow):
self.listSequences.addItem(f"{sT[0]} - {sT[1]}")
def updateStarAltNames(self, altNames):
print(altNames)
altNamesString = ""
self.listAltIDs.clear()
for an in altNames[:-1]:
altNamesString += f"{an[0]}, "
altNamesString += altNames[-1][0]
self.lbAltIDs.setText(altNamesString)
self.listAltIDs.addItem(f"{an[0]}")
def updateStarInfo(self, starInfo):
self.lbSpType.setText(starInfo[0])
+97 -49
View File
@@ -162,7 +162,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
<height>310</height>
<height>2550</height>
</size>
</property>
<property name="title">
@@ -174,7 +174,7 @@
<item>
<widget class="QListWidget" name="listSequences">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -188,7 +188,7 @@
<property name="maximumSize">
<size>
<width>200</width>
<height>500</height>
<height>250</height>
</size>
</property>
</widget>
@@ -240,6 +240,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>250</height>
</size>
</property>
<property name="title">
<string>Plot options</string>
</property>
@@ -926,17 +932,76 @@
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>250</height>
</size>
</property>
<property name="title">
<string>Star infos</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="2">
<widget class="QLabel" name="lbSpType">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="lbRotVel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Alt. IDs:</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="lbDistance">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Main ID: </string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
@@ -944,15 +1009,21 @@
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="lbRotVel">
<item row="4" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>-</string>
<string>Distance: </string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="lbDistance">
<item row="0" column="2">
<widget class="QLabel" name="lbMainID">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>-</string>
</property>
@@ -965,48 +1036,25 @@
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Distance: </string>
<item row="1" column="2">
<widget class="QListWidget" name="listAltIDs">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Alt. IDs:</string>
<property name="minimumSize">
<size>
<width>200</width>
<height>50</height>
</size>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Main ID: </string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="lbMainID">
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="lbAltIDs">
<property name="text">
<string>-</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="lbSpType">
<property name="text">
<string>-</string>
<property name="maximumSize">
<size>
<width>200</width>
<height>150</height>
</size>
</property>
</widget>
</item>