1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 12:12:50 +01:00

Qt: vfs tool dialog

This commit is contained in:
Megamouse 2024-08-14 19:38:38 +02:00
parent f5d8786ffd
commit 72cd146665
8 changed files with 216 additions and 0 deletions

View File

@ -416,6 +416,9 @@
<ClCompile Include="QTGeneratedFiles\Debug\moc_skylander_dialog.cpp"> <ClCompile Include="QTGeneratedFiles\Debug\moc_skylander_dialog.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="QTGeneratedFiles\Debug\moc_vfs_tool_dialog.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="QTGeneratedFiles\Debug\moc_syntax_highlighter.cpp"> <ClCompile Include="QTGeneratedFiles\Debug\moc_syntax_highlighter.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
@ -683,6 +686,9 @@
<ClCompile Include="QTGeneratedFiles\Release\moc_skylander_dialog.cpp"> <ClCompile Include="QTGeneratedFiles\Release\moc_skylander_dialog.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="QTGeneratedFiles\Release\moc_vfs_tool_dialog.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="QTGeneratedFiles\Release\moc_syntax_highlighter.cpp"> <ClCompile Include="QTGeneratedFiles\Release\moc_syntax_highlighter.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
@ -798,6 +804,7 @@
<ClCompile Include="rpcs3qt\vfs_dialog_path_widget.cpp" /> <ClCompile Include="rpcs3qt\vfs_dialog_path_widget.cpp" />
<ClCompile Include="rpcs3qt\vfs_dialog_usb_input.cpp" /> <ClCompile Include="rpcs3qt\vfs_dialog_usb_input.cpp" />
<ClCompile Include="rpcs3qt\vfs_dialog_usb_tab.cpp" /> <ClCompile Include="rpcs3qt\vfs_dialog_usb_tab.cpp" />
<ClCompile Include="rpcs3qt\vfs_tool_dialog.cpp" />
<ClCompile Include="rpcs3qt\_discord_utils.cpp" /> <ClCompile Include="rpcs3qt\_discord_utils.cpp" />
<ClCompile Include="rpcs3qt\find_dialog.cpp" /> <ClCompile Include="rpcs3qt\find_dialog.cpp" />
<ClCompile Include="rpcs3qt\game_compatibility.cpp" /> <ClCompile Include="rpcs3qt\game_compatibility.cpp" />
@ -1022,6 +1029,7 @@
<ClInclude Include="QTGeneratedFiles\ui_patch_manager_dialog.h" /> <ClInclude Include="QTGeneratedFiles\ui_patch_manager_dialog.h" />
<ClInclude Include="QTGeneratedFiles\ui_settings_dialog.h" /> <ClInclude Include="QTGeneratedFiles\ui_settings_dialog.h" />
<ClInclude Include="QTGeneratedFiles\ui_shortcut_dialog.h" /> <ClInclude Include="QTGeneratedFiles\ui_shortcut_dialog.h" />
<ClInclude Include="QTGeneratedFiles\ui_vfs_tool_dialog.h" />
<ClInclude Include="QTGeneratedFiles\ui_welcome_dialog.h" /> <ClInclude Include="QTGeneratedFiles\ui_welcome_dialog.h" />
<CustomBuild Include="rpcs3qt\about_dialog.h"> <CustomBuild Include="rpcs3qt\about_dialog.h">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
@ -1492,6 +1500,16 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DWIN32_LEAN_AND_MEAN -DHAVE_VULKAN -DWITH_DISCORD_RPC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DQT_CONCURRENT_LIB -DQT_MULTIMEDIA_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_SVG_LIB -D%(PreprocessorDefinitions) "-I.\..\3rdparty\SoundTouch\soundtouch\include" "-I.\..\3rdparty\cubeb\extra" "-I.\..\3rdparty\cubeb\cubeb\include" "-I.\..\3rdparty\flatbuffers\include" "-I.\..\3rdparty\wolfssl\wolfssl" "-I.\..\3rdparty\curl\curl\include" "-I.\..\3rdparty\libusb\libusb\libusb" "-I$(VULKAN_SDK)\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)" "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtMultimedia" "-I$(QTDIR)\include\QtMultimediaWidgets" "-I$(QTDIR)\include\QtSvg"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DWIN32_LEAN_AND_MEAN -DHAVE_VULKAN -DWITH_DISCORD_RPC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DQT_CONCURRENT_LIB -DQT_MULTIMEDIA_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_SVG_LIB -D%(PreprocessorDefinitions) "-I.\..\3rdparty\SoundTouch\soundtouch\include" "-I.\..\3rdparty\cubeb\extra" "-I.\..\3rdparty\cubeb\cubeb\include" "-I.\..\3rdparty\flatbuffers\include" "-I.\..\3rdparty\wolfssl\wolfssl" "-I.\..\3rdparty\curl\curl\include" "-I.\..\3rdparty\libusb\libusb\libusb" "-I$(VULKAN_SDK)\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)" "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtMultimedia" "-I$(QTDIR)\include\QtMultimediaWidgets" "-I$(QTDIR)\include\QtSvg"</Command>
</CustomBuild> </CustomBuild>
<CustomBuild Include="rpcs3qt\vfs_tool_dialog.h">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DWIN32_LEAN_AND_MEAN -DHAVE_VULKAN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DQT_CONCURRENT_LIB -DQT_MULTIMEDIA_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_SVG_LIB -D%(PreprocessorDefinitions) "-I.\..\3rdparty\SoundTouch\soundtouch\include" "-I.\..\3rdparty\cubeb\extra" "-I.\..\3rdparty\cubeb\cubeb\include" "-I.\..\3rdparty\flatbuffers\include" "-I.\..\3rdparty\wolfssl\wolfssl" "-I.\..\3rdparty\curl\curl\include" "-I.\..\3rdparty\libusb\libusb\libusb" "-I$(VULKAN_SDK)\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)" "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtMultimedia" "-I$(QTDIR)\include\QtMultimediaWidgets" "-I$(QTDIR)\include\QtSvg"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DWIN32_LEAN_AND_MEAN -DHAVE_VULKAN -DWITH_DISCORD_RPC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DQT_CONCURRENT_LIB -DQT_MULTIMEDIA_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_SVG_LIB -D%(PreprocessorDefinitions) "-I.\..\3rdparty\SoundTouch\soundtouch\include" "-I.\..\3rdparty\cubeb\extra" "-I.\..\3rdparty\cubeb\cubeb\include" "-I.\..\3rdparty\flatbuffers\include" "-I.\..\3rdparty\wolfssl\wolfssl" "-I.\..\3rdparty\curl\curl\include" "-I.\..\3rdparty\libusb\libusb\libusb" "-I$(VULKAN_SDK)\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)" "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(QTDIR)\include\QtConcurrent" "-I$(QTDIR)\include\QtMultimedia" "-I$(QTDIR)\include\QtMultimediaWidgets" "-I$(QTDIR)\include\QtSvg"</Command>
</CustomBuild>
<CustomBuild Include="rpcs3qt\screenshot_item.h"> <CustomBuild Include="rpcs3qt\screenshot_item.h">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs> <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing %(Identity)...</Message> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing %(Identity)...</Message>
@ -1963,6 +1981,16 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\QTGeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\QTGeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\uic.exe" -o ".\QTGeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command> <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\uic.exe" -o ".\QTGeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
</CustomBuild> </CustomBuild>
<CustomBuild Include="rpcs3qt\vfs_tool_dialog.ui">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Uic%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\QTGeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\uic.exe" -o ".\QTGeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Uic%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\QTGeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\uic.exe" -o ".\QTGeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
</CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\.cirrus.yml" /> <None Include="..\.cirrus.yml" />

