Add temporary directory to About LyX dialog

This commit is contained in:
Richard Kimberly Heck 2024-06-25 11:32:26 -04:00
parent 527693b782
commit e7af6afb01
3 changed files with 78 additions and 16 deletions

View File

@ -244,6 +244,12 @@ static QString dirUser()
}
static QString dirTemp()
{
return toqstr(makeDisplayPath(package().temp_dir().absFileName()));
}
static QString version(bool const plain = false)
{
QString loc_release_date;
@ -326,6 +332,12 @@ void GuiAbout::on_showDirUserPB_clicked()
}
void GuiAbout::on_showDirTempPB_clicked()
{
showDirectory(package().temp_dir());
}
void GuiAbout::on_versionCopyPB_clicked()
{
qApp->clipboard()->setText(version(true));
@ -355,6 +367,8 @@ GuiAbout::GuiAbout(GuiView & lv)
d->ui.iconSW->setFixedSize(iconsize, iconsize);
d->ui.dirLibraryLA->setText(dirLibrary());
d->ui.dirLibraryLA->adjustSize();
d->ui.dirTempLA->setText(dirTemp());
d->ui.dirTempLA->adjustSize();
d->ui.dirUserLA->setText(dirUser());
d->ui.dirUserLA->adjustSize();
d->ui.buildinfoTB->setText(buildinfo());

View File

@ -30,6 +30,7 @@ private Q_SLOTS:
void on_buttonBox_rejected();
void on_showDirLibraryPB_clicked();
void on_showDirUserPB_clicked();
void on_showDirTempPB_clicked();
void on_versionCopyPB_clicked();
private:

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>552</width>
<height>470</height>
<height>504</height>
</rect>
</property>
<property name="windowTitle">
@ -30,7 +30,7 @@
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
</property>
<item>
<widget class="QSvgWidget" name="iconSW" native="true">
@ -45,7 +45,7 @@
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@ -60,10 +60,10 @@
<item row="0" column="1">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<enum>QSizePolicy::Policy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@ -78,10 +78,10 @@
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<enum>QSizePolicy::Policy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@ -106,7 +106,7 @@
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;LyX version info goes here.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Qt version (run-time) goes here.&lt;/p&gt;&lt;p&gt;Qt version (compile-time) goes here.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
@ -115,17 +115,17 @@
<number>0</number>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
<set>Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
<enum>QSizePolicy::Policy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@ -172,13 +172,13 @@
<string notr="true">System directory goes here.</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
<enum>Qt::TextFormat::PlainText</enum>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
<set>Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse</set>
</property>
</widget>
</item>
@ -200,13 +200,13 @@
<string notr="true">User directory goes here.</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
<enum>Qt::TextFormat::PlainText</enum>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
<set>Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse</set>
</property>
</widget>
</item>
@ -232,6 +232,53 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gridGroupBox2">
<property name="title">
<string>Temporary directory</string>
</property>
<layout class="QGridLayout" name="gridLayout_9">
<item row="0" column="0">
<widget class="QLabel" name="dirTempLA">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
<string notr="true">Temp directory goes here.</string>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::PlainText</enum>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextInteractionFlag::LinksAccessibleByMouse|Qt::TextInteractionFlag::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="showDirTempPB">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Open temporary directory in file browser</string>
</property>
<property name="text">
<string>[[do]]O&amp;pen</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
@ -368,7 +415,7 @@
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
<set>QDialogButtonBox::StandardButton::Close</set>
</property>
</widget>
</item>