Skip to content

Commit

Permalink
Reinstate authors list.
Browse files Browse the repository at this point in the history
  • Loading branch information
trisyoungs committed Feb 16, 2024
1 parent a52ad81 commit 290730f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 12 deletions.
4 changes: 4 additions & 0 deletions src/gui/importCIFDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ void ImportCIFDialog::updateWidgets()
"{}, {}, <b>{}</b>, {}", cifHandler_.getTagString("_journal_name_full").value_or("???"),
cifHandler_.getTagString("_journal_year").value_or("???"), cifHandler_.getTagString("_journal_volume").value_or("???"),
cifHandler_.getTagString("_journal_page_first").value_or("???"))));
ui_.InfoAuthorsList->clear();
auto authors = cifHandler_.getTagStrings("_publ_author_name");
for (auto &author : authors)
ui_.InfoAuthorsList->addItem(QString::fromStdString(author));

// Spacegroup
ui_.SpaceGroupsCombo->setCurrentIndex(cifHandler_.spaceGroup() - 1);
Expand Down
55 changes: 43 additions & 12 deletions src/gui/importCIFDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>882</width>
<height>646</height>
<width>849</width>
<height>982</height>
</rect>
</property>
<property name="font">
Expand Down Expand Up @@ -135,8 +135,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>316</width>
<height>342</height>
<width>162</width>
<height>639</height>
</rect>
</property>
<attribute name="icon">
Expand Down Expand Up @@ -301,6 +301,37 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="CIFAuthorsGroup">
<property name="title">
<string>Authors</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_15">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item>
<widget class="QListWidget" name="InfoAuthorsList">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="CIFReferenceGroup">
<property name="title">
Expand Down Expand Up @@ -361,8 +392,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>330</width>
<height>303</height>
<width>407</width>
<height>675</height>
</rect>
</property>
<attribute name="icon">
Expand Down Expand Up @@ -567,8 +598,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>330</width>
<height>303</height>
<width>407</width>
<height>675</height>
</rect>
</property>
<attribute name="icon">
Expand Down Expand Up @@ -660,8 +691,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>330</width>
<height>303</height>
<width>407</width>
<height>675</height>
</rect>
</property>
<attribute name="icon">
Expand Down Expand Up @@ -844,8 +875,8 @@
<widget class="QWidget" name="RightWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>2</verstretch>
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
Expand Down

0 comments on commit 290730f

Please sign in to comment.