show dict id in dictionary info panel

This commit is contained in:
Xiao YiFang 2022-10-11 21:34:24 +08:00
parent 85b6b34aed
commit bf625dc550
2 changed files with 66 additions and 55 deletions

View file

@ -18,6 +18,7 @@ void DictInfo::showInfo( sptr<Dictionary::Class> dict )
{
setWindowTitle( QString::fromUtf8( dict->getName().data(), dict->getName().size() ) );
ui.dictionaryId->setText( QString::fromStdString( dict->getId() ));
ui.dictionaryTotalArticles->setText( QString::number( dict->getArticleCount() ) );
ui.dictionaryTotalWords->setText( QString::number( dict->getWordCount() ) );
ui.dictionaryTranslatesFrom->setText( Language::localizedStringForId( dict->getLangFrom() ) );

View file

@ -23,61 +23,6 @@
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Total articles:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="dictionaryTotalArticles">
<property name="text">
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Translates from:</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="dictionaryTranslatesFrom">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Total words:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="dictionaryTotalWords">
<property name="text">
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Translates to:</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="dictionaryTranslatesTo">
<property name="text">
@ -101,6 +46,27 @@
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Translates from:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Total words:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Translates to:</string>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QPushButton" name="editDictionary">
<property name="enabled">
@ -111,6 +77,50 @@
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Total articles:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="dictionaryTotalArticles">
<property name="text">
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="dictionaryTranslatesFrom">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="dictionaryTotalWords">
<property name="text">
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="QLabel" name="dictionaryId">
<property name="text">
<string/>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>