feat: add image support for mod pages

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-09-10 18:49:00 -03:00
parent ea3be17220
commit db158a5735
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469
3 changed files with 12 additions and 1 deletions

View File

@ -14,7 +14,7 @@
<item row="1" column="0" colspan="4"> <item row="1" column="0" colspan="4">
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="2"> <item row="1" column="2">
<widget class="QTextBrowser" name="packDescription"> <widget class="ProjectDescriptionPage" name="packDescription">
<property name="openExternalLinks"> <property name="openExternalLinks">
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -98,6 +98,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>ProjectDescriptionPage</class>
<extends>QTextBrowser</extends>
<header>ui/widgets/ProjectDescriptionPage.h</header>
</customwidget>
</customwidgets>
<tabstops> <tabstops>
<tabstop>searchEdit</tabstop> <tabstop>searchEdit</tabstop>
<tabstop>searchButton</tabstop> <tabstop>searchButton</tabstop>

View File

@ -59,6 +59,8 @@ FlameModPage::FlameModPage(ModDownloadDialog* dialog, BaseInstance* instance)
connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &FlameModPage::onSelectionChanged); connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &FlameModPage::onSelectionChanged);
connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &FlameModPage::onVersionSelectionChanged); connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &FlameModPage::onVersionSelectionChanged);
connect(ui->modSelectionButton, &QPushButton::clicked, this, &FlameModPage::onModSelected); connect(ui->modSelectionButton, &QPushButton::clicked, this, &FlameModPage::onModSelected);
ui->packDescription->setMetaEntry(metaEntryBase());
} }
auto FlameModPage::validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, ModAPI::ModLoaderTypes loaders) const -> bool auto FlameModPage::validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, ModAPI::ModLoaderTypes loaders) const -> bool

View File

@ -59,6 +59,8 @@ ModrinthModPage::ModrinthModPage(ModDownloadDialog* dialog, BaseInstance* instan
connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &ModrinthModPage::onSelectionChanged); connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &ModrinthModPage::onSelectionChanged);
connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &ModrinthModPage::onVersionSelectionChanged); connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &ModrinthModPage::onVersionSelectionChanged);
connect(ui->modSelectionButton, &QPushButton::clicked, this, &ModrinthModPage::onModSelected); connect(ui->modSelectionButton, &QPushButton::clicked, this, &ModrinthModPage::onModSelected);
ui->packDescription->setMetaEntry(metaEntryBase());
} }
auto ModrinthModPage::validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, ModAPI::ModLoaderTypes loaders) const -> bool auto ModrinthModPage::validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, ModAPI::ModLoaderTypes loaders) const -> bool