aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/ResourcePage.ui
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-11-25 09:23:46 -0300
committerflow <flowlnlnln@gmail.com>2023-01-13 16:23:00 -0300
commit6a1807995390b2a2cbe074ee1f47d3791e0e3f10 (patch)
tree592c7ea5be22577d4034668177119271c2218527 /launcher/ui/pages/modplatform/ResourcePage.ui
parentb937d334362c0810ab59b3bc4660a2bbea31c7da (diff)
downloadPrismLauncher-6a1807995390b2a2cbe074ee1f47d3791e0e3f10.tar.gz
PrismLauncher-6a1807995390b2a2cbe074ee1f47d3791e0e3f10.tar.bz2
PrismLauncher-6a1807995390b2a2cbe074ee1f47d3791e0e3f10.zip
refactor: generalize mod models and APIs to resources
Firstly, this abstract away behavior in the mod download models that can also be applied to other types of resources into a superclass, allowing other resource types to be implemented without so much code duplication. For that, this also generalizes the APIs used (currently, ModrinthAPI and FlameAPI) to be able to make requests to other types of resources. It also does a general cleanup of both of those. In particular, this makes use of std::optional instead of invalid values for errors and, well, optional values :p This is a squash of some commits that were becoming too interlaced together to be cleanly separated. Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/pages/modplatform/ResourcePage.ui')
-rw-r--r--launcher/ui/pages/modplatform/ResourcePage.ui118
1 files changed, 118 insertions, 0 deletions
diff --git a/launcher/ui/pages/modplatform/ResourcePage.ui b/launcher/ui/pages/modplatform/ResourcePage.ui
new file mode 100644
index 00000000..8fe1d613
--- /dev/null
+++ b/launcher/ui/pages/modplatform/ResourcePage.ui
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ResourcePage</class>
+ <widget class="QWidget" name="ResourcePage">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>837</width>
+ <height>685</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="1" column="0" colspan="4">
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="1" column="2">
+ <widget class="ProjectDescriptionPage" name="packDescription">
+ <property name="openExternalLinks">
+ <bool>false</bool>
+ </property>
+ <property name="openLinks">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QListView" name="packView">
+ <property name="horizontalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="alternatingRowColors">
+ <bool>true</bool>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="3">
+ <widget class="QPushButton" name="searchButton">
+ <property name="text">
+ <string>Search</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLineEdit" name="searchEdit">
+ <property name="placeholderText">
+ <string>Search for resources...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="4">
+ <layout class="QGridLayout" name="gridLayout_4" columnstretch="0,0,0">
+ <item row="0" column="2">
+ <widget class="QComboBox" name="versionSelectionBox"/>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Version selected:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QComboBox" name="sortByBox"/>
+ </item>
+ <item row="1" column="2">
+ <widget class="QPushButton" name="resourceSelectionButton">
+ <property name="text">
+ <string>Select resource for download</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="1">
+ <widget class="QPushButton" name="resourceFilterButton">
+ <property name="text">
+ <string>Filter options</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="Line" name="line">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>ProjectDescriptionPage</class>
+ <extends>QTextBrowser</extends>
+ <header>ui/widgets/ProjectDescriptionPage.h</header>
+ </customwidget>
+ </customwidgets>
+ <tabstops>
+ <tabstop>searchEdit</tabstop>
+ <tabstop>searchButton</tabstop>
+ <tabstop>packView</tabstop>
+ <tabstop>packDescription</tabstop>
+ <tabstop>sortByBox</tabstop>
+ <tabstop>versionSelectionBox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>