mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-12 09:24:33 +00:00
Qt: Add 'Open Directory' button to post-processing settings
This commit is contained in:
@@ -45,6 +45,16 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="openDirectory">
|
||||
<property name="text">
|
||||
<string>Open Directory</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="folder-open-line"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="reload">
|
||||
<property name="text">
|
||||
@@ -185,7 +195,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>630</width>
|
||||
<height>237</height>
|
||||
<height>246</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
@@ -207,7 +217,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="resources/resources.qrc"/>
|
||||
<include location="resources/duckstation-qt.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "postprocessingsettingswidget.h"
|
||||
#include "qthost.h"
|
||||
#include "qtutils.h"
|
||||
#include "settingswindow.h"
|
||||
#include "settingwidgetbinder.h"
|
||||
|
||||
@@ -81,6 +82,8 @@ void PostProcessingChainConfigWidget::triggerSettingsReload()
|
||||
void PostProcessingChainConfigWidget::connectUi()
|
||||
{
|
||||
connect(m_ui.reload, &QPushButton::clicked, this, &PostProcessingChainConfigWidget::onReloadButtonClicked);
|
||||
connect(m_ui.openDirectory, &QPushButton::clicked, this,
|
||||
&PostProcessingChainConfigWidget::onOpenDirectoryButtonClicked);
|
||||
connect(m_ui.add, &QPushButton::clicked, this, &PostProcessingChainConfigWidget::onAddButtonClicked);
|
||||
connect(m_ui.remove, &QPushButton::clicked, this, &PostProcessingChainConfigWidget::onRemoveButtonClicked);
|
||||
connect(m_ui.clear, &QPushButton::clicked, this, &PostProcessingChainConfigWidget::onClearButtonClicked);
|
||||
@@ -270,6 +273,11 @@ void PostProcessingChainConfigWidget::onReloadButtonClicked()
|
||||
g_emu_thread->reloadPostProcessingShaders();
|
||||
}
|
||||
|
||||
void PostProcessingChainConfigWidget::onOpenDirectoryButtonClicked()
|
||||
{
|
||||
QtUtils::OpenURL(this, QUrl::fromLocalFile(QString::fromStdString(EmuFolders::Shaders)));
|
||||
}
|
||||
|
||||
void PostProcessingChainConfigWidget::onSelectedShaderChanged()
|
||||
{
|
||||
std::optional<u32> index = getSelectedIndex();
|
||||
|
||||
@@ -51,6 +51,7 @@ private:
|
||||
void onMoveUpButtonClicked();
|
||||
void onMoveDownButtonClicked();
|
||||
void onReloadButtonClicked();
|
||||
void onOpenDirectoryButtonClicked();
|
||||
void onSelectedShaderChanged();
|
||||
void triggerSettingsReload();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user