View File

@ -972,6 +972,12 @@
<ClCompile Include="QTGeneratedFiles\Release\moc_shortcut_dialog.cpp"> <ClCompile Include="QTGeneratedFiles\Release\moc_shortcut_dialog.cpp">
<Filter>Generated Files\Release</Filter> <Filter>Generated Files\Release</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="QTGeneratedFiles\Debug\moc_vfs_tool_dialog.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="QTGeneratedFiles\Release\moc_vfs_tool_dialog.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="rpcs3qt\progress_indicator.cpp"> <ClCompile Include="rpcs3qt\progress_indicator.cpp">
<Filter>Gui\progress</Filter> <Filter>Gui\progress</Filter>
</ClCompile> </ClCompile>
@ -1101,6 +1107,9 @@
<ClCompile Include="module_verifier.cpp"> <ClCompile Include="module_verifier.cpp">
<Filter>rpcs3</Filter> <Filter>rpcs3</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="rpcs3qt\vfs_tool_dialog.cpp">
<Filter>Gui\vfs</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="Input\ds4_pad_handler.h"> <ClInclude Include="Input\ds4_pad_handler.h">
@ -1259,6 +1268,9 @@
<ClInclude Include="QTGeneratedFiles\ui_shortcut_dialog.h"> <ClInclude Include="QTGeneratedFiles\ui_shortcut_dialog.h">
<Filter>Generated Files</Filter> <Filter>Generated Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="QTGeneratedFiles\ui_vfs_tool_dialog.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="rpcs3qt\progress_indicator.h"> <ClInclude Include="rpcs3qt\progress_indicator.h">
<Filter>Gui\progress</Filter> <Filter>Gui\progress</Filter>
</ClInclude> </ClInclude>
@ -1561,6 +1573,9 @@
<CustomBuild Include="rpcs3qt\shortcut_dialog.ui"> <CustomBuild Include="rpcs3qt\shortcut_dialog.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</CustomBuild> </CustomBuild>
<CustomBuild Include="rpcs3qt\vfs_tool_dialog.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="rpcs3qt\system_cmd_dialog.h"> <CustomBuild Include="rpcs3qt\system_cmd_dialog.h">
<Filter>Gui\dev tools</Filter> <Filter>Gui\dev tools</Filter>
</CustomBuild> </CustomBuild>
@ -1600,6 +1615,9 @@
<CustomBuild Include="rpcs3qt\raw_mouse_settings_dialog.h"> <CustomBuild Include="rpcs3qt\raw_mouse_settings_dialog.h">
<Filter>Gui\settings</Filter> <Filter>Gui\settings</Filter>
</CustomBuild> </CustomBuild>
<CustomBuild Include="rpcs3qt\vfs_tool_dialog.h">
<Filter>Gui\vfs</Filter>
</CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Image Include="rpcs3.ico" /> <Image Include="rpcs3.ico" />

