Skip to content

Commit 60dba40

Browse files
authored
feat: Species dialog headers (#2318)
1 parent 67a7b01 commit 60dba40

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

src/gui/qml/nodeGraph/SpeciesDialog.qml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,20 @@ Dialog {
8989
onClicked: sp.atoms.addAtom(elementField.currentText, xField.text, yField.text, zField.text, chargeField.text)
9090
}
9191
}
92+
HorizontalHeaderView {
93+
id: atomTableHeader
94+
95+
Layout.fillWidth: true
96+
Layout.preferredHeight: contentHeight
97+
Layout.preferredWidth: contentWidth
98+
clip: true
99+
enabled: !sp.atoms
100+
model: getHeaderStringArray(sp.atoms)
101+
syncView: atomTable
102+
}
92103
TableView {
104+
id: atomTable
105+
93106
Layout.fillHeight: true
94107
Layout.fillWidth: true
95108
clip: true
@@ -142,7 +155,20 @@ Dialog {
142155
onClicked: sp.addBond(bondI.text, bondJ.text)
143156
}
144157
}
158+
HorizontalHeaderView {
159+
id: bondTableHeader
160+
161+
Layout.fillWidth: true
162+
Layout.preferredHeight: contentHeight
163+
Layout.preferredWidth: contentWidth
164+
clip: true
165+
enabled: !sp.bonds
166+
model: getHeaderStringArray(sp.bonds)
167+
syncView: bondTable
168+
}
145169
TableView {
170+
id: bondTable
171+
146172
Layout.fillHeight: true
147173
Layout.fillWidth: true
148174
implicitHeight: 200
@@ -197,7 +223,20 @@ Dialog {
197223
onClicked: sp.addAngle(angleI.text, angleJ.text, angleK.text)
198224
}
199225
}
226+
HorizontalHeaderView {
227+
id: angleTableHeader
228+
229+
Layout.fillWidth: true
230+
Layout.preferredHeight: contentHeight
231+
Layout.preferredWidth: contentWidth
232+
clip: true
233+
enabled: !sp.angles
234+
model: getHeaderStringArray(sp.angles)
235+
syncView: angleTable
236+
}
200237
TableView {
238+
id: angleTable
239+
201240
Layout.fillHeight: true
202241
Layout.fillWidth: true
203242
implicitHeight: 200
@@ -261,7 +300,20 @@ Dialog {
261300
onClicked: sp.addTorsion(torsionI.text, torsionJ.text, torsionK.text, torsionL.text)
262301
}
263302
}
303+
HorizontalHeaderView {
304+
id: torsionTableHeader
305+
306+
Layout.fillWidth: true
307+
Layout.preferredHeight: contentHeight
308+
Layout.preferredWidth: contentWidth
309+
clip: true
310+
enabled: !sp.torsions
311+
model: getHeaderStringArray(sp.torsions)
312+
syncView: torsionTable
313+
}
264314
TableView {
315+
id: torsionTable
316+
265317
Layout.fillHeight: true
266318
Layout.fillWidth: true
267319
implicitHeight: 200
@@ -325,7 +377,20 @@ Dialog {
325377
onClicked: sp.addImproper(improperI.text, improperJ.text, improperK.text, improperL.text)
326378
}
327379
}
380+
HorizontalHeaderView {
381+
id: improperTableHeader
382+
383+
Layout.fillWidth: true
384+
Layout.preferredHeight: contentHeight
385+
Layout.preferredWidth: contentWidth
386+
clip: true
387+
enabled: !sp.impropers
388+
model: getHeaderStringArray(sp.impropers)
389+
syncView: improperTable
390+
}
328391
TableView {
392+
id: improperTable
393+
329394
Layout.fillHeight: true
330395
Layout.fillWidth: true
331396
implicitHeight: 200

0 commit comments

Comments
 (0)