View File

@ -106,6 +106,7 @@ add_library(rpcs3_ui STATIC
vfs_dialog_tab.cpp vfs_dialog_tab.cpp
vfs_dialog_usb_input.cpp vfs_dialog_usb_input.cpp
vfs_dialog_usb_tab.cpp vfs_dialog_usb_tab.cpp
vfs_tool_dialog.cpp
welcome_dialog.cpp welcome_dialog.cpp
about_dialog.ui about_dialog.ui

View File

@ -38,6 +38,7 @@
#include "emulated_pad_settings_dialog.h" #include "emulated_pad_settings_dialog.h"
#include "basic_mouse_settings_dialog.h" #include "basic_mouse_settings_dialog.h"
#include "raw_mouse_settings_dialog.h" #include "raw_mouse_settings_dialog.h"
#include "vfs_tool_dialog.h"
#include "welcome_dialog.h" #include "welcome_dialog.h"
#include <thread> #include <thread>
@ -3017,6 +3018,12 @@ void main_window::CreateConnects()
connect(ui->toolsExtractTARAct, &QAction::triggered, this, &main_window::ExtractTar); connect(ui->toolsExtractTARAct, &QAction::triggered, this, &main_window::ExtractTar);
connect(ui->toolsVfsDialogAct, &QAction::triggered, this, [this]()
{
vfs_tool_dialog* dlg = new vfs_tool_dialog(this);
dlg->show();
});
connect(ui->showDebuggerAct, &QAction::triggered, this, [this](bool checked) connect(ui->showDebuggerAct, &QAction::triggered, this, [this](bool checked)
{ {
checked ? m_debugger_frame->show() : m_debugger_frame->hide(); checked ? m_debugger_frame->show() : m_debugger_frame->hide();

View File

@ -301,6 +301,7 @@
<addaction name="toolsRsxDebuggerAct"/> <addaction name="toolsRsxDebuggerAct"/>
<addaction name="toolsSystemCommandsAct"/> <addaction name="toolsSystemCommandsAct"/>
<addaction name="patchCreatorAct"/> <addaction name="patchCreatorAct"/>
<addaction name="toolsVfsDialogAct"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="toolsDecryptSprxLibsAct"/> <addaction name="toolsDecryptSprxLibsAct"/>
<addaction name="separator"/> <addaction name="separator"/>
@ -1366,6 +1367,11 @@
<string>Raw Mouse</string> <string>Raw Mouse</string>
</property> </property>
</action> </action>
<action name="toolsVfsDialogAct">
<property name="text">
<string>VFS Tool</string>
</property>
</action>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<resources> <resources>

View File

@ -0,0 +1,44 @@
#include "stdafx.h"
#include "vfs_tool_dialog.h"
#include "ui_vfs_tool_dialog.h"
#include "Emu/VFS.h"
vfs_tool_dialog::vfs_tool_dialog(QWidget *parent)
: QDialog(parent)
, ui(new Ui::vfs_tool_dialog)
{
setAttribute(Qt::WA_DeleteOnClose);
ui->setupUi(this);
connect(ui->pathEdit, &QLineEdit::textChanged, this, &vfs_tool_dialog::handle_vfs_path);
handle_vfs_path("");
}
vfs_tool_dialog::~vfs_tool_dialog()
{
}
void vfs_tool_dialog::handle_vfs_path(const QString& path)
{
const std::string spath = path.toStdString();
const std::string vfs_get_path = vfs::get(spath);
const std::string vfs_retrieve_path = vfs::retrieve(spath);
const std::string vfs_escape_path = vfs::escape(spath);
const std::string vfs_unescape_path = vfs::unescape(spath);
const std::string result = fmt::format(
"Path:\n'%s'\n\n"
"vfs::get:\n'%s'\n\n"
"vfs::retrieve:\n'%s'\n\n"
"vfs::escape:\n'%s'\n\n"
"vfs::unescape:\n'%s'",
spath,
vfs_get_path,
vfs_retrieve_path,
vfs_escape_path,
vfs_unescape_path
);
ui->resultEdit->setPlainText(QString::fromStdString(result));
}

View File

@ -0,0 +1,23 @@
#pragma once
#include <QDialog>
namespace Ui
{
class vfs_tool_dialog;
}
class vfs_tool_dialog : public QDialog
{
Q_OBJECT
public:
vfs_tool_dialog(QWidget *parent);
virtual ~vfs_tool_dialog();
private:
std::unique_ptr<Ui::vfs_tool_dialog> ui;
private Q_SLOTS:
void handle_vfs_path(const QString& path);
};

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>vfs_tool_dialog</class>
<widget class="QDialog" name="vfs_tool_dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
<string>VFS Tool</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Path</string>
</property>
<layout class="QVBoxLayout" name="pathLayout">
<item>
<widget class="QLineEdit" name="pathEdit">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Result</string>
</property>
<layout class="QVBoxLayout" name="resultLayout">
<item>
<widget class="QTextEdit" name="resultEdit">
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="undoRedoEnabled">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="buttonBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin" stdset="0">
<number>0</number>
</property>
<item>
<spacer name="spacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>131</width>
<height>31</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>